Skip to content

PlaceCategory

Base classes

Name Children Inherits
QPlaceCategory
PySide6.QtLocation
QPlaceCategory(self, /) -> None

⋔ Inheritance diagram

graph TD
  2760015774["location.PlaceCategory"]
  2452219181["QtLocation.QPlaceCategory"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  2452219181 --> 2760015774
  37984305 --> 2452219181
  2751680898 --> 37984305

🛈 DocStrings

Bases: QPlaceCategory

Represents a category that a QPlace can be associated with.

Source code in prettyqt/location/placecategory.py
class PlaceCategory(location.QPlaceCategory):
    """Represents a category that a QPlace can be associated with."""

    def __str__(self):
        return self.name()

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

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

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

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

get_visibility() -> location.VisibilityStr

Return the visibility of the place.

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

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

:fa-brands-github: Show source on GitHub