eric4.KdeQt.KQFileDialog

Compatibility module to use the KDE File Dialog instead of the Qt File Dialog.

Global Attributes

None

Classes

None

Functions

__convertFilter Private function to convert a Qt file filter to a KDE file filter.
__kdeGetExistingDirectory Module function to get the name of a directory.
__kdeGetOpenFileName Module function to get the name of a file for opening it.
__kdeGetOpenFileNames Module function to get a list of names of files for opening.
__kdeGetSaveFileName Module function to get the name of a file for saving it.
__qtGetExistingDirectory Module function to get the name of a directory.
__qtGetOpenFileName Module function to get the name of a file for opening it.
__qtGetOpenFileNames Module function to get a list of names of files for opening.
__qtGetSaveFileName Module function to get the name of a file for saving it.
__qtReorderFilter Private function to reorder the file filter to cope with a KDE issue introduced by distributors usage of KDE file dialogs.
__workingDirectory Private function to determine working directory for the file dialog.
getExistingDirectory Module function to get the name of a directory.
getOpenFileName Module function to get the name of a file for opening it.
getOpenFileNames Module function to get a list of names of files for opening.
getSaveFileName Module function to get the name of a file for saving it.


__convertFilter

__convertFilter(filter, selectedFilter = None)

Private function to convert a Qt file filter to a KDE file filter.

filter
Qt file filter (QString or string)
selectedFilter
this is set to the selected filter
Returns:
the corresponding KDE file filter (QString)
Up


__kdeGetExistingDirectory

__kdeGetExistingDirectory(parent = None, caption = QString(), dir_ = QString(), options = QFileDialog.Options(QFileDialog.ShowDirsOnly))

Module function to get the name of a directory.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of selected directory (QString)
Up


__kdeGetOpenFileName

__kdeGetOpenFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for opening it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be opened (QString)
Up


__kdeGetOpenFileNames

__kdeGetOpenFileNames(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get a list of names of files for opening.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
list of filenames to be opened (QStringList)
Up


__kdeGetSaveFileName

__kdeGetSaveFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for saving it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be saved (QString)
Up


__qtGetExistingDirectory

__qtGetExistingDirectory(parent = None, caption = QString(), dir_ = QString(), options = QFileDialog.Options(QFileDialog.ShowDirsOnly))

Module function to get the name of a directory.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of selected directory (QString)
Up


__qtGetOpenFileName

__qtGetOpenFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for opening it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be opened (QString)
Up


__qtGetOpenFileNames

__qtGetOpenFileNames(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get a list of names of files for opening.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
list of filenames to be opened (QStringList)
Up


__qtGetSaveFileName

__qtGetSaveFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for saving it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be saved (QString)
Up


__qtReorderFilter

__qtReorderFilter(filter, selectedFilter = None)

Private function to reorder the file filter to cope with a KDE issue introduced by distributors usage of KDE file dialogs.

filter
Qt file filter (QString or string)
selectedFilter
this is set to the selected filter (QString or string)
Returns:
the rearranged Qt file filter (QString)
Up


__workingDirectory

__workingDirectory(path_)

Private function to determine working directory for the file dialog.

path_
path of the intended working directory (string or QString)
Returns:
calculated working directory (QString)
Up


getExistingDirectory

getExistingDirectory(parent = None, caption = QString(), dir_ = QString(), options = QFileDialog.Options(QFileDialog.ShowDirsOnly))

Module function to get the name of a directory.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of selected directory (QString)
Up


getOpenFileName

getOpenFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for opening it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be opened (QString)
Up


getOpenFileNames

getOpenFileNames(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get a list of names of files for opening.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
list of filenames to be opened (QStringList)
Up


getSaveFileName

getSaveFileName(parent = None, caption = QString(), dir_ = QString(), filter = QString(), selectedFilter = None, options = QFileDialog.Options())

Module function to get the name of a file for saving it.

parent
parent widget of the dialog (QWidget)
caption
window title of the dialog (QString)
dir_
working directory of the dialog (QString)
filter
filter string for the dialog (QString)
selectedFilter
selected filter for the dialog (QString)
options
various options for the dialog (QFileDialog.Options)
Returns:
name of file to be saved (QString)
Up