diff options
Diffstat (limited to 'examples/quick/scenegraph')
21 files changed, 22 insertions, 11 deletions
diff --git a/examples/quick/scenegraph/customgeometry/beziercurve.h b/examples/quick/scenegraph/customgeometry/beziercurve.h index f2f7832e6d..be9e4ef49f 100644 --- a/examples/quick/scenegraph/customgeometry/beziercurve.h +++ b/examples/quick/scenegraph/customgeometry/beziercurve.h @@ -64,6 +64,7 @@ class BezierCurve : public QQuickItem Q_PROPERTY(QPointF p4 READ p4 WRITE setP4 NOTIFY p4Changed) Q_PROPERTY(int segmentCount READ segmentCount WRITE setSegmentCount NOTIFY segmentCountChanged) + QML_ELEMENT public: BezierCurve(QQuickItem *parent = 0); diff --git a/examples/quick/scenegraph/customgeometry/main.cpp b/examples/quick/scenegraph/customgeometry/main.cpp index 6f3c24e87b..9352e4bd24 100644 --- a/examples/quick/scenegraph/customgeometry/main.cpp +++ b/examples/quick/scenegraph/customgeometry/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<BezierCurve>("CustomGeometry", 1, 0, "BezierCurve"); + qmlRegisterTypesAndRevisions<BezierCurve>("CustomGeometry", 1); QQuickView view; QSurfaceFormat format = view.format(); diff --git a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h index be9aadc43b..4be3671d1c 100644 --- a/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h +++ b/examples/quick/scenegraph/d3d11underqml/d3d11squircle.h @@ -59,6 +59,7 @@ class D3D11Squircle : public QQuickItem { Q_OBJECT Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged) + QML_ELEMENT public: D3D11Squircle(); diff --git a/examples/quick/scenegraph/d3d11underqml/main.cpp b/examples/quick/scenegraph/d3d11underqml/main.cpp index d26de1144a..dcab8c879c 100644 --- a/examples/quick/scenegraph/d3d11underqml/main.cpp +++ b/examples/quick/scenegraph/d3d11underqml/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<D3D11Squircle>("D3D11UnderQML", 1, 0, "D3D11Squircle"); + qmlRegisterTypesAndRevisions<D3D11Squircle>("D3D11UnderQML", 1); QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Direct3D11Rhi); diff --git a/examples/quick/scenegraph/fboitem/fboinsgrenderer.h b/examples/quick/scenegraph/fboitem/fboinsgrenderer.h index e1a9ce22c8..1b92b56851 100644 --- a/examples/quick/scenegraph/fboitem/fboinsgrenderer.h +++ b/examples/quick/scenegraph/fboitem/fboinsgrenderer.h @@ -58,6 +58,7 @@ class LogoRenderer; class FboInSGRenderer : public QQuickFramebufferObject { Q_OBJECT + QML_NAMED_ELEMENT(Renderer) public: Renderer *createRenderer() const; }; diff --git a/examples/quick/scenegraph/fboitem/main.cpp b/examples/quick/scenegraph/fboitem/main.cpp index 429224ba95..056bf24ade 100644 --- a/examples/quick/scenegraph/fboitem/main.cpp +++ b/examples/quick/scenegraph/fboitem/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<FboInSGRenderer>("SceneGraphRendering", 1, 0, "Renderer"); + qmlRegisterTypesAndRevisions<FboInSGRenderer>("SceneGraphRendering", 1); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/graph/graph.h b/examples/quick/scenegraph/graph/graph.h index a1a00cb6dc..e32e657e0e 100644 --- a/examples/quick/scenegraph/graph/graph.h +++ b/examples/quick/scenegraph/graph/graph.h @@ -56,6 +56,7 @@ class Graph : public QQuickItem { Q_OBJECT + QML_ELEMENT public: Graph(); diff --git a/examples/quick/scenegraph/graph/main.cpp b/examples/quick/scenegraph/graph/main.cpp index 2406457ab5..9a575944b9 100644 --- a/examples/quick/scenegraph/graph/main.cpp +++ b/examples/quick/scenegraph/graph/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); - qmlRegisterType<Graph>("Graph", 1, 0, "Graph"); + qmlRegisterTypesAndRevisions<Graph>("Graph", 1); QQuickView view; view.resize(800, 400); diff --git a/examples/quick/scenegraph/metalunderqml/main.cpp b/examples/quick/scenegraph/metalunderqml/main.cpp index 5ad337abb1..3e620137cd 100644 --- a/examples/quick/scenegraph/metalunderqml/main.cpp +++ b/examples/quick/scenegraph/metalunderqml/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<MetalSquircle>("MetalUnderQML", 1, 0, "MetalSquircle"); + qmlRegisterTypesAndRevisions<MetalSquircle>("MetalUnderQML", 1); QQuickWindow::setSceneGraphBackend(QSGRendererInterface::MetalRhi); diff --git a/examples/quick/scenegraph/metalunderqml/metalsquircle.h b/examples/quick/scenegraph/metalunderqml/metalsquircle.h index 43c4afad21..18db7d45f3 100644 --- a/examples/quick/scenegraph/metalunderqml/metalsquircle.h +++ b/examples/quick/scenegraph/metalunderqml/metalsquircle.h @@ -59,6 +59,7 @@ class MetalSquircle : public QQuickItem { Q_OBJECT Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged) + QML_ELEMENT public: MetalSquircle(); diff --git a/examples/quick/scenegraph/openglunderqml/main.cpp b/examples/quick/scenegraph/openglunderqml/main.cpp index 022d6a75bb..c04d0da68f 100644 --- a/examples/quick/scenegraph/openglunderqml/main.cpp +++ b/examples/quick/scenegraph/openglunderqml/main.cpp @@ -59,7 +59,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<Squircle>("OpenGLUnderQML", 1, 0, "Squircle"); + qmlRegisterTypesAndRevisions<Squircle>("OpenGLUnderQML", 1); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/openglunderqml/squircle.h b/examples/quick/scenegraph/openglunderqml/squircle.h index 1b9995bc1e..c24fdd50c2 100644 --- a/examples/quick/scenegraph/openglunderqml/squircle.h +++ b/examples/quick/scenegraph/openglunderqml/squircle.h @@ -86,6 +86,7 @@ class Squircle : public QQuickItem { Q_OBJECT Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged) + QML_ELEMENT public: Squircle(); diff --git a/examples/quick/scenegraph/rendernode/customrenderitem.h b/examples/quick/scenegraph/rendernode/customrenderitem.h index a0ac3468e4..74115b2505 100644 --- a/examples/quick/scenegraph/rendernode/customrenderitem.h +++ b/examples/quick/scenegraph/rendernode/customrenderitem.h @@ -56,6 +56,7 @@ class CustomRenderItem : public QQuickItem { Q_OBJECT + QML_ELEMENT public: CustomRenderItem(QQuickItem *parent = nullptr); diff --git a/examples/quick/scenegraph/rendernode/main.cpp b/examples/quick/scenegraph/rendernode/main.cpp index 146d787e50..b1dfe47829 100644 --- a/examples/quick/scenegraph/rendernode/main.cpp +++ b/examples/quick/scenegraph/rendernode/main.cpp @@ -59,7 +59,7 @@ int main(int argc, char **argv) QGuiApplication app(argc, argv); //! [1] - qmlRegisterType<CustomRenderItem>("SceneGraphRendering", 2, 0, "CustomRenderItem"); + qmlRegisterTypesAndRevisions<CustomRenderItem>("SceneGraphRendering", 2); //! [1] QQuickView view; diff --git a/examples/quick/scenegraph/simplematerial/simplematerial.cpp b/examples/quick/scenegraph/simplematerial/simplematerial.cpp index 6773b6fb5a..55e1d879ca 100644 --- a/examples/quick/scenegraph/simplematerial/simplematerial.cpp +++ b/examples/quick/scenegraph/simplematerial/simplematerial.cpp @@ -157,6 +157,7 @@ class Item : public QQuickItem Q_OBJECT Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + QML_NAMED_ELEMENT(SimpleMaterialItem) public: @@ -203,7 +204,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<Item>("SimpleMaterial", 1, 0, "SimpleMaterialItem"); + qmlRegisterTypesAndRevisions<Item>("SimpleMaterial", 1); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/textureinthread/main.cpp b/examples/quick/scenegraph/textureinthread/main.cpp index 7a46f25390..7c22fa7fdf 100644 --- a/examples/quick/scenegraph/textureinthread/main.cpp +++ b/examples/quick/scenegraph/textureinthread/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char **argv) return app.exec(); } - qmlRegisterType<ThreadRenderer>("SceneGraphRendering", 1, 0, "Renderer"); + qmlRegisterTypesAndRevisions<ThreadRenderer>("SceneGraphRendering", 1); int execReturn = 0; { diff --git a/examples/quick/scenegraph/textureinthread/threadrenderer.h b/examples/quick/scenegraph/textureinthread/threadrenderer.h index 8442041bf8..96c00e7b2e 100644 --- a/examples/quick/scenegraph/textureinthread/threadrenderer.h +++ b/examples/quick/scenegraph/textureinthread/threadrenderer.h @@ -58,6 +58,7 @@ class RenderThread; class ThreadRenderer : public QQuickItem { Q_OBJECT + QML_NAMED_ELEMENT(Renderer) public: ThreadRenderer(); diff --git a/examples/quick/scenegraph/threadedanimation/main.cpp b/examples/quick/scenegraph/threadedanimation/main.cpp index b1b0c05085..c77a291f5d 100644 --- a/examples/quick/scenegraph/threadedanimation/main.cpp +++ b/examples/quick/scenegraph/threadedanimation/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<Spinner>("Spinner", 1, 0, "Spinner"); + qmlRegisterTypesAndRevisions<Spinner>("Spinner", 1); QQuickView view; view.setSource(QUrl("qrc:///scenegraph/threadedanimation/main.qml")); diff --git a/examples/quick/scenegraph/threadedanimation/spinner.h b/examples/quick/scenegraph/threadedanimation/spinner.h index c3f3394c93..fd3eaa7751 100644 --- a/examples/quick/scenegraph/threadedanimation/spinner.h +++ b/examples/quick/scenegraph/threadedanimation/spinner.h @@ -58,6 +58,7 @@ class Spinner : public QQuickItem Q_OBJECT Q_PROPERTY(bool spinning READ spinning WRITE setSpinning NOTIFY spinningChanged) + QML_ELEMENT public: Spinner(); diff --git a/examples/quick/scenegraph/twotextureproviders/main.cpp b/examples/quick/scenegraph/twotextureproviders/main.cpp index a5d23b6adc..3f53bb6e32 100644 --- a/examples/quick/scenegraph/twotextureproviders/main.cpp +++ b/examples/quick/scenegraph/twotextureproviders/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char **argv) { QGuiApplication app(argc, argv); - qmlRegisterType<XorBlender>("SceneGraphRendering", 1, 0, "XorBlender"); + qmlRegisterTypesAndRevisions<XorBlender>("SceneGraphRendering", 1); QQuickView view; view.setResizeMode(QQuickView::SizeRootObjectToView); diff --git a/examples/quick/scenegraph/twotextureproviders/xorblender.h b/examples/quick/scenegraph/twotextureproviders/xorblender.h index 94132f09fb..17557b8efd 100644 --- a/examples/quick/scenegraph/twotextureproviders/xorblender.h +++ b/examples/quick/scenegraph/twotextureproviders/xorblender.h @@ -58,6 +58,7 @@ class XorBlender : public QQuickItem Q_OBJECT Q_PROPERTY(QQuickItem *source1 READ source1 WRITE setSource1 NOTIFY source1Changed) Q_PROPERTY(QQuickItem *source2 READ source2 WRITE setSource2 NOTIFY source2Changed) + QML_ELEMENT public: explicit XorBlender(QQuickItem *parent = 0); |