QGeoRouteSegment¶
The
QGeoRouteSegment
class represents a segment of a route. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
distance
()def
isLegLastSegment
()def
isValid
()def
maneuver
()def
nextRouteSegment
()def
path
()def
setDistance
(distance)def
setManeuver
(maneuver)def
setNextRouteSegment
(routeSegment)def
setPath
(path)def
setTravelTime
(secs)def
travelTime
()
Detailed Description¶
A
QGeoRouteSegment
instance has information about the physical layout of the route segment, the length of the route and estimated time required to traverse the route segment and an optionalQGeoManeuver
associated with the beginning of the route segment.
QGeoRouteSegment
instances can be thought of as edges on a routing graph, withQGeoManeuver
instances as optional labels attached to the vertices of the graph.
- class PySide2.QtLocation.QGeoRouteSegment¶
PySide2.QtLocation.QGeoRouteSegment(other)
- param other:
Constructs an invalid route segment object.
The route segment will remain invalid until one of
setNextRouteSegment()
,setTravelTime()
,setDistance()
,setPath()
orsetManeuver()
is called.Constructs a route segment object from the contents of
other
.
- PySide2.QtLocation.QGeoRouteSegment.distance()¶
- Return type:
float
Returns the distance covered by this segment of the route, in meters.
See also
- PySide2.QtLocation.QGeoRouteSegment.isLegLastSegment()¶
- Return type:
bool
Returns whether this route segment is the last segment of a route leg.
- PySide2.QtLocation.QGeoRouteSegment.isValid()¶
- Return type:
bool
Returns whether this route segment is valid or not.
If
nextRouteSegment()
is called on the last route segment of a route, the returned value will be an invalid route segment.
- PySide2.QtLocation.QGeoRouteSegment.maneuver()¶
- Return type:
Returns the maneuver for this route segment.
Will return an invalid
QGeoManeuver
if no information has been attached to the starting point of this route segment.See also
- PySide2.QtLocation.QGeoRouteSegment.nextRouteSegment()¶
- Return type:
Returns the next route segment in the route.
Will return an invalid route segment if this is the last route segment in the route.
See also
- PySide2.QtLocation.QGeoRouteSegment.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns whether this route segment and
other
are not equal.The value of
nextRouteSegment()
is not considered in the comparison.
- PySide2.QtLocation.QGeoRouteSegment.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns whether this route segment and
other
are equal.The value of
nextRouteSegment()
is not considered in the comparison.
- PySide2.QtLocation.QGeoRouteSegment.path()¶
- Return type:
Returns the geometric shape of this route segment of the route.
The coordinates should be listed in the order in which they would be traversed by someone traveling along this segment of the route.
See also
- PySide2.QtLocation.QGeoRouteSegment.setDistance(distance)¶
- Parameters:
distance – float
Sets the distance covered by this segment of the route, in meters, to
distance
.See also
- PySide2.QtLocation.QGeoRouteSegment.setManeuver(maneuver)¶
- Parameters:
maneuver –
PySide2.QtLocation.QGeoManeuver
Sets the maneuver for this route segment to
maneuver
.See also
- PySide2.QtLocation.QGeoRouteSegment.setNextRouteSegment(routeSegment)¶
- Parameters:
routeSegment –
PySide2.QtLocation.QGeoRouteSegment
Sets the next route segment in the route to
routeSegment
.See also
- PySide2.QtLocation.QGeoRouteSegment.setPath(path)¶
- Parameters:
path –
Sets the geometric shape of this segment of the route to
path
.The coordinates in
path
should be listed in the order in which they would be traversed by someone traveling along this segment of the route.See also
- PySide2.QtLocation.QGeoRouteSegment.setTravelTime(secs)¶
- Parameters:
secs – int
Sets the estimated amount of time it will take to traverse this segment of the route, in seconds, to
secs
.See also
- PySide2.QtLocation.QGeoRouteSegment.travelTime()¶
- Return type:
int
Returns the estimated amount of time it will take to traverse this segment of the route, in seconds.
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.