MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QLandmarkCategory Class Reference

The QLandmarkCategory class designates a grouping of landmarks of similar type. More...

 #include <QLandmarkCategory>

This class was introduced in Qt Mobility 1.1.

Public Functions

QLandmarkCategory ()
QLandmarkCategory ( const QLandmarkCategory & other )
~QLandmarkCategory ()
QLandmarkCategoryId categoryId () const
void clear ()
QUrl iconUrl () const
QString name () const
void setCategoryId ( const QLandmarkCategoryId & id )
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.

More than one category can be assigned to a landmark. Assignment of a category to a landmark is achieved by using the QLandmark::setCategoryIds() or QLandmark::addCategoryId() functions.

Some categories may be considered read-only by a manager and cannot be saved. To see if a category is read only, the id of the cateory must be passed into the QLandmarkManager::isReadOnly() function. Localization is only possible for categories that are 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()).

Member Function Documentation

QLandmarkCategory::QLandmarkCategory ()

Constructs an empty category.

A new category will be assigned an invalid QLandmarkCategoryId.

QLandmarkCategory::QLandmarkCategory ( const QLandmarkCategory & other )

Constructs a copy of other.

This function was introduced in Qt Mobility 1.1.

QLandmarkCategory::~QLandmarkCategory ()

Destroys the category.

QLandmarkCategoryId QLandmarkCategory::categoryId () const

Returns the identifier of the category.

This function was introduced in Qt Mobility 1.1.

See also setCategoryId().

void QLandmarkCategory::clear ()

Clears all the data fields of the category.

This function was introduced in Qt Mobility 1.1.

QUrl QLandmarkCategory::iconUrl () const

Returns the url of the category's icon.

This function was introduced in Qt Mobility 1.1.

See also setIconUrl().

QString QLandmarkCategory::name () const

Returns the name of the category.

This function was introduced in Qt Mobility 1.1.

See also setName().

void QLandmarkCategory::setCategoryId ( const QLandmarkCategoryId & id )

Sets the id of the category.

Note that saving a new category using a QLandmarkManager will automatically assign the category a valid identifier.

This function was introduced in Qt Mobility 1.1.

See also categoryId().

void QLandmarkCategory::setIconUrl ( const QUrl & url )

Sets the url of the category's icon

This function was introduced in Qt Mobility 1.1.

See also iconUrl().

void QLandmarkCategory::setName ( const QString & name )

Sets the name of the category.

Using the default manager on the Symbian platform, the catgory name is retricted to a length of 124 characters.

This function was introduced in Qt Mobility 1.1.

See also name().

bool QLandmarkCategory::operator!= ( const QLandmarkCategory & other ) const

Returns true if this category is not equal to other, otherwise returns false.

This function was introduced in Qt Mobility 1.1.

See also operator==().

QLandmarkCategory & QLandmarkCategory::operator= ( const QLandmarkCategory & other )

Assigns other to this category and returns a reference to this category.

This function was introduced in Qt Mobility 1.1.

bool QLandmarkCategory::operator== ( const QLandmarkCategory & other ) const

Returns true if this category is equal to other, otherwise returns false.

This function was introduced in Qt Mobility 1.1.

See also operator!=().