QPlaceManagerEngine¶
The
QPlaceManagerEngine
class provides an interface for implementers ofQGeoServiceProvider
plugins who want to provide access to place functionality. More…
Synopsis¶
Functions¶
def
manager
()def
managerName
()def
managerVersion
()
Virtual functions¶
def
category
(categoryId)def
childCategories
(parentId)def
childCategoryIds
(categoryId)def
compatiblePlace
(original)def
constructIconUrl
(icon, size)def
getPlaceContent
(request)def
getPlaceDetails
(placeId)def
initializeCategories
()def
locales
()def
matchingPlaces
(request)def
parentCategoryId
(categoryId)def
removeCategory
(categoryId)def
removePlace
(placeId)def
saveCategory
(category, parentId)def
savePlace
(place)def
search
(request)def
searchSuggestions
(request)def
setLocales
(locales)
Signals¶
def
categoryAdded
(category, parentCategoryId)def
categoryRemoved
(categoryId, parentCategoryId)def
categoryUpdated
(category, parentCategoryId)def
dataChanged
()def
error
(arg__1, error[, errorString=””])def
finished
(reply)def
placeAdded
(placeId)def
placeRemoved
(placeId)def
placeUpdated
(placeId)
Detailed Description¶
Application developers need not concern themselves with the
QPlaceManagerEngine
. Backend implementers however will need to derive fromQPlaceManagerEngine
and provide implementations for the abstract virtual functions.For more information on writing a backend see the Places Backend documentation.
See also
- class PySide2.QtLocation.QPlaceManagerEngine(parameters[, parent=None])¶
- param parent:
- param parameters:
Constructs a new engine with the specified
parent
, usingparameters
to pass any implementation specific data to the engine.
- PySide2.QtLocation.QPlaceManagerEngine.category(categoryId)¶
- Parameters:
categoryId – str
- Return type:
Returns the category corresponding to the given
categoryId
.
- PySide2.QtLocation.QPlaceManagerEngine.categoryAdded(category, parentCategoryId)¶
- Parameters:
category –
PySide2.QtLocation.QPlaceCategory
parentCategoryId – str
- PySide2.QtLocation.QPlaceManagerEngine.categoryRemoved(categoryId, parentCategoryId)¶
- Parameters:
categoryId – str
parentCategoryId – str
- PySide2.QtLocation.QPlaceManagerEngine.categoryUpdated(category, parentCategoryId)¶
- Parameters:
category –
PySide2.QtLocation.QPlaceCategory
parentCategoryId – str
- PySide2.QtLocation.QPlaceManagerEngine.childCategories(parentId)¶
- Parameters:
parentId – str
- Return type:
Returns a list of categories that are children of the category corresponding to
parentId
. IfparentId
is empty, all the top level categories are returned.
- PySide2.QtLocation.QPlaceManagerEngine.childCategoryIds(categoryId)¶
- Parameters:
categoryId – str
- Return type:
list of strings
Returns the child category identifiers of the category corresponding to
categoryId
. IfcategoryId
is empty then all top level category identifiers are returned.
- PySide2.QtLocation.QPlaceManagerEngine.compatiblePlace(original)¶
- Parameters:
original –
PySide2.QtLocation.QPlace
- Return type:
Returns a pruned or modified version of the
original
place which is suitable to be saved by the manager engine.Only place details that are supported by this manager is present in the modified version. Manager specific data such as the place id, is not copied over from the
original
.
- PySide2.QtLocation.QPlaceManagerEngine.constructIconUrl(icon, size)¶
- Parameters:
size –
PySide2.QtCore.QSize
- Return type:
QUrl
(constQPlaceIcon
&icon, constQSize
&size)Constructs an icon url from a given
icon
,size
. The URL of the icon image that most closely matches the given parameters is returned.
- PySide2.QtLocation.QPlaceManagerEngine.dataChanged()¶
- PySide2.QtLocation.QPlaceManagerEngine.error(arg__1, error[, errorString=""])¶
- Parameters:
arg__1 –
PySide2.QtLocation.QPlaceReply
error –
Error
errorString – str
- PySide2.QtLocation.QPlaceManagerEngine.finished(reply)¶
- Parameters:
reply –
PySide2.QtLocation.QPlaceReply
- PySide2.QtLocation.QPlaceManagerEngine.getPlaceContent(request)¶
- Parameters:
request –
PySide2.QtLocation.QPlaceContentRequest
- Return type:
Retrieves content for a place according to the parameters specified in
request
.
- PySide2.QtLocation.QPlaceManagerEngine.getPlaceDetails(placeId)¶
- Parameters:
placeId – str
- Return type:
Retrieves details of place corresponding to the given
placeId
.
- PySide2.QtLocation.QPlaceManagerEngine.initializeCategories()¶
- Return type:
Initializes the categories of the manager engine.
- PySide2.QtLocation.QPlaceManagerEngine.locales()¶
- Return type:
Returns a list of preferred locales. The locales are used as a hint to the manager engine for what language place and category details should be returned in.
If the first specified locale cannot be accommodated, the manager engine falls back to the next and so forth.
Support for locales may vary from provider to provider. For those that do support it, by default, the
global default locale
will be used. If the manager engine has no locales assigned to it, it implicitly uses the global default locale. For engines that do not support locales, the locale list is always empty.See also
- PySide2.QtLocation.QPlaceManagerEngine.manager()¶
- Return type:
Returns the manager instance used to create this engine.
- PySide2.QtLocation.QPlaceManagerEngine.managerName()¶
- Return type:
str
Returns the name which this engine implementation uses to distinguish itself from the implementations provided by other plugins.
The manager name is automatically set to be the same as the QGeoServiceProviderFactory::providerName().
- PySide2.QtLocation.QPlaceManagerEngine.managerVersion()¶
- Return type:
int
Returns the version of this engine implementation.
The manager version is automatically set to be the same as the QGeoServiceProviderFactory::providerVersion().
- PySide2.QtLocation.QPlaceManagerEngine.matchingPlaces(request)¶
- Parameters:
request –
PySide2.QtLocation.QPlaceMatchRequest
- Return type:
Returns a reply which contains a list of places which correspond/match those specified in
request
.
- PySide2.QtLocation.QPlaceManagerEngine.parentCategoryId(categoryId)¶
- Parameters:
categoryId – str
- Return type:
str
Returns the parent category identifier of the category corresponding to
categoryId
.
- PySide2.QtLocation.QPlaceManagerEngine.placeAdded(placeId)¶
- Parameters:
placeId – str
- PySide2.QtLocation.QPlaceManagerEngine.placeRemoved(placeId)¶
- Parameters:
placeId – str
- PySide2.QtLocation.QPlaceManagerEngine.placeUpdated(placeId)¶
- Parameters:
placeId – str
- PySide2.QtLocation.QPlaceManagerEngine.removeCategory(categoryId)¶
- Parameters:
categoryId – str
- Return type:
Removes the category corresponding to
categoryId
from the manager engine’s datastore.
- PySide2.QtLocation.QPlaceManagerEngine.removePlace(placeId)¶
- Parameters:
placeId – str
- Return type:
Removes the place corresponding to
placeId
from the manager engine’s datastore.
- PySide2.QtLocation.QPlaceManagerEngine.saveCategory(category, parentId)¶
- Parameters:
category –
PySide2.QtLocation.QPlaceCategory
parentId – str
- Return type:
Saves a
category
that is a child of the category specified byparentId
. An emptyparentId
meanscategory
is saved as a top level category.
- PySide2.QtLocation.QPlaceManagerEngine.savePlace(place)¶
- Parameters:
place –
PySide2.QtLocation.QPlace
- Return type:
Saves a specified
place
to the manager engine’s datastore.
- PySide2.QtLocation.QPlaceManagerEngine.search(request)¶
- Parameters:
request –
PySide2.QtLocation.QPlaceSearchRequest
- Return type:
Searches for places according to the parameters specified in
request
.
- PySide2.QtLocation.QPlaceManagerEngine.searchSuggestions(request)¶
- Parameters:
request –
PySide2.QtLocation.QPlaceSearchRequest
- Return type:
Requests a set of search term suggestions according to the parameters specified in
request
.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.