QPlaceCategoryclass represents a category that aQPlacecan be associated with. 更多 …
def
__eq__
(other)
def
__ne__
(other)
def
categoryId
()
def
icon
()
def
isEmpty
()
def
name
()
def
setCategoryId
(identifier)
def
setIcon
(icon)
def
setName
(name)
Categories are used to search for places based on the categories they are associated with. The list/tree of available categories can be obtained from
QPlaceManager。setCategories()function can be used to limit the search results to places with the specified categories.若
QGeoServiceProvidersupports it, categories can be created and removed. This functionality is available in theQPlaceManager类。
QPlaceCategory
¶
QPlaceCategory(other)
- param other
Constructs a category.
Constructs a category which is a copy of
other
.
PySide2.QtLocation.QPlaceCategory.
categoryId
(
)
¶
unicode
Returns the identifier of the category. The category identifier is a string which uniquely identifies this category within a particular
QPlaceManager
. The identifier is only meaningful to the
QPlaceManager
that generated it and is not transferable between managers.
另请参阅
PySide2.QtLocation.QPlaceCategory.
icon
(
)
¶
Returns the icon associated with the category.
另请参阅
PySide2.QtLocation.QPlaceCategory.
isEmpty
(
)
¶
bool
Returns a boolean indicating whether the all the fields of the place category are empty or not.
PySide2.QtLocation.QPlaceCategory.
name
(
)
¶
unicode
Returns the name of category.
另请参阅
PySide2.QtLocation.QPlaceCategory.
__ne__
(
other
)
¶
other
–
QPlaceCategory
bool
返回 true 若
other
is not equal to this category; otherwise returns false.
PySide2.QtLocation.QPlaceCategory.
__eq__
(
other
)
¶
other
–
QPlaceCategory
bool
返回 true 若
other
is equal to this category; otherwise returns false.
PySide2.QtLocation.QPlaceCategory.
setCategoryId
(
identifier
)
¶
identifier – unicode
设置
identifier
of the category.
另请参阅
PySide2.QtLocation.QPlaceCategory.
setIcon
(
icon
)
¶
icon
–
QPlaceIcon
设置
icon
of the category.
另请参阅