Contents
QLandmarkCategory Class Reference
The QLandmarkCategory class designates a grouping of landmarks of similar type. More...
#include <QLandmarkCategory>
Public Functions
QLandmarkCategory () | |
QLandmarkCategory ( const QLandmarkCategory & other ) | |
~QLandmarkCategory () | |
QVariant | attribute ( const QString & key, const QVariant & defaultValue = QVariant() ) const |
QStringList | attributeKeys () const |
QLandmarkCategoryId | categoryId () const |
void | clear () |
QString | description () const |
QUrl | iconUrl () const |
QString | name () const |
void | setAttribute ( const QString & key, const QVariant & value ) |
void | setCategoryId ( const QLandmarkCategoryId & id ) |
void | setDescription ( const QString & description ) |
void | setIconUrl ( const QUrl & url ) |
void | setName ( const QString & name ) |
bool | operator!= ( const QLandmarkCategory & other ) const |
QLandmarkCategory & | operator= ( const QLandmarkCategory & other ) |
bool | operator== ( const QLandmarkCategory & other ) const |
Detailed Description
The QLandmarkCategory class designates a grouping of landmarks of similar type.
Landmarks of similar type may be grouped together into categories, e.g. restaurants, accommodation etc. A QLandmarkCategory object represents one of these and allows access to category properties such as description and icon url.
More than one category can be assigned to a landmark. Assignment of a category to a landmark is achieved by using the QLandmark class in conjunction with the QLandmarkCategoryId class.
Some categories may be designated as read-only. Typically these are intended to be "global" categories that are the same across landmark stores. In practicality, not all landmark stores may necessarily have the same set of global categories. Localization is only possible for categories that are read-only. If the landmark store supports localization, the locale may be set through a QLandmarkManager's parameters and whenever categories are retrieved, the translated names are used. The QLandmarkManager::isReadOnly(const QLandmarkCategoryId &) function may be used to determine if a category is read-only.
A QLandmarkCategory instance is an in memory representation and may not reflect the state of the category found in persistent storage, until the appropriate synchronization method is called on the QLandmarkManager(e.g.saveCategory(), removeCategory()).