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

Method rowCount

Modules/SegmentationUI/src/QmitkMultiLabelTreeModel.cpp:298–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298int QmitkMultiLabelTreeModel::rowCount(const QModelIndex &parent) const
299{
300 if (parent.column() > 0)
301 return 0;
302
303 if (m_Segmentation.IsNull())
304 return 0;
305
306 QmitkMultiLabelSegTreeItem* parentItem = m_RootItem.get();
307
308 if (parent.isValid())
309 parentItem = static_cast<QmitkMultiLabelSegTreeItem *>(parent.internalPointer());
310
311 if (parentItem->HandleAsInstance())
312 {
313 return 0;
314 }
315
316 return parentItem->m_childItems.size();
317}
318
319QVariant QmitkMultiLabelTreeModel::data(const QModelIndex &index, int role) const
320{

Callers 12

CheckModelDefaultMethod · 0.45
AddingLabelTestMethod · 0.45
AddingLayerTestMethod · 0.45
RenameGroupTestMethod · 0.45
RemovingLabelTestMethod · 0.45
RemovingLayerTestMethod · 0.45
ModifyLabelNameTestMethod · 0.45
ModifyLabelTestMethod · 0.45
ApplyFilterMethod · 0.45

Calls 3

HandleAsInstanceMethod · 0.80
IsNullMethod · 0.45
sizeMethod · 0.45

Tested by 11

CheckModelDefaultMethod · 0.36
AddingLabelTestMethod · 0.36
AddingLayerTestMethod · 0.36
RenameGroupTestMethod · 0.36
RemovingLabelTestMethod · 0.36
RemovingLayerTestMethod · 0.36
ModifyLabelNameTestMethod · 0.36
ModifyLabelTestMethod · 0.36