PySide6.QtLocation.QPlaceManagerEngine

class QPlaceManagerEngine

The QPlaceManagerEngine class provides an interface for implementers of QGeoServiceProvider plugins who want to provide access to place functionality. More

Inheritance diagram of PySide6.QtLocation.QPlaceManagerEngine

Synopsis

Methods

Virtual methods

Signals

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 from QPlaceManagerEngine and provide implementations for the abstract virtual functions.

For more information on writing a backend see the Places Backend documentation.

See also

QPlaceManager

__init__(parameters[, parent=None])
Parameters:
  • parameters – Dictionary with keys of type .QString and values of type QVariant.

  • parentQObject

Constructs a new engine with the specified parent, using parameters to pass any implementation specific data to the engine.

category(categoryId)
Parameters:

categoryId – str

Return type:

QPlaceCategory

Returns the category corresponding to the given categoryId.

categoryAdded(category, parentCategoryId)
Parameters:

This signal is emitted if a category has been added to the manager engine’s datastore. The parent of the category is specified by parentId.

This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.

See also

dataChanged()

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 by parentId.

This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.

See also

dataChanged()

categoryUpdated(category, parentCategoryId)
Parameters:

This signal is emitted if a category has been modified in the manager engine’s datastore. The parent of the modified category is specified by parentId.

This signal is only emitted by manager engines that support the QPlaceManager::NotificationsFeature.

See also

dataChanged()

childCategories(parentId)
Parameters:

parentId – str

Return type:

.list of QPlaceCategory

Returns a list of categories that are children of the category corresponding to parentId. If parentId 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. If categoryId is empty then all top level category identifiers are returned.

compatiblePlace(original)
Parameters:

originalQPlace

Return type:

QPlace

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:
Return type:

QUrl

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:

This signal is emitted when an error has been detected in the processing of reply. The finished() signal will probably follow.

The error will be described by the error code error. If errorString 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:

replyQPlaceReply

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:

requestQPlaceContentRequest

Return type:

QPlaceContentReply

Retrieves content for a place according to the parameters specified in request.

getPlaceDetails(placeId)
Parameters:

placeId – str

Return type:

QPlaceDetailsReply

Retrieves details of place corresponding to the given placeId.

initializeCategories()
Return type:

QPlaceReply

Initializes the categories of the manager engine.

locales()
Return type:

.list of QLocale

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

setLocales()

manager()
Return type:

QPlaceManager

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:

requestQPlaceMatchRequest

Return type:

QPlaceMatchReply

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

dataChanged()

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

dataChanged()

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

dataChanged()

removeCategory(categoryId)
Parameters:

categoryId – str

Return type:

QPlaceIdReply

Removes the category corresponding to categoryId from the manager engine’s datastore.

removePlace(placeId)
Parameters:

placeId – str

Return type:

QPlaceIdReply

Removes the place corresponding to placeId from the manager engine’s datastore.

saveCategory(category, parentId)
Parameters:
Return type:

QPlaceIdReply

Saves a category that is a child of the category specified by parentId. An empty parentId means category is saved as a top level category.

savePlace(place)
Parameters:

placeQPlace

Return type:

QPlaceIdReply

Saves a specified place to the manager engine’s datastore.

search(request)
Parameters:

requestQPlaceSearchRequest

Return type:

QPlaceSearchReply

Searches for places according to the parameters specified in request.

searchSuggestions(request)
Parameters:

requestQPlaceSearchRequest

Return type:

QPlaceSearchSuggestionReply

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

locales()