Skip to content

GeoRectangle

Base classes

Name Children Inherits
GeoShapeMixin
prettyqt.positioning.geoshape
QGeoRectangle
PySide6.QtPositioning
QGeoRectangle(self, other: PySide6.QtPositioning.QGeoRectangle, /, *, bottomLeft: PySide6.QtPositioning.QGeoCoordinate | None \= None, bottomRight: PySide6.QtPositioning.QGeoCoordinate | None \= None, topLeft: PySide6.QtPositioning.QGeoCoordinate | None \= None, topRight: PySide6.QtPositioning.QGeoCoordinate | None \= None, center: PySide6.QtPositioning.QGeoCoordinate | None \= None, height: float | None \= None, width: float | None \= None) -> None

⋔ Inheritance diagram

graph TD
  920644396["positioning.GeoRectangle"]
  2727036102["positioning.GeoShapeMixin"]
  2751680898["builtins.object"]
  1016281930["QtPositioning.QGeoRectangle"]
  2678726727["QtPositioning.QGeoShape"]
  37984305["Shiboken.Object"]
  2727036102 --> 920644396
  2751680898 --> 2727036102
  1016281930 --> 920644396
  2678726727 --> 1016281930
  37984305 --> 2678726727
  2751680898 --> 37984305

🛈 DocStrings

Bases: GeoShapeMixin, QGeoRectangle

Source code in prettyqt/positioning/georectangle.py
class GeoRectangle(positioning.GeoShapeMixin, QtPositioning.QGeoRectangle):
    def __repr__(self):
        return get_repr(self, self.get_top_left(), self.get_bottom_right())

    def get_top_left(self) -> positioning.GeoCoordinate:
        return positioning.GeoCoordinate(self.topLeft())

    def get_bottom_right(self) -> positioning.GeoCoordinate:
        return positioning.GeoCoordinate(self.bottomRight())

:fa-brands-github: Show source on GitHub