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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QGeoManeuver Class Reference

The QGeoManeuver class represents the information relevant to the point at which two QGeoRouteSegments meet. More...

 #include <QGeoManeuver>

This class was introduced in Qt Mobility 1.1.

Public Types

enum InstructionDirection { NoDirection, DirectionForward, DirectionBearRight, DirectionLightRight, ..., DirectionBearLeft }

Public Functions

QGeoManeuver ()
QGeoManeuver ( const QGeoManeuver & other )
~QGeoManeuver ()
InstructionDirection direction () const
qreal distanceToNextInstruction () const
QString instructionText () const
bool isValid () const
QGeoCoordinate position () const
void setDirection ( InstructionDirection direction )
void setDistanceToNextInstruction ( qreal distance )
void setInstructionText ( const QString & instructionText )
void setPosition ( const QGeoCoordinate & position )
void setTimeToNextInstruction ( int secs )
void setWaypoint ( const QGeoCoordinate & coordinate )
int timeToNextInstruction () const
QGeoCoordinate waypoint () const
bool operator!= ( const QGeoManeuver & other ) const
QGeoManeuver & operator= ( const QGeoManeuver & other )
bool operator== ( const QGeoManeuver & other ) const

Detailed Description

The QGeoManeuver class represents the information relevant to the point at which two QGeoRouteSegments meet.

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.

The most interesting information help in a QGeoManeuver instance is normally the textual navigation to provide and the position at which to provide it, accessible by instructionText() and position() respectively.

It is also possible to determine if a routing waypoint has been passed by checking if waypoint() returns a valid QGeoCoordinate.

Member Type Documentation

enum QGeoManeuver::InstructionDirection

Describes the change in direction associated with the instruction text that is associated with a QGeoManaeuver.

ConstantValueDescription
QGeoManeuver::NoDirection0There is no direction associated with the instruction text.
QGeoManeuver::DirectionForward1The instruction indicates that the direction of travel does not need to change.
QGeoManeuver::DirectionBearRight2The instruction indicates that the direction of travel should bear to the right.
QGeoManeuver::DirectionLightRight3The instruction indicates that a light turn to the right is required.
QGeoManeuver::DirectionRight4The instruction indicates that a turn to the right is required.
QGeoManeuver::DirectionHardRight5The instruction indicates that a hard turn to the right is required.
QGeoManeuver::DirectionUTurnRight6The instruction indicates that a u-turn to the right is required.
QGeoManeuver::DirectionUTurnLeft7The instruction indicates that a u-turn to the left is required.
QGeoManeuver::DirectionHardLeft8The instruction indicates that a hard turn to the left is required.
QGeoManeuver::DirectionLeft9The instruction indicates that a turn to the left is required.
QGeoManeuver::DirectionLightLeft10The instruction indicates that a light turn to the left is required.
QGeoManeuver::DirectionBearLeft11The instruction indicates that the direction of travel should bear to the left.

Member Function Documentation

QGeoManeuver::QGeoManeuver ()

Constructs a invalid maneuver object.

The maneuver will remain invalid until one of setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() or setWaypoint() is called.

QGeoManeuver::QGeoManeuver ( const QGeoManeuver & other )

Constructs a maneuver object from the contents of other.

This function was introduced in Qt Mobility 1.1.

QGeoManeuver::~QGeoManeuver ()

Destroys this manevuer object.

InstructionDirection QGeoManeuver::direction () const

Returns the direction associated with the associated instruction.

This function was introduced in Qt Mobility 1.1.

See also setDirection().

qreal QGeoManeuver::distanceToNextInstruction () const

Returns the distance, in metres, between the point at which the associated instruction was issued and the point that the next instruction should be issued.

This function was introduced in Qt Mobility 1.1.

See also setDistanceToNextInstruction().

QString QGeoManeuver::instructionText () const

Returns the textual navigation instructions.

This function was introduced in Qt Mobility 1.1.

See also setInstructionText().

bool QGeoManeuver::isValid () const

Returns whether this maneuver is valid or not.

Invalid maneuvers are used when there is no information that needs to be attached to the endpoint of a QGeoRouteSegment instance.

This function was introduced in Qt Mobility 1.1.

QGeoCoordinate QGeoManeuver::position () const

Returns the position where instructionText() should be displayed.

This function was introduced in Qt Mobility 1.1.

See also setPosition().

void QGeoManeuver::setDirection ( InstructionDirection direction )

Sets the direction associated with the associated instruction to direction.

This function was introduced in Qt Mobility 1.1.

See also direction().

void QGeoManeuver::setDistanceToNextInstruction ( qreal distance )

Sets the distance, in metres, between the point at which the associated instruction was issued and the point that the next instruction should be issued to distance.

This function was introduced in Qt Mobility 1.1.

See also distanceToNextInstruction().

void QGeoManeuver::setInstructionText ( const QString & instructionText )

Sets the textual navigation instructions to instructionText.

This function was introduced in Qt Mobility 1.1.

See also instructionText().

void QGeoManeuver::setPosition ( const QGeoCoordinate & position )

Sets the position where instructionText() should be displayed to position.

This function was introduced in Qt Mobility 1.1.

See also position().

void QGeoManeuver::setTimeToNextInstruction ( int secs )

Sets the estimated time it will take to travel from the point at which the associated instruction was issued and the point that the next instruction should be issued, in seconds, to secs.

This function was introduced in Qt Mobility 1.1.

See also timeToNextInstruction().

void QGeoManeuver::setWaypoint ( const QGeoCoordinate & coordinate )

Sets the waypoint associated with this maneuver to coordinate.

This function was introduced in Qt Mobility 1.1.

See also waypoint().

int QGeoManeuver::timeToNextInstruction () const

Returns the estimated time it will take to travel from the point at which the associated instruction was issued and the point that the next instruction should be issued, in seconds.

This function was introduced in Qt Mobility 1.1.

See also setTimeToNextInstruction().

QGeoCoordinate QGeoManeuver::waypoint () const

Returns the waypoint associated with this maneuver.

If there is not waypoint associated with this maneuver an invalid QGeoCoordinate will be returned.

This function was introduced in Qt Mobility 1.1.

See also setWaypoint().

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

Returns whether this maneuver is not equal to other.

This function was introduced in Qt Mobility 1.1.

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

Assigns other to this maneuver object and then returns a reference to this maneuver object.

This function was introduced in Qt Mobility 1.1.

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

Returns whether this maneuver is equal to other.

This function was introduced in Qt Mobility 1.1.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 88
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 36
  5. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le Qt Quarterly au hasard

Logo

Utiliser CMake pour compiler des projets Qt

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.2
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