PlaceSearchRequest
Base classes
| Name |
Children |
Inherits |
QPlaceSearchRequest PySide6.QtLocation QPlaceSearchRequest(self, /) -> None |
|
|
⋔ Inheritance diagram
graph TD
1150255937["location.PlaceSearchRequest"]
2925460363["QtLocation.QPlaceSearchRequest"]
37984305["Shiboken.Object"]
2751680898["builtins.object"]
2925460363 --> 1150255937
37984305 --> 2925460363
2751680898 --> 37984305
🛈 DocStrings
Bases: QPlaceSearchRequest
Represents the set of parameters for a search request.
Source code in prettyqt/location/placesearchrequest.py
| class PlaceSearchRequest(location.QPlaceSearchRequest):
"""Represents the set of parameters for a search request."""
def get_visibility_scope(self) -> list[location.VisibilityStr]:
"""Return the scope of the visibility.
Returns:
Visibility scope
"""
return location.VISIBILITY.get_list(self.visibilityScope())
def get_categories(self) -> list[location.PlaceCategory]:
return [location.PlaceCategory(i) for i in self.categories()]
def get_search_area(self) -> positioning.QGeoShape:
area = self.searchArea()
match area:
case positioning.QGeoCircle():
return positioning.GeoCircle(area)
case positioning.QGeoPath():
return positioning.GeoPath(area)
case positioning.QGeoPolygon():
return positioning.GeoPolygon(area)
case positioning.QGeoRectangle():
return positioning.GeoRectangle(area)
case _:
return positioning.GeoShape(area)
def set_relevance_hint(
self, hint: RelevanceHintStr | location.QPlaceSearchRequest.RelevanceHint
):
"""Set the relevance hint.
Args:
hint: Relevance hint
"""
self.setRelevanceHint(RELEVANCE_HINT.get_enum_value(hint))
def get_relevance_hint(self) -> RelevanceHintStr:
"""Return current relevance hint.
Returns:
Relevance hint
"""
return RELEVANCE_HINT.inverse[self.relevanceHint()]
|
get_relevance_hint() -> RelevanceHintStr
Return current relevance hint.
Source code in prettyqt/location/placesearchrequest.py
| def get_relevance_hint(self) -> RelevanceHintStr:
"""Return current relevance hint.
Returns:
Relevance hint
"""
return RELEVANCE_HINT.inverse[self.relevanceHint()]
|
get_visibility_scope() -> list[location.VisibilityStr]
Return the scope of the visibility.
Source code in prettyqt/location/placesearchrequest.py
| def get_visibility_scope(self) -> list[location.VisibilityStr]:
"""Return the scope of the visibility.
Returns:
Visibility scope
"""
return location.VISIBILITY.get_list(self.visibilityScope())
|
set_relevance_hint(hint: RelevanceHintStr | location.QPlaceSearchRequest.RelevanceHint)
Set the relevance hint.
Parameters:
| Name |
Type |
Description |
Default |
hint
|
RelevanceHintStr | RelevanceHint
|
|
required
|
Source code in prettyqt/location/placesearchrequest.py
| def set_relevance_hint(
self, hint: RelevanceHintStr | location.QPlaceSearchRequest.RelevanceHint
):
"""Set the relevance hint.
Args:
hint: Relevance hint
"""
self.setRelevanceHint(RELEVANCE_HINT.get_enum_value(hint))
|
:fa-brands-github: Show source on GitHub