Skip to content

Place

Qt Base Class: QPlace

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473573480496["location.Place"]
  1473573365328["QtLocation.QPlace"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573365328 --> 1473573480496
  1473291690208 --> 1473573365328
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: QPlace

Represents a set of data about a place.

Source code in prettyqt\location\place.py
class Place(location.QPlace):
    """Represents a set of data about a place."""

    def __bool__(self):
        return not self.isEmpty()

    def __setitem__(self, index: str, val: location.QPlaceAttribute | None):
        if val is None:
            val = location.PlaceAttribute()
        self.setExtendedAttribute(index, val)

    def __getitem__(self, index: str) -> location.PlaceAttribute:
        attr = self.extendedAttribute(index)
        return location.PlaceAttribute(attr)

    def get_categories(self) -> list[location.PlaceCategory]:
        return [location.PlaceCategory(i) for i in self.categories()]

    def get_contact_details(self, contact_type: str) -> list[location.PlaceContactDetail]:
        return [location.PlaceContactDetail(i) for i in self.contactDetails(contact_type)]

    def set_content(self, typ: str, value: dict[int, location.QPlaceContent]):
        self.setContent(location.placecontent.TYPE.get_enum_value(typ), value)

    def get_content(self, typ: str) -> dict[int, location.QPlaceContent]:
        return self.content(location.placecontent.TYPE.get_enum_value(typ))

    def get_icon(self) -> location.PlaceIcon | None:
        icon = self.icon()
        return None if icon.isEmpty() else location.PlaceIcon(icon)

    def get_location(self) -> positioning.GeoLocation:
        return positioning.GeoLocation(self.location())

    def get_primary_website(self) -> core.Url:
        return core.Url(self.primaryWebsite())

    def get_ratings(self) -> location.PlaceRatings:
        return location.PlaceRatings(self.ratings())

    def get_supplier(self) -> location.PlaceSupplier:
        return location.PlaceSupplier(self.supplier())

    def get_visibility(self) -> location.VisibilityStr:
        """Return visibility.

        Returns:
            Visibility
        """
        return location.VISIBILITY.inverse[self.visibility()]

get_visibility() -> location.VisibilityStr

Return visibility.

Source code in prettyqt\location\place.py
def get_visibility(self) -> location.VisibilityStr:
    """Return visibility.

    Returns:
        Visibility
    """
    return location.VISIBILITY.inverse[self.visibility()]