42 const QString& description,
44 const char *changed_slot,
46 :
Property( name, default_value, description, parent, changed_slot, receiver )
70 const QStyleOptionViewItem& option )
72 QSpinBox* editor =
new QSpinBox( parent );
73 editor->setFrame(
false );
75 connect( editor, SIGNAL( valueChanged(
int )),
this, SLOT(
setInt(
int )));
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...
IntProperty(const QString &name=QString(), int default_value=0, const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)
Constructor.
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...
A single element of a property tree, with a name, value, description, and possibly children...
void setInt(int new_value)
Set the value of this property to the given integer.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option)
Overridden to create a QSpinBox with the min and max set and with a signal/slot connection to setInt(...
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...