58 @param reference to the watch expression model (WatchPointModel) |
58 @param reference to the watch expression model (WatchPointModel) |
59 """ |
59 """ |
60 self.__model = model |
60 self.__model = model |
61 |
61 |
62 # TODO: Remove these comments once proven ok in daily use |
62 # TODO: Remove these comments once proven ok in daily use |
63 ## self.sortingModel = QSortFilterProxyModel() |
63 self.sortingModel = QSortFilterProxyModel() |
64 ## self.sortingModel.setSourceModel(self.__model) |
64 self.sortingModel.setDynamicSortFilter(True) |
65 ## super().setModel(self.sortingModel) |
65 self.sortingModel.setSourceModel(self.__model) |
66 super().setModel(self.__model) |
66 super().setModel(self.sortingModel) |
67 |
67 |
68 ## header = self.header() |
68 header = self.header() |
69 ## header.setSortIndicator(0, Qt.AscendingOrder) |
69 header.setSortIndicator(0, Qt.AscendingOrder) |
70 ## header.setSortIndicatorShown(True) |
70 header.setSortIndicatorShown(True) |
71 ## header.setClickable(True) |
71 header.setClickable(True) |
72 ## |
72 |
73 ## self.setSortingEnabled(True) |
73 self.setSortingEnabled(True) |
74 ## |
74 |
75 self.__layoutDisplay() |
75 self.__layoutDisplay() |
76 |
76 |
77 def __layoutDisplay(self): |
77 def __layoutDisplay(self): |
78 """ |
78 """ |
79 Private slot to perform a layout operation. |
79 Private slot to perform a layout operation. |
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 """ |
103 """ |
104 ## return self.sortingModel.mapToSource(index) |
104 return self.sortingModel.mapToSource(index) |
105 return index |
|
106 |
105 |
107 def __fromSourceIndex(self, sindex): |
106 def __fromSourceIndex(self, sindex): |
108 """ |
107 """ |
109 Private slot to convert a source index to an index. |
108 Private slot to convert a source index to an index. |
110 |
109 |
111 @param sindex source index to be converted (QModelIndex) |
110 @param sindex source index to be converted (QModelIndex) |
112 """ |
111 """ |
113 ## return self.sortingModel.mapFromSource(sindex) |
112 return self.sortingModel.mapFromSource(sindex) |
114 return sindex |
|
115 |
113 |
116 def __setRowSelected(self, index, selected=True): |
114 def __setRowSelected(self, index, selected=True): |
117 """ |
115 """ |
118 Private slot to select a complete row. |
116 Private slot to select a complete row. |
119 |
117 |