Property specialized to enforce floating point max/min. More...
#include <float_property.h>
Public Member Functions | |
FloatProperty (const QString &name=QString(), float default_value=0, const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0) | |
virtual float | getFloat () const |
float | getMax () |
float | getMin () |
void | setMax (float max) |
void | setMin (float min) |
virtual bool | setValue (const QVariant &new_value) |
Set the new value for this property. Returns true if the new value is different from the old value, false if same. | |
Private Attributes | |
float | max_ |
float | min_ |
Property specialized to enforce floating point max/min.
Definition at line 38 of file float_property.h.
rviz::FloatProperty::FloatProperty | ( | const QString & | name = QString() , |
|
float | default_value = 0 , |
|||
const QString & | description = QString() , |
|||
Property * | parent = 0 , |
|||
const char * | changed_slot = 0 , |
|||
QObject * | receiver = 0 | |||
) |
Definition at line 39 of file float_property.cpp.
virtual float rviz::FloatProperty::getFloat | ( | ) | const [inline, virtual] |
Definition at line 58 of file float_property.h.
float rviz::FloatProperty::getMax | ( | ) | [inline] |
Definition at line 63 of file float_property.h.
float rviz::FloatProperty::getMin | ( | ) | [inline] |
Definition at line 61 of file float_property.h.
void rviz::FloatProperty::setMax | ( | float | max | ) |
Definition at line 62 of file float_property.cpp.
void rviz::FloatProperty::setMin | ( | float | min | ) |
Definition at line 56 of file float_property.cpp.
bool rviz::FloatProperty::setValue | ( | const QVariant & | new_value | ) | [virtual] |
Set the new value for this property. Returns true if the new value is different from the old value, false if same.
If the new value is different from the old value, this emits aboutToChange() before changing the value and changed() after.
Overridden from Property::setValue() to enforce minimum and maximum.
Reimplemented from rviz::Property.
Definition at line 51 of file float_property.cpp.
float rviz::FloatProperty::max_ [private] |
Definition at line 67 of file float_property.h.
float rviz::FloatProperty::min_ [private] |
Definition at line 66 of file float_property.h.