The QGeoManeuver class represents the information relevant to the point at which two QGeoRouteSegments meet. More...
#include <QGeoManeuver>
This class was introduced in Qt Mobility 1.1.
enum | InstructionDirection { NoDirection, DirectionForward, DirectionBearRight, DirectionLightRight, ..., DirectionBearLeft } |
QGeoManeuver () | |
QGeoManeuver ( const QGeoManeuver & other ) | |
~QGeoManeuver () | |
InstructionDirection | direction () const |
qreal | distanceToNextInstruction () const |
QString | instructionText () const |
bool | isValid () const |
QGeoCoordinate | position () const |
void | setDirection ( InstructionDirection direction ) |
void | setDistanceToNextInstruction ( qreal distance ) |
void | setInstructionText ( const QString & instructionText ) |
void | setPosition ( const QGeoCoordinate & position ) |
void | setTimeToNextInstruction ( int secs ) |
void | setWaypoint ( const QGeoCoordinate & coordinate ) |
int | timeToNextInstruction () const |
QGeoCoordinate | waypoint () const |
bool | operator!= ( const QGeoManeuver & other ) const |
QGeoManeuver & | operator= ( const QGeoManeuver & other ) |
bool | operator== ( const QGeoManeuver & other ) const |
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.
Describes the change in direction associated with the instruction text that is associated with a QGeoManaeuver.
Constant | Value | Description |
---|---|---|
QGeoManeuver::NoDirection | 0 | There is no direction associated with the instruction text. |
QGeoManeuver::DirectionForward | 1 | The instruction indicates that the direction of travel does not need to change. |
QGeoManeuver::DirectionBearRight | 2 | The instruction indicates that the direction of travel should bear to the right. |
QGeoManeuver::DirectionLightRight | 3 | The instruction indicates that a light turn to the right is required. |
QGeoManeuver::DirectionRight | 4 | The instruction indicates that a turn to the right is required. |
QGeoManeuver::DirectionHardRight | 5 | The instruction indicates that a hard turn to the right is required. |
QGeoManeuver::DirectionUTurnRight | 6 | The instruction indicates that a u-turn to the right is required. |
QGeoManeuver::DirectionUTurnLeft | 7 | The instruction indicates that a u-turn to the left is required. |
QGeoManeuver::DirectionHardLeft | 8 | The instruction indicates that a hard turn to the left is required. |
QGeoManeuver::DirectionLeft | 9 | The instruction indicates that a turn to the left is required. |
QGeoManeuver::DirectionLightLeft | 10 | The instruction indicates that a light turn to the left is required. |
QGeoManeuver::DirectionBearLeft | 11 | The instruction indicates that the direction of travel should bear to the left. |
Constructs a invalid maneuver object.
The maneuver will remain invalid until one of setPosition(), setInstructionText(), setDirection(), setTimeToNextInstruction(), setDistanceToNextInstruction() or setWaypoint() is called.
Constructs a maneuver object from the contents of other.
This function was introduced in Qt Mobility 1.1.
Destroys this manevuer object.
Returns the direction associated with the associated instruction.
This function was introduced in Qt Mobility 1.1.
See also setDirection().
Returns the distance, in metres, between the point at which the associated instruction was issued and the point that the next instruction should be issued.
This function was introduced in Qt Mobility 1.1.
See also setDistanceToNextInstruction().
Returns the textual navigation instructions.
This function was introduced in Qt Mobility 1.1.
See also setInstructionText().
Returns 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.
This function was introduced in Qt Mobility 1.1.
Returns the position where instructionText() should be displayed.
This function was introduced in Qt Mobility 1.1.
See also setPosition().
Sets the direction associated with the associated instruction to direction.
This function was introduced in Qt Mobility 1.1.
See also direction().
Sets the distance, in metres, between the point at which the associated instruction was issued and the point that the next instruction should be issued to distance.
This function was introduced in Qt Mobility 1.1.
See also distanceToNextInstruction().
Sets the textual navigation instructions to instructionText.
This function was introduced in Qt Mobility 1.1.
See also instructionText().
Sets the position where instructionText() should be displayed to position.
This function was introduced in Qt Mobility 1.1.
See also position().
Sets the estimated time it will take to travel from the point at which the associated instruction was issued and the point that the next instruction should be issued, in seconds, to secs.
This function was introduced in Qt Mobility 1.1.
See also timeToNextInstruction().
Sets the waypoint associated with this maneuver to coordinate.
This function was introduced in Qt Mobility 1.1.
See also waypoint().
Returns the estimated time it will take to travel from the point at which the associated instruction was issued and the point that the next instruction should be issued, in seconds.
This function was introduced in Qt Mobility 1.1.
See also setTimeToNextInstruction().
Returns the waypoint associated with this maneuver.
If there is not waypoint associated with this maneuver an invalid QGeoCoordinate will be returned.
This function was introduced in Qt Mobility 1.1.
See also setWaypoint().
Returns whether this maneuver is not equal to other.
This function was introduced in Qt Mobility 1.1.
Assigns other to this maneuver object and then returns a reference to this maneuver object.
This function was introduced in Qt Mobility 1.1.
Returns whether this maneuver is equal to other.
This function was introduced in Qt Mobility 1.1.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.