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
__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 (optional))
- 
initial filter (defaults to "")
- 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 (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to
        QFileDialog.Option.ShowDirsOnly)
- Return:
- 
name of selected directory
- Return Type:
- 
str
getExistingDirectoryPath
getExistingDirectoryPath(parent=None, caption="", directory="", options=QFileDialog.Option.ShowDirsOnly)
    Module function to get the path of a directory.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to
        QFileDialog.Option.ShowDirsOnly)
- Return:
- 
path of selected directory
- Return Type:
- 
pathlib.Path
getOpenFilPathsAndFilter
getOpenFilPathsAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get a list of paths of files for opening and the
    selected file name filter.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
list of file paths to be opened and selected filter
- Return Type:
- 
tuple of (list of pathlib.Path, str)
getOpenFileAndDirNames
getOpenFileAndDirNames(parent=None, caption="", directory="", filterStr="", options=None)
    Module function to get the names of files and directories for opening.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
names of the selected files and folders
- Return Type:
- 
list of str
getOpenFileAndDirPaths
getOpenFileAndDirPaths(parent=None, caption="", directory="", filterStr="", options=None)
    Module function to get the paths of files and directories for opening.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
paths of the selected files and folders
- Return Type:
- 
list of pathlib.Path
getOpenFileName
getOpenFileName(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the name of a file for opening it.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- 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 (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
name of file to be opened and selected filter
- Return Type:
- 
tuple of (str, str)
getOpenFileNames
getOpenFileNames(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get a list of names of files for opening.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- 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 (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
list of file names to be opened and selected filter
- Return Type:
- 
tuple of (list of str, str)
getOpenFilePath
getOpenFilePath(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the path of a file for opening it.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
path of file to be opened
- Return Type:
- 
pathlib.Path
getOpenFilePathAndFilter
getOpenFilePathAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the path of a file for opening it and the selected
    file name filter.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
path of file to be opened and selected filter
- Return Type:
- 
tuple of (pathlib.Path, str)
getOpenFilePaths
getOpenFilePaths(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get a list of paths of files for opening.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
list of file paths to be opened
- Return Type:
- 
list of pathlib.Path
getSaveFileName
getSaveFileName(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the name of a file for saving.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- 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 and the selected file name
    filter.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
name of file to be saved and selected filte
- Return Type:
- 
tuple of (str, str)
getSaveFilePath
getSaveFilePath(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the path of a file for saving.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
path of file to be saved
- Return Type:
- 
pathlib.Path
getSaveFilePathAndFilter
getSaveFilePathAndFilter(parent=None, caption="", directory="", filterStr="", initialFilter="", options=None)
    Module function to get the path of a file for saving and the selected
    file name filter.
- parent (QWidget (optional))
- 
parent widget of the dialog (defaults to None)
- caption (str (optional))
- 
window title of the dialog (defaults to "")
- directory (str or pathlib.Path (optional))
- 
working directory of the dialog (defaults to "")
- filterStr (str (optional))
- 
filter string for the dialog (defaults to "")
- initialFilter (str (optional))
- 
initial filter for the dialog (defaults to "")
- options (QFileDialog.Options ((optional))
- 
various options for the dialog (defaults to None)
- Return:
- 
path of file to be saved and selected filte
- Return Type:
- 
tuple of (pathlib.Path, str)