The QGeoRoute class represents a route between two points. More...
#include <QGeoRoute>
QGeoRoute () | |
QGeoRoute ( const QGeoRoute & other ) | |
~QGeoRoute () | |
QGeoBoundingBox | bounds () const |
qreal | distance () const |
QList<QGeoCoordinate> | path () const |
QGeoRouteRequest | request () const |
QString | routeId () const |
QList<QGeoRouteSegment> | routeSegments () const |
void | setBounds ( const QGeoBoundingBox & bounds ) |
void | setDistance ( qreal distance ) |
void | setPath ( const QList<QGeoCoordinate> & path ) |
void | setRequest ( const QGeoRouteRequest & request ) |
void | setRouteId ( const QString & id ) |
void | setRouteSegments ( const QList<QGeoRouteSegment> & routeSegments ) |
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, or objects derived from QGeoRouteSegment, which describe subsections of the route in greater detail. The subclasses of QGeoRouteSegment are used to provide specific information for the subsection of the route for particular cases, as may be needed when the segment is to be traversed via public transport or in a truck.
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.
See also setBounds().
Returns the distance covered by this route, in metres.
See also setDistance().
Returns the geometric shape of the route.
The coordinates should be listed in the order in which they would be traversed by someone travelling along this segment of the route.
See also setPath().
Returns the route request which describes the criteria used in the calculation of this route.
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.
See also setRouteId().
Returns the route segments.
QGeoRouteSegment contains more detailed information than QGeoRoute and can be subclasses to provide more specialized information, such as for the description of segments of the journey for those who are travelling by public transport, or by truck.
See also setRouteSegments().
Sets the bounding box which encompasses the entire route to bounds.
See also bounds().
Sets the distance covered by this route, in metres, to distance.
See also distance().
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 travelling along this segment of the route.
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.
See also routeId().
Sets the list of route segements to routeSegments.
QGeoRouteSegment contains more detailed information than QGeoRoute and can be subclasses to provide more specialized information, such as for the description of segments of the journey for those who are travelling by public transport, or by truck.
See also routeSegments().
Sets the travel mode for this route.
This should be one of the travel modes returned by request().travelModes().
See also travelMode().
Sets the estimated amount of time it will take to traverse this route, in seconds, to secs.
See also travelTime().
Returns the travel mode for the this route.
This should be one of the travel modes returned by request().travelModes().
See also setTravelMode().
Returns the estimated amount of time it will take to traverse this route, in seconds.
See also setTravelTime().
Returns whether this route and other are not equal.
Assigns the contents of other to this route and returns a reference to this route.
Returns whether this route and other are equal.