29 #ifndef FLOAT_PROPERTY_H 30 #define FLOAT_PROPERTY_H 45 const char* changed_slot =
nullptr,
46 QObject* receiver =
nullptr);
55 bool setValue(
const QVariant& new_value)
override;
99 #endif // FLOAT_PROPERTY_H
FloatProperty(const QString &name=QString(), float default_value=0, const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
A single element of a property tree, with a name, value, description, and possibly children...
bool multiply(float factor)
Multiply the property value by the given factor.
Property specialized to enforce floating point max/min.
bool add(float delta)
Add the given delta to the property value.
bool setFloat(float new_value)
Float-typed "SLOT" version of setValue().
bool setValue(const QVariant &new_value) override
Set the new value for this property. Returns true if the new value is different from the old value...
double min(double a, double b)
virtual float getFloat() const
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
double max(double a, double b)