summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-29 03:52:36 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-29 04:06:09 (GMT)
commit220eea1b5a978cf62e27878e7d9b2e1f4d10e91e (patch)
tree0cdb8ba932cedd3b2f0f1b45b92c4c095a36862c /src/declarative/qml/qmlcomponent.h
parentbfbded95056d43a65b2c9ef1fa90bfd40adc6472 (diff)
downloadQt-220eea1b5a978cf62e27878e7d9b2e1f4d10e91e.zip
Qt-220eea1b5a978cf62e27878e7d9b2e1f4d10e91e.tar.gz
Qt-220eea1b5a978cf62e27878e7d9b2e1f4d10e91e.tar.bz2
Merge QmlComponentJS into QmlComponent
createComponent() and Component{} are now the same, and so Component{}s can now be passed around for use in script. Also this commit fixes the minor bug QT-2386
Diffstat (limited to 'src/declarative/qml/qmlcomponent.h')
-rw-r--r--src/declarative/qml/qmlcomponent.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h
index a72aa4e..382b335 100644
--- a/src/declarative/qml/qmlcomponent.h
+++ b/src/declarative/qml/qmlcomponent.h
@@ -64,6 +64,10 @@ class Q_DECLARATIVE_EXPORT QmlComponent : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QmlComponent)
+ Q_PROPERTY(bool isNull READ isNull NOTIFY statusChanged)
+ Q_PROPERTY(bool isReady READ isReady NOTIFY statusChanged)
+ Q_PROPERTY(bool isError READ isError NOTIFY statusChanged)
+ Q_PROPERTY(bool isLoading READ isLoading NOTIFY statusChanged)
public:
QmlComponent(QObject *parent = 0);
@@ -84,6 +88,7 @@ public:
bool isLoading() const;
QList<QmlError> errors() const;
+ Q_INVOKABLE QString errorsString() const;
qreal progress() const;
@@ -93,9 +98,12 @@ public:
virtual QObject *beginCreate(QmlContext *);
virtual void completeCreate();
+ Q_INVOKABLE QScriptValue createObject();
+
void loadUrl(const QUrl &url);
void setData(const QByteArray &, const QUrl &baseUrl);
+ void setCreationContext(QmlContext*);
QmlContext *creationContext() const;
static QmlComponentAttached *qmlAttachedProperties(QObject *);