![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtLocation More...
#include <qgeomaneuver.h>
Public Types | |
enum | InstructionDirection { NoDirection , DirectionForward , DirectionBearRight , DirectionLightRight , DirectionRight , DirectionHardRight , DirectionUTurnRight , DirectionUTurnLeft , DirectionHardLeft , DirectionLeft , DirectionLightLeft , DirectionBearLeft } |
\qmltype routeManeuver \inqmlmodule QtLocation More... | |
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.
\qmltype routeManeuver \inqmlmodule QtLocation
The routeManeuver type represents the information relevant to the point at which two routeSegments meet.
Instances of routeSegment can be thought of as edges on a routing graph, with routeManeuver instances as optional labels attached to the vertices of the graph.
The most interesting information held in a routeManeuver instance is normally the textual navigation to provide and the position at which to provide it, accessible by \l instructionText and \l position respectively.
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.
qreal QGeoManeuver::distanceToNextInstruction | ( | ) | const |
Definition at line 304 of file qgeomaneuver.cpp.
QVariantMap QGeoManeuver::extendedAttributes | ( | ) | const |
Definition at line 361 of file qgeomaneuver.cpp.
QString QGeoManeuver::instructionText | ( | ) | const |
Definition at line 218 of file qgeomaneuver.cpp.
bool QGeoManeuver::isValid | ( | ) | const |
Definition at line 175 of file qgeomaneuver.cpp.
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.
QGeoCoordinate QGeoManeuver::position | ( | ) | const |
Definition at line 197 of file qgeomaneuver.cpp.
void QGeoManeuver::setDirection | ( | QGeoManeuver::InstructionDirection | direction | ) |
Definition at line 249 of file qgeomaneuver.cpp.
Definition at line 298 of file qgeomaneuver.cpp.
void QGeoManeuver::setExtendedAttributes | ( | const QVariantMap & | extendedAttributes | ) |
Definition at line 355 of file qgeomaneuver.cpp.
Definition at line 212 of file qgeomaneuver.cpp.
void QGeoManeuver::setPosition | ( | const QGeoCoordinate & | position | ) |
Definition at line 191 of file qgeomaneuver.cpp.
void QGeoManeuver::setTimeToNextInstruction | ( | int | secs | ) |
Definition at line 274 of file qgeomaneuver.cpp.
void QGeoManeuver::setWaypoint | ( | const QGeoCoordinate & | coordinate | ) |
Definition at line 323 of file qgeomaneuver.cpp.
|
inlinenoexcept |
Definition at line 59 of file qgeomaneuver.h.
int QGeoManeuver::timeToNextInstruction | ( | ) | const |
Definition at line 280 of file qgeomaneuver.cpp.
QGeoCoordinate QGeoManeuver::waypoint | ( | ) | const |
Definition at line 329 of file qgeomaneuver.cpp.
|
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 29 of file qgeomaneuver.h.
|
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 31 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 33 of file qgeomaneuver.h.
|
read |
\qmlproperty string routeManeuver::instructionText
This read-only property holds textual navigation instruction.
the textual navigation instructions.
Definition at line 28 of file qgeomaneuver.h.
|
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 27 of file qgeomaneuver.h.
|
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 30 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 26 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 32 of file qgeomaneuver.h.