Skip to content

PlaceMatchReply

Base classes

Name Children Inherits
PlaceReplyMixin
prettyqt.location.placereply
QPlaceMatchReply
PySide6.QtLocation
QPlaceMatchReply(self, /, parent: PySide6.QtCore.QObject | None \= None) -> None

⋔ Inheritance diagram

graph TD
  3732539067["location.PlaceMatchReply"]
  3765200330["location.PlaceReplyMixin"]
  3227531497["core.ObjectMixin"]
  2751680898["builtins.object"]
  1189330495["QtLocation.QPlaceMatchReply"]
  2286347697["QtLocation.QPlaceReply"]
  3984060476["QtCore.QObject"]
  37984305["Shiboken.Object"]
  3765200330 --> 3732539067
  3227531497 --> 3765200330
  2751680898 --> 3227531497
  2751680898 --> 3765200330
  1189330495 --> 3732539067
  2286347697 --> 1189330495
  3984060476 --> 2286347697
  37984305 --> 3984060476
  2751680898 --> 37984305

🛈 DocStrings

Bases: PlaceReplyMixin, QPlaceMatchReply

Manages a place matching operation started by an instance of QPlaceManager.

Source code in prettyqt/location/placematchreply.py
class PlaceMatchReply(location.PlaceReplyMixin, location.QPlaceMatchReply):
    """Manages a place matching operation started by an instance of QPlaceManager."""

    def __iter__(self) -> Iterator[location.Place]:
        return iter(self.get_places())

    def __getitem__(self, index: int) -> location.Place:
        return self.get_places()[index]

    def __len__(self):
        return len(self.get_places())

    @classmethod
    def clone_from(cls, obj: location.QPlaceMatchReply) -> Self:
        reply = cls(obj.parent())
        reply.setPlaces([location.Place(i) for i in obj.places()])
        request = location.PlaceMatchRequest(obj.request())
        reply.setRequest(request)
        return reply

    def get_places(self) -> list[location.Place]:
        return [location.Place(i) for i in self.places()]

    def get_request(self) -> location.PlaceMatchRequest:
        return location.PlaceMatchRequest(self.request())

:fa-brands-github: Show source on GitHub