Auf dieser Seite

QGeoManeuver Class

Die Klasse „QGeoManeuver“ repräsentiert die Informationen, die für den Punkt relevant sind, an dem sich zwei „QGeoRouteSegments“ treffen. Mehr...

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

Öffentliche Typen

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

Eigenschaften

Öffentliche Veranstaltungen

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)
bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs)
bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs)

Detaillierte Beschreibung

QGeoRouteSegment Instanzen können als Kanten in einem Routing-Graphen betrachtet werden, wobei QGeoManeuver-Instanzen als optionale Beschriftungen an den Knoten des Graphen angehängt sind.

Die interessantesten Informationen in einer QGeoManeuver-Instanz sind in der Regel der anzuzeigende Navigationstext und die Position, an der dieser angezeigt werden soll; auf diese kann man über instructionText() bzw. position() zugreifen.

Es ist außerdem möglich festzustellen, ob ein Routenwegpunkt bereits passiert wurde, indem geprüft wird, ob ` waypoint()` einen gültigen ` QGeoCoordinate` zurückgibt.

Dokumentation zu Mitgliedstypen

enum QGeoManeuver::InstructionDirection

Beschreibt die Richtungsänderung, die mit dem Anweisungstext verbunden ist, der einem QGeoManaeuver zugeordnet ist.

KonstanteWertBeschreibung
QGeoManeuver::NoDirection0Dem Anweisungstext ist keine Richtung zugeordnet.
QGeoManeuver::DirectionForward1Die Anweisung besagt, dass die Fahrtrichtung nicht geändert werden muss.
QGeoManeuver::DirectionBearRight2Die Anweisung besagt, dass die Fahrtrichtung nach rechts abweichen soll.
QGeoManeuver::DirectionLightRight3Die Anweisung besagt, dass eine leichte Rechtskurve erforderlich ist.
QGeoManeuver::DirectionRight4Die Anweisung besagt, dass eine Rechtskurve erforderlich ist.
QGeoManeuver::DirectionHardRight5Die Anweisung besagt, dass eine scharfe Rechtskurve erforderlich ist.
QGeoManeuver::DirectionUTurnRight6Die Anweisung besagt, dass eine Kehrtwende nach rechts erforderlich ist.
QGeoManeuver::DirectionUTurnLeft7Die Anweisung besagt, dass eine Kehrtwende nach links erforderlich ist.
QGeoManeuver::DirectionHardLeft8Die Anweisung besagt, dass eine scharfe Linkskurve erforderlich ist.
QGeoManeuver::DirectionLeft9Die Anweisung besagt, dass eine Linkskurve erforderlich ist.
QGeoManeuver::DirectionLightLeft10Die Anweisung besagt, dass eine leichte Linkskurve erforderlich ist.
QGeoManeuver::DirectionBearLeft11Die Anweisung besagt, dass die Fahrtrichtung nach links ausgerichtet sein sollte.

Dokumentation zur Immobilie

[read-only] direction : const InstructionDirection

Diese Eigenschaft enthält die Richtung, die mit dem zugehörigen Befehl verknüpft ist.

Zugriffsfunktionen:

QGeoManeuver::InstructionDirection direction() const

[read-only] distanceToNextInstruction : const qreal

Diese Eigenschaft gibt den Abstand in Metern zwischen dem Punkt, an dem diese Anweisung erteilt wurde, und dem Punkt an, dem die nächste Anweisung erteilt werden soll, an.

Zugriffsfunktionen:

qreal distanceToNextInstruction() const

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

Diese Eigenschaft enthält die mit diesem Manöver verbundenen erweiterten Attribute.

Diese Aufzählung wurde in QtLocation 5.11 eingeführt.

Zugriffsfunktionen:

QVariantMap extendedAttributes() const

[read-only] instructionText : const QString

Diese Eigenschaft enthält die textuellen Navigationsanweisungen.

Zugriffsfunktionen:

QString instructionText() const

[read-only] position : const QGeoCoordinate

Diese Eigenschaft legt fest, an welcher Stelle „ instructionText “ angezeigt werden soll.

Zugriffsfunktionen:

QGeoCoordinate position() const

[read-only] timeToNextInstruction : const int

Diese Eigenschaft enthält die geschätzte Zeit in Sekunden, die benötigt wird, um von dem Zeitpunkt, zu dem der zugehörige Befehl ausgegeben wurde, bis zu dem Zeitpunkt zu gelangen, zu dem der nächste Befehl ausgegeben werden soll.

Zugriffsfunktionen:

int timeToNextInstruction() const

[read-only] valid : const bool

Diese Eigenschaft gibt an, ob dieses Manöver gültig ist oder nicht.

Ungültige Manöver werden verwendet, wenn keine Informationen vorhanden sind, die an den Endpunkt einer „ QGeoRouteSegment “-Instanz angehängt werden müssen.

Zugriffsfunktionen:

bool isValid() const

[read-only] waypoint : const QGeoCoordinate

Diese Eigenschaft enthält den Wegpunkt, der diesem Manöver zugeordnet ist.

Wenn diesem Manöver kein Wegpunkt zugeordnet ist, enthält diese Eigenschaft einen ungültigen Wert „ QGeoCoordinate “.

Zugriffsfunktionen:

QGeoCoordinate waypoint() const

Dokumentation der Member-Funktionen

QGeoManeuver::QGeoManeuver()

Erstellt ein ungültiges Manöverobjekt.

Das Manöver bleibt so lange ungültig, bis eine der folgenden Funktionen aufgerufen wird: setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() oder setWaypoint().

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

Erstellt ein Manöverobjekt aus dem Inhalt von „ other “.

[constexpr noexcept default] QGeoManeuver::QGeoManeuver(QGeoManeuver &&other)

Erstellt eine Instanz von ` QGeoManeuver` mithilfe der `Move`-Konstruktion.

[noexcept] QGeoManeuver::~QGeoManeuver()

Löscht dieses Manöverobjekt.

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

Weist diesem Manöverobjekt „ other “ zu und gibt anschließend eine Referenz auf dieses Manöverobjekt zurück.

Verwandte Nicht-Mitglieder

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

Gibt zurück, ob das Manöver „ lhs “ nicht mit „ rhs “ übereinstimmt.

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

Gibt zurück, ob das Manöver „ lhs “ mit „ rhs “ übereinstimmt.

© 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.