| 119 | } |
| 120 | |
| 121 | QModelIndex QmitkImageStatisticsTreeModel::parent(const QModelIndex &child) const |
| 122 | { |
| 123 | if (!child.isValid()) |
| 124 | return QModelIndex(); |
| 125 | |
| 126 | QmitkImageStatisticsTreeItem *childItem = static_cast<QmitkImageStatisticsTreeItem *>(child.internalPointer()); |
| 127 | QmitkImageStatisticsTreeItem *parentItem = childItem->parentItem(); |
| 128 | |
| 129 | if (parentItem == m_RootItem.get()) |
| 130 | return QModelIndex(); |
| 131 | |
| 132 | return createIndex(parentItem->row(), 0, parentItem); |
| 133 | } |
| 134 | |
| 135 | Qt::ItemFlags QmitkImageStatisticsTreeModel::flags(const QModelIndex &index) const |
| 136 | { |
nothing calls this directly
no test coverage detected