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

Method UpdateLayoutDesignList

Modules/QtWidgets/src/QmitkRenderWindowMenu.cpp:101–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void QmitkRenderWindowMenu::UpdateLayoutDesignList(LayoutDesign layoutDesign)
102{
103 m_LayoutDesign = layoutDesign;
104
105 if (nullptr == m_LayoutActionsMenu)
106 {
107 CreateSettingsWidget();
108 }
109
110 m_DefaultLayoutAction->setEnabled(true);
111 m_All2DTop3DBottomLayoutAction->setEnabled(true);
112 m_All2DLeft3DRightLayoutAction->setEnabled(true);
113 m_OneBigLayoutAction->setEnabled(true);
114 m_Only2DHorizontalLayoutAction->setEnabled(true);
115 m_Only2DVerticalLayoutAction->setEnabled(true);
116 m_OneTop3DBottomLayoutAction->setEnabled(true);
117 m_OneLeft3DRightLayoutAction->setEnabled(true);
118 m_AllHorizontalLayoutAction->setEnabled(true);
119 m_AllVerticalLayoutAction->setEnabled(true);
120 m_RemoveOneLayoutAction->setEnabled(true);
121
122 switch (m_LayoutDesign)
123 {
124 case LayoutDesign::DEFAULT:
125 {
126 m_DefaultLayoutAction->setEnabled(false);
127 break;
128 }
129 case LayoutDesign::ALL_2D_TOP_3D_BOTTOM:
130 {
131 m_All2DTop3DBottomLayoutAction->setEnabled(false);
132 break;
133 }
134 case LayoutDesign::ALL_2D_LEFT_3D_RIGHT:
135 {
136 m_All2DLeft3DRightLayoutAction->setEnabled(false);
137 break;
138 }
139 case LayoutDesign::ONE_BIG:
140 {
141 m_OneBigLayoutAction->setEnabled(false);
142 break;
143 }
144 case LayoutDesign::ONLY_2D_HORIZONTAL:
145 {
146 m_Only2DHorizontalLayoutAction->setEnabled(false);
147 break;
148 }
149 case LayoutDesign::ONLY_2D_VERTICAL:
150 {
151 m_Only2DVerticalLayoutAction->setEnabled(false);
152 break;
153 }
154 case LayoutDesign::ONE_TOP_3D_BOTTOM:
155 {
156 m_OneTop3DBottomLayoutAction->setEnabled(false);
157 break;
158 }

Callers

nothing calls this directly

Calls 1

setEnabledMethod · 0.45

Tested by

no test coverage detected