Skip to content

GeoRouteSegment

Qt Base Class: QGeoRouteSegment

Signature: QGeoRouteSegment(self) -> None QGeoRouteSegment(self, other: PySide6.QtLocation.QGeoRouteSegment) -> None

Base classes

Name Children Inherits
QGeoRouteSegment
PySide6.QtLocation
QGeoRouteSegment(self) -> None

⋔ Inheritance diagram

graph TD
  1473573473664["location.GeoRouteSegment"]
  1473573366304["QtLocation.QGeoRouteSegment"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573366304 --> 1473573473664
  1473291690208 --> 1473573366304
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QGeoRouteSegment

Represents a segment of a route.

Source code in prettyqt\location\georoutesegment.py
class GeoRouteSegment(location.QGeoRouteSegment):
    """Represents a segment of a route."""

    def __bool__(self):
        return self.isValid()

    def __abs__(self) -> float:
        return self.distance()

    def get_maneuver(self) -> location.GeoManeuver:
        return location.GeoManeuver(self.maneuver())

    def get_path(self) -> list[positioning.GeoCoordinate]:
        return [positioning.GeoCoordinate(i) for i in self.path()]