summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmldom.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-06-30 08:38:45 (GMT)
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-06-30 08:38:45 (GMT)
commit7cba48bea33dcb80979975b27047d81025d054a5 (patch)
treebba85c4ed8879efef3328fc576a95afe9fd4fe47 /src/declarative/qml/qmldom.h
parent6856dd2850245414fb610e651391f5fe141605de (diff)
downloadQt-7cba48bea33dcb80979975b27047d81025d054a5.zip
Qt-7cba48bea33dcb80979975b27047d81025d054a5.tar.gz
Qt-7cba48bea33dcb80979975b27047d81025d054a5.tar.bz2
First set of changes to add dynamic properties to the QML DOM.
Diffstat (limited to 'src/declarative/qml/qmldom.h')
-rw-r--r--src/declarative/qml/qmldom.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/declarative/qml/qmldom.h b/src/declarative/qml/qmldom.h
index ab3e39f..1dddb5f 100644
--- a/src/declarative/qml/qmldom.h
+++ b/src/declarative/qml/qmldom.h
@@ -44,6 +44,7 @@
#include <QtCore/qlist.h>
#include <QtCore/qshareddata.h>
+#include <QtCore/qvariant.h>
#include <QtDeclarative/qmlerror.h>
QT_BEGIN_HEADER
@@ -107,9 +108,36 @@ public:
private:
friend class QmlDomObject;
+ friend class QmlDomDynamicProperty;
QSharedDataPointer<QmlDomPropertyPrivate> d;
};
+class QmlDomDynamicPropertyPrivate;
+class Q_DECLARATIVE_EXPORT QmlDomDynamicProperty
+{
+public:
+ QmlDomDynamicProperty();
+ QmlDomDynamicProperty(const QmlDomDynamicProperty &);
+ ~QmlDomDynamicProperty();
+ QmlDomDynamicProperty &operator=(const QmlDomDynamicProperty &);
+
+ bool isValid() const;
+
+ QByteArray propertyName() const;
+ QVariant::Type propertyType() const;
+
+ bool isDefaultProperty() const;
+
+ QmlDomProperty defaultValue() const;
+
+ int position() const;
+ int length() const;
+
+private:
+ friend class QmlDomObject;
+ QSharedDataPointer<QmlDomDynamicPropertyPrivate> d;
+};
+
class QmlDomObjectPrivate;
class Q_DECLARATIVE_EXPORT QmlDomObject
{
@@ -133,6 +161,9 @@ public:
void removeProperty(const QByteArray &);
void addProperty(const QByteArray &, const QmlDomValue &);
+ QList<QmlDomDynamicProperty> dynamicProperties() const;
+ QmlDomDynamicProperty dynamicProperty(const QByteArray &) const;
+
bool isCustomType() const;
QByteArray customTypeData() const;
void setCustomTypeData(const QByteArray &);