eric6/WebBrowser/History/HistoryFilterModel.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8207
d359172d11be
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
97 if url not in self.__historyDict: 97 if url not in self.__historyDict:
98 return 0 98 return 0
99 99
100 return self.sourceModel().rowCount() - self.__historyDict[url] 100 return self.sourceModel().rowCount() - self.__historyDict[url]
101 101
102 def data(self, index, role=Qt.DisplayRole): 102 def data(self, index, role=Qt.ItemDataRole.DisplayRole):
103 """ 103 """
104 Public method to get data from the model. 104 Public method to get data from the model.
105 105
106 @param index index of history entry to get data for (QModelIndex) 106 @param index index of history entry to get data for (QModelIndex)
107 @param role data role (integer) 107 @param role data role (integer)
142 @param bottomRight index of bottom right data element (QModelIndex) 142 @param bottomRight index of bottom right data element (QModelIndex)
143 """ 143 """
144 self.dataChanged.emit( 144 self.dataChanged.emit(
145 self.mapFromSource(topLeft), self.mapFromSource(bottomRight)) 145 self.mapFromSource(topLeft), self.mapFromSource(bottomRight))
146 146
147 def headerData(self, section, orientation, role=Qt.DisplayRole): 147 def headerData(self, section, orientation,
148 role=Qt.ItemDataRole.DisplayRole):
148 """ 149 """
149 Public method to get the header data. 150 Public method to get the header data.
150 151
151 @param section section number (integer) 152 @param section section number (integer)
152 @param orientation header orientation (Qt.Orientation) 153 @param orientation header orientation (Qt.Orientation)
153 @param role data role (integer) 154 @param role data role (Qt.ItemDataRole)
154 @return header data 155 @return header data
155 """ 156 """
156 return self.sourceModel().headerData(section, orientation, role) 157 return self.sourceModel().headerData(section, orientation, role)
157 158
158 def recalculateFrequencies(self): 159 def recalculateFrequencies(self):

eric ide

mercurial