diff options
Diffstat (limited to 'src/location/maps/qgeoroute.h')
-rw-r--r-- | src/location/maps/qgeoroute.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/location/maps/qgeoroute.h b/src/location/maps/qgeoroute.h index ef1f7566..381152e3 100644 --- a/src/location/maps/qgeoroute.h +++ b/src/location/maps/qgeoroute.h @@ -50,13 +50,13 @@ class QGeoRectangle; class QGeoRouteSegment; class QGeoRoutePrivate; - +class QGeoRouteLeg; class Q_LOCATION_EXPORT QGeoRoute { public: QGeoRoute(); QGeoRoute(const QGeoRoute &other); - ~QGeoRoute(); + ~QGeoRoute(); // ### Qt6: make this virtual QGeoRoute &operator = (const QGeoRoute &other); @@ -87,9 +87,13 @@ public: void setPath(const QList<QGeoCoordinate> &path); QList<QGeoCoordinate> path() const; + void setRouteLegs(const QList<QGeoRouteLeg> &legs); + QList<QGeoRouteLeg> routeLegs() const; + protected: QGeoRoute(const QExplicitlySharedDataPointer<QGeoRoutePrivate> &dd); QExplicitlySharedDataPointer<QGeoRoutePrivate> &d(); + const QExplicitlySharedDataPointer<QGeoRoutePrivate> &const_d() const; private: QExplicitlySharedDataPointer<QGeoRoutePrivate> d_ptr; @@ -97,6 +101,26 @@ private: friend class QGeoRoutePrivate; }; +class Q_LOCATION_EXPORT QGeoRouteLeg: public QGeoRoute +{ +public: + QGeoRouteLeg(); + QGeoRouteLeg(const QGeoRouteLeg &other); + ~QGeoRouteLeg(); + + void setLegIndex(int idx); + int legIndex() const; + + void setOverallRoute(const QGeoRoute &route); + QGeoRoute overallRoute() const; + +protected: + QGeoRouteLeg(const QExplicitlySharedDataPointer<QGeoRoutePrivate> &dd); + + friend class QDeclarativeGeoRoute; + friend class QGeoRoutePrivate; +}; + QT_END_NAMESPACE #endif |