MCPcopy Create free account
hub / github.com/MITK/MITK / index

Method index

Modules/ImageStatisticsUI/src/QmitkImageStatisticsTreeModel.cpp:102–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102QModelIndex QmitkImageStatisticsTreeModel::index(int row, int column, const QModelIndex &parent) const
103{
104 if (!hasIndex(row, column, parent))
105 return QModelIndex();
106
107 QmitkImageStatisticsTreeItem *parentItem;
108
109 if (!parent.isValid())
110 parentItem = m_RootItem.get();
111 else
112 parentItem = static_cast<QmitkImageStatisticsTreeItem *>(parent.internalPointer());
113
114 QmitkImageStatisticsTreeItem *childItem = parentItem->child(row);
115 if (childItem)
116 return createIndex(row, column, childItem);
117 else
118 return QModelIndex();
119}
120
121QModelIndex QmitkImageStatisticsTreeModel::parent(const QModelIndex &child) const
122{

Callers 1

IterateMethod · 0.45

Calls 2

childMethod · 0.80
QModelIndexClass · 0.50

Tested by

no test coverage detected