MCPcopy Create free account
hub / github.com/KDAB/GammaRay / itemData

Method itemData

plugins/timertop/timermodel.cpp:534–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

532}
533
534QMap<int, QVariant> TimerModel::itemData(const QModelIndex &index) const
535{
536 auto d = QAbstractTableModel::itemData(index);
537 if (index.column() == 0) {
538 d.insert(ObjectModel::ObjectIdRole, index.data(ObjectModel::ObjectIdRole));
539 auto v = index.data(ObjectModel::CreationLocationRole);
540 if (v.isValid())
541 d.insert(ObjectModel::CreationLocationRole, v);
542 v = index.data(ObjectModel::DeclarationLocationRole);
543 if (v.isValid())
544 d.insert(ObjectModel::DeclarationLocationRole, v);
545 d.insert(TimerTypeRole, index.data(TimerTypeRole));
546 }
547 if (index.column() == StateColumn)
548 d.insert(TimerModel::TimerIntervalRole, index.data(TimerModel::TimerIntervalRole));
549 return d;
550}
551
552void TimerModel::clearHistory()
553{

Callers

nothing calls this directly

Calls 4

columnMethod · 0.80
insertMethod · 0.45
dataMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected