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

Method SetActiveRenderWindowWidget

Modules/QtWidgets/src/QmitkMxNMultiWidget.cpp:272–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void QmitkMxNMultiWidget::SetActiveRenderWindowWidget(RenderWindowWidgetPointer activeRenderWindowWidget)
273{
274 auto currentActiveRenderWindowWidget = GetActiveRenderWindowWidget();
275 if (currentActiveRenderWindowWidget == activeRenderWindowWidget)
276 {
277 return;
278 }
279
280 // reset the decoration color of the previously active render window widget
281 if (nullptr != currentActiveRenderWindowWidget)
282 {
283 auto decorationColor = currentActiveRenderWindowWidget->GetDecorationColor();
284 QColor hexColor(decorationColor[0] * 255, decorationColor[1] * 255, decorationColor[2] * 255);
285 currentActiveRenderWindowWidget->setStyleSheet("QmitkRenderWindowWidget { border: 2px solid " +
286 hexColor.name(QColor::HexRgb) + "; }");
287 }
288
289 // set the new decoration color of the currently active render window widget
290 if (nullptr != activeRenderWindowWidget)
291 {
292 activeRenderWindowWidget->setStyleSheet("QmitkRenderWindowWidget { border: 2px solid #FF6464; }");
293 }
294
295 QmitkAbstractMultiWidget::SetActiveRenderWindowWidget(activeRenderWindowWidget);
296}
297
298void QmitkMxNMultiWidget::InitializeViews(const mitk::TimeGeometry* geometry, bool resetCamera)
299{

Callers 5

SetLayoutImplMethod · 0.95
TearDownAllCellsMethod · 0.95
ApplyLayoutMethod · 0.95
SetDataBasedLayoutMethod · 0.95

Calls 2

GetDecorationColorMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected