Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkOverlay.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 MITKOVERLAY_H_HEADER_INCLUDED_C10DC4EB
18 #define MITKOVERLAY_H_HEADER_INCLUDED_C10DC4EB
19 
20 // MITK
21 #include "mitkCommon.h"
22 #include "mitkPropertyList.h"
23 
24 // Qt
25 #include <QWidget>
26 
27 #include <MitkQtOverlaysExports.h>
28 
53 class MITKQTOVERLAYS_EXPORT QmitkOverlay : public QObject
54 {
55  Q_OBJECT
56 
57 public:
60  {
61  top_Left = 0,
62  top_Center = 1,
63  top_Right = 2,
64  middle_Left = 3,
65  middle_Right = 4,
66  bottom_Left = 5,
67  bottom_Center = 6,
68  bottom_Right = 7
69  };
70 
74  QmitkOverlay(const char *id);
75 
79  virtual ~QmitkOverlay();
80 
82  virtual void SetPosition(DisplayPosition);
83 
85  virtual DisplayPosition GetPosition();
86 
88  virtual void SetLayer(unsigned int);
89 
91  virtual unsigned int GetLayer();
92 
96  virtual void GenerateData(mitk::PropertyList::Pointer /*pl*/){};
97 
101  virtual QWidget *GetWidget();
102 
103  virtual QSize GetNeededSize() = 0;
104 
105 protected:
109  void AddDropShadow(QWidget *widget);
111  const char *m_Id;
112 
115 
117  unsigned int m_Layer;
118 
120  QWidget *m_Widget;
121 
123 };
124 
125 #endif /* MITKOVERLAY_H_HEADER_INCLUDED_C10DC4EB */
Abstract base class for all overlay-objects in MITK.
Definition: QmitkOverlay.h:53
bool m_WidgetIsCustom
Definition: QmitkOverlay.h:122
DisplayPosition
enumeration of all possible display positions
Definition: QmitkOverlay.h:59
virtual void GenerateData(mitk::PropertyList::Pointer)
abstract method to internally setup the overlay
Definition: QmitkOverlay.h:96
QWidget * m_Widget
internal QWidget representing the overlay
Definition: QmitkOverlay.h:120
#define MITKQTOVERLAYS_EXPORT
unsigned int m_Layer
layer of the overlay
Definition: QmitkOverlay.h:117
DisplayPosition m_Position
position of the overlay
Definition: QmitkOverlay.h:114
const char * m_Id
ID of the overlay.
Definition: QmitkOverlay.h:111