QPlaceCategory Class

The QPlaceCategory class represents a category that a QPlace can be associated with. 更多...

头: #include <QPlaceCategory>
qmake: QT += location

公共函数

QPlaceCategory ()
QPlaceCategory (const QPlaceCategory & other )
~QPlaceCategory ()
QString categoryId () const
QPlaceIcon icon () const
bool isEmpty () const
QString name () const
void setCategoryId (const QString & identifier )
void setIcon (const QPlaceIcon & icon )
void setName (const QString & name )
void setVisibility (QLocation::Visibility visibility )
QLocation::Visibility visibility () const
QPlaceCategory & operator= (const QPlaceCategory & other )
bool operator!= (const QPlaceCategory & lhs , const QPlaceCategory & rhs )
bool operator== (const QPlaceCategory & lhs , const QPlaceCategory & rhs )

详细描述

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 类。

成员函数文档编制

QPlaceCategory:: QPlaceCategory ()

Constructs a category.

[noexcept] QPlaceCategory:: QPlaceCategory (const QPlaceCategory & other )

Constructs a category which is a copy of other .

[noexcept] QPlaceCategory:: ~QPlaceCategory ()

Destroys the category.

QString QPlaceCategory:: categoryId () const

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 ().

QPlaceIcon QPlaceCategory:: icon () const

Returns the icon associated with the category.

另请参阅 setIcon ().

bool QPlaceCategory:: isEmpty () const

Returns a boolean indicating whether the all the fields of the place category are empty or not.

QString QPlaceCategory:: 名称 () const

Returns the name of category.

另请参阅 setName ().

void QPlaceCategory:: setCategoryId (const QString & identifier )

设置 identifier of the category.

另请参阅 categoryId ().

void QPlaceCategory:: setIcon (const QPlaceIcon & icon )

设置 icon of the category.

另请参阅 icon ().

void QPlaceCategory:: setName (const QString & name )

设置 name of the category.

另请参阅 name ().

void QPlaceCategory:: setVisibility ( QLocation::Visibility visibility )

设置 visibility of the category.

另请参阅 visibility ().

QLocation::Visibility QPlaceCategory:: visibility () const

Returns the visibility of the category.

另请参阅 setVisibility ().

[noexcept] QPlaceCategory &QPlaceCategory:: operator= (const QPlaceCategory & other )

赋值 other to this category and returns a reference to this category.

相关非成员

[noexcept] bool operator!= (const QPlaceCategory & lhs , const QPlaceCategory & rhs )

返回 true 若 lhs 不等于 rhs ;否则返回 false。

[noexcept] bool operator== (const QPlaceCategory & lhs , const QPlaceCategory & rhs )

返回 true 若 lhs 等于 rhs ;否则返回 false。