org.kde.koala

Class KFileDialog

public class KFileDialog extends KDialogBase

Provides a user (and developer) friendly way to select files and directories. The widget can be used as a drop in replacement for the QFileDialog widget, but has greater functionality and a nicer GUI. You will usually want to use one of the static methods getOpenFileName(), getSaveFileName(), getOpenURL() or for multiple files getOpenFileNames() or getOpenURLs(). The dialog has been designed to allow applications to customise it by subclassing. It uses geometry management to ensure that subclasses can easily add children that will be incorporated into the layout. \image html kfiledialog.png "KDE File Dialog" See KFileDialogSignals for signals emitted by KFileDialog

Author: Richard J. Moore , Carsten Pfeiffer

UNKNOWN: A file selection dialog.

Field Summary
static intOpening
static intOther
Defines some default behavior of the filedialog.
static intSaving
Constructor Summary
protected KFileDialog(Class dummy)
KFileDialog(String startDir, String filter, QWidget parent, String name, boolean modal)
Constructs a file dialog.
KFileDialog(String startDir, String filter, QWidget parent, String name, boolean modal, QWidget widget)
Constructs a file dialog.
Method Summary
protected voidaccept()
KActionCollectionactionCollection()
protected voidaddToRecentDocuments()
KURLbaseURL()
KPushButtoncancelButton()
StringclassName()
voidclearFilter()
Clears any mime- or namefilter.
StringcurrentFilter()
Returns the current filter as entered by the user or one of the predefined set via setFilter().
protected StringcurrentFilterExtension()
Returns the filename extension associated with the currentFilter(). null is returned if an extension is not available or if operationMode() !
StringcurrentMimeFilter()
The mimetype for the desired output format.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidenterURL(KURL url)
protected voidenterURL(String url)
protected voidfileCompletion(String arg1)
protected voidfileHighlighted(KFileItem i)
protected voidfileSelected(KFileItem i)
protected voidfinalize()
Deletes the wrapped C++ instance
protected KURLgetCompleteURL(String arg1)
Returns the absolute version of the URL specified in locationEdit.
static StringgetExistingDirectory(String startDir, QWidget parent, String caption)
Creates a modal file dialog and returns the selected directory or an empty string if none was chosen.
static StringgetExistingDirectory(String startDir, QWidget parent)
static StringgetExistingDirectory(String startDir)
static StringgetExistingDirectory()
static KURLgetExistingURL(String startDir, QWidget parent, String caption)
Creates a modal file dialog and returns the selected directory or an empty string if none was chosen.
static KURLgetExistingURL(String startDir, QWidget parent)
static KURLgetExistingURL(String startDir)
static KURLgetExistingURL()
static KURLgetImageOpenURL(String startDir, QWidget parent, String caption)
Creates a modal file dialog with an image previewer and returns the selected url or an empty string if none was chosen.
static KURLgetImageOpenURL(String startDir, QWidget parent)
static KURLgetImageOpenURL(String startDir)
static KURLgetImageOpenURL()
static StringgetOpenFileName(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and return the selected filename or an empty string if none was chosen.
static StringgetOpenFileName(String startDir, String filter, QWidget parent)
static StringgetOpenFileName(String startDir, String filter)
static StringgetOpenFileName(String startDir)
static StringgetOpenFileName()
static ArrayListgetOpenFileNames(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and returns the selected filenames or an empty list if none was chosen.
static ArrayListgetOpenFileNames(String startDir, String filter, QWidget parent)
static ArrayListgetOpenFileNames(String startDir, String filter)
static ArrayListgetOpenFileNames(String startDir)
static ArrayListgetOpenFileNames()
static StringgetOpenFileNameWId(String startDir, String filter, long parent_id, String caption)
Use this version only if you have no QWidget available as parent widget.
static KURLgetOpenURL(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and returns the selected URL or an empty string if none was chosen.
static KURLgetOpenURL(String startDir, String filter, QWidget parent)
static KURLgetOpenURL(String startDir, String filter)
static KURLgetOpenURL(String startDir)
static KURLgetOpenURL()
static ArrayListgetOpenURLs(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and returns the selected URLs or an empty list if none was chosen.
static ArrayListgetOpenURLs(String startDir, String filter, QWidget parent)
static ArrayListgetOpenURLs(String startDir, String filter)
static ArrayListgetOpenURLs(String startDir)
static ArrayListgetOpenURLs()
static StringgetSaveFileName(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and returns the selected filename or an empty string if none was chosen.
static StringgetSaveFileName(String startDir, String filter, QWidget parent)
static StringgetSaveFileName(String startDir, String filter)
static StringgetSaveFileName(String startDir)
static StringgetSaveFileName()
static StringgetSaveFileNameWId(String dir, String filter, long parent_id, String caption)
This function accepts the window id of the parent window, instead of QWidget.
static KURLgetSaveURL(String startDir, String filter, QWidget parent, String caption)
Creates a modal file dialog and returns the selected filename or an empty string if none was chosen.
static KURLgetSaveURL(String startDir, String filter, QWidget parent)
static KURLgetSaveURL(String startDir, String filter)
static KURLgetSaveURL(String startDir)
static KURLgetSaveURL()
static KURLgetStartURL(String startDir, StringBuffer recentDirClass)
This method implements the logic to determine the user's default directory to be listed.
protected voidinit(String startDir, String filter, QWidget widget)
Perform basic initialization tasks.
protected voidinitGUI()
rebuild geometry management.
protected voidinitSpeedbar()
booleanisDisposed()
Has the wrapped C++ instance been deleted?
booleankeepsLocation()
protected voidkeyPressEvent(QKeyEvent e)
Reimplemented to animate the cancel button.
protected voidlocationActivated(String url)
QMetaObjectmetaObject()
intmode()
Returns the mode of the filedialog.
protected voidmultiSelectionChanged()
called when an item is highlighted/selected in multiselection mode. handles setting the locationEdit.
KPushButtonokButton()
intoperationMode()
protected ArrayListparseSelectedURLs()
intpathComboIndex()
protected voidreadConfig(KConfig arg1, String group)
Reads configuration and applies it (size, recent directories, ...)
protected voidreadConfig(KConfig arg1)
protected voidreadRecentFiles(KConfig arg1)
Reads the recent used files and inserts them into the location combobox
protected voidsaveRecentFiles(KConfig arg1)
Saves the entries from the location combobox.
StringselectedFile()
Returns the full path of the selected file in the local filesystem.
ArrayListselectedFiles()
Returns a list of all selected local files.
KURLselectedURL()
ArrayListselectedURLs()
voidsetFilter(String filter)
Sets the filter to be used to filter. You can set more filters for the user to select separated by '\n'.
voidsetKeepLocation(boolean keep)
Sets whether the filename/url should be kept when changing directories.
voidsetLocationLabel(String text)
Sets the text to be displayed in front of the selection.
voidsetMimeFilter(String[] types, String defaultType)
Sets the filter up to specify the output type.
voidsetMimeFilter(String[] types)
voidsetMode(int m)
Convenient overload of the other setMode(unsigned int) method.
voidsetOperationMode(int arg1)
Sets the operational mode of the filedialog to Saving, Opening or Other. This will set some flags that are specific to loading or saving files.
voidsetPreviewWidget(KPreviewWidgetBase w)
Adds a preview widget and enters the preview mode.
voidsetSelection(String name)
Sets the file name to preselect to name This takes absolute URLs and relative file names.
static voidsetStartDir(KURL directory)
Used by KDirSelectDialog to share the dialog's start directory.
voidsetURL(KURL url, boolean clearforward)
Sets the directory to view.
voidsetURL(KURL url)
voidshow()
protected voidslotAutoSelectExtClicked()
protected voidslotCancel()
protected voidslotFilterChanged()
protected voidslotLoadingFinished()
protected voidslotOk()
protected voidslotStatResult(Job job)
KURLBarspeedBar()
Note that this method may return a null-pointer if the user configured to not use the speed-bar.
protected voidtoggleBookmarks(boolean show)
protected voidtoggleSpeedbar(boolean arg1)
protected ArrayListtokenize(String line)
Parses the string "line" for files.
KToolBartoolBar()
Returns a pointer to the toolbar.
protected voidupdateAutoSelectExtension()
Updates the currentFilterExtension and the availability of the Automatically Select Extension Checkbox (visible if operationMode() == Saving and enabled if an extension _will_ be associated with the currentFilter(), _after_ this call).
protected voidurlEntered(KURL arg1)
protected voidwriteConfig(KConfig arg1, String group)
Saves the current configuration
protected voidwriteConfig(KConfig arg1)

Field Detail

Opening

public static final int Opening

Other

public static final int Other
Defines some default behavior of the filedialog. E.g. in mode Opening and Saving, the selected files/urls will be added to the "recent documents" list. The Saving mode also implies setKeepLocation() being set. Other means that no default actions are performed.

See Also: KFileDialog KFileDialog

UNKNOWN: Defines some default behavior of the filedialog.

Saving

public static final int Saving

Constructor Detail

KFileDialog

protected KFileDialog(Class dummy)

KFileDialog

public KFileDialog(String startDir, String filter, QWidget parent, String name, boolean modal)
Constructs a file dialog.

Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter A shell glob or a mime-type-filter that specifies which files to display. parent The parent widget of this dialog name The name of this object modal Whether to create a modal dialog or not See setFilter() for details on how to use this argument.

    UNKNOWN: Constructs a file dialog.

    KFileDialog

    public KFileDialog(String startDir, String filter, QWidget parent, String name, boolean modal, QWidget widget)
    Constructs a file dialog. The parameters here are identical to the first constructor except for the addition of a QWidget parameter. Historical note: The original version of KFileDialog did not have this extra parameter. It was added later, and, in order to maintain binary compatibility, it was placed in a new constructor instead of added to the original one.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter A shell glob or a mime-type-filter that specifies which files to display. See setFilter() for details on how to use this argument. widget A widget, or a widget of widgets, for displaying custom data in the dialog. This can be used, for example, to display a check box with the caption "Open as read-only". When creating this widget, you don't need to specify a parent, since the widget's parent will be set automatically by KFileDialog. parent The parent widget of this dialog name The name of this object modal Whether to create a modal dialog or not

    UNKNOWN: Constructs a file dialog.

    Method Detail

    accept

    protected void accept()

    actionCollection

    public KActionCollection actionCollection()

    Returns: a pointer to the action collection, holding all the used KActions.

    UNKNOWN:

    addToRecentDocuments

    protected void addToRecentDocuments()

    baseURL

    public KURL baseURL()

    Returns: the currently shown directory.

    UNKNOWN:

    cancelButton

    public KPushButton cancelButton()

    Returns: a pointer to the Cancel-Button in the filedialog. You may use it e.g. to set a custom text to it.

    UNKNOWN:

    className

    public String className()

    clearFilter

    public void clearFilter()
    Clears any mime- or namefilter. Does not reload the directory.

    UNKNOWN: Clears any mime- or namefilter.

    currentFilter

    public String currentFilter()
    Returns the current filter as entered by the user or one of the predefined set via setFilter().

    See Also: KFileDialog KFileDialog

    UNKNOWN: Returns the current filter as entered by the user or one of the predefined set via setFilter().

    currentFilterExtension

    protected String currentFilterExtension()
    Returns the filename extension associated with the currentFilter(). null is returned if an extension is not available or if operationMode() != Saving.

    UNKNOWN: Returns the filename extension associated with the currentFilter().

    currentMimeFilter

    public String currentMimeFilter()
    The mimetype for the desired output format. This is only valid if setMimeFilter() has been called previously.

    See Also: KFileDialog

    UNKNOWN: The mimetype for the desired output format.

    dispose

    public void dispose()
    Delete the wrapped C++ instance ahead of finalize()

    enterURL

    protected void enterURL(KURL url)

    enterURL

    protected void enterURL(String url)

    fileCompletion

    protected void fileCompletion(String arg1)

    fileHighlighted

    protected void fileHighlighted(KFileItem i)

    fileSelected

    protected void fileSelected(KFileItem i)

    finalize

    protected void finalize()
    Deletes the wrapped C++ instance

    getCompleteURL

    protected KURL getCompleteURL(String arg1)
    Returns the absolute version of the URL specified in locationEdit.

    UNKNOWN: Returns the absolute version of the URL specified in locationEdit.

    getExistingDirectory

    public static String getExistingDirectory(String startDir, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected directory or an empty string if none was chosen.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected directory or an empty string if none was chosen.

    getExistingDirectory

    public static String getExistingDirectory(String startDir, QWidget parent)

    getExistingDirectory

    public static String getExistingDirectory(String startDir)

    getExistingDirectory

    public static String getExistingDirectory()

    getExistingURL

    public static KURL getExistingURL(String startDir, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected directory or an empty string if none was chosen. Contrary to getExistingDirectory(), this method allows the selection of a remote directory.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected directory or an empty string if none was chosen.

    getExistingURL

    public static KURL getExistingURL(String startDir, QWidget parent)

    getExistingURL

    public static KURL getExistingURL(String startDir)

    getExistingURL

    public static KURL getExistingURL()

    getImageOpenURL

    public static KURL getImageOpenURL(String startDir, QWidget parent, String caption)
    Creates a modal file dialog with an image previewer and returns the selected url or an empty string if none was chosen.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog with an image previewer and returns the selected url or an empty string if none was chosen.

    getImageOpenURL

    public static KURL getImageOpenURL(String startDir, QWidget parent)

    getImageOpenURL

    public static KURL getImageOpenURL(String startDir)

    getImageOpenURL

    public static KURL getImageOpenURL()

    getOpenFileName

    public static String getOpenFileName(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and return the selected filename or an empty string if none was chosen. Note that with this method the user must select an existing filename.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and return the selected filename or an empty string if none was chosen.

    getOpenFileName

    public static String getOpenFileName(String startDir, String filter, QWidget parent)

    getOpenFileName

    public static String getOpenFileName(String startDir, String filter)

    getOpenFileName

    public static String getOpenFileName(String startDir)

    getOpenFileName

    public static String getOpenFileName()

    getOpenFileNames

    public static ArrayList getOpenFileNames(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected filenames or an empty list if none was chosen. Note that with this method the user must select an existing filename.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected filenames or an empty list if none was chosen.

    getOpenFileNames

    public static ArrayList getOpenFileNames(String startDir, String filter, QWidget parent)

    getOpenFileNames

    public static ArrayList getOpenFileNames(String startDir, String filter)

    getOpenFileNames

    public static ArrayList getOpenFileNames(String startDir)

    getOpenFileNames

    public static ArrayList getOpenFileNames()

    getOpenFileNameWId

    public static String getOpenFileNameWId(String startDir, String filter, long parent_id, String caption)
    Use this version only if you have no QWidget available as parent widget. This can be the case if the parent widget is a widget in another process or if the parent widget is a non-Qt widget. For example, in a GTK program.

    UNKNOWN: Use this version only if you have no QWidget available as parent widget.

    getOpenURL

    public static KURL getOpenURL(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected URL or an empty string if none was chosen. Note that with this method the user must select an existing URL.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected URL or an empty string if none was chosen.

    getOpenURL

    public static KURL getOpenURL(String startDir, String filter, QWidget parent)

    getOpenURL

    public static KURL getOpenURL(String startDir, String filter)

    getOpenURL

    public static KURL getOpenURL(String startDir)

    getOpenURL

    public static KURL getOpenURL()

    getOpenURLs

    public static ArrayList getOpenURLs(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected URLs or an empty list if none was chosen. Note that with this method the user must select an existing filename.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected URLs or an empty list if none was chosen.

    getOpenURLs

    public static ArrayList getOpenURLs(String startDir, String filter, QWidget parent)

    getOpenURLs

    public static ArrayList getOpenURLs(String startDir, String filter)

    getOpenURLs

    public static ArrayList getOpenURLs(String startDir)

    getOpenURLs

    public static ArrayList getOpenURLs()

    getSaveFileName

    public static String getSaveFileName(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected filename or an empty string if none was chosen. Note that with this method the user need not select an existing filename.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • a relative path or a filename determining the directory to start in and the file to be selected.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected filename or an empty string if none was chosen.

    getSaveFileName

    public static String getSaveFileName(String startDir, String filter, QWidget parent)

    getSaveFileName

    public static String getSaveFileName(String startDir, String filter)

    getSaveFileName

    public static String getSaveFileName(String startDir)

    getSaveFileName

    public static String getSaveFileName()

    getSaveFileNameWId

    public static String getSaveFileNameWId(String dir, String filter, long parent_id, String caption)
    This function accepts the window id of the parent window, instead of QWidget. It should be used only when necessary.

    UNKNOWN: This function accepts the window id of the parent window, instead of QWidget .

    getSaveURL

    public static KURL getSaveURL(String startDir, String filter, QWidget parent, String caption)
    Creates a modal file dialog and returns the selected filename or an empty string if none was chosen. Note that with this method the user need not select an existing filename.

    Parameters: startDir This can either be

  • The URL of the directory to start in.
  • a relative path or a filename determining the directory to start in and the file to be selected.
  • null to start in the current working directory, or the last directory where a file has been selected.
  • ':<keyword>' to start in the directory last used by a filedialog in the same application that specified the same keyword.
  • '.<keyword>' to start in the directory last used by a filedialog in any application that specified the same keyword.
  • filter This is a space separated list of shell globs. You can set the text to be displayed for the glob, and provide multiple globs. See setFilter() for details on how to do this... parent The widget the dialog will be centered on initially. caption The name of the dialog widget.

    UNKNOWN: Creates a modal file dialog and returns the selected filename or an empty string if none was chosen.

    getSaveURL

    public static KURL getSaveURL(String startDir, String filter, QWidget parent)

    getSaveURL

    public static KURL getSaveURL(String startDir, String filter)

    getSaveURL

    public static KURL getSaveURL(String startDir)

    getSaveURL

    public static KURL getSaveURL()

    getStartURL

    public static KURL getStartURL(String startDir, StringBuffer recentDirClass)
    This method implements the logic to determine the user's default directory to be listed. E.g. the documents direcory, home directory or a recently used directory.

    Parameters: startDir A url/directory, to be used. May use the ':' and '.' syntax as documented in the KFileDialog() constructor. recentDirClass If the ':' or '.' syntax is used, recentDirClass will contain the string to be used later for KRecentDir.dir()

    Returns: The URL that should be listed by default (e.g. by KFileDialog or KDirSelectDialog).

    UNKNOWN: This method implements the logic to determine the user's default directory to be listed.

    init

    protected void init(String startDir, String filter, QWidget widget)
    Perform basic initialization tasks. Called by constructors.

    UNKNOWN: Perform basic initialization tasks.

    initGUI

    protected void initGUI()
    rebuild geometry management.

    UNKNOWN: rebuild geometry management.

    initSpeedbar

    protected void initSpeedbar()

    isDisposed

    public boolean isDisposed()
    Has the wrapped C++ instance been deleted?

    keepsLocation

    public boolean keepsLocation()

    Returns: whether the contents of the location edit are kept when changing directories.

    UNKNOWN:

    keyPressEvent

    protected void keyPressEvent(QKeyEvent e)
    Reimplemented to animate the cancel button.

    UNKNOWN: Reimplemented to animate the cancel button.

    locationActivated

    protected void locationActivated(String url)

    metaObject

    public QMetaObject metaObject()

    mode

    public int mode()
    Returns the mode of the filedialog.

    See Also: KFileDialog

    UNKNOWN: Returns the mode of the filedialog.

    multiSelectionChanged

    protected void multiSelectionChanged()
    called when an item is highlighted/selected in multiselection mode. handles setting the locationEdit.

    UNKNOWN: called when an item is highlighted/selected in multiselection mode.

    okButton

    public KPushButton okButton()

    Returns: a pointer to the OK-Button in the filedialog. You may use it e.g. to set a custom text to it.

    UNKNOWN:

    operationMode

    public int operationMode()

    Returns: the current operation mode, Opening, Saving or Other. Default is Other.

    See Also: KFileDialog KFileDialog

    UNKNOWN:

    parseSelectedURLs

    protected ArrayList parseSelectedURLs()

    pathComboIndex

    public int pathComboIndex()

    Returns: the index of the path combobox so when inserting widgets into the dialog (e.g. subclasses) they can do so without hardcoding in an index

    UNKNOWN:

    readConfig

    protected void readConfig(KConfig arg1, String group)
    Reads configuration and applies it (size, recent directories, ...)

    UNKNOWN: Reads configuration and applies it (size, recent directories, .

    readConfig

    protected void readConfig(KConfig arg1)

    readRecentFiles

    protected void readRecentFiles(KConfig arg1)
    Reads the recent used files and inserts them into the location combobox

    UNKNOWN: Reads the recent used files and inserts them into the location combobox

    saveRecentFiles

    protected void saveRecentFiles(KConfig arg1)
    Saves the entries from the location combobox.

    UNKNOWN: Saves the entries from the location combobox.

    selectedFile

    public String selectedFile()
    Returns the full path of the selected file in the local filesystem. (Local files only)

    UNKNOWN: Returns the full path of the selected file in the local filesystem.

    selectedFiles

    public ArrayList selectedFiles()
    Returns a list of all selected local files.

    UNKNOWN: Returns a list of all selected local files.

    selectedURL

    public KURL selectedURL()

    Returns: The selected fully qualified filename.

    UNKNOWN:

    selectedURLs

    public ArrayList selectedURLs()

    Returns: The list of selected URLs.

    UNKNOWN:

    setFilter

    public void setFilter(String filter)
    Sets the filter to be used to filter. You can set more filters for the user to select separated by '\n'. Every filter entry is defined through namefilter|text to diplay. If no | is found in the expression, just the namefilter is shown. Examples:
    		 kfile.setFilter("*.cpp|C++ Source Files\n.h|Header files");
    		 kfile.setFilter("*.cpp");
    		 kfile.setFilter("*.cpp|Sources (.cpp)");
    		 kfile.setFilter("*.cpp|" + i18n("Sources (.cpp)"));
    		 kfile.setFilter("*.cpp .cc .C|C++ Source Files\n.h .H|Header files");
    		 
    Note: The text to display is not parsed in any way. So, if you want to show the suffix to select by a specific filter, you must repeat it. If the filter contains an unescaped '/', a mimetype-filter is assumed. If you would like a '/' visible in your filter it can be escaped with a '\'. You can specify multiple mimetypes like this (separated with space):
    		 kfile.setFilter( "image/png text/html text/plain" );
    		 kfile.setFilter( "*.cue|CUE\\/BIN Files (.cue)" );
    		 

    See Also: KFileDialog KFileDialog

    UNKNOWN: Sets the filter to be used to filter.

    setKeepLocation

    public void setKeepLocation(boolean keep)
    Sets whether the filename/url should be kept when changing directories. This is for example useful when having a predefined filename where the full path for that file is searched. This is implicitly set when operationMode() is KFileDialog.Saving getSaveFileName() and getSaveURL() set this to true by default, so that you can type in the filename and change the directory without having to type the name again.

    UNKNOWN: Sets whether the filename/url should be kept when changing directories.

    setLocationLabel

    public void setLocationLabel(String text)
    Sets the text to be displayed in front of the selection. The default is "Location". Most useful if you want to make clear what the location is used for.

    UNKNOWN: Sets the text to be displayed in front of the selection.

    setMimeFilter

    public void setMimeFilter(String[] types, String defaultType)
    Sets the filter up to specify the output type.

    Parameters: types a list of mimetypes that can be used as output format defaultType the default mimetype to use as output format, if any. If defaultType is set, it will be set as the current item. Otherwise, a first item showing all the mimetypes will be created. Typically, defaultType should be empty for loading and set for saving. Do not use in conjunction with setFilter()

    UNKNOWN: Sets the filter up to specify the output type.

    setMimeFilter

    public void setMimeFilter(String[] types)

    setMode

    public void setMode(int m)
    Convenient overload of the other setMode(unsigned int) method.

    UNKNOWN: Convenient overload of the other setMode(unsigned int) method.

    setOperationMode

    public void setOperationMode(int arg1)
    Sets the operational mode of the filedialog to Saving, Opening or Other. This will set some flags that are specific to loading or saving files. E.g. setKeepLocation() makes mostly sense for a save-as dialog. So setOperationMode( KFileDialog.Saving ); sets setKeepLocation for example. The mode Saving, together with a default filter set via setMimeFilter() will make the filter combobox read-only. The default mode is Opening. Call this method right after instantiating KFileDialog.

    See Also: KFileDialog KFileDialog

    UNKNOWN: Sets the operational mode of the filedialog to Saving, Opening or Other.

    setPreviewWidget

    public void setPreviewWidget(KPreviewWidgetBase w)
    Adds a preview widget and enters the preview mode. In this mode the dialog is split and the right part contains your preview widget. Ownership is transferred to KFileDialog. You need to create the preview-widget with "new", i.e. on the heap.

    Parameters: w The widget to be used for the preview.

    UNKNOWN: Adds a preview widget and enters the preview mode.

    setSelection

    public void setSelection(String name)
    Sets the file name to preselect to name This takes absolute URLs and relative file names.

    UNKNOWN: Sets the file name to preselect to name

    setStartDir

    public static void setStartDir(KURL directory)
    Used by KDirSelectDialog to share the dialog's start directory.

    UNKNOWN:

    setURL

    public void setURL(KURL url, boolean clearforward)
    Sets the directory to view.

    Parameters: url URL to show. clearforward Indicates whether the forward queue should be cleared.

    UNKNOWN: Sets the directory to view.

    setURL

    public void setURL(KURL url)

    show

    public void show()

    slotAutoSelectExtClicked

    protected void slotAutoSelectExtClicked()

    slotCancel

    protected void slotCancel()

    slotFilterChanged

    protected void slotFilterChanged()

    slotLoadingFinished

    protected void slotLoadingFinished()

    slotOk

    protected void slotOk()

    slotStatResult

    protected void slotStatResult(Job job)

    speedBar

    public KURLBar speedBar()
    Note that this method may return a null-pointer if the user configured to not use the speed-bar.

    Returns: the KURLBar object used as the "speed bar". You can add custom entries to it like that:

     KURLBar *urlBar = fileDialog.speedBar();
     if ( urlBar )
         urlBar.insertDynamicItem( someURL, i18n("The URL's description") );
     

    See Also: KURLBar KURLBar

    UNKNOWN:

    toggleBookmarks

    protected void toggleBookmarks(boolean show)

    UNKNOWN:

    toggleSpeedbar

    protected void toggleSpeedbar(boolean arg1)

    UNKNOWN:

    tokenize

    protected ArrayList tokenize(String line)
    Parses the string "line" for files. If line doesn't contain any ", the whole line will be interpreted as one file. If the number of " is odd, an empty list will be returned. Otherwise, all items enclosed in " " will be returned as correct urls.

    UNKNOWN: Parses the string "line" for files.

    toolBar

    public KToolBar toolBar()
    Returns a pointer to the toolbar. You can use this to insert custom items into it, e.g.:
    		      yourAction = new KAction( i18n("Your Action"), 0,
    		                                this, SLOT("yourSlot()"),
    		                                this, "action name" );
    		      yourAction.plug( kfileDialog.toolBar() );
    		 

    UNKNOWN: Returns a pointer to the toolbar.

    updateAutoSelectExtension

    protected void updateAutoSelectExtension()
    Updates the currentFilterExtension and the availability of the Automatically Select Extension Checkbox (visible if operationMode() == Saving and enabled if an extension _will_ be associated with the currentFilter(), _after_ this call). You should call this after filterWidget.setCurrentItem().

    UNKNOWN: Updates the currentFilterExtension and the availability of the Automatically Select Extension Checkbox (visible if operationMode() == Saving and enabled if an extension _will_ be associated with the currentFilter(), _after_ this call).

    urlEntered

    protected void urlEntered(KURL arg1)

    writeConfig

    protected void writeConfig(KConfig arg1, String group)
    Saves the current configuration

    UNKNOWN: Saves the current configuration

    writeConfig

    protected void writeConfig(KConfig arg1)