12 #ifndef QmitkNumberPropertyView_h
13 #define QmitkNumberPropertyView_h
33 Q_PROPERTY(
short decimalPlaces READ decimalPlaces WRITE setDecimalPlaces)
34 Q_PROPERTY(QString suffix READ suffix WRITE setSuffix)
35 Q_PROPERTY(
bool showPercent READ showPercent WRITE setShowPercent)
Read-only QLabel that displays a numeric MITK property value.
void PropertyChanged() override
Called when the observed property value has changed.
const mitk::GenericProperty< int > * m_IntProperty
~QmitkNumberPropertyView() override
Destructor.
const mitk::GenericProperty< double > * m_DoubleProperty
bool showPercent() const
Check whether values are displayed as percentages.
QString m_Suffix
-1 indicates "no limit to decimal places"
void setDecimalPlaces(short places)
Set the number of decimal places to display.
void setShowPercent(bool show)
Enable or disable percentage display (value multiplied by 100, "%" suffix).
const mitk::GenericProperty< float > * m_FloatProperty
QString suffix() const
Get the current text suffix.
QmitkNumberPropertyView(const mitk::IntProperty *property, QWidget *parent)
Construct a view for an integer property.
void setSuffix(const QString &suffix)
Set a text suffix appended to the displayed value.
void PropertyRemoved() override
Called when the observed property is about to be deleted.
QmitkNumberPropertyView(const mitk::FloatProperty *property, QWidget *parent)
Construct a view for a float property.
QmitkNumberPropertyView(const mitk::DoubleProperty *property, QWidget *parent)
Construct a view for a double property.
short decimalPlaces() const
Get the number of decimal places displayed.
Read-only observer for a mitk::BaseProperty.
Declares commonly used GenericProperty specializations for MITK.