| 143 | } |
| 144 | |
| 145 | TreeItem* TreeModel::itemForIndex(const QModelIndex& index) const |
| 146 | { |
| 147 | Q_D(const TreeModel); |
| 148 | |
| 149 | if (!index.isValid()) |
| 150 | return d->root; |
| 151 | else |
| 152 | return static_cast<TreeItem*>(index.internalPointer()); |
| 153 | } |
| 154 | |
| 155 | QModelIndex TreeModel::indexForItem(TreeItem *item, int column) const |
| 156 | { |
no test coverage detected