PySide6.QtLocation.QPlaceManagerEngine¶
- class QPlaceManagerEngine¶
- The - QPlaceManagerEngineclass provides an interface for implementers of- QGeoServiceProviderplugins 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 from- QPlaceManagerEngineand 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, using- parametersto 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 - categoryhas been added to the manager engine’s datastore. The parent of the- categoryis specified by- parentId.- 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 - categoryIdhas 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 - categoryUpdated(category, parentCategoryId)¶
- Parameters:
- category – - QPlaceCategory
- parentCategoryId – str 
 
 
 - This signal is emitted if a - categoryhas 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 - 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- parentIdis 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- categoryIdis empty then all top level category identifiers are returned.- Returns a pruned or modified version of the - originalplace 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(reply, error[, errorString=""])¶
- Parameters:
- reply – - QPlaceReply
- error – - Error
- errorString – str 
 
 
 - 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- errorStringis 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 - replyobject in the slot connected to this signal. Use deleteLater() instead.- finished(reply)¶
- Parameters:
- reply – - QPlaceReply
 
 - This signal is emitted when - replyhas finished processing.- If reply->error() equals - NoErrorthen the processing finished successfully.- This signal and - finished()will be emitted at the same time.- Note - Do not delete the - replyobject 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 - categoryIdfrom the manager engine’s datastore.- removePlace(placeId)¶
- Parameters:
- placeId – str 
- Return type:
 
 - Removes the place corresponding to - placeIdfrom the manager engine’s datastore.- saveCategory(category, parentId)¶
- Parameters:
- category – - QPlaceCategory
- parentId – str 
 
- Return type:
 
 - Saves a - categorythat is a child of the category specified by- parentId. An empty- parentIdmeans- categoryis saved as a top level category.- Saves a specified - placeto 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