register canvas and related classess
authorCharles Yin <charles.yin@nokia.com>
Mon, 16 May 2011 00:20:12 +0000 (10:20 +1000)
committerCharles Yin <charles.yin@nokia.com>
Mon, 16 May 2011 00:20:12 +0000 (10:20 +1000)
src/declarative/items/qsgitemsmodule.cpp

index aa74ff6..6ea20bb 100644 (file)
@@ -73,6 +73,8 @@
 #include <private/qsgshadereffectitem_p.h>
 #include <private/qsgshadereffectsource_p.h>
 //#include "private/qsgpincharea_p.h"
+#include "qsgcanvasitem_p.h"
+#include "qsgcontext2d_p.h"
 
 static QDeclarativePrivate::AutoParentResult qsgitem_autoParent(QObject *obj, QObject *parent)
 {
@@ -173,6 +175,11 @@ static void qt_sgitems_defineModule(const char *uri, int major, int minor)
 
     qmlRegisterUncreatableType<QSGPaintedItem>("QtQuick", 2, 0, "PaintedItem", QSGPaintedItem::tr("Cannot create instance of abstract class PaintedItem"));
 
+    qmlRegisterType<QSGCanvasItem>("QtQuick", 2, 0, "Canvas");
+    qmlRegisterType<QSGContext2D>();
+    qmlRegisterType<QSGCanvasGradient>();
+
+
     qmlRegisterType<QSGParentChange>(uri, major, minor,"ParentChange");
     qmlRegisterType<QSGAnchorChanges>(uri, major, minor,"AnchorChanges");
     qmlRegisterType<QSGAnchorSet>();