| 532 | } |
| 533 | |
| 534 | QMap<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 | |
| 552 | void TimerModel::clearHistory() |
| 553 | { |