E5Gui/E5TreeSortFilterProxyModel.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
diff -r 1b59c4ba121e -r 8cd4d08fa9f6 E5Gui/E5TreeSortFilterProxyModel.py
--- a/E5Gui/E5TreeSortFilterProxyModel.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/E5Gui/E5TreeSortFilterProxyModel.py	Fri Mar 11 16:51:57 2011 +0100
@@ -10,6 +10,7 @@
 from PyQt4.QtCore import Qt, QModelIndex
 from PyQt4.QtGui import QSortFilterProxyModel
 
+
 class E5TreeSortFilterProxyModel(QSortFilterProxyModel):
     """
     Class implementing a modified QSortFilterProxyModel.
@@ -17,7 +18,7 @@
     It always accepts the root nodes in the tree so filtering is only done
     on the children.
     """
-    def __init__(self, parent = None):
+    def __init__(self, parent=None):
         """
         Constructor
         
@@ -41,7 +42,7 @@
         
         return QSortFilterProxyModel.filterAcceptsRow(self, sourceRow, sourceParent)
     
-    def hasChildren(self, parent = QModelIndex()):
+    def hasChildren(self, parent=QModelIndex()):
         """
         Public method to check, if a parent node has some children.
         
@@ -49,4 +50,4 @@
         @return flag indicating the presence of children (boolean)
         """
         sindex = self.mapToSource(parent)
-        return self.sourceModel().hasChildren(sindex)
\ No newline at end of file
+        return self.sourceModel().hasChildren(sindex)

eric ide

mercurial