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

Method SetOnly2DVerticalLayout

Modules/QtWidgets/src/QmitkMultiWidgetLayoutManager.cpp:323–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void QmitkMultiWidgetLayoutManager::SetOnly2DVerticalLayout()
324{
325 MITK_DEBUG << "Set only 2D layout";
326
327 m_MultiWidget->ActivateMenuWidget(false);
328
329 delete m_MultiWidget->layout();
330
331 auto hBoxLayout = new QHBoxLayout(m_MultiWidget);
332 hBoxLayout->setContentsMargins(0, 0, 0, 0);
333 m_MultiWidget->setLayout(hBoxLayout);
334 hBoxLayout->setContentsMargins({});
335
336 auto mainSplit = new QSplitter(Qt::Vertical, m_MultiWidget);
337 hBoxLayout->addWidget(mainSplit);
338
339 QList<int> splitterSize;
340 auto all2DRenderWindowWidgets = m_MultiWidget->Get2DRenderWindowWidgets();
341 for (const auto& renderWindowWidget : all2DRenderWindowWidgets)
342 {
343 mainSplit->addWidget(renderWindowWidget.second.get());
344 renderWindowWidget.second->show();
345 splitterSize.push_back(1000);
346 }
347 mainSplit->setSizes(splitterSize);
348
349 m_MultiWidget->ActivateMenuWidget(true);
350
351 auto allRenderWindows = m_MultiWidget->GetRenderWindows();
352 for (auto& renderWindow : allRenderWindows)
353 {
354 renderWindow->UpdateLayoutDesignList(LayoutDesign::ONLY_2D_VERTICAL);
355 }
356}
357
358void QmitkMultiWidgetLayoutManager::SetOneTop3DBottomLayout()
359{

Callers

nothing calls this directly

Calls 5

showMethod · 0.80
ActivateMenuWidgetMethod · 0.45
GetRenderWindowsMethod · 0.45

Tested by

no test coverage detected