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

Method headerData

examples/Gantt/project/projectmodel.cpp:237–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237QVariant ProjectModel::headerData(int section, Qt::Orientation orientation, int role) const
238{
239 if (orientation != Qt::Horizontal || role != Qt::DisplayRole)
240 return QVariant();
241 switch (section) {
242 case 0:
243 return tr("Name");
244 case 1:
245 return tr("Type");
246 case 2:
247 return tr("Start");
248 case 3:
249 return tr("End");
250 case 4:
251 return tr("Completion %");
252 default:
253 return QVariant();
254 }
255}
256
257QVariant ProjectModel::data(const QModelIndex &idx, int role) const
258{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected