39 self.__sortOrder = order |
39 self.__sortOrder = order |
40 super(BrowserSortFilterProxyModel, self).sort(column, order) |
40 super(BrowserSortFilterProxyModel, self).sort(column, order) |
41 |
41 |
42 def lessThan(self, left, right): |
42 def lessThan(self, left, right): |
43 """ |
43 """ |
44 Protected method used to sort the displayed items. |
44 Public method used to sort the displayed items. |
45 |
45 |
46 It implements a special sorting function that takes into account, |
46 It implements a special sorting function that takes into account, |
47 if folders should be shown first, and that __init__ is always the first |
47 if folders should be shown first, and that __init__ is always the first |
48 method of a class. |
48 method of a class. |
49 |
49 |
85 sindex = self.mapToSource(parent) |
85 sindex = self.mapToSource(parent) |
86 return self.sourceModel().hasChildren(sindex) |
86 return self.sourceModel().hasChildren(sindex) |
87 |
87 |
88 def filterAcceptsRow(self, source_row, source_parent): |
88 def filterAcceptsRow(self, source_row, source_parent): |
89 """ |
89 """ |
90 Protected method to filter rows. |
90 Public method to filter rows. |
91 |
91 |
92 It implements a filter to suppress the display of non public |
92 It implements a filter to suppress the display of non public |
93 classes, methods and attributes. |
93 classes, methods and attributes. |
94 |
94 |
95 @param source_row row number (in the source model) of item (integer) |
95 @param source_row row number (in the source model) of item (integer) |