summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.h
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-04-23 01:50:48 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-04-23 01:50:48 (GMT)
commit28cec90fd8740f1d47010d99699f86ac014e9926 (patch)
treed3ff8dd0eec3bf5c6536960650490cb4cc382396 /src/declarative/qml/qmlcomponent.h
parent0e8b82bc7b9b0d88e8cc4a4d293851795d35950a (diff)
downloadQt-28cec90fd8740f1d47010d99699f86ac014e9926.zip
Qt-28cec90fd8740f1d47010d99699f86ac014e9926.tar.gz
Qt-28cec90fd8740f1d47010d99699f86ac014e9926.tar.bz2
Merge in changes to old kinetic-dui branch.
Diffstat (limited to 'src/declarative/qml/qmlcomponent.h')
-rw-r--r--src/declarative/qml/qmlcomponent.h35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h
index 1a74fe9..91e0917 100644
--- a/src/declarative/qml/qmlcomponent.h
+++ b/src/declarative/qml/qmlcomponent.h
@@ -62,36 +62,43 @@ class Q_DECLARATIVE_EXPORT QmlComponent : public QObject
Q_OBJECT
Q_DECLARE_PRIVATE(QmlComponent);
- Q_PROPERTY(QString name READ name WRITE setName);
-
public:
- QmlComponent(QObject *parent=0);
+ QmlComponent(QObject *parent = 0);
QmlComponent(QmlEngine *, QObject *parent=0);
QmlComponent(QmlEngine *, const QUrl &url, QObject *parent = 0);
- QmlComponent(QmlEngine *, const QByteArray &, const QUrl &url=QUrl(), QObject *parent=0);
- ~QmlComponent();
+ QmlComponent(QmlEngine *, const QByteArray &data,
+ const QUrl &baseUrl=QUrl(), QObject *parent=0);
+ virtual ~QmlComponent();
- virtual QObject *create(QmlContext *context = 0);
- virtual QObject *beginCreate(QmlContext *);
- virtual void completeCreate();
+ enum Status { Null, Ready, Loading, Error };
+ Status status() const;
- QString name() const;
- void setName(const QString &name);
+ bool isNull() const;
+ bool isReady() const;
+ bool isError() const;
+ bool isLoading() const;
+ QString errorDescription() const;
- void setData(const QByteArray &, const QUrl &url);
+ QUrl url() const;
- bool isReady() const;
+ virtual QObject *create(QmlContext *context = 0);
+ virtual QObject *beginCreate(QmlContext *);
+ virtual void completeCreate();
- QmlComponent(QmlEngine *, QmlCompiledComponent *, int, int, QObject *parent);
+ void loadUrl(const QUrl &url);
+ void setData(const QByteArray &, const QUrl &baseUrl = QUrl());
Q_SIGNALS:
- void readyChanged();
+ void statusChanged(Status);
protected:
QmlComponent(QmlComponentPrivate &dd, QObject* parent);
private:
+ QmlComponent(QmlEngine *, QmlCompiledComponent *, int, int, QObject *parent);
+
friend class QmlVME;
+ friend class QmlCompositeTypeData;
};
QML_DECLARE_TYPE(QmlComponent);