diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-22 07:26:45 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-22 07:26:45 (GMT) |
commit | 6b2e0b4c5851a156c1f5fa0f73e9b1266ddc6930 (patch) | |
tree | 31616634bec2095cf16e82df9109cd6beda59460 /src/declarative/qml/qmlvmemetaobject_p.h | |
parent | c4c12f947b0480fd0695e1885ebec9ab496f6bf4 (diff) | |
download | Qt-6b2e0b4c5851a156c1f5fa0f73e9b1266ddc6930.zip Qt-6b2e0b4c5851a156c1f5fa0f73e9b1266ddc6930.tar.gz Qt-6b2e0b4c5851a156c1f5fa0f73e9b1266ddc6930.tar.bz2 |
Preliminary support for object and list synthesized property types
Diffstat (limited to 'src/declarative/qml/qmlvmemetaobject_p.h')
-rw-r--r-- | src/declarative/qml/qmlvmemetaobject_p.h | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/src/declarative/qml/qmlvmemetaobject_p.h b/src/declarative/qml/qmlvmemetaobject_p.h index 931d22c..1c26241 100644 --- a/src/declarative/qml/qmlvmemetaobject_p.h +++ b/src/declarative/qml/qmlvmemetaobject_p.h @@ -118,13 +118,36 @@ private: QVariant *data; QBitArray aConnected; -#if 0 - QList<QString> *slotData; - int slotDataIdx; -#endif - QAbstractDynamicMetaObject *parent; + void listChanged(int); + class List : public QmlConcreteList<QObject*> + { + public: + List(QmlVMEMetaObject *p, int propIdx) + : parent(p), parentProperty(propIdx) { } + + virtual void append(QObject *v) { + QmlConcreteList<QObject*>::append(v); + parent->listChanged(parentProperty); + } + virtual void insert(int i, QObject *v) { + QmlConcreteList<QObject*>::insert(i, v); + parent->listChanged(parentProperty); + } + virtual void clear() { + QmlConcreteList<QObject*>::clear(); + parent->listChanged(parentProperty); + } + virtual void removeAt(int i) { + QmlConcreteList<QObject*>::removeAt(i); + parent->listChanged(parentProperty); + } + private: + QmlVMEMetaObject *parent; + int parentProperty; + }; + QList<List *> listProperties; }; QT_END_NAMESPACE |