MCPcopy Create free account
hub / github.com/KDAB/KDChart / data

Method data

python/examples-qt6/reorder/main.py:53–66  ·  view source on GitHub ↗
(self, index, role=Qt.DisplayRole)

Source from the content-addressed store, hash-verified

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:

Callers 3

enableActionsMethod · 0.45
initFromMethod · 0.45
addDependItemMethod · 0.45

Calls 5

rowCountMethod · 0.95
columnCountMethod · 0.95
rowMethod · 0.80
isValidMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected