The QGeoRoute class represents a route between two points. More...
#include <QGeoRoute>
This class was introduced in Qt Mobility 1.1.
QGeoRoute () | |
QGeoRoute ( const QGeoRoute & other ) | |
~QGeoRoute () | |
QGeoBoundingBox | bounds () const |
qreal | distance () const |
QGeoRouteSegment | firstRouteSegment () const |
QList<QGeoCoordinate> | path () const |
QGeoRouteRequest | request () const |
QString | routeId () const |
void | setBounds ( const QGeoBoundingBox & bounds ) |
void | setDistance ( qreal distance ) |
void | setFirstRouteSegment ( const QGeoRouteSegment & routeSegment ) |
void | setPath ( const QList<QGeoCoordinate> & path ) |
void | setRequest ( const QGeoRouteRequest & request ) |
void | setRouteId ( const QString & id ) |
void | setTravelMode ( QGeoRouteRequest::TravelMode mode ) |
void | setTravelTime ( int secs ) |
QGeoRouteRequest::TravelMode | travelMode () const |
int | travelTime () const |
bool | operator!= ( const QGeoRoute & other ) const |
QGeoRoute & | operator= ( const QGeoRoute & other ) |
bool | operator== ( const QGeoRoute & other ) const |
The QGeoRoute class represents a route between two points.
A QGeoRoute object contains high level information about a route, such as the length the route, the estimated travel time for the route, and enough information to render a basic image of the route on a map.
The QGeoRoute object also contains a list of QGeoRouteSegment objecs which describe subsections of the route in greater detail.
Routing information is normally requested using QGeoRoutingManager::calculateRoute(), which returns a QGeoRouteReply instance. If the operation is completed successfully the routing information can be accessed with QGeoRouteReply::routes()
See also QGeoRoutingManager.
Constructs a route object.
Constructs a route object from the contents of other.
Destroys this route object.
Returns a bounding box which encompasses the entire route.
This function was introduced in Qt Mobility 1.1.
See also setBounds().
Returns the distance covered by this route, in metres.
This function was introduced in Qt Mobility 1.1.
See also setDistance().
Returns the first route segment in the route.
Will return an invalid route segment if there are no route segments associated with the route.
The remaining route segments can be accessed sequentially with QGeoRouteSegment::nextRouteSegment.
This function was introduced in Qt Mobility 1.1.
See also setFirstRouteSegment().
Returns the geometric shape 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().
Returns the route request which describes the criteria used in the calculation of this route.
This function was introduced in Qt Mobility 1.1.
See also setRequest().
Returns the ID of this route.
Service providers which support the updating of routes commonly assign IDs to routes. If this route did not come from such a service provider the function will return an empty string.
This function was introduced in Qt Mobility 1.1.
See also setRouteId().
Sets the bounding box which encompasses the entire route to bounds.
This function was introduced in Qt Mobility 1.1.
See also bounds().
Sets the distance covered by this route, in metres, to distance.
This function was introduced in Qt Mobility 1.1.
See also distance().
Sets the first route segment in the route to routeSegment.
This function was introduced in Qt Mobility 1.1.
See also firstRouteSegment().
Sets the geometric shape 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 route request which describes the criteria used in the calculcation of this route to request.
See also request().
Sets the ID of this route to id.
Service providers which support the updating of routes commonly assign IDs to routes. If this route came from such a service provider changing the ID will probably cause route updates to stop working.
This function was introduced in Qt Mobility 1.1.
See also routeId().
Sets the travel mode for this route to mode.
This should be one of the travel modes returned by request().travelModes().
This function was introduced in Qt Mobility 1.1.
See also travelMode().
Sets the estimated amount of time it will take to traverse this route, in seconds, to secs.
This function was introduced in Qt Mobility 1.1.
See also travelTime().
Returns the travel mode for the this route.
This should be one of the travel modes returned by request().travelModes().
This function was introduced in Qt Mobility 1.1.
See also setTravelMode().
Returns the estimated amount of time it will take to traverse this route, in seconds.
This function was introduced in Qt Mobility 1.1.
See also setTravelTime().
Returns whether this route and other are not equal.
This function was introduced in Qt Mobility 1.1.
Assigns the contents of other to this route and returns a reference to this route.
This function was introduced in Qt Mobility 1.1.
Returns whether this route and other are equal.
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.