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