(self, index, role=Qt.DisplayRole)
| 51 | return 4 |
| 52 | |
| 53 | def data(self, index, role=Qt.DisplayRole): |
| 54 | if index.isValid() and index.row() < self.rowCount() and index.column() < self.columnCount(): |
| 55 | column = index.column() |
| 56 | row = index.row() |
| 57 | if column == 0 and role == Qt.DisplayRole: |
| 58 | return self.tasks[row].title |
| 59 | if column == 1 and role == Qt.DisplayRole: |
| 60 | return KDGantt.TypeTask |
| 61 | if column == 2 and (role in [KDGantt.StartTimeRole, Qt.DisplayRole]): |
| 62 | return self.tasks[row].start |
| 63 | if column == 3 and (role in [KDGantt.EndTimeRole, Qt.DisplayRole]): |
| 64 | return self.tasks[row].end |
| 65 | |
| 66 | return None |
| 67 | |
| 68 | def moveRow(self, fromIndex, toIndex): |
| 69 | if fromIndex == toIndex: |
no test coverage detected