classPlaceCategory(location.QPlaceCategory):"""Represents a category that a QPlace can be associated with."""def__str__(self):returnself.name()def__bool__(self):returnnotself.isEmpty()defget_icon(self)->location.PlaceIcon|None:icon=self.icon()returnNoneificon.isEmpty()elselocation.PlaceIcon(icon)defget_visibility(self)->location.VisibilityStr:"""Return the visibility of the place. Returns: Visibility """returnlocation.VISIBILITY.inverse[self.visibility()]
defget_visibility(self)->location.VisibilityStr:"""Return the visibility of the place. Returns: Visibility """returnlocation.VISIBILITY.inverse[self.visibility()]