51 |
51 |
52 def setModel(self, model): |
52 def setModel(self, model): |
53 """ |
53 """ |
54 Public slot to set the watch expression model. |
54 Public slot to set the watch expression model. |
55 |
55 |
56 @param reference to the watch expression model (WatchPointModel) |
56 @param model reference to the watch expression model (WatchPointModel) |
57 """ |
57 """ |
58 self.__model = model |
58 self.__model = model |
59 |
59 |
60 self.sortingModel = QSortFilterProxyModel() |
60 self.sortingModel = QSortFilterProxyModel() |
61 self.sortingModel.setDynamicSortFilter(True) |
61 self.sortingModel.setDynamicSortFilter(True) |
98 def __toSourceIndex(self, index): |
98 def __toSourceIndex(self, index): |
99 """ |
99 """ |
100 Private slot to convert an index to a source index. |
100 Private slot to convert an index to a source index. |
101 |
101 |
102 @param index index to be converted (QModelIndex) |
102 @param index index to be converted (QModelIndex) |
|
103 @return mapped index (QModelIndex) |
103 """ |
104 """ |
104 return self.sortingModel.mapToSource(index) |
105 return self.sortingModel.mapToSource(index) |
105 |
106 |
106 def __fromSourceIndex(self, sindex): |
107 def __fromSourceIndex(self, sindex): |
107 """ |
108 """ |
108 Private slot to convert a source index to an index. |
109 Private slot to convert a source index to an index. |
109 |
110 |
110 @param sindex source index to be converted (QModelIndex) |
111 @param sindex source index to be converted (QModelIndex) |
|
112 @return mapped index (QModelIndex) |
111 """ |
113 """ |
112 return self.sortingModel.mapFromSource(sindex) |
114 return self.sortingModel.mapFromSource(sindex) |
113 |
115 |
114 def __setRowSelected(self, index, selected=True): |
116 def __setRowSelected(self, index, selected=True): |
115 """ |
117 """ |