29 #ifndef EDITABLE_ENUM_PROPERTY_H 30 #define EDITABLE_ENUM_PROPERTY_H 32 #include <QStringList> 51 const char* changed_slot =
nullptr,
52 QObject* receiver =
nullptr);
55 virtual void addOption(
const QString& option);
58 addOption(QString::fromStdString(option));
61 QWidget*
createEditor(QWidget* parent,
const QStyleOptionViewItem& option)
override;
70 virtual void setString(
const QString& str);
91 #endif // EDITABLE_ENUM_PROPERTY_H virtual void setString(const QString &str)
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option) override
Create an editor widget to edit the value of this property.
virtual void clearOptions()
A single element of a property tree, with a name, value, description, and possibly children...
virtual void addOption(const QString &option)
void addOptionStd(const std::string &option)
EditableEnumProperty(const QString &name=QString(), const QString &default_value=QString(), const QString &description=QString(), Property *parent=nullptr, const char *changed_slot=nullptr, QObject *receiver=nullptr)
void requestOptions(EditableEnumProperty *property_in_need_of_options)
requestOptions() is emitted each time createEditor() is called.
Property specialized for string values.
void sortOptions()
Sort the option strings.