![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtLocation More...
#include <qgeomaneuver.h>
Public Types | |
enum | InstructionDirection { NoDirection , DirectionForward , DirectionBearRight , DirectionLightRight , DirectionRight , DirectionHardRight , DirectionUTurnRight , DirectionUTurnLeft , DirectionHardLeft , DirectionLeft , DirectionLightLeft , DirectionBearLeft } |
Properties | |
QML_STRUCTURED_VALUEbool | valid |
\qmlproperty bool routeManeuver::valid | |
QGeoCoordinate | position |
\qmlproperty coordinate routeManeuver::position | |
QString | instructionText |
\qmlproperty string routeManeuver::instructionText | |
InstructionDirection | direction |
\qmlproperty enumeration routeManeuver::direction | |
int | timeToNextInstruction |
\qmlproperty int routeManeuver::timeToNextInstruction | |
qreal | distanceToNextInstruction |
\qmlproperty real routeManeuver::distanceToNextInstruction | |
QGeoCoordinate | waypoint |
\qmlproperty coordinate routeManeuver::waypoint | |
QVariantMap | extendedAttributes |
\qmlproperty Object routeManeuver::extendedAttributes | |
Friends | |
bool | operator== (const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept |
Returns whether the lhs maneuver is equal to rhs. | |
bool | operator!= (const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept |
Returns whether the lhs maneuver is not equal to rhs. | |
\inmodule QtLocation
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.
Definition at line 19 of file qgeomaneuver.h.
Definition at line 36 of file qgeomaneuver.h.
QGeoManeuver::QGeoManeuver | ( | ) |
Constructs a invalid maneuver object.
The maneuver will remain invalid until one of setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() or setWaypoint() is called.
Definition at line 115 of file qgeomaneuver.cpp.
|
defaultnoexcept |
Constructs a maneuver object from the contents of other.
|
defaultnoexcept |
|
default |
Destroys this maneuver object.
QGeoManeuver::InstructionDirection QGeoManeuver::direction | ( | ) | const |
Definition at line 255 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::direction().
qreal QGeoManeuver::distanceToNextInstruction | ( | ) | const |
Definition at line 304 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::distanceToNextInstruction().
QVariantMap QGeoManeuver::extendedAttributes | ( | ) | const |
Definition at line 361 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::extendedAttributes().
QString QGeoManeuver::instructionText | ( | ) | const |
Definition at line 218 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::text().
bool QGeoManeuver::isValid | ( | ) | const |
Definition at line 175 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::valid().
QGeoManeuver & QGeoManeuver::operator= | ( | const QGeoManeuver & | other | ) |
Assigns other to this maneuver object and then returns a reference to this maneuver object.
Definition at line 132 of file qgeomaneuver.cpp.
References other().
QGeoCoordinate QGeoManeuver::position | ( | ) | const |
Definition at line 197 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::position().
void QGeoManeuver::setDirection | ( | QGeoManeuver::InstructionDirection | direction | ) |
Definition at line 249 of file qgeomaneuver.cpp.
References direction, QGeoManeuverPrivate::setDirection(), and QGeoManeuverPrivate::setValid().
Referenced by constructRoute(), and QGeoRouteParserOsrmV5Private::parseStep().
Definition at line 298 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::setDistanceToNextInstruction(), and QGeoManeuverPrivate::setValid().
Referenced by constructRoute(), and QGeoRouteParserOsrmV5Private::parseStep().
void QGeoManeuver::setExtendedAttributes | ( | const QVariantMap & | extendedAttributes | ) |
Definition at line 355 of file qgeomaneuver.cpp.
References extendedAttributes, QGeoManeuverPrivate::setExtendedAttributes(), and QGeoManeuverPrivate::setValid().
Referenced by QGeoRouteParserOsrmV5Private::parseStep().
Definition at line 212 of file qgeomaneuver.cpp.
References instructionText, QGeoManeuverPrivate::setText(), and QGeoManeuverPrivate::setValid().
Referenced by constructRoute(), and QGeoRouteParserOsrmV5Private::parseStep().
void QGeoManeuver::setPosition | ( | const QGeoCoordinate & | position | ) |
Definition at line 191 of file qgeomaneuver.cpp.
References position, QGeoManeuverPrivate::setPosition(), and QGeoManeuverPrivate::setValid().
Referenced by constructRoute(), and QGeoRouteParserOsrmV5Private::parseStep().
void QGeoManeuver::setTimeToNextInstruction | ( | int | secs | ) |
Definition at line 274 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::setTimeToNextInstruction(), and QGeoManeuverPrivate::setValid().
Referenced by constructRoute(), and QGeoRouteParserOsrmV5Private::parseStep().
void QGeoManeuver::setWaypoint | ( | const QGeoCoordinate & | coordinate | ) |
Definition at line 323 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::setValid(), and QGeoManeuverPrivate::setWaypoint().
Referenced by QGeoRouteParserOsrmV5Private::parseStep().
|
inlinenoexcept |
Definition at line 59 of file qgeomaneuver.h.
References other().
int QGeoManeuver::timeToNextInstruction | ( | ) | const |
Definition at line 280 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::timeToNextInstruction().
QGeoCoordinate QGeoManeuver::waypoint | ( | ) | const |
Definition at line 329 of file qgeomaneuver.cpp.
References QGeoManeuverPrivate::waypoint().
|
friend |
Returns whether the lhs maneuver is not equal to rhs.
Definition at line 63 of file qgeomaneuver.h.
|
friend |
Returns whether the lhs maneuver is equal to rhs.
Definition at line 61 of file qgeomaneuver.h.
|
read |
\qmlproperty enumeration routeManeuver::direction
Describes the change in direction associated with the instruction text that is associated with a routeManeuver.
\list
the direction associated with the associated instruction.
Definition at line 23 of file qgeomaneuver.h.
Referenced by setDirection().
|
read |
\qmlproperty real routeManeuver::distanceToNextInstruction
This read-only property holds the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should be issued.
the distance, in meters, between the point at which this instruction was issued, and the point at which the next instruction should be issued.
Definition at line 23 of file qgeomaneuver.h.
|
read |
\qmlproperty Object routeManeuver::extendedAttributes
This property holds the extended attributes of the maneuver and is a map. These attributes are plugin specific, and can be empty.
Consult the \l {Qt Location::Plugin References and Parameters}{plugin documentation} for what attributes are supported and how they should be used.
Note, due to limitations of the QQmlPropertyMap, it is not possible to declaratively specify the attributes in QML, assignment of attributes keys and values can only be accomplished by JavaScript.
the extended attributes associated with this maneuver.
Definition at line 23 of file qgeomaneuver.h.
Referenced by setExtendedAttributes().
|
read |
\qmlproperty string routeManeuver::instructionText
This read-only property holds textual navigation instruction.
the textual navigation instructions.
Definition at line 23 of file qgeomaneuver.h.
Referenced by setInstructionText().
|
read |
\qmlproperty coordinate routeManeuver::position
This read-only property holds where the \l instructionText should be displayed.
the position where \l instructionText should be displayed.
Definition at line 23 of file qgeomaneuver.h.
Referenced by setPosition().
|
read |
\qmlproperty int routeManeuver::timeToNextInstruction
This read-only property holds the estimated time, in seconds, that it will take to travel from the point at which the associated instruction was issued to the point at which the next instruction should be issued, in seconds.
the estimated time, in seconds, that it will take to travel from the point at which the associated instruction was issued to the point at which the next instruction should be issued.
Definition at line 23 of file qgeomaneuver.h.
|
read |
\qmlproperty bool routeManeuver::valid
This read-only property holds 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.
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.
Definition at line 23 of file qgeomaneuver.h.
|
read |
\qmlproperty coordinate routeManeuver::waypoint
This property holds the waypoint associated with this maneuver. Not all maneuvers have a waypoint associated with them.
the waypoint associated with this maneuver.
If there is not waypoint associated with this maneuver, then this property holds an invalid QGeoCoordinate.
Definition at line 23 of file qgeomaneuver.h.