summaryrefslogtreecommitdiffstats
path: root/src/location/maps/qgeoroute.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-26 12:02:12 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-04 12:23:21 +0200
commit16e6505c953d6d8d8f05f89ae052a9dd6ccf828e (patch)
treeb80c21b524acc8896bcf1081bcc1b1428868ea25 /src/location/maps/qgeoroute.h
parent8b9bd24556214074d0930716e1cfe918471f42b6 (diff)
Register QGeoRoute as QML value type, remove QDeclarativeGeoRoute
Adapt model and tests accordingly. Fixes: QTBUG-106482 Change-Id: Ie5a36e4fef17ae7bc4ecfab9187a325fb025e283 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/location/maps/qgeoroute.h')
-rw-r--r--src/location/maps/qgeoroute.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/location/maps/qgeoroute.h b/src/location/maps/qgeoroute.h
index e9a9041a..269515b1 100644
--- a/src/location/maps/qgeoroute.h
+++ b/src/location/maps/qgeoroute.h
@@ -62,13 +62,17 @@ class Q_LOCATION_EXPORT QGeoRoute
QML_VALUE_TYPE(route)
QML_STRUCTURED_VALUE
+ Q_PROPERTY(QString routeId READ routeId CONSTANT)
Q_PROPERTY(QGeoRectangle bounds READ bounds CONSTANT)
Q_PROPERTY(int travelTime READ travelTime CONSTANT)
Q_PROPERTY(qreal distance READ distance CONSTANT)
+ Q_PROPERTY(QList<QGeoCoordinate> path READ path WRITE setPath)
Q_PROPERTY(QList<QGeoRoute> routeLegs READ routeLegs CONSTANT)
Q_PROPERTY(QVariantMap extendedAttributes READ extendedAttributes CONSTANT)
Q_PROPERTY(int legIndex READ legIndex CONSTANT)
Q_PROPERTY(QGeoRoute overallRoute READ overallRoute CONSTANT)
+ Q_PROPERTY(qsizetype segmentsCount READ segmentsCount CONSTANT)
+ Q_PROPERTY(QList<QGeoRouteSegment> segments READ segments CONSTANT)
public:
QGeoRoute();
@@ -97,6 +101,8 @@ public:
void setFirstRouteSegment(const QGeoRouteSegment &routeSegment);
QGeoRouteSegment firstRouteSegment() const;
+ qsizetype segmentsCount() const;
+ QList<QGeoRouteSegment> segments() const;
void setTravelTime(int secs);
int travelTime() const;