Skip to content

PlaceCategory

Qt Base Class: QPlaceCategory

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

Base classes

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

⋔ Inheritance diagram

graph TD
  1473573474640["location.PlaceCategory"]
  1473573386800["QtLocation.QPlaceCategory"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473573386800 --> 1473573474640
  1473291690208 --> 1473573386800
  140713234304496 --> 1473291690208

🛈 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()]