Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkMxNMultiWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QMITKMXNMULTIWIDGET_H
14 #define QMITKMXNMULTIWIDGET_H
15 
16 // qt widgets module
17 #include "MitkQtWidgetsExports.h"
19 
27 {
28  Q_OBJECT
29 
30 public:
31 
32  QmitkMxNMultiWidget(QWidget* parent = nullptr,
33  Qt::WindowFlags f = 0,
34  const QString& multiWidgetName = "mxnmulti");
35 
36  ~QmitkMxNMultiWidget() = default;
37 
38  void InitializeMultiWidget() override;
39  void MultiWidgetOpened() override;
40  void MultiWidgetClosed() override;
41 
42  void Synchronize(bool synchronized) override;
43 
44  QmitkRenderWindow* GetRenderWindow(const QString& widgetName) const override;
45  QmitkRenderWindow* GetRenderWindow(const mitk::BaseRenderer::ViewDirection& viewDirection) const override;
46 
47  void SetActiveRenderWindowWidget(RenderWindowWidgetPointer activeRenderWindowWidget) override;
48 
49  void SetSelectedPosition(const mitk::Point3D& newPosition, const QString& widgetName) override;
50  const mitk::Point3D GetSelectedPosition(const QString& widgetName) const override;
51 
52  void SetCrosshairVisibility(bool activate) override;
53  bool GetCrosshairVisibility() const override { return m_CrosshairVisibility; }
54 
55  void ResetCrosshair() override;
56 
57  void SetWidgetPlaneMode(int userMode) override;
58 
59 public Q_SLOTS:
60 
61  // mouse events
62  void wheelEvent(QWheelEvent* e) override;
63  void mousePressEvent(QMouseEvent* e) override;
64  void moveEvent(QMoveEvent* e) override;
65 
66 Q_SIGNALS:
67 
68  void WheelMoved(QWheelEvent *);
69  void Moved();
70 
71 private:
72 
73  void SetLayoutImpl() override;
74  void SetInteractionSchemeImpl() override { }
75 
76  void CreateRenderWindowWidget();
77 
78  bool m_CrosshairVisibility;
79 
80 };
81 
82 #endif // QMITKMXNMULTIWIDGET_H
QmitkRenderWindow * GetRenderWindow(int row, int column) const
virtual const mitk::Point3D GetSelectedPosition(const QString &widgetName) const =0
#define MITKQTWIDGETS_EXPORT
virtual void InitializeMultiWidget()=0
std::shared_ptr< QmitkRenderWindowWidget > RenderWindowWidgetPointer
virtual void SetCrosshairVisibility(bool visible)=0
MITK implementation of the QVTKWidget.
virtual void SetActiveRenderWindowWidget(RenderWindowWidgetPointer activeRenderWindowWidget)
virtual void SetWidgetPlaneMode(int mode)=0
ViewDirection
Possible view directions for render windows.
bool GetCrosshairVisibility() const override
The &#39;QmitkMxNMultiWidget&#39; is a &#39;QmitkAbstractMultiWidget&#39; that is used to display multiple render win...
virtual void ResetCrosshair()=0
The &#39;QmitkAbstractMultiWidget&#39; is a &#39;QWidget&#39; that can be subclassed to display multiple render windo...
virtual void SetSelectedPosition(const mitk::Point3D &newPosition, const QString &widgetName)=0