diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-11-06 16:21:58 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-11-30 16:20:12 +0000 |
commit | 74e0f7b414432688858ce9d82a05384b4f883688 (patch) | |
tree | 8829ceb8bca000db8383f991240832e5c1e72835 /src/positioning/qgeocoordinate.h | |
parent | 3e107c6d2933b4b924100d1aab18f52f7ca40edc (diff) | |
download | qtlocation-74e0f7b414432688858ce9d82a05384b4f883688.tar.gz |
Introduce Waypoint
This patch replaces QGeoCoordinate with Waypoint as mean to specify
waypoints in a RouteQuery.
This patch also adds a new invokable to RouteQuery, waypointObjects,
to return QDeclarativeGeoWaypoints instead of QGeoCooordinates.
NOTE: If, by 5.11, support to perform implicit conversions in method
invocations based on converters registered in the metatype system
will be added, this method could/should be removed, and
QDeclarativeGeoWaypoint objects should be return as QVariants from
the waypoints() getter, as they could be used in place of
QGeoCoordinate when passing them as arguments.
Task-number: QTBUG-64066
Change-Id: I77747f53cdcbabe6430580b60fa59d4afe8c650a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning/qgeocoordinate.h')
-rw-r--r-- | src/positioning/qgeocoordinate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/positioning/qgeocoordinate.h b/src/positioning/qgeocoordinate.h index ddb6274e..c5497dae 100644 --- a/src/positioning/qgeocoordinate.h +++ b/src/positioning/qgeocoordinate.h @@ -51,6 +51,7 @@ class QDebug; class QDataStream; class QGeoCoordinatePrivate; +class QGeoCoordinateObject; class Q_POSITIONING_EXPORT QGeoCoordinate { Q_GADGET @@ -81,14 +82,26 @@ public: QGeoCoordinate(double latitude, double longitude); QGeoCoordinate(double latitude, double longitude, double altitude); QGeoCoordinate(const QGeoCoordinate &other); + QGeoCoordinate(const QGeoCoordinateObject &coordinateoObject); + QGeoCoordinate(const QGeoCoordinateObject *coordinateObject); ~QGeoCoordinate(); QGeoCoordinate &operator=(const QGeoCoordinate &other); + QGeoCoordinate &operator=(const QGeoCoordinateObject &coordinateObject); + QGeoCoordinate &operator=(const QGeoCoordinateObject *coordinateoObject); bool operator==(const QGeoCoordinate &other) const; + bool operator==(const QGeoCoordinateObject &other) const; + bool operator==(const QGeoCoordinateObject *other) const; inline bool operator!=(const QGeoCoordinate &other) const { return !operator==(other); } + inline bool operator!=(const QGeoCoordinateObject &other) const { + return !operator==(other); + } + inline bool operator!=(const QGeoCoordinateObject *other) const { + return !operator==(*other); + } bool isValid() const; CoordinateType type() const; |