The QLandmarkCategory class designates a grouping of landmarks of similar type. More...
#include <QLandmarkCategory>
QLandmarkCategory () | |
QLandmarkCategory ( const QLandmarkCategory & other ) | |
~QLandmarkCategory () | |
QVariant | attribute ( const QString & key ) const |
QStringList | attributeKeys () const |
QLandmarkCategoryId | categoryId () const |
void | clear () |
QVariant | customAttribute ( const QString & key, const QVariant & defaultValue = QVariant() ) const |
QStringList | customAttributeKeys () const |
QUrl | iconUrl () const |
QString | name () const |
void | removeAttribute ( const QString & key ) |
void | removeCustomAttribute ( const QString & key ) |
void | setAttribute ( const QString & key, const QVariant & value ) |
void | setCategoryId ( const QLandmarkCategoryId & id ) |
void | setCustomAttribute ( const QString & key, const QVariant & value ) |
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 |
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()).
Constructs an empty category.
A new category will be assigned an invalid QLandmarkCategoryId.
Constructs a copy of other.
Destroys the category.
Returns the value of the attribute corresponding to key. If the key doest exist, an invalid QVariant is returned.
See also setAttribute().
Returns a list of attribute keys.
See also attribute() and setAttribute().
Returns the identifier of the category.
See also setCategoryId().
Clears all the data fields of the category.
Returns the value of the custom attribute corresponding to key. If the custom attribute doest exist, returns defaultValue.
If no default value is specified, a default QVariant is returned.
See also setCustomAttribute().
Returns a list of custom Attribute keys.
See also customAttribute() and setCustomAttribute().
Returns the url of the category's icon.
See also setIconUrl().
Returns the name of the category.
See also setName().
Removes the attribute corresponding to key. Common cross platform attributes cannot be removed, only extended attributes may be removed using this function.
Removes the custom attribute corresponding to key.
Sets the value of the attribute corresponding to key. If the key does not already exist this function has no effect.
See also attribute().
Sets the id of the category.
Note that saving a new category using a QLandmarkManager will automatically assign the category a valid identifier.
See also categoryId().
Sets the value of the custom attribute corresponding to key. Setting an invalid QVariant removes the key.
See also customAttribute().
Sets the url of the category's icon
See also iconUrl().
Sets the name of the category.
See also name().
Returns true if this category is not equal to other, otherwise returns false.
See also operator==().
Assigns other to this category and returns a reference to this category.
Returns true if this category is equal to other, otherwise returns false.
See also operator!=().