内容表

上一话题

QGeoCodingManagerEngine

下一话题

QGeoRoute

QGeoManeuver

QGeoManeuver class represents the information relevant to the point at which two QGeoRouteSegments meet. 更多

Inheritance diagram of PySide2.QtLocation.QGeoManeuver

概要

函数

详细描述

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() 分别。

It is also possible to determine if a routing waypoint has been passed by checking if waypoint() returns a valid QGeoCoordinate .

class QGeoManeuver

QGeoManeuver(other)

param other

QGeoManeuver

Constructs a invalid maneuver object.

The maneuver will remain invalid until one of setPosition() , setInstructionText() , setDirection() , setTimeToNextInstruction() , setDistanceToNextInstruction() or setWaypoint() 被调用。

PySide2.QtLocation.QGeoManeuver. InstructionDirection

Describes the change in direction associated with the instruction text that is associated with a QGeoManaeuver.

常量

描述

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 ( )
返回类型

InstructionDirection

Returns the direction associated with the associated instruction.

另请参阅

setDirection()

PySide2.QtLocation.QGeoManeuver. distanceToNextInstruction ( )
返回类型

qreal

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.

PySide2.QtLocation.QGeoManeuver. extendedAttributes ( )
返回类型

Returns the extended attributes associated with this maneuver.

PySide2.QtLocation.QGeoManeuver. instructionText ( )
返回类型

unicode

Returns the textual navigation instructions.

PySide2.QtLocation.QGeoManeuver. isValid ( )
返回类型

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 实例。

PySide2.QtLocation.QGeoManeuver. __ne__ ( other )
参数

other QGeoManeuver

返回类型

bool

Returns whether this maneuver is not equal to other .

PySide2.QtLocation.QGeoManeuver. __eq__ ( other )
参数

other QGeoManeuver

返回类型

bool

Returns whether this maneuver is equal to other .

PySide2.QtLocation.QGeoManeuver. position ( )
返回类型

QGeoCoordinate

Returns the position where instructionText() should be displayed.

另请参阅

setPosition()

PySide2.QtLocation.QGeoManeuver. setDirection ( direction )
参数

direction InstructionDirection

Sets the direction associated with the associated instruction to direction .

另请参阅

direction()

PySide2.QtLocation.QGeoManeuver. setDistanceToNextInstruction ( distance )
参数

distance qreal

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 .

PySide2.QtLocation.QGeoManeuver. setExtendedAttributes ( extendedAttributes )
参数

extendedAttributes

Sets the extended attributes extendedAttributes associated with this maneuver.

PySide2.QtLocation.QGeoManeuver. setInstructionText ( instructionText )
参数

instructionText – unicode

Sets the textual navigation instructions to instructionText .

另请参阅

instructionText()

PySide2.QtLocation.QGeoManeuver. setPosition ( position )
参数

position QGeoCoordinate

Sets the position where instructionText() should be displayed to position .

另请参阅

position()

PySide2.QtLocation.QGeoManeuver. setTimeToNextInstruction ( secs )
参数

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 .

PySide2.QtLocation.QGeoManeuver. setWaypoint ( coordinate )
参数

coordinate QGeoCoordinate

Sets the waypoint associated with this maneuver to coordinate .

另请参阅

waypoint()

PySide2.QtLocation.QGeoManeuver. timeToNextInstruction ( )
返回类型

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.

PySide2.QtLocation.QGeoManeuver. waypoint ( )
返回类型

QGeoCoordinate

Returns the waypoint associated with this maneuver.

If there is not waypoint associated with this maneuver an invalid QGeoCoordinate 将被返回。

另请参阅

setWaypoint()