Sur cette page

QGeoManeuver Class

La classe QGeoManeuver représente les informations relatives au point de rencontre de deux QGeoRouteSegments. Plus d'informations...

Header: #include <QGeoManeuver>
qmake: QT += location

Types publics

enum InstructionDirection { NoDirection, DirectionForward, DirectionBearRight, DirectionLightRight, DirectionRight, …, DirectionBearLeft }

Propriétés

Fonctions publiques

QGeoManeuver()
QGeoManeuver(const QGeoManeuver &other)
~QGeoManeuver()
QGeoManeuver::InstructionDirection direction() const
qreal distanceToNextInstruction() const
QVariantMap extendedAttributes() const
QString instructionText() const
bool isValid() const
QGeoCoordinate position() const
int timeToNextInstruction() const
QGeoCoordinate waypoint() const
QGeoManeuver &operator=(const QGeoManeuver &other)
bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs)
bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs)

Description détaillée

QGeoRouteSegment Les instances de QGeoManeuver peuvent être considérées comme des arêtes d'un graphe de routage, les instances de QGeoManeuver étant des étiquettes optionnelles attachées aux sommets du graphe.

L'aide à l'information la plus intéressante dans une instance de QGeoManeuver est normalement la navigation textuelle à fournir et la position à laquelle la fournir, accessibles respectivement par instructionText() et position().

Il est également possible de déterminer si un point de cheminement a été franchi en vérifiant si waypoint() renvoie une adresse QGeoCoordinate valide.

Documentation sur les types de membres

enum QGeoManeuver::InstructionDirection

Décrit le changement de direction associé au texte d'instruction associé à une manœuvre QGeoManaver.

ConstanteValeurDescription
QGeoManeuver::NoDirection0Aucune direction n'est associée au texte de l'instruction.
QGeoManeuver::DirectionForward1L'instruction indique qu'il n'est pas nécessaire de modifier la direction du déplacement.
QGeoManeuver::DirectionBearRight2L'instruction indique que le sens de circulation doit être orienté vers la droite.
QGeoManeuver::DirectionLightRight3L'instruction indique qu'un léger virage à droite est nécessaire.
QGeoManeuver::DirectionRight4L'instruction indique qu'il faut tourner à droite.
QGeoManeuver::DirectionHardRight5L'instruction indique qu'un virage serré à droite est nécessaire.
QGeoManeuver::DirectionUTurnRight6L'instruction indique qu'un demi-tour à droite est nécessaire.
QGeoManeuver::DirectionUTurnLeft7L'instruction indique qu'un demi-tour à gauche est nécessaire.
QGeoManeuver::DirectionHardLeft8L'instruction indique qu'un virage serré vers la gauche est nécessaire.
QGeoManeuver::DirectionLeft9L'instruction indique qu'il faut tourner à gauche.
QGeoManeuver::DirectionLightLeft10L'instruction indique qu'un léger virage à gauche est nécessaire.
QGeoManeuver::DirectionBearLeft11L'instruction indique que le sens de circulation doit être orienté vers la gauche.

Documentation sur les biens

[read-only] direction : const InstructionDirection

Cette propriété contient la direction associée à l'instruction associée.

Fonctions d'accès :

QGeoManeuver::InstructionDirection direction() const

[read-only] distanceToNextInstruction : const qreal

Cette propriété indique la distance, en mètres, entre le point où cette instruction a été émise et le point où l'instruction suivante devrait être émise.

Fonctions d'accès :

qreal distanceToNextInstruction() const

[read-only, since QtLocation 5.11] extendedAttributes : const QVariantMap

Cette propriété contient les attributs étendus associés à cette manœuvre.

Cette propriété a été introduite dans QtLocation 5.11.

Fonctions d'accès :

QVariantMap extendedAttributes() const

[read-only] instructionText : const QString

Cette propriété contient les instructions de navigation textuelles.

Fonctions d'accès :

QString instructionText() const

[read-only] position : const QGeoCoordinate

Cette propriété contient la position où instructionText doit être affiché.

Fonctions d'accès :

QGeoCoordinate position() const

[read-only] timeToNextInstruction : const int

Cette propriété contient le temps estimé, en secondes, qu'il faudra pour aller du point où l'instruction associée a été émise au point où l'instruction suivante devrait être émise.

Fonctions d'accès :

int timeToNextInstruction() const

[read-only] valid : const bool

Cette propriété indique si cette manœuvre est valide ou non.

Les manœuvres non valides sont utilisées lorsqu'aucune information ne doit être attachée à l'extrémité d'une instance QGeoRouteSegment.

Fonctions d'accès :

bool isValid() const

[read-only] waypoint : const QGeoCoordinate

Cette propriété contient le point de cheminement associé à cette manœuvre.

S'il n'y a pas de point de passage associé à cette manœuvre, cette propriété contient une adresse invalide QGeoCoordinate.

Fonctions d'accès :

QGeoCoordinate waypoint() const

Documentation des fonctions membres

QGeoManeuver::QGeoManeuver()

Construit un objet de manœuvre invalide.

La manœuvre restera invalide jusqu'à ce que l'une des fonctions suivantes soit appelée : setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() ou setWaypoint().

[noexcept] QGeoManeuver::QGeoManeuver(const QGeoManeuver &other)

Construit un objet manœuvre à partir du contenu de other.

[noexcept] QGeoManeuver::~QGeoManeuver()

Détruit cet objet de manœuvre.

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

Attribue other à cet objet de manœuvre et renvoie une référence à cet objet de manœuvre.

Non-membres associés

[noexcept] bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs)

Renvoie si la manœuvre lhs n'est pas égale à rhs.

[noexcept] bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs)

Retourne si la manœuvre lhs est égale à rhs.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.