diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-08-16 15:46:30 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-10-10 14:11:52 +0000 |
commit | 094e1f12945a04507054b5a5bad94b72a7982fb7 (patch) | |
tree | 61485604973f9fa15c64978b9581975f3c82ab1d /src/quick/items/qquickitemsmodule.cpp | |
parent | e4dfc6d749957bdd88a48b95aa67e59d93fd4b7b (diff) |
Make Path and PathView configurable
Change-Id: Ie9e35612fc274def96d63ef35817c03475077f1f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/qquickitemsmodule.cpp')
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 6bb6cdddba..dffefa5869 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -57,10 +57,14 @@ #include "qquickflickable_p_p.h" #include "qquicklistview_p.h" #include "qquickgridview_p.h" +#if QT_CONFIG(quick_pathview) #include "qquickpathview_p.h" +#endif #include "qquickitemviewtransition_p.h" +#if QT_CONFIG(quick_path) #include <private/qquickpath_p.h> #include <private/qquickpathinterpolator_p.h> +#endif #include "qquickpositioners_p.h" #include "qquickrepeater_p.h" #include "qquickloader_p.h" @@ -157,6 +161,7 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickListView>(uri,major,minor,"ListView"); qmlRegisterType<QQuickLoader>(uri,major,minor,"Loader"); qmlRegisterType<QQuickMouseArea>(uri,major,minor,"MouseArea"); +#if QT_CONFIG(quick_path) qmlRegisterType<QQuickPath>(uri,major,minor,"Path"); qmlRegisterType<QQuickPathAttribute>(uri,major,minor,"PathAttribute"); qmlRegisterType<QQuickPathCubic>(uri,major,minor,"PathCubic"); @@ -166,7 +171,10 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickPathCatmullRomCurve>("QtQuick",2,0,"PathCurve"); qmlRegisterType<QQuickPathArc>("QtQuick",2,0,"PathArc"); qmlRegisterType<QQuickPathSvg>("QtQuick",2,0,"PathSvg"); +#endif +#if QT_CONFIG(quick_pathview) qmlRegisterType<QQuickPathView>(uri,major,minor,"PathView"); +#endif qmlRegisterUncreatableType<QQuickBasePositioner>(uri,major,minor,"Positioner", QStringLiteral("Positioner is an abstract type that is only available as an attached property.")); qmlRegisterType<QQuickRectangle>(uri,major,minor,"Rectangle"); @@ -191,8 +199,10 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickWheelEvent>(); qmlRegisterType<QQuickCloseEvent>(); qmlRegisterType<QQuickTransform>(); +#if QT_CONFIG(quick_path) qmlRegisterType<QQuickPathElement>(); qmlRegisterType<QQuickCurve>(); +#endif qmlRegisterType<QQuickScaleGrid>(); qmlRegisterType<QQuickTextLine>(); qmlRegisterType<QQuickPen>(); @@ -231,8 +241,10 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickAnchorSet>(); qmlRegisterType<QQuickAnchorAnimation>(uri, major, minor,"AnchorAnimation"); qmlRegisterType<QQuickParentAnimation>(uri, major, minor,"ParentAnimation"); +#if QT_CONFIG(quick_canvas) qmlRegisterType<QQuickPathAnimation>("QtQuick",2,0,"PathAnimation"); qmlRegisterType<QQuickPathInterpolator>("QtQuick",2,0,"PathInterpolator"); +#endif #ifndef QT_NO_DRAGANDDROP qmlRegisterType<QQuickDropArea>("QtQuick", 2, 0, "DropArea"); @@ -293,7 +305,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickGridView, 7>(uri, 2, 7, "GridView"); qmlRegisterType<QQuickTextInput, 7>(uri, 2, 7, "TextInput"); qmlRegisterType<QQuickTextEdit, 7>(uri, 2, 7, "TextEdit"); +#if QT_CONFIG(quick_pathview) qmlRegisterType<QQuickPathView, 7>(uri, 2, 7, "PathView"); +#endif qmlRegisterUncreatableType<QQuickMouseEvent, 7>(uri, 2, 7, nullptr, QQuickMouseEvent::tr("MouseEvent is only available within handlers in MouseArea")); |