Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QGeoRoute Class

The QGeoRoute class represents a route between two points. More...

 #include <QGeoRoute>

This class was introduced in Qt Location 5.0.

Public Functions

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

Detailed Description

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.

Member Function Documentation

QGeoRoute::QGeoRoute()

Constructs a route object.

QGeoRoute::QGeoRoute(const QGeoRoute & other)

Constructs a route object from the contents of other.

QGeoRoute::~QGeoRoute()

Destroys this route object.

QGeoBoundingBox QGeoRoute::bounds() const

Returns a bounding box which encompasses the entire route.

See also setBounds().

qreal QGeoRoute::distance() const

Returns the distance covered by this route, in meters.

See also setDistance().

QGeoRouteSegment QGeoRoute::firstRouteSegment() const

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.

See also setFirstRouteSegment().

QList<QGeoCoordinate> QGeoRoute::path() const

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.

See also setPath().

QGeoRouteRequest QGeoRoute::request() const

Returns the route request which describes the criteria used in the calculation of this route.

See also setRequest().

QString QGeoRoute::routeId() const

Returns the identifier of this route.

Service providers which support the updating of routes commonly assign identifiers to routes. If this route did not come from such a service provider the function will return an empty string.

See also setRouteId().

void QGeoRoute::setBounds(const QGeoBoundingBox & bounds)

Sets the bounding box which encompasses the entire route to bounds.

See also bounds().

void QGeoRoute::setDistance(qreal distance)

Sets the distance covered by this route, in meters, to distance.

See also distance().

void QGeoRoute::setFirstRouteSegment(const QGeoRouteSegment & routeSegment)

Sets the first route segment in the route to routeSegment.

See also firstRouteSegment().

void QGeoRoute::setPath(const QList<QGeoCoordinate> & path)

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.

See also path().

void QGeoRoute::setRequest(const QGeoRouteRequest & request)

Sets the route request which describes the criteria used in the calculcation of this route to request.

See also request().

void QGeoRoute::setRouteId(const QString & id)

Sets the identifier of this route to id.

Service providers which support the updating of routes commonly assign identifiers to routes. If this route came from such a service provider changing the identifier will probably cause route updates to stop working.

See also routeId().

void QGeoRoute::setTravelMode(QGeoRouteRequest::TravelMode mode)

Sets the travel mode for this route to mode.

This should be one of the travel modes returned by request().travelModes().

See also travelMode().

void QGeoRoute::setTravelTime(int secs)

Sets the estimated amount of time it will take to traverse this route, in seconds, to secs.

See also travelTime().

QGeoRouteRequest::TravelMode QGeoRoute::travelMode() const

Returns the travel mode for the this route.

This should be one of the travel modes returned by request().travelModes().

See also setTravelMode().

int QGeoRoute::travelTime() const

Returns the estimated amount of time it will take to traverse this route, in seconds.

See also setTravelTime().

bool QGeoRoute::operator!=(const QGeoRoute & other) const

Returns whether this route and other are not equal.

QGeoRoute & QGeoRoute::operator=(const QGeoRoute & other)

Assigns the contents of other to this route and returns a reference to this route.

bool QGeoRoute::operator==(const QGeoRoute & other) const

Returns whether this route and other are equal.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web