11 |
11 |
12 from PyQt6.QtCore import Qt, QModelIndex, QDate, QAbstractProxyModel |
12 from PyQt6.QtCore import Qt, QModelIndex, QDate, QAbstractProxyModel |
13 |
13 |
14 from .HistoryModel import HistoryModel |
14 from .HistoryModel import HistoryModel |
15 |
15 |
16 import UI.PixmapCache |
16 from eric7.EricGui import EricPixmapCache |
17 |
17 |
18 |
18 |
19 class HistoryTreeModel(QAbstractProxyModel): |
19 class HistoryTreeModel(QAbstractProxyModel): |
20 """ |
20 """ |
21 Class implementing the history tree model. |
21 Class implementing the history tree model. |
72 elif ( |
72 elif ( |
73 role == Qt.ItemDataRole.DecorationRole |
73 role == Qt.ItemDataRole.DecorationRole |
74 and index.column() == 0 |
74 and index.column() == 0 |
75 and not index.parent().isValid() |
75 and not index.parent().isValid() |
76 ): |
76 ): |
77 return UI.PixmapCache.getIcon("history") |
77 return EricPixmapCache.getIcon("history") |
78 |
78 |
79 elif ( |
79 elif ( |
80 role == HistoryModel.DateRole |
80 role == HistoryModel.DateRole |
81 and index.column() == 0 |
81 and index.column() == 0 |
82 and index.internalId() == 0 |
82 and index.internalId() == 0 |