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

Method MakeWindowDescriptor

Modules/QtWidgets/src/QmitkMxNMultiWidget.cpp:857–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

855}
856
857QmitkMxNMultiWidget::WindowDescriptor
858QmitkMxNMultiWidget::MakeWindowDescriptor(const QmitkRenderWindowWidget* cell) const
859{
860 if (nullptr == cell)
861 {
862 mitkThrow() << "MakeWindowDescriptor: null cell.";
863 }
864
865 WindowDescriptor descriptor;
866 descriptor.id = cell->GetWidgetName();
867 descriptor.displayName = cell->GetDisplayName();
868 descriptor.viewDirection = QString::fromStdString(
869 ViewDirectionToV2String(
870 cell->GetSliceNavigationController()->GetDefaultViewDirection()));
871
872 const auto idx = cell->GetUtilityWidget()->GetSyncGroup();
873 const auto recorded = m_GroupNameByIndex.find(idx);
874 if (recorded == m_GroupNameByIndex.end())
875 {
876 mitkThrow() << "MakeWindowDescriptor: cell sync group " << idx
877 << " has no entry in the group-name registry; "
878 << "engine state is corrupt.";
879 }
880 descriptor.selectionGroup = QString::fromStdString(recorded->second);
881 return descriptor;
882}
883
884std::vector<QmitkMxNMultiWidget::WindowDescriptor>
885QmitkMxNMultiWidget::ListWindowDescriptors() const

Callers 2

SerializeSplitterMethod · 0.95
ListWindowDescriptorsMethod · 0.95

Calls 7

ViewDirectionToV2StringFunction · 0.85
GetUtilityWidgetMethod · 0.80
GetDisplayNameMethod · 0.45
GetSyncGroupMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected