diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2021-01-26 11:37:43 +0100 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2021-02-02 10:48:48 +0100 |
commit | 6e20620fdc5a7e95410dfb740e9a09b0cab59930 (patch) | |
tree | ed7ddf1735c4c66bdd19aed60a70c3a655dc884c | |
parent | c93c393bc2b56911b1ac685ec82e33d3ce6887af (diff) | |
download | qtlocation-6e20620fdc5a7e95410dfb740e9a09b0cab59930.tar.gz |
QtPositioning: update the version of the QML plugin
This patch bumps the version of QML plugin, so that we could do
import QtPositioning 6.1
as well as
import QtPositioning 5.15
or
import QtPositioning
This patch also ports the module to declarative registration of the
types in QML
Task-number: QTBUG-90491
Change-Id: I8f046019f8519ba1be8c732660d85501b2e50b74
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | src/imports/positioning/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/imports/positioning/positioning.cpp | 92 | ||||
-rw-r--r-- | src/positioning/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/positioning/qgeopolygon.h | 2 | ||||
-rw-r--r-- | src/positioningquick/CMakeLists.txt | 29 | ||||
-rw-r--r-- | src/positioningquick/locationsingleton.cpp (renamed from src/imports/positioning/locationsingleton.cpp) | 2 | ||||
-rw-r--r-- | src/positioningquick/locationsingleton_p.h (renamed from src/imports/positioning/locationsingleton.h) | 11 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativegeoaddress_p.h | 3 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativegeolocation_p.h | 4 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepluginparameter_p.h | 2 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativeposition_p.h | 26 | ||||
-rw-r--r-- | src/positioningquick/qdeclarativepositionsource_p.h | 8 | ||||
-rw-r--r-- | src/positioningquick/qpositioningquickglobal_p.h | 2 | ||||
-rw-r--r-- | src/positioningquick/qpositioningquickmodule_p.h | 151 | ||||
-rw-r--r-- | src/positioningquick/qquickgeocoordinateanimation_p.h | 2 |
15 files changed, 227 insertions, 112 deletions
diff --git a/src/imports/positioning/CMakeLists.txt b/src/imports/positioning/CMakeLists.txt index f849ad2d..0890b5f1 100644 --- a/src/imports/positioning/CMakeLists.txt +++ b/src/imports/positioning/CMakeLists.txt @@ -4,12 +4,8 @@ qt_internal_add_qml_module(declarative_positioning VERSION "${CMAKE_PROJECT_VERSION}" CLASSNAME QtPositioningDeclarativeModule SKIP_TYPE_REGISTRATION - #GENERATE_QMLTYPES - INSTALL_QMLTYPES SOURCES positioning.cpp - locationsingleton.cpp - locationsingleton.h PUBLIC_LIBRARIES Qt::QuickPrivate Qt::PositioningPrivate diff --git a/src/imports/positioning/positioning.cpp b/src/imports/positioning/positioning.cpp index 2940e307..b73957c9 100644 --- a/src/imports/positioning/positioning.cpp +++ b/src/imports/positioning/positioning.cpp @@ -37,31 +37,12 @@ ** ****************************************************************************/ - -#include <QtPositioningQuick/private/qdeclarativegeoaddress_p.h> -#include <QtPositioningQuick/private/qdeclarativegeolocation_p.h> -#include <QtPositioning/private/qwebmercator_p.h> -#include <QtPositioningQuick/private/qdeclarativeposition_p.h> -#include <QtPositioningQuick/private/qdeclarativepositionsource_p.h> -#include <QtPositioningQuick/private/qdeclarativepluginparameter_p.h> - +#include <private/qpositioningquickglobal_p.h> #include <QtPositioningQuick/private/qquickgeocoordinateanimation_p.h> -#include "locationsingleton.h" - #include <QtCore/QVariantAnimation> - #include <QtQml/qqmlextensionplugin.h> #include <QtQml/private/qqmlvaluetype_p.h> -#include <QtPositioning/QGeoRectangle> -#include <QtPositioning/QGeoCircle> -#include <QtPositioning/QGeoPath> -#include <QtPositioning/QGeoLocation> -#include <QtPositioning/QGeoPositionInfo> -#include <QtPositioning/private/qgeocoordinateobject_p.h> - -#include <QtCore/QDebug> - QT_BEGIN_NAMESPACE /*! @@ -549,15 +530,7 @@ QT_BEGIN_NAMESPACE This property holds the list of coordinates defining the polygon. */ -static QObject *singleton_type_factory(QQmlEngine *engine, QJSEngine *jsEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(jsEngine); - - return new LocationSingleton; -} - -class QtPositioningDeclarativeModule: public QQmlExtensionPlugin +class QtPositioningDeclarativeModule: public QQmlEngineExtensionPlugin { Q_OBJECT @@ -565,61 +538,20 @@ class QtPositioningDeclarativeModule: public QQmlExtensionPlugin FILE "plugin.json") public: - QtPositioningDeclarativeModule(QObject *parent = 0) : QQmlExtensionPlugin(parent) { } - void registerTypes(const char *uri) override + QtPositioningDeclarativeModule(QObject *parent = 0) : QQmlEngineExtensionPlugin(parent) { - if (QLatin1String(uri) == QStringLiteral("QtPositioning")) { - - // @uri QtPositioning 5.0 - - int major = 5; - int minor = 0; - - qRegisterMetaType<QGeoCoordinate>(); - qRegisterMetaType<QGeoAddress>(); - qRegisterMetaType<QGeoRectangle>(); - qRegisterMetaType<QGeoCircle>(); - qRegisterMetaType<QGeoPath>(); - qRegisterMetaType<QGeoPolygon>(); - qRegisterMetaType<QGeoLocation>(); - qRegisterMetaType<QGeoShape>(); - qRegisterMetaType<QGeoCoordinateObject *>(); - qRegisterMetaType<QGeoPositionInfo>(); - - qRegisterAnimationInterpolator<QGeoCoordinate>(q_coordinateInterpolator); - - // Register the 5.0 types - // 5.0 is silent and not advertised - qmlRegisterSingletonType<LocationSingleton >(uri, major, minor, "QtPositioning", singleton_type_factory); - qmlRegisterType<QDeclarativePosition >(uri, major, minor, "Position"); - qmlRegisterType<QDeclarativePositionSource >(uri, major, minor, "PositionSource"); - qmlRegisterType<QDeclarativeGeoAddress >(uri, major, minor, "Address"); - qmlRegisterType<QDeclarativeGeoLocation >(uri, major, minor, "Location"); - - // Register the 5.3 types - // Introduction of 5.3 version; existing 5.0 exports become automatically available under 5.3 - minor = 3; - qmlRegisterType<QQuickGeoCoordinateAnimation >(uri, major, minor, "CoordinateAnimation"); - qmlRegisterType<QDeclarativePosition, 1>(uri, major, minor, "Position"); - - minor = 4; - qmlRegisterType<QDeclarativePosition, 2>(uri, major, minor, "Position"); - - minor = 13; - qmlRegisterType<QDeclarativeGeoLocation, 13>(uri, major, minor, "Location"); - - minor = 14; - qmlRegisterType<QDeclarativePluginParameter >(uri, major, minor, "PluginParameter"); - - // The minor version used to be the current Qt 5 minor. For compatibility it is the last - // Qt 5 release. - qmlRegisterModule(uri, 5, 15); - } else { - qDebug() << "Unsupported URI given to load positioning QML plugin: " << QLatin1String(uri); - } + volatile auto registration = &qml_register_types_QtPositioning; + Q_UNUSED(registration) } }; +void QtPositioningDeclarative_initializeModule() +{ + qRegisterAnimationInterpolator<QGeoCoordinate>(q_coordinateInterpolator); +} + +Q_CONSTRUCTOR_FUNCTION(QtPositioningDeclarative_initializeModule) + QT_END_NAMESPACE #include "positioning.moc" diff --git a/src/positioning/CMakeLists.txt b/src/positioning/CMakeLists.txt index 20b10e65..4d607389 100644 --- a/src/positioning/CMakeLists.txt +++ b/src/positioning/CMakeLists.txt @@ -5,6 +5,7 @@ ##################################################################### qt_internal_add_module(Positioning + GENERATE_METATYPES # special case PLUGIN_TYPES position SOURCES qclipperutils.cpp qclipperutils_p.h diff --git a/src/positioning/qgeopolygon.h b/src/positioning/qgeopolygon.h index 8becda8f..9bed9c75 100644 --- a/src/positioning/qgeopolygon.h +++ b/src/positioning/qgeopolygon.h @@ -51,7 +51,7 @@ class QGeoPolygonPrivate; class Q_POSITIONING_EXPORT QGeoPolygon : public QGeoShape { Q_GADGET - Q_PROPERTY(QVariantList perimeter READ perimeter WRITE setPerimeter REVISION 12) + Q_PROPERTY(QVariantList perimeter READ perimeter WRITE setPerimeter REVISION(5, 12)) public: QGeoPolygon(); diff --git a/src/positioningquick/CMakeLists.txt b/src/positioningquick/CMakeLists.txt index 077c6d10..e4f927ae 100644 --- a/src/positioningquick/CMakeLists.txt +++ b/src/positioningquick/CMakeLists.txt @@ -4,15 +4,20 @@ ## PositioningQuick Module: ##################################################################### -file(GLOB SOURCES "*.cpp") -file(GLOB HEADERS "*.h") - qt_internal_add_module(PositioningQuick + GENERATE_METATYPES SOURCES - ${SOURCES} - ${HEADERS} - INCLUDE_DIRECTORIES - ${CMAKE_CURRENT_SOURCE_DIR} + qdeclarativegeoaddress_p.h qdeclarativegeoaddress.cpp + qdeclarativegeolocation_p.h qdeclarativegeolocation.cpp + qdeclarativepluginparameter_p.h qdeclarativepluginparameter.cpp + qdeclarativeposition_p.h qdeclarativeposition.cpp + qdeclarativepositionsource_p.h qdeclarativepositionsource.cpp + qquickgeocoordinateanimation_p.h qquickgeocoordinateanimation.cpp + locationsingleton_p.h locationsingleton.cpp + qquickgeocoordinateanimation_p_p.h + qpositioningquickglobal.h + qpositioningquickglobal_p.h + qpositioningquickmodule_p.h LIBRARIES Qt::CorePrivate Qt::PositioningPrivate @@ -29,3 +34,13 @@ qt_internal_add_module(PositioningQuick Qt::QmlPrivate Qt::QuickPrivate ) + +set_target_properties(PositioningQuick PROPERTIES + QT_QML_MODULE_INSTALL_QMLTYPES TRUE + QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION} + QT_QML_MODULE_URI QtPositioning + QT_QMLTYPES_FILENAME plugins.qmltypes + QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtPositioning" +) + +qt6_qml_type_registration(PositioningQuick) diff --git a/src/imports/positioning/locationsingleton.cpp b/src/positioningquick/locationsingleton.cpp index 77408368..afc80bae 100644 --- a/src/imports/positioning/locationsingleton.cpp +++ b/src/positioningquick/locationsingleton.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "locationsingleton.h" +#include "locationsingleton_p.h" #include <QtPositioning/private/qwebmercator_p.h> #include <QtPositioning/private/qdoublevector2d_p.h> #include <QDebug> diff --git a/src/imports/positioning/locationsingleton.h b/src/positioningquick/locationsingleton_p.h index 16d838e6..75459cb1 100644 --- a/src/imports/positioning/locationsingleton.h +++ b/src/positioningquick/locationsingleton_p.h @@ -62,10 +62,15 @@ #include <QtQml/QJSValue> #include <QVariant> #include <QPointF> +#include <QQmlEngine> +#include <QtPositioningQuick/private/qpositioningquickglobal_p.h> -class LocationSingleton : public QObject +class Q_POSITIONINGQUICK_PRIVATE_EXPORT LocationSingleton : public QObject { Q_OBJECT + QML_NAMED_ELEMENT(QtPositioning) + QML_SINGLETON + QML_ADDED_IN_VERSION(5, 0) public: explicit LocationSingleton(QObject *parent = 0); @@ -98,8 +103,8 @@ public: Q_INVOKABLE QGeoPath shapeToPath(const QGeoShape &shape) const; Q_INVOKABLE QGeoPolygon shapeToPolygon(const QGeoShape &shape) const; - Q_REVISION(12) Q_INVOKABLE QGeoCoordinate mercatorToCoord(const QPointF &mercator) const; - Q_REVISION(12) Q_INVOKABLE QPointF coordToMercator(const QGeoCoordinate &coord) const; + Q_REVISION(5, 12) Q_INVOKABLE QGeoCoordinate mercatorToCoord(const QPointF &mercator) const; + Q_REVISION(5, 12) Q_INVOKABLE QPointF coordToMercator(const QGeoCoordinate &coord) const; }; #endif // LOCATIONSINGLETON_H diff --git a/src/positioningquick/qdeclarativegeoaddress_p.h b/src/positioningquick/qdeclarativegeoaddress_p.h index dd814978..bde91eb3 100644 --- a/src/positioningquick/qdeclarativegeoaddress_p.h +++ b/src/positioningquick/qdeclarativegeoaddress_p.h @@ -54,12 +54,15 @@ #include <QtCore/QObject> #include <QtPositioning/QGeoAddress> #include <QtPositioningQuick/private/qpositioningquickglobal_p.h> +#include <QQmlEngine> QT_BEGIN_NAMESPACE class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativeGeoAddress : public QObject { Q_OBJECT + QML_NAMED_ELEMENT(Address) + QML_ADDED_IN_VERSION(5, 0) Q_PROPERTY(QGeoAddress address READ address WRITE setAddress) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) diff --git a/src/positioningquick/qdeclarativegeolocation_p.h b/src/positioningquick/qdeclarativegeolocation_p.h index 2d604ea5..bb5f90a4 100644 --- a/src/positioningquick/qdeclarativegeolocation_p.h +++ b/src/positioningquick/qdeclarativegeolocation_p.h @@ -63,12 +63,14 @@ QT_BEGIN_NAMESPACE class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativeGeoLocation : public QObject { Q_OBJECT + QML_NAMED_ELEMENT(Location) + QML_ADDED_IN_VERSION(5, 0) Q_PROPERTY(QGeoLocation location READ location WRITE setLocation) Q_PROPERTY(QDeclarativeGeoAddress *address READ address WRITE setAddress NOTIFY addressChanged) Q_PROPERTY(QGeoCoordinate coordinate READ coordinate WRITE setCoordinate NOTIFY coordinateChanged) Q_PROPERTY(QGeoRectangle boundingBox READ boundingBox WRITE setBoundingBox NOTIFY boundingBoxChanged) - Q_PROPERTY(QVariantMap extendedAttributes MEMBER m_extendedAttributes NOTIFY extendedAttributesChanged REVISION 13) + Q_PROPERTY(QVariantMap extendedAttributes MEMBER m_extendedAttributes NOTIFY extendedAttributesChanged REVISION(5, 13)) public: explicit QDeclarativeGeoLocation(QObject *parent = 0); diff --git a/src/positioningquick/qdeclarativepluginparameter_p.h b/src/positioningquick/qdeclarativepluginparameter_p.h index f5035aae..2d3b8e2a 100644 --- a/src/positioningquick/qdeclarativepluginparameter_p.h +++ b/src/positioningquick/qdeclarativepluginparameter_p.h @@ -60,6 +60,8 @@ QT_BEGIN_NAMESPACE class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativePluginParameter : public QObject { Q_OBJECT + QML_NAMED_ELEMENT(PluginParameter) + QML_ADDED_IN_VERSION(5, 14) Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) diff --git a/src/positioningquick/qdeclarativeposition_p.h b/src/positioningquick/qdeclarativeposition_p.h index c2a8d987..7556e6b9 100644 --- a/src/positioningquick/qdeclarativeposition_p.h +++ b/src/positioningquick/qdeclarativeposition_p.h @@ -64,6 +64,8 @@ QT_BEGIN_NAMESPACE class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativePosition : public QObject { Q_OBJECT + QML_NAMED_ELEMENT(Position) + QML_ADDED_IN_VERSION(5, 0) Q_PROPERTY(bool latitudeValid READ isLatitudeValid NOTIFY latitudeValidChanged) Q_PROPERTY(bool longitudeValid READ isLongitudeValid NOTIFY longitudeValidChanged) @@ -77,13 +79,13 @@ class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativePosition : public QObject Q_PROPERTY(bool horizontalAccuracyValid READ isHorizontalAccuracyValid NOTIFY horizontalAccuracyValidChanged) Q_PROPERTY(bool verticalAccuracyValid READ isVerticalAccuracyValid NOTIFY verticalAccuracyValidChanged) - Q_PROPERTY(bool directionValid READ isDirectionValid NOTIFY directionValidChanged REVISION 1) - Q_PROPERTY(double direction READ direction NOTIFY directionChanged REVISION 1) - Q_PROPERTY(bool verticalSpeedValid READ isVerticalSpeedValid NOTIFY verticalSpeedValidChanged REVISION 1) - Q_PROPERTY(double verticalSpeed READ verticalSpeed NOTIFY verticalSpeedChanged REVISION 1) + Q_PROPERTY(bool directionValid READ isDirectionValid NOTIFY directionValidChanged REVISION(5, 1)) + Q_PROPERTY(double direction READ direction NOTIFY directionChanged REVISION(5, 1)) + Q_PROPERTY(bool verticalSpeedValid READ isVerticalSpeedValid NOTIFY verticalSpeedValidChanged REVISION(5, 1)) + Q_PROPERTY(double verticalSpeed READ verticalSpeed NOTIFY verticalSpeedChanged REVISION(5, 1)) - Q_PROPERTY(double magneticVariation READ magneticVariation NOTIFY magneticVariationChanged REVISION 2) - Q_PROPERTY(bool magneticVariationValid READ isMagneticVariationValid NOTIFY magneticVariationChanged REVISION 2) + Q_PROPERTY(double magneticVariation READ magneticVariation NOTIFY magneticVariationChanged REVISION(5, 2)) + Q_PROPERTY(bool magneticVariationValid READ isMagneticVariationValid NOTIFY magneticVariationChanged REVISION(5, 2)) public: explicit QDeclarativePosition(QObject *parent = 0); @@ -130,13 +132,13 @@ Q_SIGNALS: void verticalAccuracyChanged(); void verticalAccuracyValidChanged(); - Q_REVISION(1) void directionValidChanged(); - Q_REVISION(1) void directionChanged(); - Q_REVISION(1) void verticalSpeedValidChanged(); - Q_REVISION(1) void verticalSpeedChanged(); + Q_REVISION(5, 1) void directionValidChanged(); + Q_REVISION(5, 1) void directionChanged(); + Q_REVISION(5, 1) void verticalSpeedValidChanged(); + Q_REVISION(5, 1) void verticalSpeedChanged(); - Q_REVISION(2) void magneticVariationChanged(); - Q_REVISION(2) void magneticVariationValidChanged(); + Q_REVISION(5, 2) void magneticVariationChanged(); + Q_REVISION(5, 2) void magneticVariationValidChanged(); private: QGeoPositionInfo m_info; diff --git a/src/positioningquick/qdeclarativepositionsource_p.h b/src/positioningquick/qdeclarativepositionsource_p.h index 8fe645f1..11fe604f 100644 --- a/src/positioningquick/qdeclarativepositionsource_p.h +++ b/src/positioningquick/qdeclarativepositionsource_p.h @@ -67,6 +67,8 @@ class QTcpSocket; class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativePositionSource : public QObject, public QQmlParserStatus { Q_OBJECT + QML_NAMED_ELEMENT(PositionSource) + QML_ADDED_IN_VERSION(5, 0) Q_PROPERTY(QDeclarativePosition *position READ position NOTIFY positionChanged) Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged) @@ -77,7 +79,7 @@ class Q_POSITIONINGQUICK_PRIVATE_EXPORT QDeclarativePositionSource : public QObj Q_PROPERTY(PositioningMethods preferredPositioningMethods READ preferredPositioningMethods WRITE setPreferredPositioningMethods NOTIFY preferredPositioningMethodsChanged) Q_PROPERTY(SourceError sourceError READ sourceError NOTIFY sourceErrorChanged) Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) - Q_PROPERTY(QQmlListProperty<QDeclarativePluginParameter> parameters READ parameters REVISION 14) + Q_PROPERTY(QQmlListProperty<QDeclarativePluginParameter> parameters READ parameters REVISION(5, 14)) Q_ENUMS(PositioningMethod) Q_CLASSINFO("DefaultProperty", "parameters") @@ -132,8 +134,8 @@ public: void classBegin() override { } void componentComplete() override; - Q_REVISION(14) Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value); - Q_REVISION(14) Q_INVOKABLE QVariant backendProperty(const QString &name) const; + Q_REVISION(5, 14) Q_INVOKABLE bool setBackendProperty(const QString &name, const QVariant &value); + Q_REVISION(5, 14) Q_INVOKABLE QVariant backendProperty(const QString &name) const; public Q_SLOTS: void update(int timeout = 0); diff --git a/src/positioningquick/qpositioningquickglobal_p.h b/src/positioningquick/qpositioningquickglobal_p.h index 46e40f25..ce284106 100644 --- a/src/positioningquick/qpositioningquickglobal_p.h +++ b/src/positioningquick/qpositioningquickglobal_p.h @@ -58,4 +58,6 @@ QT_BEGIN_NAMESPACE QT_END_NAMESPACE +void Q_POSITIONINGQUICK_PRIVATE_EXPORT qml_register_types_QtPositioning(); + #endif // QPOSITIONINGQUICKGLOBAL_P_H diff --git a/src/positioningquick/qpositioningquickmodule_p.h b/src/positioningquick/qpositioningquickmodule_p.h new file mode 100644 index 00000000..6d8aed91 --- /dev/null +++ b/src/positioningquick/qpositioningquickmodule_p.h @@ -0,0 +1,151 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtPositioning module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef QT_POSITIONINGQUICKMODULE_P_H +#define QT_POSITIONINGQUICKMODULE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include <QtQml/qqml.h> +#include "qpositioningquickglobal_p.h" + +#include <QtPositioning/QGeoCoordinate> +#include <QtPositioning/QGeoAddress> +#include <QtPositioning/QGeoRectangle> +#include <QtPositioning/QGeoCircle> +#include <QtPositioning/QGeoPath> +#include <QtPositioning/QGeoPolygon> +#include <QtPositioning/QGeoLocation> +#include <QtPositioning/QGeoShape> +#include <QtPositioning/QGeoPositionInfo> +#include <QtPositioning/private/qgeocoordinateobject_p.h> + +QT_BEGIN_NAMESPACE + +struct QGeoCoordinateForeign +{ + Q_GADGET + QML_FOREIGN(QGeoCoordinate) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoAddressForeign +{ + Q_GADGET + QML_FOREIGN(QGeoAddress) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoRectangleForeign +{ + Q_GADGET + QML_FOREIGN(QGeoRectangle) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoCircleForeign +{ + Q_GADGET + QML_FOREIGN(QGeoCircle) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoPathForeign +{ + Q_GADGET + QML_FOREIGN(QGeoPath) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoPolygonForeign +{ + Q_GADGET + QML_FOREIGN(QGeoPolygon) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoLocationForeign +{ + Q_GADGET + QML_FOREIGN(QGeoLocation) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoShapeForeign +{ + Q_GADGET + QML_FOREIGN(QGeoShape) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoCoordinateObjectForeign +{ + Q_GADGET + QML_FOREIGN(QGeoCoordinateObject) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +struct QGeoPositionInfoForeign +{ + Q_GADGET + QML_FOREIGN(QGeoPositionInfo) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(5, 0) +}; + +QT_END_NAMESPACE + +#endif // QT_POSITIONINGQUICKMODULE_P_H diff --git a/src/positioningquick/qquickgeocoordinateanimation_p.h b/src/positioningquick/qquickgeocoordinateanimation_p.h index c616d780..69f3ee4c 100644 --- a/src/positioningquick/qquickgeocoordinateanimation_p.h +++ b/src/positioningquick/qquickgeocoordinateanimation_p.h @@ -62,6 +62,8 @@ class QQuickGeoCoordinateAnimationPrivate; class Q_POSITIONINGQUICK_PRIVATE_EXPORT QQuickGeoCoordinateAnimation : public QQuickPropertyAnimation { Q_OBJECT + QML_NAMED_ELEMENT(CoordinateAnimation) + QML_ADDED_IN_VERSION(5, 3) Q_DECLARE_PRIVATE(QQuickGeoCoordinateAnimation) Q_PROPERTY(QGeoCoordinate from READ from WRITE setFrom) Q_PROPERTY(QGeoCoordinate to READ to WRITE setTo) |