The QPlaceCategory class represents a category that a QPlace can be associated with. 更多...
头: | #include <QPlaceCategory> |
qmake: | QT += location |
Since: | Qt 5.6 |
QPlaceCategory () | |
QPlaceCategory (const QPlaceCategory & other ) | |
virtual | ~QPlaceCategory () |
QString | categoryId () const |
QPlaceIcon | icon () const |
bool | isEmpty () const |
QString | name () const |
void | setCategoryId (const QString & 标识符 ) |
void | setIcon (const QPlaceIcon & icon ) |
void | setName (const QString & name ) |
void | setVisibility (QLocation::Visibility visibility ) |
QLocation::Visibility | visibility () const |
bool | operator!= (const QPlaceCategory & other ) const |
QPlaceCategory & | operator= (const QPlaceCategory & other ) |
bool | operator== (const QPlaceCategory & other ) const |
The QPlaceCategory class represents a category that a QPlace can be associated with.
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 。 QPlaceSearchRequest::setCategories () function can be used to limit the search results to places with the specified categories.
若 QGeoServiceProvider supports it, categories can be created and removed. This functionality is available in the QPlaceManager 类。
Constructs a category.
Constructs a category which is a copy of other .
[虚拟]
QPlaceCategory::
~QPlaceCategory
()
Destroys the category.
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.
另请参阅 setCategoryId ().
Returns the icon associated with the category.
另请参阅 setIcon ().
Returns a boolean indicating whether the all the fields of the place category are empty or not.
Returns the name of category.
另请参阅 setName ().
设置 标识符 of the category.
另请参阅 categoryId ().
设置 icon of the category.
另请参阅 icon ().
设置 name of the category.
另请参阅 name ().
设置 visibility of the category.
另请参阅 visibility ().
Returns the visibility of the category.
另请参阅 setVisibility ().
返回 true 若 other is not equal to this category; otherwise returns false.
赋值 other to this category and returns a reference to this category.
返回 true 若 other is equal to this category; otherwise returns false.