12 #ifndef QmitkNumberPropertyEditor_h
13 #define QmitkNumberPropertyEditor_h
34 Q_PROPERTY(
short decimalPlaces READ getDecimalPlaces WRITE setDecimalPlaces)
35 Q_PROPERTY(
bool showPercent READ getShowPercent WRITE setShowPercent)
36 Q_PROPERTY(
int minValue READ minValue WRITE setMinValue)
37 Q_PROPERTY(
int maxValue READ maxValue WRITE setMaxValue)
153 void adjustFactors(
short,
bool);
155 bool m_SelfChangeLock;
A QSpinBox that edits numeric MITK properties (int, float, double).
void setShowPercent(bool showPercent)
Enable or disable percentage display (e.g. 0.5 displayed as 50%).
void setMinValue(int value)
Set the minimum allowed value.
QString textFromValue(int) const override
void PropertyChanged() override
Called when the observed property value has changed.
mitk::GenericProperty< float > * m_FloatProperty
int valueFromText(const QString &) const override
void setMaxValue(int value)
Set the maximum allowed value.
bool getShowPercent() const
Check whether values are displayed as percentages.
void PropertyRemoved() override
Called when the observed property is about to be deleted.
void setDoubleValue(double value)
Set the current value from a double.
QmitkNumberPropertyEditor(mitk::DoubleProperty *property, QWidget *parent)
Construct an editor for a double property.
QmitkNumberPropertyEditor(mitk::IntProperty *property, QWidget *parent)
Construct an editor for an integer property.
short getDecimalPlaces() const
Get the number of decimal places shown.
QmitkNumberPropertyEditor(mitk::FloatProperty *property, QWidget *parent)
Construct an editor for a float property.
int maxValue() const
Get the maximum allowed value.
void setDecimalPlaces(short places)
Set the number of decimal places (only effective for float/double properties).
mitk::GenericProperty< double > * m_DoubleProperty
double m_FactorPropertyToSpinbox
int minValue() const
Get the minimum allowed value.
mitk::GenericProperty< int > * m_IntProperty
~QmitkNumberPropertyEditor() override
Destructor.
double m_FactorSpinboxToDisplay
double doubleValue() const
Get the current value as a double.
Read-write observer for a mitk::BaseProperty.
Declares commonly used GenericProperty specializations for MITK.