PlaceSearchRequest
Qt Base Class: QPlaceSearchRequest
Signature: QPlaceSearchRequest(self) -> None
QPlaceSearchRequest(self, other: PySide6.QtLocation.QPlaceSearchRequest) -> None
Base classes
⋔ Inheritance diagram
graph TD
1473573493184["location.PlaceSearchRequest"]
1473573377040["QtLocation.QPlaceSearchRequest"]
1473291690208["Shiboken.Object"]
140713234304496["builtins.object"]
1473573377040 --> 1473573493184
1473291690208 --> 1473573377040
140713234304496 --> 1473291690208
🛈 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) -> location.VisibilityStr:
"""Return the scope of the visibility.
Returns:
Visibility scope
"""
return location.VISIBILITY.inverse[self.visibilityScope()]
def get_categories(self) -> list[location.PlaceCategory]:
return [location.PlaceCategory(i) for i in self.categories()]
def get_search_area(self) -> positioning.GeoShape:
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() -> location.VisibilityStr
Return the scope of the visibility.
Source code in prettyqt\location\placesearchrequest.py
| def get_visibility_scope(self) -> location.VisibilityStr:
"""Return the scope of the visibility.
Returns:
Visibility scope
"""
return location.VISIBILITY.inverse[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))
|