The QLandmark class represents a point of interest. More...
#include <QLandmark>
Inherits: QGeoPlace.
This class was introduced in Qt Mobility 1.1.
QLandmark () | |
QLandmark ( const QGeoPlace & other ) | |
QLandmark ( const QLandmark & other ) | |
~QLandmark () | |
void | addCategoryId ( const QLandmarkCategoryId & categoryId ) |
QList<QLandmarkCategoryId> | categoryIds () const |
void | clear () |
QString | description () const |
QUrl | iconUrl () const |
QLandmarkId | landmarkId () const |
QString | name () const |
QString | phoneNumber () const |
qreal | radius () const |
void | removeCategoryId ( const QLandmarkCategoryId & categoryId ) |
void | setCategoryIds ( const QList<QLandmarkCategoryId> & categoryIds ) |
void | setDescription ( const QString & description ) |
void | setIconUrl ( const QUrl & url ) |
void | setLandmarkId ( const QLandmarkId & id ) |
void | setName ( const QString & name ) |
void | setPhoneNumber ( const QString & phoneNumber ) |
void | setRadius ( qreal radius ) |
void | setUrl ( const QUrl & url ) |
QUrl | url () const |
bool | operator!= ( const QLandmark & other ) const |
QLandmark & | operator= ( const QLandmark & other ) |
bool | operator== ( const QLandmark & other ) const |
The QLandmark class represents a point of interest.
Each QLandmark represents a location with a number of attributes or properties such as name, description, phone number etc. Each QLandmark may also be associated with zero or more categories. A category defines a type of landmark such as restaurant or cinema. To set the category that a landmark belongs to, use the setCategoryIds() or addCategoryId() functions. A landmark may be removed from a category by using the removeCategoryId() function.
Some landmarks may be designated as read-only, e.g. a publically accessible landmark server may not want some of its content to be editable. Note, localization is only possible for landmarks that are read-only.
Each QLandmark is an in memory representation of a landmark; it does not reflect the actual landmark state in persistent storage until the appropriate synchronization method is called on the QLandmarkManager(e.g. saveLandmark(), removeLandmark()).
Note that QLandmark inherits from QGeoPlace and thus has a viewport data field. Most managers usually however ignore this field when saving the landmark.
Constructs an new landmark.
A new landmark will be assigned with invalid QLandmarkId.
Constructs a new landmark from other.
If other is not a landmark, the coordinates, address and viewport get copied into the newly created landmark.
If other is a landmark, this function is equivalent to calling QLandmark(const QLandmark &other).
This constructor allows (1) and c to take place. /code QGeoPlace geoPlace = lm1; //lm1 is a QLandmark ... QLandmark lm2 = geoPlace; //(1)lm2 is equivalent to lm1
QGeoPlace ordinaryPlace; QLandmark lm3 = ordinarPlace; //(2)lm3 has the details of ordinaryPlace's coordinate, address and viewport. /endcode
This function was introduced in Qt Mobility 1.1.
Constructs a copy of other.
This function was introduced in Qt Mobility 1.1.
Destroys the landmark.
Adds another category that this landmark will be associated with via its categoryId.
This function was introduced in Qt Mobility 1.1.
See also setCategoryIds() and removeCategoryId().
Returns a of list identifiers of categories that this landmark belongs to.
This function was introduced in Qt Mobility 1.1.
See also setCategoryIds().
Clears all the data fields of the landmark.
This function was introduced in Qt Mobility 1.1.
Returns a description of the landmark.
This function was introduced in Qt Mobility 1.1.
See also setDescription().
Returns the url of the landmark's icon.
This function was introduced in Qt Mobility 1.1.
See also setIconUrl().
Returns the identifier of the landmark.
This function was introduced in Qt Mobility 1.1.
See also setLandmarkId().
Returns the name of the landmark.
This function was introduced in Qt Mobility 1.1.
See also setName().
Returns the phone number of the landmark.
This function was introduced in Qt Mobility 1.1.
See also setPhoneNumber().
Returns the coverage radius of the landmark. The unit of the radius is meters.
The coverage radius is relevant for large landmarks such as cities. Note that landmark searches over a given area do not factor in the coverage radius.
This function was introduced in Qt Mobility 1.1.
See also setRadius().
Removes a category from a landmark, by using its categoryId.
This function was introduced in Qt Mobility 1.1.
See also addCategoryId() and categoryIds().
Sets the categories that this landmark belongs to via a list of categoryIds.
This function was introduced in Qt Mobility 1.1.
See also categoryIds(), addCategoryId(), and removeCategoryId().
Sets the description of the landmark.
Using the default manager on the Symbian platform, the description is restricted to a length of 4096 characters.
This function was introduced in Qt Mobility 1.1.
See also description().
Sets the url of the landmark's icon.
This function was introduced in Qt Mobility 1.1.
See also iconUrl().
Sets the id of the landmark.
Note that saving a new landmark using a QLandmarkManager will automatically assign the landmark a valid identifier.
This function was introduced in Qt Mobility 1.1.
See also landmarkId().
Sets the name of the landmark.
Using the default manager on the Symbian platform, the name is restricted to a length of 256 characters.
This function was introduced in Qt Mobility 1.1.
See also name().
Sets the phoneNumber of the landmark.
This function was introduced in Qt Mobility 1.1.
See also phoneNumber().
Sets the coverage radius of the landmark. The unit of the radius is meters.
This function was introduced in Qt Mobility 1.1.
See also radius().
Sets the url of the landmark.
This function was introduced in Qt Mobility 1.1.
See also url().
Returns the url of the landmark.
This function was introduced in Qt Mobility 1.1.
See also setUrl().
Returns true if this landmark not is equal to other, otherwise returns false.
This function was introduced in Qt Mobility 1.1.
See also operator==().
Assigns other to this landmark and returns a reference to this landmark.
This function was introduced in Qt Mobility 1.1.
Returns true if this landmark is equal to other, otherwise returns false.
Two landmarks are considered equal if both the landmark details and identifiers are equal.
This function was introduced in Qt Mobility 1.1.
See also operator!=().