Medical Imaging Interaction Toolkit  2023.12.99-29da53b2
Medical Imaging Interaction Toolkit
QmitkNumberPropertyView.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 #ifndef QmitkNumberPropertyView_h
13 #define QmitkNumberPropertyView_h
14 
16 #include <QLabel>
17 #include <mitkProperties.h>
18 #include <mitkPropertyObserver.h>
19 
22 {
23  Q_OBJECT
24  Q_PROPERTY(short decimalPlaces READ decimalPlaces WRITE setDecimalPlaces)
25  Q_PROPERTY(QString suffix READ suffix WRITE setSuffix)
26  Q_PROPERTY(bool showPercent READ showPercent WRITE setShowPercent)
27 
28 public:
29  QmitkNumberPropertyView(const mitk::IntProperty *, QWidget *parent);
30  QmitkNumberPropertyView(const mitk::FloatProperty *, QWidget *parent);
31  QmitkNumberPropertyView(const mitk::DoubleProperty *, QWidget *parent);
32 
33  ~QmitkNumberPropertyView() override;
34 
35  short decimalPlaces() const;
36  void setDecimalPlaces(short);
37 
38  QString suffix() const;
39  void setSuffix(const QString &);
40 
41  bool showPercent() const;
42  void setShowPercent(bool);
43 
44 protected:
45  void initialize();
46 
47  void PropertyChanged() override;
48  void PropertyRemoved() override;
49 
50  void DisplayNumber();
51 
52  union {
56  };
57 
58  const int m_DataType;
59 
61  QString m_Suffix;
63 };
64 
65 #endif
QmitkNumberPropertyView::m_DataType
const int m_DataType
Definition: QmitkNumberPropertyView.h:58
MITKQTWIDGETSEXT_EXPORT
#define MITKQTWIDGETSEXT_EXPORT
Definition: MitkQtWidgetsExtExports.h:15
QmitkNumberPropertyView::m_Suffix
QString m_Suffix
-1 indicates "no limit to decimal places"
Definition: QmitkNumberPropertyView.h:61
QmitkNumberPropertyView::m_DecimalPlaces
short m_DecimalPlaces
Definition: QmitkNumberPropertyView.h:60
mitk::PropertyView
Definition: mitkPropertyObserver.h:54
QmitkNumberPropertyView::m_FloatProperty
const mitk::GenericProperty< float > * m_FloatProperty
Definition: QmitkNumberPropertyView.h:54
mitk::GenericProperty< int >
QmitkNumberPropertyView::m_IntProperty
const mitk::GenericProperty< int > * m_IntProperty
Definition: QmitkNumberPropertyView.h:53
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitkPropertyObserver.h
MitkQtWidgetsExtExports.h
QmitkNumberPropertyView::m_DoubleProperty
const mitk::GenericProperty< double > * m_DoubleProperty
Definition: QmitkNumberPropertyView.h:55
mitkProperties.h
QmitkNumberPropertyView::m_DisplayFactor
double m_DisplayFactor
Definition: QmitkNumberPropertyView.h:62
QmitkNumberPropertyView
Definition: QmitkNumberPropertyView.h:21