eric7.EricWidgets.EricFileDialog
Module implementing alternative functions for the QFileDialog static methods.
Global Attributes
DontConfirmOverwrite |
DontResolveSymlinks |
DontUseCustomDirectoryIcons |
DontUseNativeDialog |
HideNameFilterDetails |
Option |
ReadOnly |
ShowDirsOnly |
Classes
Functions
__reorderFilter |
Private function to reorder the file filter to cope with a KDE issue introduced by distributor's usage of KDE file dialogs. |
getExistingDirectory |
Module function to get the name of a directory. |
getOpenFileAndDirNames |
Module function to get the names of files and directories for opening. |
getOpenFileName |
Module function to get the name of a file for opening it. |
getOpenFileNameAndFilter |
Module function to get the name of a file for opening it and the selected file name filter. |
getOpenFileNames |
Module function to get a list of names of files for opening. |
getOpenFileNamesAndFilter |
Module function to get a list of names of files for opening and the selected file name filter. |
getSaveFileName |
Module function to get the name of a file for saving it. |
getSaveFileNameAndFilter |
Module function to get the name of a file for saving it and the selected file name filter. |
__reorderFilter
__reorderFilter(filterStr, initialFilter="")
Private function to reorder the file filter to cope with a KDE issue
introduced by distributor's usage of KDE file dialogs.
- filterStr (str)
-
Qt file filter
- initialFilter (str)
-
initial filter
- Return:
-
the rearranged Qt file filter
- Return Type:
-
str
getExistingDirectory
getExistingDirectory(parent=None, caption="", directory="", options=QFileDialog.Option.ShowDirsOnly)
Module function to get the name of a directory.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
name of selected directory
- Return Type:
-
str
getOpenFileAndDirNames
getOpenFileAndDirNames(parent=None, caption="", directory="", filterStr="", options=None)
Module function to get the names of files and directories for opening.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
names of the selected files and folders
- Return Type:
-
list of str
getOpenFileName
getOpenFileName(parent=None, caption="", directory="", filterStr="", options=None)
Module function to get the name of a file for opening it.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
name of file to be opened
- Return Type:
-
str
getOpenFileNameAndFilter
getOpenFileNameAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
Module function to get the name of a file for opening it and the selected
file name filter.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- initialFilter (str)
-
initial filter for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
name of file to be opened and selected filter
- Return Type:
-
tuple of (str, str)
getOpenFileNames
getOpenFileNames(parent=None, caption="", directory="", filterStr="", options=None)
Module function to get a list of names of files for opening.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
list of file names to be opened
- Return Type:
-
list of str
getOpenFileNamesAndFilter
getOpenFileNamesAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
Module function to get a list of names of files for opening and the
selected file name filter.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- initialFilter (str)
-
initial filter for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
list of file names to be opened and selected filter
- Return Type:
-
tuple of (list of str, str)
getSaveFileName
getSaveFileName(parent=None, caption="", directory="", filterStr="", options=None)
Module function to get the name of a file for saving it.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
name of file to be saved
- Return Type:
-
str
getSaveFileNameAndFilter
getSaveFileNameAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
Module function to get the name of a file for saving it and the selected
file name filter.
- parent (QWidget)
-
parent widget of the dialog
- caption (str)
-
window title of the dialog
- directory (str)
-
working directory of the dialog
- filterStr (str)
-
filter string for the dialog
- initialFilter (str)
-
initial filter for the dialog
- options (QFileDialog.Options)
-
various options for the dialog
- Return:
-
name of file to be saved and selected filte
- Return Type:
-
tuple of (str, str)