Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSliderLevelWindowWidget.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 QMITKSLIDERLEVELWINDOW_WIDGET
18 #define QMITKSLIDERLEVELWINDOW_WIDGET
19 
20 #include <MitkQtWidgetsExports.h>
21 
22 #include <QWidget>
23 #include <mitkLevelWindowManager.h>
24 
26 
82 {
83  Q_OBJECT
84 
85 public:
87  QmitkSliderLevelWindowWidget(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
88 
91 
97 
100 
102  void setLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
103 
105  void setDataStorage(mitk::DataStorage *ds);
106 
108  mitk::LevelWindowManager *GetManager();
109 
110 private:
112  void contextMenuEvent(QContextMenuEvent *) override;
113 
115  void OnPropertyModified(const itk::EventObject &e);
116 
117 protected:
119  virtual void update();
120 
124  QRect m_Rect;
125 
129  QPoint m_StartPos;
130 
131  bool m_Resize;
132  bool m_Bottom;
140  unsigned long m_ObserverTag;
142 
143  QFont m_Font;
144 
149 
153  void paintEvent(QPaintEvent *e) override;
154 
162  void mouseMoveEvent(QMouseEvent *mouseEvent) override;
163 
164  void enterEvent(QEvent *event) override;
165 
173  void mousePressEvent(QMouseEvent *mouseEvent) override;
174 
178  void mouseReleaseEvent(QMouseEvent *mouseEvent) override;
179 
183  void virtual resizeEvent(QResizeEvent *event) override;
184 
185 protected slots:
186 
188  void hideScale();
189 
191  void showScale();
192 };
193 #endif // QMITKSLIDERLEVELWINDOW_WIDGET
Data management class that handles 'was created by' relations.
#define MITKQTWIDGETS_EXPORT
Provides a widget with a slider to change the level and window value of the current image...
Provides a contextmenu for Level/Window functionality.
The LevelWindow class Class to store level/window values.
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
mitk::LevelWindowManager::Pointer m_Manager
manager who is responsible to collect and deliver changes on Level/Window
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image...