The QGeoRouteSegment class represents a segment of a route. More...
#include <QGeoRouteSegment>
This class was introduced in Qt Mobility 1.1.
QGeoRouteSegment () | |
QGeoRouteSegment ( const QGeoRouteSegment & other ) | |
~QGeoRouteSegment () | |
qreal | distance () const |
bool | isValid () const |
QGeoManeuver | maneuver () const |
QGeoRouteSegment | nextRouteSegment () const |
QList<QGeoCoordinate> | path () const |
void | setDistance ( qreal distance ) |
void | setManeuver ( const QGeoManeuver & maneuver ) |
void | setNextRouteSegment ( const QGeoRouteSegment & routeSegment ) |
void | setPath ( const QList<QGeoCoordinate> & path ) |
void | setTravelTime ( int secs ) |
int | travelTime () const |
bool | operator!= ( const QGeoRouteSegment & other ) const |
QGeoRouteSegment & | operator= ( const QGeoRouteSegment & other ) |
bool | operator== ( const QGeoRouteSegment & other ) const |
The QGeoRouteSegment class represents a segment of a route.
A QGeoRouteSegment instance has information about the physcial layout of the route segment, the length of the route and estimated time required to traverse the route segment and an optional QGeoManeuver associated with the end of the route segment.
QGeoRouteSegment instances can be thought of as edges on a routing graph, with QGeoManeuver instances as optional labels attached to the vertices of the graph.
Constructs an invalid route segment object.
The route segment will remain invalid until one of setNextRouteSegment(), setTravelTime(), setDistance(), setPath() or setManeuver() is called.
Constructs a route segment object from the contents of other.
This function was introduced in Qt Mobility 1.1.
Destroys this route segment object.
Returns the distance covered by this segment of the route, in metres.
This function was introduced in Qt Mobility 1.1.
See also setDistance().
Returns whether this route segment is valid or not.
If nextRouteSegment() is called on the last route segment of a route, the returned value will be an invalid route segment.
This function was introduced in Qt Mobility 1.1.
Returns the manevuer for this route segment.
Will return an invalid QGeoManeuver if no information has been attached to the endpoint of this route segment.
This function was introduced in Qt Mobility 1.1.
See also setManeuver().
Returns the next route segment in the route.
Will return an invalid route segment if this is the last route segment in the route.
This function was introduced in Qt Mobility 1.1.
See also setNextRouteSegment().
Returns the geometric shape of this route segment of the route.
The coordinates should be listed in the order in which they would be traversed by someone traveling along this segment of the route.
This function was introduced in Qt Mobility 1.1.
See also setPath().
Sets the distance covered by this segment of the route, in metres, to distance.
This function was introduced in Qt Mobility 1.1.
See also distance().
Sets the maneuver for this route segment to maneuver.
This function was introduced in Qt Mobility 1.1.
See also maneuver().
Sets the next route segment in the route to routeSegment.
This function was introduced in Qt Mobility 1.1.
See also nextRouteSegment().
Sets the geometric shape of this segment of the route to path.
The coordinates in path should be listed in the order in which they would be traversed by someone traveling along this segment of the route.
This function was introduced in Qt Mobility 1.1.
See also path().
Sets the estimated amount of time it will take to traverse this segment of the route, in seconds, to secs.
This function was introduced in Qt Mobility 1.1.
See also travelTime().
Returns the estimated amount of time it will take to traverse this segment of the route, in seconds.
This function was introduced in Qt Mobility 1.1.
See also setTravelTime().
Returns whether this route segment and other are not equal.
The value of nextRouteSegment() is not considered in the comparison.
This function was introduced in Qt Mobility 1.1.
Assigns other to this route segment object and then returns a reference to this route segment object.
This function was introduced in Qt Mobility 1.1.
Returns whether this route segment and other are equal.
The value of nextRouteSegment() is not considered in the comparison.
This function was introduced in Qt Mobility 1.1.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.