QPlaceManagerEngineclass provides an interface for implementers ofQGeoServiceProviderplugins who want to provide access to place functionality. 更多 …
def
manager
()
def
managerName
()
def
managerVersion
()
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)
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)
Application developers need not concern themselves with the
QPlaceManagerEngine. Backend implementers however will need to derive fromQPlaceManagerEngineand provide implementations for the abstract virtual functions.For more information on writing a backend see the Places Backend 文档编制。
另请参阅
QPlaceManager
QPlaceManagerEngine
(
参数
[
,
parent=None
]
)
¶
- param parent
QObject- param parameters
Constructs a new engine with the specified
parent
,使用
参数
to pass any implementation specific data to the engine.
PySide2.QtLocation.QPlaceManagerEngine.
category
(
categoryId
)
¶
categoryId – unicode
Returns the category corresponding to the given
categoryId
.
PySide2.QtLocation.QPlaceManagerEngine.
categoryAdded
(
category
,
parentCategoryId
)
¶
category
–
QPlaceCategory
parentCategoryId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
categoryRemoved
(
categoryId
,
parentCategoryId
)
¶
categoryId – unicode
parentCategoryId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
categoryUpdated
(
category
,
parentCategoryId
)
¶
category
–
QPlaceCategory
parentCategoryId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
childCategories
(
parentId
)
¶
parentId – unicode
Returns a list of categories that are children of the category corresponding to
parentId
。若
parentId
is empty, all the top level categories are returned.
PySide2.QtLocation.QPlaceManagerEngine.
childCategoryIds
(
categoryId
)
¶
categoryId – unicode
字符串列表
Returns the child category identifiers of the category corresponding to
categoryId
。若
categoryId
is empty then all top level category identifiers are returned.
PySide2.QtLocation.QPlaceManagerEngine.
compatiblePlace
(
original
)
¶
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
)
¶
icon
–
QPlaceIcon
size
–
QSize
QUrl
QUrl
(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.
PySide2.QtLocation.QPlaceManagerEngine.
dataChanged
(
)
¶
PySide2.QtLocation.QPlaceManagerEngine.
error
(
arg__1
,
error
[
,
errorString=""
]
)
¶
arg__1
–
QPlaceReply
error
–
Error
errorString – unicode
PySide2.QtLocation.QPlaceManagerEngine.
finished
(
reply
)
¶
reply
–
QPlaceReply
PySide2.QtLocation.QPlaceManagerEngine.
getPlaceContent
(
request
)
¶
request
–
QPlaceContentRequest
Retrieves content for a place according to the parameters specified in
request
.
PySide2.QtLocation.QPlaceManagerEngine.
getPlaceDetails
(
placeId
)
¶
placeId – unicode
Retrieves details of place corresponding to the given
placeId
.
PySide2.QtLocation.QPlaceManagerEngine.
initializeCategories
(
)
¶
Initializes the categories of the manager engine.
PySide2.QtLocation.QPlaceManagerEngine.
locales
(
)
¶
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.
另请参阅
PySide2.QtLocation.QPlaceManagerEngine.
manager
(
)
¶
QPlaceManager
Returns the manager instance used to create this engine.
PySide2.QtLocation.QPlaceManagerEngine.
managerName
(
)
¶
unicode
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
(
)
¶
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
)
¶
request
–
QPlaceMatchRequest
Returns a reply which contains a list of places which correspond/match those specified in
request
.
PySide2.QtLocation.QPlaceManagerEngine.
parentCategoryId
(
categoryId
)
¶
categoryId – unicode
unicode
Returns the parent category identifier of the category corresponding to
categoryId
.
PySide2.QtLocation.QPlaceManagerEngine.
placeAdded
(
placeId
)
¶
placeId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
placeRemoved
(
placeId
)
¶
placeId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
placeUpdated
(
placeId
)
¶
placeId – unicode
PySide2.QtLocation.QPlaceManagerEngine.
removeCategory
(
categoryId
)
¶
categoryId – unicode
Removes the category corresponding to
categoryId
from the manager engine’s datastore.
PySide2.QtLocation.QPlaceManagerEngine.
removePlace
(
placeId
)
¶
placeId – unicode
Removes the place corresponding to
placeId
from the manager engine’s datastore.
PySide2.QtLocation.QPlaceManagerEngine.
saveCategory
(
category
,
parentId
)
¶
category
–
QPlaceCategory
parentId – unicode
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.
PySide2.QtLocation.QPlaceManagerEngine.
savePlace
(
place
)
¶
place
–
QPlace
Saves a specified
place
to the manager engine’s datastore.
PySide2.QtLocation.QPlaceManagerEngine.
search
(
request
)
¶
request
–
QPlaceSearchRequest
Searches for places according to the parameters specified in
request
.
PySide2.QtLocation.QPlaceManagerEngine.
searchSuggestions
(
request
)
¶
request
–
QPlaceSearchRequest
Requests a set of search term suggestions according to the parameters specified in
request
.