| 440 | } |
| 441 | |
| 442 | QModelIndex TimerModel::index(int row, int column, const QModelIndex &parent) const |
| 443 | { |
| 444 | if (hasIndex(row, column, parent)) { |
| 445 | if (row < m_sourceModel->rowCount()) { |
| 446 | const QModelIndex sourceIndex = m_sourceModel->index(row, 0); |
| 447 | QObject *const timerObject = sourceIndex.data(ObjectModel::ObjectRole).value<QObject *>(); |
| 448 | return createIndex(row, column, timerObject); |
| 449 | } |
| 450 | return createIndex(row, column, row - m_sourceModel->rowCount()); |
| 451 | } |
| 452 | |
| 453 | return {}; |
| 454 | } |
| 455 | |
| 456 | int TimerModel::columnCount(const QModelIndex &parent) const |
| 457 | { |