Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkLineEditLevelWindowWidget.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 QMITKLINEEDITLEVELWINDOWWIDGET
18 #define QMITKLINEEDITLEVELWINDOWWIDGET
19 
20 #include <MitkQtWidgetsExports.h>
21 
22 #include <QWidget>
23 
24 #include <mitkLevelWindowManager.h>
25 
27 class QLineEdit;
28 
36 {
37  Q_OBJECT
38 
39 public:
41  QmitkLineEditLevelWindowWidget(QWidget *parent = nullptr, Qt::WindowFlags f = nullptr);
42 
45 
47  QLineEdit *m_LevelInput;
48 
50  QLineEdit *m_WindowInput;
51 
57 
60 
62  void setLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
63 
65  void SetDataStorage(mitk::DataStorage *ds);
66 
68  mitk::LevelWindowManager *GetManager();
69 
70 private:
72  void contextMenuEvent(QContextMenuEvent *) override;
73 
75  void OnPropertyModified(const itk::EventObject &e);
76 
77 public slots:
78 
80  void SetLevelValue();
81 
83  void SetWindowValue();
84 
85  // validator to accept only possible values for Level/Window in lineedits
86  // void setValidator();
87 
88 protected:
89  unsigned long m_ObserverTag;
91 
96 };
97 #endif // QMITKLINEEDITLEVELWINDOWWIDGET
QLineEdit * m_LevelInput
inputfield for level value
Data management class that handles 'was created by' relations.
#define MITKQTWIDGETS_EXPORT
Provides a contextmenu for Level/Window functionality.
The LevelWindow class Class to store level/window values.
mitk::LevelWindowManager::Pointer m_Manager
manager who is responsible to collect and deliver changes on Level/Window
Provides a widget with two lineedit fields, one to change the window value of the current image and o...
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image...
QLineEdit * m_WindowInput
inputfield for window value