QGeoManeuver¶
The
QGeoManeuver
class represents the information relevant to the point at which two QGeoRouteSegments meet. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
direction
()def
distanceToNextInstruction
()def
extendedAttributes
()def
instructionText
()def
isValid
()def
position
()def
setDirection
(direction)def
setDistanceToNextInstruction
(distance)def
setExtendedAttributes
(extendedAttributes)def
setInstructionText
(instructionText)def
setPosition
(position)def
setTimeToNextInstruction
(secs)def
setWaypoint
(coordinate)def
timeToNextInstruction
()def
waypoint
()
Detailed Description¶
QGeoRouteSegment
instances can be thought of as edges on a routing graph, withQGeoManeuver
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 byinstructionText()
andposition()
respectively.It is also possible to determine if a routing waypoint has been passed by checking if
waypoint()
returns a validQGeoCoordinate
.
- class PySide2.QtLocation.QGeoManeuver¶
PySide2.QtLocation.QGeoManeuver(other)
- param other:
Constructs a invalid maneuver object.
The maneuver will remain invalid until one of
setPosition()
,setInstructionText()
,setDirection()
,setTimeToNextInstruction()
,setDistanceToNextInstruction()
orsetWaypoint()
is called.
- PySide2.QtLocation.QGeoManeuver.InstructionDirection¶
Describes the change in direction associated with the instruction text that is associated with a QGeoManaeuver.
Constant
Description
QGeoManeuver.NoDirection
There is no direction associated with the instruction text.
QGeoManeuver.DirectionForward
The instruction indicates that the direction of travel does not need to change.
QGeoManeuver.DirectionBearRight
The instruction indicates that the direction of travel should bear to the right.
QGeoManeuver.DirectionLightRight
The instruction indicates that a light turn to the right is required.
QGeoManeuver.DirectionRight
The instruction indicates that a turn to the right is required.
QGeoManeuver.DirectionHardRight
The instruction indicates that a hard turn to the right is required.
QGeoManeuver.DirectionUTurnRight
The instruction indicates that a u-turn to the right is required.
QGeoManeuver.DirectionUTurnLeft
The instruction indicates that a u-turn to the left is required.
QGeoManeuver.DirectionHardLeft
The instruction indicates that a hard turn to the left is required.
QGeoManeuver.DirectionLeft
The instruction indicates that a turn to the left is required.
QGeoManeuver.DirectionLightLeft
The instruction indicates that a light turn to the left is required.
QGeoManeuver.DirectionBearLeft
The instruction indicates that the direction of travel should bear to the left.
- PySide2.QtLocation.QGeoManeuver.direction()¶
- Return type:
Returns the direction associated with the associated instruction.
See also
- PySide2.QtLocation.QGeoManeuver.distanceToNextInstruction()¶
- Return type:
float
Returns the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should be issued.
See also
- PySide2.QtLocation.QGeoManeuver.extendedAttributes()¶
- Return type:
Returns the extended attributes associated with this maneuver.
See also
- PySide2.QtLocation.QGeoManeuver.instructionText()¶
- Return type:
str
Returns the textual navigation instructions.
See also
- PySide2.QtLocation.QGeoManeuver.isValid()¶
- Return type:
bool
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.
- PySide2.QtLocation.QGeoManeuver.__ne__(other)¶
- Parameters:
other –
PySide2.QtLocation.QGeoManeuver
- Return type:
bool
Returns whether this maneuver is not equal to
other
.
- PySide2.QtLocation.QGeoManeuver.__eq__(other)¶
- Parameters:
other –
PySide2.QtLocation.QGeoManeuver
- Return type:
bool
Returns whether this maneuver is equal to
other
.
- PySide2.QtLocation.QGeoManeuver.position()¶
- Return type:
Returns the position where
instructionText()
should be displayed.See also
- PySide2.QtLocation.QGeoManeuver.setDirection(direction)¶
- Parameters:
direction –
InstructionDirection
Sets the direction associated with the associated instruction to
direction
.See also
- PySide2.QtLocation.QGeoManeuver.setDistanceToNextInstruction(distance)¶
- Parameters:
distance – float
Sets the distance, in meters, between the point at which the associated instruction was issued and the point that the next instruction should be issued to
distance
.See also
- PySide2.QtLocation.QGeoManeuver.setExtendedAttributes(extendedAttributes)¶
- Parameters:
extendedAttributes –
Sets the extended attributes
extendedAttributes
associated with this maneuver.See also
- PySide2.QtLocation.QGeoManeuver.setInstructionText(instructionText)¶
- Parameters:
instructionText – str
Sets the textual navigation instructions to
instructionText
.See also
- PySide2.QtLocation.QGeoManeuver.setPosition(position)¶
- Parameters:
position –
PySide2.QtPositioning.QGeoCoordinate
Sets the position where
instructionText()
should be displayed toposition
.See also
- PySide2.QtLocation.QGeoManeuver.setTimeToNextInstruction(secs)¶
- Parameters:
secs – int
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
.See also
- PySide2.QtLocation.QGeoManeuver.setWaypoint(coordinate)¶
- Parameters:
coordinate –
PySide2.QtPositioning.QGeoCoordinate
Sets the waypoint associated with this maneuver to
coordinate
.See also
- PySide2.QtLocation.QGeoManeuver.timeToNextInstruction()¶
- Return type:
int
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.
See also
- PySide2.QtLocation.QGeoManeuver.waypoint()¶
- Return type:
Returns the waypoint associated with this maneuver.
If there is not waypoint associated with this maneuver an invalid
QGeoCoordinate
will be returned.See also
© 2022 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.