|
|
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:
|
Constructs a KURLRequester widget with the default URL url
Parameters:
|
Special constructor, which creates a KURLRequester widget with a custom edit-widget. The edit-widget can be either a KComboBox or a KLineEdit (or inherited thereof). Note: for geometry management reasons, the edit-widget is reparented to have the KURLRequester as parent.
Parameters:
~ |
Destructs the KURLRequester
void |
Sets the url in the lineedit to url.
Depending on the state of
showLocalProtocol(), file:/ on local files will be shown or not.
QString |
[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 virtual]
Returns: a pointer to the filedialog You can use this to customize the dialog, e.g. to specify a filter. Never returns 0L.
KLineEdit * |
[const]
It is provided so that you can e.g. set an own completion object (e.g. KShellCompletion) into it.
Returns: a pointer to the lineedit, either the default one, or the special one, if you used the special constructor.
KComboBox * |
[const]
Returns: a pointer to the combobox, in case you have set one using the special constructor. Returns 0L otherwise.
QPushButton * |
[const]
Returns: a pointer to the pushbutton. It is provided so that you can specify an own pixmap or a text, if you really need to.
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]
KLineEdit * |
[protected]
QPushButton * |
[protected]
KURLCompletion * |
[protected]
bool |
[protected]
void |
[protected slot]
Called when the button is pressed to open the filedialog. Also called when KStdAccel::Open (default is Ctrl-O) is pressed.