40 const QString& default_value,
41 const QString& description,
43 const char *changed_slot,
45 :
StringProperty( name, default_value, description, parent, changed_slot, receiver )
60 const QStyleOptionViewItem& option )
67 cb->setEditText(
getValue().toString() );
68 QObject::connect( cb, SIGNAL( currentIndexChanged(
const QString& )),
this, SLOT(
setString(
const QString& )));
virtual void setString(const QString &str)
virtual void clearOptions()
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...
virtual void addOption(const QString &option)
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option)
Create an editor widget to edit the value of this property.
EditableEnumProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=0, const char *changed_slot=0, QObject *receiver=0)
void requestOptions(EditableEnumProperty *property_in_need_of_options)
requestOptions() is emitted each time createEditor() is called.
Property specialized for string values.
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...