Skip to content

GeoAreaMonitorInfo

Qt Base Class: QGeoAreaMonitorInfo

Signature: QGeoAreaMonitorInfo(self, name: str = '') -> None QGeoAreaMonitorInfo(self, other: Union[PySide6.QtPositioning.QGeoAreaMonitorInfo, str]) -> None

Base classes

Name Children Inherits
QGeoAreaMonitorInfo
PySide6.QtPositioning
QGeoAreaMonitorInfo(self, name: str \= '') -> None

⋔ Inheritance diagram

graph TD
  1473573462928["positioning.GeoAreaMonitorInfo"]
  1473573349712["QtPositioning.QGeoAreaMonitorInfo"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573349712 --> 1473573462928
  1473291690208 --> 1473573349712
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QGeoAreaMonitorInfo

Source code in prettyqt\positioning\geoareamonitorinfo.py
class GeoAreaMonitorInfo(QtPositioning.QGeoAreaMonitorInfo):
    def __str__(self):
        return self.name()

    def __repr__(self):
        return get_repr(self, self.name())

    def get_area(self) -> QtPositioning.QGeoShape:
        area = self.area()
        match area:
            case QtPositioning.QGeoCircle():
                return positioning.GeoCircle(area)
            case QtPositioning.QGeoRectangle():
                return positioning.GeoRectangle(area)
            case QtPositioning.QGeoPath():
                return positioning.GeoPath(area)
            case QtPositioning.QGeoPolygon():
                return positioning.GeoPolygon(area)
            case QtPositioning.QGeoShape():
                return positioning.GeoShape(area)
            case _:
                raise RuntimeError

    def get_expiration(self) -> core.DateTime:
        return core.DateTime(self.expiration())