UI/BrowserSortFilterProxyModel.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import *
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import *
12 12
13 import Preferences 13 import Preferences
14 14
15
15 class BrowserSortFilterProxyModel(QSortFilterProxyModel): 16 class BrowserSortFilterProxyModel(QSortFilterProxyModel):
16 """ 17 """
17 Class implementing the browser sort filter proxy model. 18 Class implementing the browser sort filter proxy model.
18 """ 19 """
19 def __init__(self, parent = None): 20 def __init__(self, parent=None):
20 """ 21 """
21 Constructor 22 Constructor
22 23
23 @param parent reference to the parent object (QObject) 24 @param parent reference to the parent object (QObject)
24 """ 25 """
67 return None 68 return None
68 69
69 sindex = self.mapToSource(index) 70 sindex = self.mapToSource(index)
70 return self.sourceModel().item(sindex) 71 return self.sourceModel().item(sindex)
71 72
72 def hasChildren(self, parent = QModelIndex()): 73 def hasChildren(self, parent=QModelIndex()):
73 """ 74 """
74 Public method to check for the presence of child items. 75 Public method to check for the presence of child items.
75 76
76 We always return True for normal items in order to do lazy 77 We always return True for normal items in order to do lazy
77 population of the tree. 78 population of the tree.

eric ide

mercurial