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  · 

QGeoRouteSegment Class

The QGeoRouteSegment class represents a segment of a route. More...

 #include <QGeoRouteSegment>

This class was introduced in Qt Location 5.0.

Public Functions

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

Detailed Description

The QGeoRouteSegment class represents a segment of a route.

A QGeoRouteSegment instance has information about the physical 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.

Member Function Documentation

QGeoRouteSegment::QGeoRouteSegment()

Constructs an invalid route segment object.

The route segment will remain invalid until one of setNextRouteSegment(), setTravelTime(), setDistance(), setPath() or setManeuver() is called.

QGeoRouteSegment::QGeoRouteSegment(const QGeoRouteSegment & other)

Constructs a route segment object from the contents of other.

QGeoRouteSegment::~QGeoRouteSegment()

Destroys this route segment object.

qreal QGeoRouteSegment::distance() const

Returns the distance covered by this segment of the route, in meters.

See also setDistance().

bool QGeoRouteSegment::isValid() const

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.

QGeoManeuver QGeoRouteSegment::maneuver() const

Returns the maneuver for this route segment.

Will return an invalid QGeoManeuver if no information has been attached to the endpoint of this route segment.

See also setManeuver().

QGeoRouteSegment QGeoRouteSegment::nextRouteSegment() const

Returns the next route segment in the route.

Will return an invalid route segment if this is the last route segment in the route.

See also setNextRouteSegment().

QList<QGeoCoordinate> QGeoRouteSegment::path() const

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.

See also setPath().

void QGeoRouteSegment::setDistance(qreal distance)

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

See also distance().

void QGeoRouteSegment::setManeuver(const QGeoManeuver & maneuver)

Sets the maneuver for this route segment to maneuver.

See also maneuver().

void QGeoRouteSegment::setNextRouteSegment(const QGeoRouteSegment & routeSegment)

Sets the next route segment in the route to routeSegment.

See also nextRouteSegment().

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

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.

See also path().

void QGeoRouteSegment::setTravelTime(int secs)

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

See also travelTime().

int QGeoRouteSegment::travelTime() const

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

See also setTravelTime().

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

Returns whether this route segment and other are not equal.

The value of nextRouteSegment() is not considered in the comparison.

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

Assigns other to this route segment object and then returns a reference to this route segment object.

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

Returns whether this route segment and other are equal.

The value of nextRouteSegment() is not considered in the comparison.

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