Go to the documentation of this file.
38 const QString& default_value,
39 const QString& description,
62 cb->lineEdit()->setTextMargins(0, -1, 0, 0);
64 cb->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
66 cb->setEditText(
getValue().toString());
67 QObject::connect(cb, qOverload<int>(&QComboBox::currentIndexChanged),
this,
68 [
this, cb](
int idx) {
setString(cb->itemText(idx)); });
virtual void setString(const QString &str)
virtual void addOption(const QString &option)
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.
EditableEnumProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Create an editor widget to edit the value of this property.
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.
virtual void clearOptions()
void requestOptions(EditableEnumProperty *property_in_need_of_options)
requestOptions() is emitted each time createEditor() is called.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Dec 13 2024 03:31:02