12 #ifndef QmitkNumberPropertySlider_h
13 #define QmitkNumberPropertySlider_h
41 Q_PROPERTY(
short decimalPlaces READ getDecimalPlaces WRITE setDecimalPlaces)
42 Q_PROPERTY(
bool showPercent READ getShowPercent WRITE setShowPercent)
43 Q_PROPERTY(
int minValue READ minValue WRITE setMinValue)
44 Q_PROPERTY(
int maxValue READ maxValue WRITE setMaxValue)
140 std::unique_ptr<Impl> d;
A QSlider that edits numeric MITK properties (int, float, double).
QmitkNumberPropertySlider(QWidget *parent=nullptr)
Construct the slider without an associated property.
int minValue() const
Get the minimum allowed value.
void SetProperty(mitk::FloatProperty *property)
Bind this slider to a float property.
void setDoubleValue(double value)
Set the current value from a double.
short getDecimalPlaces() const
Get the number of decimal places used for conversion.
double doubleValue() const
Get the current value as a double.
void setMinValue(int value)
Set the minimum allowed value.
void setMaxValue(int value)
Set the maximum allowed value.
~QmitkNumberPropertySlider() override
Destructor.
void setDecimalPlaces(short places)
Set the number of decimal places (only effective for float/double properties).
int maxValue() const
Get the maximum allowed value.
void SetProperty(mitk::IntProperty *property)
Bind this slider to an integer property.
void SetProperty(mitk::DoubleProperty *property)
Bind this slider to a double property.
void setShowPercent(bool showPercent)
Enable or disable percentage mode.
bool getShowPercent() const
Check whether values are interpreted as percentages.
Find image slices visible on a given plane.