Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 (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 QMITKSLIDERLEVELWINDOWWIDGET_H
14 #define QMITKSLIDERLEVELWINDOWWIDGET_H
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 #include <QWidget>
19 #include <mitkLevelWindowManager.h>
20 
22 
78 {
79  Q_OBJECT
80 
81 public:
83  QmitkSliderLevelWindowWidget(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
84 
86  ~QmitkSliderLevelWindowWidget() override;
87 
89  void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
90 
92  void SetDataStorage(mitk::DataStorage *ds);
93 
95  mitk::LevelWindowManager *GetManager();
96 
98 
101 
102 private:
104  void contextMenuEvent(QContextMenuEvent *) override;
105 
107  void OnPropertyModified(const itk::EventObject &e);
108 
109 protected:
111  virtual void Update();
112 
116  QRect m_Rect;
117 
121  QPoint m_StartPos;
122 
123  bool m_Resize;
124  bool m_Bottom;
132  unsigned long m_ObserverTag;
134 
135  QFont m_Font;
136 
141 
145  void paintEvent(QPaintEvent *e) override;
146 
154  void mouseMoveEvent(QMouseEvent *mouseEvent) override;
155 
156  void enterEvent(QEvent *event) override;
157 
165  void mousePressEvent(QMouseEvent *mouseEvent) override;
166 
170  void mouseReleaseEvent(QMouseEvent *mouseEvent) override;
171 
175  void resizeEvent(QResizeEvent *event) override;
176 
177 protected Q_SLOTS:
178 
181  void HideScale();
182 
185  void ShowScale();
186 };
187 
188 #endif // QMITKSLIDERLEVELWINDOWWIDGET_H
Data management class that handles &#39;was created by&#39; relations.
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
#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...