7 Module implementing the Watch expression model. |
7 Module implementing the Watch expression model. |
8 """ |
8 """ |
9 |
9 |
10 import copy |
10 import copy |
11 |
11 |
12 from PyQt5.QtCore import pyqtSignal, Qt, QAbstractItemModel, QModelIndex |
12 from PyQt6.QtCore import pyqtSignal, Qt, QAbstractItemModel, QModelIndex |
13 |
13 |
14 |
14 |
15 class WatchPointModel(QAbstractItemModel): |
15 class WatchPointModel(QAbstractItemModel): |
16 """ |
16 """ |
17 Class implementing a custom model for watch expressions. |
17 Class implementing a custom model for watch expressions. |
35 self.tr("Special"), |
35 self.tr("Special"), |
36 self.tr('Temporary'), |
36 self.tr('Temporary'), |
37 self.tr('Enabled'), |
37 self.tr('Enabled'), |
38 self.tr('Ignore Count'), |
38 self.tr('Ignore Count'), |
39 ] |
39 ] |
40 self.alignments = [Qt.Alignment(Qt.AlignmentFlag.AlignLeft), |
40 self.alignments = [Qt.AlignmentFlag.AlignLeft, |
41 Qt.Alignment(Qt.AlignmentFlag.AlignLeft), |
41 Qt.AlignmentFlag.AlignLeft, |
42 Qt.Alignment(Qt.AlignmentFlag.AlignHCenter), |
42 Qt.AlignmentFlag.AlignHCenter, |
43 Qt.Alignment(Qt.AlignmentFlag.AlignHCenter), |
43 Qt.AlignmentFlag.AlignHCenter, |
44 Qt.Alignment(Qt.AlignmentFlag.AlignRight), |
44 Qt.AlignmentFlag.AlignRight, |
45 ] |
45 ] |
46 |
46 |
47 def columnCount(self, parent=None): |
47 def columnCount(self, parent=None): |
48 """ |
48 """ |
49 Public method to get the current column count. |
49 Public method to get the current column count. |