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

Method OnItemDoubleClicked

Modules/SegmentationUI/src/QmitkMultiLabelInspector.cpp:1680–1698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1678}
1679
1680void QmitkMultiLabelInspector::OnItemDoubleClicked(const QModelIndex& index)
1681{
1682 if (!index.isValid()) return;
1683 if (index.column() > 0) return;
1684
1685 auto labelVariant = index.data(QmitkMultiLabelTreeModel::ItemModelRole::LabelInstanceValueRole);
1686
1687 if (!labelVariant.isValid()) return;
1688
1689 const auto labelID = labelVariant.value<mitk::Label::PixelType>();
1690
1691 if (QApplication::queryKeyboardModifiers().testFlag(Qt::AltModifier))
1692 {
1693 this->OnRenameLabel(false);
1694 return;
1695 }
1696
1697 this->PrepareGoToLabel(labelID);
1698}
1699
1700void QmitkMultiLabelInspector::PrepareGoToLabel(mitk::Label::PixelType labelID) const
1701{

Callers

nothing calls this directly

Calls 3

OnRenameLabelMethod · 0.95
PrepareGoToLabelMethod · 0.95
dataMethod · 0.45

Tested by

no test coverage detected