45 """ |
45 """ |
46 Public method to get the current column count. |
46 Public method to get the current column count. |
47 |
47 |
48 @return column count (integer) |
48 @return column count (integer) |
49 """ |
49 """ |
50 return len(self.header) + 1 |
50 return len(self.header) |
51 |
51 |
52 def rowCount(self, parent = QModelIndex()): |
52 def rowCount(self, parent = QModelIndex()): |
53 """ |
53 """ |
54 Public method to get the current row count. |
54 Public method to get the current row count. |
55 |
55 |
70 @return the requested data |
70 @return the requested data |
71 """ |
71 """ |
72 if not index.isValid(): |
72 if not index.isValid(): |
73 return None |
73 return None |
74 |
74 |
75 if role == Qt.DisplayRole or role == Qt.ToolTipRole: |
75 if role == Qt.DisplayRole: |
76 if index.column() < len(self.header): |
76 if index.column() in [0, 1, 2, 5]: |
|
77 return self.breakpoints[index.row()][index.column()] |
|
78 |
|
79 if role == Qt.CheckStateRole: |
|
80 if index.column() in [3, 4]: |
|
81 return self.breakpoints[index.row()][index.column()] |
|
82 |
|
83 if role == Qt.ToolTipRole: |
|
84 if index.column() in [0, 2]: |
77 return self.breakpoints[index.row()][index.column()] |
85 return self.breakpoints[index.row()][index.column()] |
78 |
86 |
79 if role == Qt.TextAlignmentRole: |
87 if role == Qt.TextAlignmentRole: |
80 if index.column() < len(self.alignments): |
88 if index.column() < len(self.alignments): |
81 return self.alignments[index.column()] |
89 return self.alignments[index.column()] |