summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmllistmodel_p.h
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-23 23:07:29 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-23 23:07:29 (GMT)
commit8727985d81c793d52d5e24ed6815e7237ae879f1 (patch)
treedbf3fcdf5c1e16a0ab5fcb79ce4f8ad6450ac353 /src/declarative/util/qmllistmodel_p.h
parentc38be88e5314f43efd7cb6a2e8140d006e77afbe (diff)
downloadQt-8727985d81c793d52d5e24ed6815e7237ae879f1.zip
Qt-8727985d81c793d52d5e24ed6815e7237ae879f1.tar.gz
Qt-8727985d81c793d52d5e24ed6815e7237ae879f1.tar.bz2
Remove QML_DEFINE_... macros, now use QML_REGISTER_... macros calls.
Task-number: QT-2798
Diffstat (limited to 'src/declarative/util/qmllistmodel_p.h')
-rw-r--r--src/declarative/util/qmllistmodel_p.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/declarative/util/qmllistmodel_p.h b/src/declarative/util/qmllistmodel_p.h
index 4cf6746..e6ddb0e 100644
--- a/src/declarative/util/qmllistmodel_p.h
+++ b/src/declarative/util/qmllistmodel_p.h
@@ -43,6 +43,7 @@
#define QMLLISTMODEL_H
#include <qml.h>
+#include <private/qmlcustomparser_p.h>
#include <QtCore/QObject>
#include <QtCore/QStringList>
@@ -98,9 +99,40 @@ private:
ModelNode *_root;
};
+// ### FIXME
+class QmlListElement : public QObject
+{
+Q_OBJECT
+};
+
+class QmlListModelParser : public QmlCustomParser
+{
+public:
+ QByteArray compile(const QList<QmlCustomParserProperty> &);
+ void setCustomData(QObject *, const QByteArray &);
+
+private:
+ struct ListInstruction
+ {
+ enum { Push, Pop, Value, Set } type;
+ int dataIdx;
+ };
+ struct ListModelData
+ {
+ int dataOffset;
+ int instrCount;
+ ListInstruction *instructions() const;
+ };
+ bool compileProperty(const QmlCustomParserProperty &prop, QList<ListInstruction> &instr, QByteArray &data);
+
+ bool definesEmptyList(const QString &);
+};
+
+
QT_END_NAMESPACE
QML_DECLARE_TYPE(QmlListModel)
+QML_DECLARE_TYPE(QmlListElement)
QT_END_HEADER