Skip to content

GeoCircle

Qt Base Class: QGeoCircle

Signature: QGeoCircle(self) -> None QGeoCircle(self, center: PySide6.QtPositioning.QGeoCoordinate, radius: float = -1.0) -> None QGeoCircle(self, other: PySide6.QtPositioning.QGeoShape) -> None QGeoCircle(self, other: Union[PySide6.QtPositioning.QGeoCircle, PySide6.QtPositioning.QGeoCoordinate, PySide6.QtPositioning.QGeoShape]) -> None

Base classes

Name Children Inherits
GeoShapeMixin
prettyqt.positioning.geoshape
QGeoCircle
PySide6.QtPositioning
QGeoCircle(self) -> None

⋔ Inheritance diagram

graph TD
  1473573455120["positioning.GeoCircle"]
  1473573419984["positioning.GeoShapeMixin"]
  140713234304496["builtins.object"]
  1473573325312["QtPositioning.QGeoCircle"]
  1473573320432["QtPositioning.QGeoShape"]
  1473291690208["Shiboken.Object"]
  1473573419984 --> 1473573455120
  140713234304496 --> 1473573419984
  1473573325312 --> 1473573455120
  1473573320432 --> 1473573325312
  1473291690208 --> 1473573320432
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: GeoShapeMixin, QGeoCircle

Source code in prettyqt\positioning\geocircle.py
class GeoCircle(positioning.GeoShapeMixin, QtPositioning.QGeoCircle):
    def __init__(
        self,
        center_or_other: None
        | (
            QtPositioning.QGeoShape | QtPositioning.QGeoCoordinate | tuple[float, float]
        ) = None,
        radius: float | None = None,
    ):
        if center_or_other is None:
            super().__init__()
        else:
            if radius is None:
                radius = -1
            if isinstance(center_or_other, tuple):
                center_or_other = QtPositioning.QGeoCoordinate(*center_or_other)
            super().__init__(center_or_other, radius)

    def __repr__(self):
        return get_repr(self, self.get_center(), self.radius())

    def get_center(self) -> positioning.GeoCoordinate:
        return positioning.GeoCoordinate(self.center())