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

Method SetAllVerticalLayout

Modules/QtWidgets/src/QmitkMultiWidgetLayoutManager.cpp:488–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488void QmitkMultiWidgetLayoutManager::SetAllVerticalLayout()
489{
490 MITK_DEBUG << "Set all vertical layout";
491
492 m_MultiWidget->ActivateMenuWidget(false);
493
494 delete m_MultiWidget->layout();
495
496 auto hBoxLayout = new QHBoxLayout(m_MultiWidget);
497 hBoxLayout->setContentsMargins(0, 0, 0, 0);
498 m_MultiWidget->setLayout(hBoxLayout);
499 hBoxLayout->setContentsMargins({});
500
501 auto mainSplit = new QSplitter(Qt::Vertical, m_MultiWidget);
502 hBoxLayout->addWidget(mainSplit);
503
504 QList<int> splitterSize;
505 auto allRenderWindowWidgets = m_MultiWidget->GetRenderWindowWidgets();
506 for (const auto& renderWindowWidget : allRenderWindowWidgets)
507 {
508 mainSplit->addWidget(renderWindowWidget.second.get());
509 renderWindowWidget.second->show();
510 splitterSize.push_back(1000);
511 }
512
513 // set size for splitter
514 mainSplit->setSizes(splitterSize);
515
516 m_MultiWidget->ActivateMenuWidget(true);
517
518 auto allRenderWindows = m_MultiWidget->GetRenderWindows();
519 for (auto& renderWindow : allRenderWindows)
520 {
521 renderWindow->UpdateLayoutDesignList(LayoutDesign::ALL_VERTICAL);
522 }
523}
524
525void QmitkMultiWidgetLayoutManager::RemoveOneLayout()
526{

Callers

nothing calls this directly

Calls 5

showMethod · 0.80
ActivateMenuWidgetMethod · 0.45
GetRenderWindowsMethod · 0.45

Tested by

no test coverage detected