24 #include <qcompilerdetection.h>
25 #include <QAbstractItemDelegate>
28 #include <QMetaObject>
30 #include <QSharedPointer>
32 #include <QStringList>
33 #include <QStyleOptionViewItem>
38 template <
typename T>
class QList;
67 explicit VProperty(
const QString &name, QVariant::Type type = QVariant::String);
73 virtual QString type() const;
76 virtual QVariant data (
int column = DPC_Name,
int role = Qt::DisplayRole) const;
82 virtual
bool setData (const QVariant &data,
int role = Qt::EditRole);
87 virtual
bool paint(QPainter*, const QStyleOptionViewItem&, const QModelIndex&, const QAbstractItemDelegate*) const;
94 virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem&, const QAbstractItemDelegate*);
97 virtual
bool setEditorData(QWidget *editor);
100 virtual QVariant getEditorData(const QWidget *editor) const;
103 virtual Qt::ItemFlags flags(
int column = DPC_Name) const;
106 virtual
void setValue(const QVariant &value);
109 virtual QVariant getValue() const;
112 virtual QString serialize() const;
115 virtual
void deserialize(const QString &value);
122 virtual void *getDataPointer();
127 virtual bool setDataPointer(void *pointer);*/
130 virtual
void setName(const QString &name);
133 virtual QString getName() const;
136 virtual
void setDescription(const QString &desc);
139 virtual QString getDescription() const;
151 virtual
VProperty *getChild(
int row) const;
154 virtual
int getRowCount() const;
160 virtual
void setParent(
VProperty *parent);
163 virtual
void removeChild(
VProperty *child);
166 virtual
int getChildRow(
VProperty *child) const;
169 virtual
bool getUpdateParent() const;
172 virtual
bool getUpdateChildren() const;
175 virtual
void setUpdateBehaviour(
bool update_parent,
bool update_children);
179 virtual
void setSettings(const
QMap<QString, QVariant> &settings);
182 virtual
QMap<QString, QVariant> getSettings() const;
185 virtual
void setSetting(const QString &key, const QVariant &value);
188 virtual QVariant getSetting(const QString &key) const;
191 virtual QStringList getSettingKeys() const;
198 Q_REQUIRED_RESULT virtual
VProperty *clone(
bool include_children = true,
VProperty *container =
nullptr) const;
201 void setPropertyType(const
Property &type);
203 virtual
void updateParent(const QVariant &value);
205 virtual
void childValueChanged(const QVariant &value,
int typeForParent);
207 void childChanged(const QVariant &value,
int typeForParent);
virtual ~UserChangeEvent() Q_DECL_OVERRIDE
static const int MyCustomEventType