Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add @since tags to promptOpen*/promptSave* scripting methods, add link to FileFilter from FileEdit.filter #3853

Merged
merged 1 commit into from
Dec 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/scripting-doc/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4014,6 +4014,7 @@ declare namespace tiled {
* Optionally override the starting directory of the dialog or its title.
*
* Returns the absolute path of the chosen directory, or an empty string if the user cancels the dialog.
* @since 1.10.2
*/
export function promptDirectory(defaultDir?: string, title?: string): string;

Expand All @@ -4023,6 +4024,7 @@ declare namespace tiled {
* You can also restrict to only certain file types by specifying {@link FileFilter|filters}.
*
* Returns an array of the absolute paths of the chosen files, or an empty array if the user cancels the dialog.
* @since 1.10.2
*/
export function promptOpenFiles(defaultDir?: string, filters?: FileFilter, title?: string): string[];

Expand All @@ -4032,6 +4034,7 @@ declare namespace tiled {
* You can also restrict to only certain file types by specifying {@link FileFilter|filters}.
*
* Returns the absolute path of the chosen file, or an empty string if the user cancels the dialog.
* @since 1.10.2
*/
export function promptOpenFile(defaultDir?: string, filters?: FileFilter, title?: string): string;

Expand All @@ -4042,6 +4045,7 @@ declare namespace tiled {
* You can also restrict to only certain file types by specifying {@link FileFilter|filters}.
*
* Returns the absolute path of the chosen file, or an empty string if the user cancels the dialog.
* @since 1.10.2
*/
export function promptSaveFile(defaultDir?: string, filters?: string, title?: string): string;

Expand Down Expand Up @@ -4498,7 +4502,7 @@ declare class FileEdit extends Qt.QWidget {
isDirectory: boolean;

/**
* When specified, only files that match the filter are shown.
* When specified, only files that match the {@link FileFilter|filter} are shown.
*/
filter: FileFilter;
}
Expand Down