- class QPlaceManagerEngine¶
The
QPlaceManagerEngine
class provides an interface for implementers ofQGeoServiceProvider
plugins who want to provide access to place functionality. More…Synopsis¶
Methods¶
def
__init__()
def
manager()
def
managerName()
def
managerVersion()
Virtual methods¶
def
category()
def
locales()
def
matchingPlaces()
def
removeCategory()
def
removePlace()
def
saveCategory()
def
savePlace()
def
search()
def
setLocales()
Signals¶
def
categoryAdded()
def
dataChanged()
def
errorOccurred()
def
finished()
def
placeAdded()
def
placeRemoved()
def
placeUpdated()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
Note
There are no source or binary compatibility guarantees for the backend classes. The API is only guaranteed to work with the Qt version it was developed against. API changes will however only be made in minor releases. (6.6, 6.7, and so on.)
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
- __init__(parameters[, parent=None])¶
- Parameters:
parameters – Dictionary with keys of type .QString and values of type QVariant.
parent –
QObject
Constructs a new engine with the specified
parent
, usingparameters
to pass any implementation specific data to the engine.- category(categoryId)¶
- Parameters:
categoryId – str
- Return type:
Returns the category corresponding to the given
categoryId
.- categoryAdded(category, parentCategoryId)¶
- Parameters:
category –
QPlaceCategory
parentCategoryId – str
This signal is emitted if a
category
has been added to the manager engine’s datastore. The parent of thecategory
is specified byparentId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- categoryRemoved(categoryId, parentCategoryId)¶
- Parameters:
categoryId – str
parentCategoryId – str
This signal is emitted when the category corresponding to
categoryId
has been removed from the manager engine’s datastore. The parent of the removed category is specified byparentId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- categoryUpdated(category, parentCategoryId)¶
- Parameters:
category –
QPlaceCategory
parentCategoryId – str
This signal is emitted if a
category
has been modified in the manager engine’s datastore. The parent of the modified category is specified byparentId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- childCategories(parentId)¶
- Parameters:
parentId – str
- Return type:
.list of QPlaceCategory
Returns a list of categories that are children of the category corresponding to
parentId
. IfparentId
is empty, all the top level categories are returned.- 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.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
.- constructIconUrl(icon, size)¶
- Parameters:
icon –
QPlaceIcon
size –
QSize
- Return type:
QUrl QPlaceManagerEngine::constructIconUrl(const
QPlaceIcon
&icon, const QSize &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.- dataChanged()¶
*
This signal is emitted by the engine if there are large scale changes to its underlying datastore and the engine considers these changes radical enough to require clients to reload all data.
If the signal is emitted, no other signals will be emitted for the associated changes.
- errorOccurred(arg__1, error[, errorString=""])¶
- Parameters:
arg__1 –
QPlaceReply
error –
Error
errorString – str
This signal is emitted when an error has been detected in the processing of
reply
. Thefinished()
signal will probably follow.The error will be described by the error code
error
. IferrorString
is not empty it will contain a textual description of the error meant for developers and not end users.This signal and
errorOccurred()
will be emitted at the same time.Note
Do not delete the
reply
object in the slot connected to this signal. Use deleteLater() instead.- finished(reply)¶
- Parameters:
reply –
QPlaceReply
This signal is emitted when
reply
has finished processing.If reply->error() equals
NoError
then the processing finished successfully.This signal and
finished()
will be emitted at the same time.Note
Do not delete the
reply
object in the slot connected to this signal. Use deleteLater() instead.- getPlaceContent(request)¶
- Parameters:
request –
QPlaceContentRequest
- Return type:
Retrieves content for a place according to the parameters specified in
request
.- getPlaceDetails(placeId)¶
- Parameters:
placeId – str
- Return type:
Retrieves details of place corresponding to the given
placeId
.- initializeCategories()¶
- Return type:
Initializes the categories of the manager engine.
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
- manager()¶
- Return type:
Returns the manager instance used to create this engine.
- 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().
- 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().
- matchingPlaces(request)¶
- Parameters:
request –
QPlaceMatchRequest
- Return type:
Returns a reply which contains a list of places which correspond/match those specified in
request
.- parentCategoryId(categoryId)¶
- Parameters:
categoryId – str
- Return type:
str
Returns the parent category identifier of the category corresponding to
categoryId
.- placeAdded(placeId)¶
- Parameters:
placeId – str
This signal is emitted if a place has been added to the manager engine’s datastore. The particular added place is specified by
placeId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- placeRemoved(placeId)¶
- Parameters:
placeId – str
This signal is emitted if a place has been removed from the manager engine’s datastore. The particular place that has been removed is specified by
placeId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- placeUpdated(placeId)¶
- Parameters:
placeId – str
This signal is emitted if a place has been modified in the manager engine’s datastore. The particular modified place is specified by
placeId
.This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.
See also
- removeCategory(categoryId)¶
- Parameters:
categoryId – str
- Return type:
Removes the category corresponding to
categoryId
from the manager engine’s datastore.- removePlace(placeId)¶
- Parameters:
placeId – str
- Return type:
Removes the place corresponding to
placeId
from the manager engine’s datastore.- saveCategory(category, parentId)¶
- Parameters:
category –
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.Saves a specified
place
to the manager engine’s datastore.- search(request)¶
- Parameters:
request –
QPlaceSearchRequest
- Return type:
Searches for places according to the parameters specified in
request
.- searchSuggestions(request)¶
- Parameters:
request –
QPlaceSearchRequest
- Return type:
Requests a set of search term suggestions according to the parameters specified in
request
.- setLocales(locales)¶
- Parameters:
locales – .list of QLocale
Set the list of preferred
locales
.See also