21 #ifndef VSTRINGPROPERTY_H
22 #define VSTRINGPROPERTY_H
24 #include <qcompilerdetection.h>
26 #include <QMetaObject>
29 #include <QStringList>
30 #include <QStyleOptionViewItem>
34 #include "../vproperty.h"
54 virtual QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &options,
55 const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE;
58 virtual QVariant
getEditorData(
const QWidget *editor)
const Q_DECL_OVERRIDE;
65 virtual void setSetting(
const QString &key,
const QVariant &value) Q_DECL_OVERRIDE;
68 virtual QVariant
getSetting(
const QString &key)
const Q_DECL_OVERRIDE;
74 virtual QString
type()
const Q_DECL_OVERRIDE;
81 Q_REQUIRED_RESULT
virtual VProperty *
clone(
bool include_children =
true,
82 VProperty *container =
nullptr)
const Q_DECL_OVERRIDE;
84 virtual void updateParent(
const QVariant &value) Q_DECL_OVERRIDE;
95 virtual bool eventFilter(QObject *
object, QEvent *event) Q_DECL_OVERRIDE;
Class for holding a string property.
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
virtual QVariant getSetting(const QString &key) const Q_DECL_OVERRIDE
Get the settings. This function has to be implemented in a subclass in order to have an effect.
void setTypeForParent(int value)
void setReadOnly(bool readOnly)
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &options, const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE
Returns an editor widget, or NULL if it doesn't supply one.
void setOsSeparator(bool separator)
virtual void updateParent(const QVariant &value) Q_DECL_OVERRIDE
int getTypeForParent() const
virtual QStringList getSettingKeys() const Q_DECL_OVERRIDE
Returns the list of keys of the property's settings.
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.
void setClearButtonEnable(bool value)
virtual void setSetting(const QString &key, const QVariant &value) Q_DECL_OVERRIDE
Sets the settings.
virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE
VStringProperty(const QString &name, const QMap< QString, QVariant > &settings)