FileDialog
Public Types | |
enum class | Modes { Open , Save } |
Properties | |
alias | browser |
var | callback |
alias | currentPath |
int | mode |
bool | searchBar |
alias | selectionBar |
alias | singleSelection |
string | suggestedFileName |
alias | textField |
Signals | |
void | finished (var urls) |
void | urlsSelected (var urls) |
Detailed Description
A dialog to quickly select files for opening or saving.
This controls inherits from MauiKit PopupPage, to checkout its inherited properties refer to the docs.
- See also
- MauiKit::PopupPage
- Note
- This component makes use of the FileBrowser.
The FileDialog can be in two modes, one for Opening and other for Saving files.
The file dialog allows to have multiple or single selection, and filtering content specific to a file type or arbitrary name filters.
You can find a more complete example at this link.
Definition at line 98 of file FileDialog.qml.
Member Enumeration Documentation
◆ Modes
|
strong |
The two different modes to use with this dialog.
Enumerator | |
---|---|
Open | To use this dialog for selecting one or multiple entries for opening. |
Save | To use this dialog to select a single directory where to save a file entry with a given name. |
Definition at line 145 of file FileDialog.qml.
Property Documentation
◆ browser
|
read |
The FileBrowser used for listing.
- Remarks
- This property is read-only
For more details on how it works check its documentation.
Definition at line 117 of file FileDialog.qml.
◆ callback
|
read |
A callback function that will be invoked once the user is done selecting the files.
This is useful when the file dialog is going to be used for multiple purposes. Otherwise you might want to use the urlsSelected
signal.
- See also
- urlsSelected
Definition at line 167 of file FileDialog.qml.
◆ currentPath
|
read |
The current path of the directory URL.
- See also
- FileBrowser::currentPath
Definition at line 110 of file FileDialog.qml.
◆ mode
|
read |
The current mode in use.
By default this is set to FileDialog.Modes.Open
- See also
- Modes
Definition at line 160 of file FileDialog.qml.
◆ searchBar
|
read |
Show the search bar to enter a search query.
Definition at line 138 of file FileDialog.qml.
◆ selectionBar
|
read |
- Remarks
- This property is read-only
- See also
- FileBrowser::selectionBar This control already has a predefined SelectionBar, and can be accessed via this alias.
Definition at line 124 of file FileDialog.qml.
◆ singleSelection
|
read |
If true then only one item can be selected, either for saving or for opening.
Definition at line 129 of file FileDialog.qml.
◆ suggestedFileName
|
read |
On save mode a text field is visible and this property is used to assign its default text value.
By default this is set to empty string
Definition at line 134 of file FileDialog.qml.
◆ textField
|
read |
On Save mode a text field is visible, this property gives access to it.
- Remarks
- This property is read-only
Definition at line 172 of file FileDialog.qml.
Member Function Documentation
◆ finished
|
signal |
Emitted once the selection has been done.
- Parameters
-
urls the selected list of URLs
◆ urlsSelected
|
signal |
Emitted once the URLs have been selected.
- Parameters
-
urls the selected list of URLs
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.