Go to the documentation of this file.
29 #ifndef EDITABLE_ENUM_PROPERTY_H
30 #define EDITABLE_ENUM_PROPERTY_H
32 #include <QStringList>
52 template <
typename Func,
typename R>
54 const QString& default_value,
55 const QString& description,
61 connect(receiver, std::forward<Func>(changed_slot));
65 template <
typename Func,
typename P>
67 const QString& default_value,
68 const QString& description,
73 connect(parent, std::forward<Func>(changed_slot));
77 virtual void addOption(
const QString& option);
80 addOption(QString::fromStdString(option));
83 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option)
override;
92 virtual void setString(
const QString& str);
113 #endif // EDITABLE_ENUM_PROPERTY_H
void sortOptions()
Sort the option strings.
virtual void setString(const QString &str)
virtual void addOption(const QString &option)
void addOptionStd(const std::string &option)
QMetaObject::Connection connect(const QObject *receiver, const char *slot, Qt::ConnectionType type=Qt::AutoConnection)
Connect changed() signal to given slot of receiver.
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.
Property specialized for string values.
virtual void clearOptions()
EditableEnumProperty(const QString &name, const QString &default_value, const QString &description, P *parent, Func &&changed_slot)
EditableEnumProperty(const QString &name, const QString &default_value, const QString &description, Property *parent, Func &&changed_slot, const R *receiver)
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