QGeoManeuver Class
La classe `QGeoManeuver` représente les informations relatives au point de rencontre entre deux `QGeoRouteSegments`. En savoir plus…
| 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 &&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) |
Personnes extérieures concernées
| bool | operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs) |
| bool | operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs) |
Description détaillée
QGeoRouteSegment Les instances peuvent être considérées comme des arêtes d'un graphe de routage, les instances QGeoManeuver étant des étiquettes facultatives associées aux sommets du graphe.
Les informations les plus intéressantes contenues dans une instance QGeoManeuver sont généralement le message de navigation à afficher et la position à laquelle l’afficher, accessibles respectivement via instructionText() et position().
Il est également possible de déterminer si un point de passage de l'itinéraire a été dépassé en vérifiant si la méthode waypoint() renvoie un objet QGeoCoordinate valide.
Documentation sur les types de membres
enum QGeoManeuver::InstructionDirection
Décrit le changement de direction associé au texte d'instruction lié à un QGeoManaeuver.
| Constante | Valeur | Description |
|---|---|---|
QGeoManeuver::NoDirection | 0 | Aucune direction n’est associée au texte d’instruction. |
QGeoManeuver::DirectionForward | 1 | L'instruction indique que la direction de déplacement n'a pas besoin de changer. |
QGeoManeuver::DirectionBearRight | 2 | L'instruction indique que la direction de déplacement doit s'orienter vers la droite. |
QGeoManeuver::DirectionLightRight | 3 | L'instruction indique qu'un léger virage vers la droite est nécessaire. |
QGeoManeuver::DirectionRight | 4 | L'instruction indique qu'un virage vers la droite est requis. |
QGeoManeuver::DirectionHardRight | 5 | L'instruction indique qu'un virage serré vers la droite est nécessaire. |
QGeoManeuver::DirectionUTurnRight | 6 | L'instruction indique qu'un demi-tour vers la droite est nécessaire. |
QGeoManeuver::DirectionUTurnLeft | 7 | L'instruction indique qu'un demi-tour vers la gauche est nécessaire. |
QGeoManeuver::DirectionHardLeft | 8 | L'instruction indique qu'un virage serré à gauche est requis. |
QGeoManeuver::DirectionLeft | 9 | L'instruction indique qu'un virage à gauche est requis. |
QGeoManeuver::DirectionLightLeft | 10 | L'instruction indique qu'un léger virage à gauche est requis. |
QGeoManeuver::DirectionBearLeft | 11 | L'instruction indique que la direction à suivre doit être vers la gauche. |
Documentation relative aux biens immobiliers
[read-only] direction : const InstructionDirection
Cette propriété contient la direction associée à l'instruction correspondante.
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ù la prochaine instruction doit ê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 énumération 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 sous forme de texte.
Fonctions d'accès :
| QString | instructionText() const |
[read-only] position : const QGeoCoordinate
Cette propriété définit l'emplacement où instructionText doit s'afficher.
Fonctions d'accès :
| QGeoCoordinate | position() const |
[read-only] timeToNextInstruction : const int
Cette propriété contient la durée estimée, en secondes, nécessaire pour passer du moment où l'instruction associée a été émise au moment où l'instruction suivante devrait être émise.
Fonctions d'accès :
| int | timeToNextInstruction() const |
[read-only] valid : const bool
Cette propriété s'applique, que cette manœuvre soit valide ou non.
Les manœuvres non valides sont utilisées lorsqu'aucune information ne doit être associée au point de terminaison d'une instance de l'QGeoRouteSegment.
Fonctions d'accès :
| bool | isValid() const |
[read-only] waypoint : const QGeoCoordinate
Cette propriété contient le point de passage associé à cette manœuvre.
S'il n'y a pas de point de passage associé à cette manœuvre, cette propriété contient une valeur non valide « QGeoCoordinate ».
Fonctions d'accès :
| QGeoCoordinate | waypoint() const |
Documentation des fonctions membres
QGeoManeuver::QGeoManeuver()
Crée un objet de manœuvre non valide.
La manœuvre restera invalide jusqu’à ce que l’une des méthodes suivantes soit appelée : setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() ou setWaypoint().
[noexcept] QGeoManeuver::QGeoManeuver(const QGeoManeuver &other)
Crée un objet de manœuvre à partir du contenu de ` other`.
[constexpr noexcept default] QGeoManeuver::QGeoManeuver(QGeoManeuver &&other)
Crée par la méthode `move` une instance de ` QGeoManeuver`.
[noexcept] QGeoManeuver::~QGeoManeuver()
Détruit cet objet de manœuvre.
QGeoManeuver &QGeoManeuver::operator=(const QGeoManeuver &other)
Attribue l'other e à cet objet de manœuvre, puis renvoie une référence à cet objet de manœuvre.
Éléments non membres associés
[noexcept] bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs)
Indique si la manœuvre « lhs » n'est pas égale à « rhs ».
[noexcept] bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs)
Indique si la manœuvre « lhs » est identique à « 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.