Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkOverlayController.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKOVERLAYCONTROLLER_H_HEADER_INCLUDED_C1E77191
18 #define MITKOVERLAYCONTROLLER_H_HEADER_INCLUDED_C1E77191
19 
20 // MITK-Stuff
21 #include "QmitkOverlay.h"
22 #include "mitkCommon.h"
23 #include "mitkPropertyList.h"
24 
25 #include <QObject>
26 
27 #include <string>
28 
29 #include <MitkQtOverlaysExports.h>
30 
31 class QmitkRenderWindow;
32 
58 {
59  Q_OBJECT
60 
61 public:
66  virtual ~QmitkOverlayController();
67 
75  void AddOverlay(QmitkOverlay *);
76 
77  void RemoveOverlay(QmitkOverlay *);
78 
79  void RemoveAllOverlays();
80 
84  void SetOverlayVisibility(bool visible);
85 
89  mitk::PropertyList *GetPropertyList();
90 
94  void SetPropertyList(mitk::PropertyList *);
95 
96 public slots:
103  void AdjustAllOverlayPosition();
104 
105  void AdjustOverlayPosition(QmitkOverlay::DisplayPosition displayPosition);
106 
107  void UpdateAllOverlays();
108 
109  void UpdateOverlayData(QmitkOverlay *overlay);
110 
111 protected:
120  void InitializeOverlayLayout();
121 
125  virtual void AlignOverlays();
126 
130  void InitializeWidget(QmitkOverlay::DisplayPosition pos);
131 
132  void RestackOverlays(QmitkOverlay::DisplayPosition pos);
133 
134  QSize GetMinimumSizeForWidget(QmitkOverlay::DisplayPosition displayPosition);
135 
136  typedef std::map<QmitkOverlay::DisplayPosition, QWidget *> OverlayPositionMap;
137  typedef std::vector<QmitkOverlay *> OverlayVector;
138 
142  OverlayVector m_AllOverlays;
143 
147  OverlayPositionMap m_PositionedOverlays;
148 
153 
158 };
159 
160 #endif /* MITKOVERLAYCONTROLLER_H_HEADER_INCLUDED_C1E77191 */
std::map< QmitkOverlay::DisplayPosition, QWidget * > OverlayPositionMap
OverlayVector m_AllOverlays
all QmitkOverlays that are currently added
Abstract base class for all overlay-objects in MITK.
Definition: QmitkOverlay.h:53
Key-value list holding instances of BaseProperty.
DisplayPosition
enumeration of all possible display positions
Definition: QmitkOverlay.h:59
mitk::PropertyList::Pointer m_PropertyList
PropertyList for RenderWindow-specific properties.
std::vector< QmitkOverlay * > OverlayVector
MITK implementation of the QVTKWidget.
#define MITKQTOVERLAYS_EXPORT
controller that manages the positioning and stacking of QmitkOverlays
OverlayPositionMap m_PositionedOverlays
all possible positions and the QWidgets representing the corresponding QmitkOverlays ...
QmitkRenderWindow * m_RenderWindow
RenderWindow that all Overlays will be added to.