22 #include <QGridLayout> 26 const QString& multiWidgetName)
28 , m_CrosshairVisibility(false)
39 if (
nullptr != displayActionEventHandler)
41 displayActionEventHandler->InitActions();
67 if (
nullptr != displayActionEventHandler)
69 displayActionEventHandler->InitActions();
75 if (
"axial" == widgetName ||
"sagittal" == widgetName ||
"coronal" == widgetName ||
"3d" == widgetName)
93 if (currentActiveRenderWindowWidget == activeRenderWindowWidget)
99 if (
nullptr != currentActiveRenderWindowWidget)
101 auto decorationColor = currentActiveRenderWindowWidget->GetDecorationColor();
102 QColor hexColor(decorationColor[0] * 255, decorationColor[1] * 255, decorationColor[2] * 255);
103 currentActiveRenderWindowWidget->setStyleSheet(
"border: 2px solid " + hexColor.name(QColor::HexRgb));
107 if (
nullptr != activeRenderWindowWidget)
109 activeRenderWindowWidget->setStyleSheet(
"border: 2px solid #FF6464");
118 if (widgetName.isNull())
127 if (
nullptr != renderWindowWidget)
129 renderWindowWidget->GetSliceNavigationController()->SelectSliceByPoint(newPosition);
130 renderWindowWidget->RequestUpdate();
134 MITK_ERROR <<
"Position can not be set for an unknown render window widget.";
146 for (
const auto& renderWindowWidget : renderWindowWidgets)
148 renderWindowWidget.second->ActivateCrosshair(activate);
151 m_CrosshairVisibility = activate;
157 if (
nullptr == dataStorage)
169 MITK_DEBUG <<
"Changing crosshair mode to " << userMode;
199 if (QEvent::MouseButtonPress != e->type())
205 if (
nullptr == renderWindowWidget)
216 QWidget::moveEvent(e);
226 void QmitkMxNMultiWidget::SetLayoutImpl()
231 int difference = requiredRenderWindowWidgets - existingRenderWindowWidgets;
232 while (0 < difference)
235 CreateRenderWindowWidget();
239 while (0 > difference)
247 if (
nullptr != firstRenderWindowWidget)
255 void QmitkMxNMultiWidget::CreateRenderWindowWidget()
260 renderWindowWidget->SetCornerAnnotationText(renderWindowWidgetName.toStdString());
266 auto renderWindow = renderWindowWidget->GetRenderWindow();
void LayoutDesignChanged(QmitkRenderWindowMenu::LayoutDesign)
static RenderingManager * GetInstance()
void CrosshairRotationModeChanged(int)
MITK implementation of the QVTKWidget.
void CrosshairVisibilityChanged(bool)
Point< ScalarType, 3 > Point3D
ViewDirection
Possible view directions for render windows.
virtual void InitializeViewsByBoundingObjects(const DataStorage *)
Initializes the renderwindows by the aggregated geometry of all objects that are held in the data sto...