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

Method InitializeMultiWidget

Modules/QtWidgets/src/QmitkStdMultiWidget.cpp:58–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void QmitkStdMultiWidget::InitializeMultiWidget()
59{
60 // yellow is default color for widget4
61 m_DecorationColorWidget4[0] = 1.0f;
62 m_DecorationColorWidget4[1] = 1.0f;
63 m_DecorationColorWidget4[2] = 0.0f;
64
65 SetLayout(2, 2);
66
67 // transfer colors in WorldGeometry-Nodes of the associated Renderer
68 // of widget 1
69 m_PlaneNode1 =
70 mitk::BaseRenderer::GetInstance(GetRenderWindow1()->renderWindow())->GetCurrentWorldPlaneGeometryNode();
71 m_PlaneNode1->SetColor(GetDecorationColor(0));
72
73 // of widget 2
74 m_PlaneNode2 =
75 mitk::BaseRenderer::GetInstance(GetRenderWindow2()->renderWindow())->GetCurrentWorldPlaneGeometryNode();
76 m_PlaneNode2->SetColor(GetDecorationColor(1));
77
78 // of widget 3
79 m_PlaneNode3 =
80 mitk::BaseRenderer::GetInstance(GetRenderWindow3()->renderWindow())->GetCurrentWorldPlaneGeometryNode();
81 m_PlaneNode3->SetColor(GetDecorationColor(2));
82
83 // the parent node
84 m_ParentNodeForGeometryPlanes =
85 mitk::BaseRenderer::GetInstance(GetRenderWindow4()->renderWindow())->GetCurrentWorldPlaneGeometryNode();
86
87 AddDisplayPlaneSubTree();
88
89 SetDisplayActionEventHandler(std::make_unique<mitk::DisplayActionEventHandlerStd>());
90
91 auto displayActionEventHandler = GetDisplayActionEventHandler();
92 if (nullptr != displayActionEventHandler)
93 {
94 displayActionEventHandler->InitActions(this->GetMultiWidgetName().toStdString());
95 }
96}
97
98QmitkRenderWindow* QmitkStdMultiWidget::GetRenderWindow(const QString& widgetName) const
99{

Callers 5

SetupWidgetsMethod · 0.45
MakeEditorMethod · 0.45
CreateQtPartControlMethod · 0.45
CreateQtPartControlMethod · 0.45

Calls 5

GetDecorationColorFunction · 0.85
AddDisplayPlaneSubTreeFunction · 0.85
InitActionsMethod · 0.80
GetMultiWidgetNameMethod · 0.80
SetColorMethod · 0.45

Tested by 2

MakeEditorMethod · 0.36