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

Method data

examples/Plotter/BigDataset/Model.cpp:60–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60QVariant Model::data(const QModelIndex &index, int role) const
61{
62 if (role != Qt::DisplayRole || index.parent().isValid() || index.column() > 1 || index.row() >= m_data.count()) {
63 return QVariant();
64 }
65 if (index.column() == 0) {
66 return index.row() * s_stepWidth;
67 } else {
68 return m_data.at(index.row());
69 }
70}
71
72// slot
73void Model::setFunction(Function f)

Callers 1

setMarkerAttributesMethod · 0.45

Calls 4

rowMethod · 0.80
isValidMethod · 0.45
parentMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected