--- a/E5Gui/E5Completers.py Fri Mar 11 08:55:14 2011 +0100 +++ b/E5Gui/E5Completers.py Fri Mar 11 16:51:57 2011 +0100 @@ -12,18 +12,19 @@ from Globals import isWindowsPlatform + class E5FileCompleter(QCompleter): """ Class implementing a completer for file names. """ - def __init__(self, parent = None, - completionMode = QCompleter.PopupCompletion, - showHidden = False): + def __init__(self, parent=None, + completionMode=QCompleter.PopupCompletion, + showHidden=False): """ Constructor @param parent parent widget of the completer (QWidget) - @keyparam completionMode completion mode of the + @keyparam completionMode completion mode of the completer (QCompleter.CompletionMode) @keyparam showHidden flag indicating to show hidden entries as well (boolean) """ @@ -43,18 +44,19 @@ if parent: parent.setCompleter(self) + class E5DirCompleter(QCompleter): """ Class implementing a completer for directory names. """ - def __init__(self, parent = None, - completionMode = QCompleter.PopupCompletion, - showHidden = False): + def __init__(self, parent=None, + completionMode=QCompleter.PopupCompletion, + showHidden=False): """ Constructor @param parent parent widget of the completer (QWidget) - @keyparam completionMode completion mode of the + @keyparam completionMode completion mode of the completer (QCompleter.CompletionMode) @keyparam showHidden flag indicating to show hidden entries as well (boolean) """ @@ -73,18 +75,19 @@ if parent: parent.setCompleter(self) + class E5StringListCompleter(QCompleter): """ Class implementing a completer for string lists. """ - def __init__(self, parent = None, strings = [], - completionMode = QCompleter.PopupCompletion): + def __init__(self, parent=None, strings=[], + completionMode=QCompleter.PopupCompletion): """ Constructor @param parent parent widget of the completer (QWidget) @param strings list of string to load into the completer (list of strings) - @keyparam completionMode completion mode of the + @keyparam completionMode completion mode of the completer (QCompleter.CompletionMode) """ QCompleter.__init__(self, parent) @@ -92,4 +95,4 @@ self.setModel(self.__model) self.setCompletionMode(completionMode) if parent: - parent.setCompleter(self) \ No newline at end of file + parent.setCompleter(self)