52 #ifndef VLABELPROPERTY_H
53 #define VLABELPROPERTY_H
55 #include <qcompilerdetection.h>
57 #include <QMetaObject>
60 #include <QStringList>
61 #include <QStyleOptionViewItem>
65 #include "../vproperty.h"
85 virtual QWidget *
createEditor(QWidget *parent,
const QStyleOptionViewItem &options,
86 const QAbstractItemDelegate *delegate) Q_DECL_OVERRIDE;
89 virtual QVariant
getEditorData(
const QWidget *editor)
const Q_DECL_OVERRIDE;
92 virtual void setSetting(
const QString &key,
const QVariant &value) Q_DECL_OVERRIDE;
95 virtual QVariant
getSetting(
const QString &key)
const Q_DECL_OVERRIDE;
101 virtual QString
type()
const Q_DECL_OVERRIDE;
108 Q_REQUIRED_RESULT
virtual VProperty *
clone(
bool include_children =
true,
109 VProperty *container =
nullptr)
const Q_DECL_OVERRIDE;
111 virtual void updateParent(
const QVariant &value) Q_DECL_OVERRIDE;
Class for holding a string property.
virtual void updateParent(const QVariant &value) Q_DECL_OVERRIDE
int getTypeForParent() const
virtual void setSetting(const QString &key, const QVariant &value) Q_DECL_OVERRIDE
Sets the settings.
virtual QString type() const Q_DECL_OVERRIDE
Returns a string containing the type of the property.
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.
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.
virtual QVariant getEditorData(const QWidget *editor) const Q_DECL_OVERRIDE
Gets the data from the widget.
virtual QStringList getSettingKeys() const Q_DECL_OVERRIDE
Returns the list of keys of the property's settings.
VLabelProperty(const QString &name, const QMap< QString, QVariant > &settings)
void setTypeForParent(int value)
virtual Q_REQUIRED_RESULT VProperty * clone(bool include_children=true, VProperty *container=nullptr) const Q_DECL_OVERRIDE
Clones this property.