Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
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 = {});
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(QEnterEvent *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::m_ScaleVisible
bool m_ScaleVisible
Definition: QmitkSliderLevelWindowWidget.h:129
QmitkSliderLevelWindowWidget::m_CtrlPressed
bool m_CtrlPressed
Definition: QmitkSliderLevelWindowWidget.h:127
QmitkSliderLevelWindowWidget::m_Manager
mitk::LevelWindowManager::Pointer m_Manager
manager who is responsible to collect and deliver changes on Level/Window
Definition: QmitkSliderLevelWindowWidget.h:100
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkSliderLevelWindowWidget::m_Leftbutton
bool m_Leftbutton
Definition: QmitkSliderLevelWindowWidget.h:126
QmitkSliderLevelWindowWidget::m_LevelWindow
mitk::LevelWindow m_LevelWindow
Definition: QmitkSliderLevelWindowWidget.h:97
QmitkSliderLevelWindowWidget::m_StartPos
QPoint m_StartPos
Definition: QmitkSliderLevelWindowWidget.h:121
QmitkSliderLevelWindowWidget::m_Bottom
bool m_Bottom
Definition: QmitkSliderLevelWindowWidget.h:124
QmitkSliderLevelWindowWidget::m_LowerBound
QRect m_LowerBound
Definition: QmitkSliderLevelWindowWidget.h:130
QmitkSliderLevelWindowWidget
Provides a widget with a slider to change the level and window value of the current image.
Definition: QmitkSliderLevelWindowWidget.h:77
itk::SmartPointer< Self >
mitk::LevelWindowManager
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
Definition: mitkLevelWindowManager.h:51
QmitkSliderLevelWindowWidget::m_Rect
QRect m_Rect
Definition: QmitkSliderLevelWindowWidget.h:116
mitk::LevelWindow
The LevelWindow class Class to store level/window values.
Definition: mitkLevelWindow.h:45
QmitkLevelWindowWidgetContextMenu
Provides a contextmenu for Level/Window functionality.
Definition: QmitkLevelWindowWidgetContextMenu.h:30
QmitkSliderLevelWindowWidget::m_UpperBound
QRect m_UpperBound
Definition: QmitkSliderLevelWindowWidget.h:131
QmitkSliderLevelWindowWidget::m_ObserverTag
unsigned long m_ObserverTag
Definition: QmitkSliderLevelWindowWidget.h:132
MitkQtWidgetsExports.h
QmitkSliderLevelWindowWidget::m_Resize
bool m_Resize
Definition: QmitkSliderLevelWindowWidget.h:123
QmitkSliderLevelWindowWidget::m_Font
QFont m_Font
Definition: QmitkSliderLevelWindowWidget.h:135
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
QmitkSliderLevelWindowWidget::m_MouseDown
bool m_MouseDown
Definition: QmitkSliderLevelWindowWidget.h:125
QmitkSliderLevelWindowWidget::m_Contextmenu
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
Definition: QmitkSliderLevelWindowWidget.h:140
QmitkSliderLevelWindowWidget::m_IsObserverTagSet
bool m_IsObserverTagSet
Definition: QmitkSliderLevelWindowWidget.h:133
QmitkSliderLevelWindowWidget::m_MoveHeight
int m_MoveHeight
Definition: QmitkSliderLevelWindowWidget.h:128
mitkLevelWindowManager.h