QGeoRouteLeg Class
The QGeoRouteLeg class represents a leg of a route, that is the portion of a route between one waypoint and the next. This is a subclass of QGeoRoute, exposing route leg specific API. More...
Header: | #include <QGeoRouteLeg> |
qmake: | QT += location |
Since: | Qt 5.12 |
Inherits: | QGeoRoute |
Public Functions
QGeoRouteLeg() | |
QGeoRouteLeg(const QGeoRouteLeg &other) | |
~QGeoRouteLeg() | |
int | legIndex() const |
QGeoRoute | overallRoute() const |
void | setLegIndex(int idx) |
void | setOverallRoute(const QGeoRoute &route) |
- 21 public functions inherited from QGeoRoute
Protected Functions
QGeoRouteLeg(const QExplicitlySharedDataPointer<QGeoRoutePrivate> &dd) |
- 2 protected functions inherited from QGeoRoute
Detailed Description
The QGeoRouteLeg class represents a leg of a route, that is the portion of a route between one waypoint and the next. This is a subclass of QGeoRoute, exposing route leg specific API.
Note: QGeoRoute::routeLegs will return an empty list if called on a route leg.
See also QGeoRoute.
Member Function Documentation
QGeoRouteLeg::QGeoRouteLeg()
Constructs a route leg object.
QGeoRouteLeg::QGeoRouteLeg(const QGeoRouteLeg &other)
Constructs a route leg object from the contents of other.
[protected]
QGeoRouteLeg::QGeoRouteLeg(const QExplicitlySharedDataPointer<QGeoRoutePrivate> &dd)
Default constructs an instance of QGeoRouteLeg.
QGeoRouteLeg::~QGeoRouteLeg()
Destroys this route object.
int QGeoRouteLeg::legIndex() const
Returns the index of this route leg inside the containing QGeoRoute::routeLegs list. Can be used to find the next legs.
See also setLegIndex().
QGeoRoute QGeoRouteLeg::overallRoute() const
Returns the route that contains this route leg.
See also setOverallRoute().
void QGeoRouteLeg::setLegIndex(int idx)
Sets the route leg index to idx.
See also legIndex().
void QGeoRouteLeg::setOverallRoute(const QGeoRoute &route)
Sets the route that contains this route leg.
See also overallRoute().
© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.