5 |
5 |
6 """ |
6 """ |
7 Module implementing the history filter model. |
7 Module implementing the history filter model. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import Qt, QDateTime, QModelIndex |
10 from PyQt4.QtCore import Qt, QDateTime, QModelIndex, qVersion |
11 from PyQt4.QtGui import QAbstractProxyModel |
11 from PyQt4.QtGui import QAbstractProxyModel |
12 |
12 |
13 from .HistoryModel import HistoryModel |
13 from .HistoryModel import HistoryModel |
14 |
14 |
15 |
15 |
137 Private slot to handle the change of data of the source model. |
137 Private slot to handle the change of data of the source model. |
138 |
138 |
139 @param topLeft index of top left data element (QModelIndex) |
139 @param topLeft index of top left data element (QModelIndex) |
140 @param bottomRight index of bottom right data element (QModelIndex) |
140 @param bottomRight index of bottom right data element (QModelIndex) |
141 """ |
141 """ |
142 self.dataChanged.emit( |
142 if qVersion() >= "5.0.0": |
143 self.mapFromSource(topLeft), self.mapFromSource(bottomRight)) |
143 self.dataChanged.emit( |
|
144 self.mapFromSource(topLeft), self.mapFromSource(bottomRight), []) |
|
145 else: |
|
146 self.dataChanged.emit( |
|
147 self.mapFromSource(topLeft), self.mapFromSource(bottomRight)) |
144 |
148 |
145 def headerData(self, section, orientation, role=Qt.DisplayRole): |
149 def headerData(self, section, orientation, role=Qt.DisplayRole): |
146 """ |
150 """ |
147 Public method to get the header data. |
151 Public method to get the header data. |
148 |
152 |