Go to the documentation of this file.
37 const QString& default_value,
38 const QString& description,
53 ints_[option] = value;
58 QString current_string =
getValue().toString();
59 QHash<QString, int>::const_iterator int_iter =
ints_.find(current_string);
60 if (int_iter !=
ints_.end())
62 return int_iter.value();
75 QObject::connect(cb, qOverload<int>(&QComboBox::currentIndexChanged),
this,
76 [
this, cb](
int idx) {
setString(cb->itemText(idx)); });
virtual int getOptionInt()
Return the int value of the currently-chosen option, or 0 if the current option string does not have ...
virtual void clearOptions()
Clear the list of options.
virtual void setString(const QString &str)
Set the value of this property to the given string. Does not force the value to be one of the list of...
EnumProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr)
void requestOptions(EnumProperty *property_in_need_of_options)
requestOptions() is emitted each time createEditor() is called.
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
A single element of a property tree, with a name, value, description, and possibly children.
virtual void addOption(const QString &option, int value=0)
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,...
Property specialized for string values.
QHash< QString, int > ints_
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Create an editor widget to edit the value of this property.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02