Update copyright year in license headers.
[profile/ivi/qtdeclarative.git] / src / declarative / qml / qdeclarativecomponent.h
index 15004a6..2e33bf8 100644 (file)
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -47,7 +47,7 @@
 
 #include <QtCore/qobject.h>
 #include <QtCore/qstring.h>
-#include <QtScript/qscriptvalue.h>
+#include <QtDeclarative/qjsvalue.h>
 
 QT_BEGIN_HEADER
 
@@ -55,11 +55,15 @@ QT_BEGIN_NAMESPACE
 
 QT_MODULE(Declarative)
 
-class QDeclarativeCompiledData;
 class QByteArray;
-class QDeclarativeComponentPrivate;
 class QDeclarativeEngine;
+class QDeclarativeComponent;
+class QDeclarativeIncubator;
+class QDeclarativeV8Function;
+class QDeclarativeCompiledData;
+class QDeclarativeComponentPrivate;
 class QDeclarativeComponentAttached;
+
 class Q_DECLARATIVE_EXPORT QDeclarativeComponent : public QObject
 {
     Q_OBJECT
@@ -96,6 +100,9 @@ public:
     virtual QObject *beginCreate(QDeclarativeContext *);
     virtual void completeCreate();
 
+    void create(QDeclarativeIncubator &, QDeclarativeContext *context = 0,
+                QDeclarativeContext *forContext = 0);
+
     QDeclarativeContext *creationContext() const;
 
     static QDeclarativeComponentAttached *qmlAttachedProperties(QObject *);
@@ -110,8 +117,8 @@ Q_SIGNALS:
 
 protected:
     QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
-    Q_INVOKABLE QScriptValue createObject(QObject* parent);
-    Q_INVOKABLE Q_REVISION(1) QScriptValue createObject(QObject* parent, const QScriptValue& valuemap); //XXX Versioning
+    Q_INVOKABLE void createObject(QDeclarativeV8Function *);
+    Q_INVOKABLE void incubateObject(QDeclarativeV8Function *);
 
 private:
     QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, QObject *parent);