|
|
This class is a widget showing a lineedit and a button, which invokes a filedialog. File completion is available in the lineedit.
The defaults for the filedialog are to ask for one existing local file, i.e. KFileDialog::setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ) The default filter is "*", i.e. show all files, and the start directory is the current working directory, or the last directory where a file has been selected.
You can change this behavior by obtaining a pointer to the dialog (fileDialog()) and calling the appropriate methods.
|
Constructs a KURLRequester widget
Parameters:
modal | specifies whether the filedialog should be opened as modal or not. |
|
Constructs a KURLRequester widget with the default URL @param url
Parameters:
modal | specifies whether the filedialog should be opened as modal or not. |
~ |
Destructs the KURLRequester
void |
Sets the url in the lineedit to @param url. Depending on the state of showLocalProtocol(), file:/ on local files will be shown or not.
KURL |
[const]
Returns: the current url in the lineedit. May be malformed, if the user entered something weird.
void |
Enables/disables showing file:/ in the lineedit, when a local file has been selected in the filedialog or was set via setURL(). Default is false, not showing file:/
bool |
[const]
Returns: whether local files will be prefixed with file:/ in the lineedit
KFileDialog * |
[const]
Returns: a pointer to the filedialog You can use this to customize the dialog, e.g. to specify a filter. Never returns 0L.
void |
[signal]
Emitted when the text in the lineedit changes. The parameter contains the contents of the lineedit.
void |
[signal]
Emitted when return or enter was pressed in the lineedit.
void |
[signal]
Emitted when return or enter was pressed in the lineedit. The parameter contains the contents of the lineedit.
void |
[protected slot]
Called when the button is pressed to open the filedialog. Also called when KStdAccel::Open (default is Ctrl-O) is pressed.