The QLandmark class represents a location or point of interest of some significance. More...
#include <QLandmark>
Inherits QGeoPlace.
QLandmark () | |
QLandmark ( const QGeoPlace & other ) | |
QLandmark ( const QLandmark & other ) | |
~QLandmark () | |
void | addCategoryId ( const QLandmarkCategoryId & categoryId ) |
QVariant | attribute ( const QString & key ) const |
QStringList | attributeKeys () const |
QList<QLandmarkCategoryId> | categoryIds () const |
void | clear () |
QVariant | customAttribute ( const QString & key, const QVariant & defaultValue = QVariant() ) const |
QStringList | customAttributeKeys () const |
QString | description () const |
QUrl | iconUrl () const |
QLandmarkId | landmarkId () const |
QString | name () const |
QString | phoneNumber () const |
double | radius () const |
void | removeAttribute ( const QString & key ) |
void | removeCategoryId ( const QLandmarkCategoryId & categoryId ) |
void | removeCustomAttribute ( const QString & key ) |
void | setAttribute ( const QString & key, const QVariant & value ) |
void | setCategoryIds ( const QList<QLandmarkCategoryId> & categoryIds ) |
void | setCustomAttribute ( const QString & key, const QVariant & value ) |
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 ( double 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 location or point of interest of some significance.
Each landmark consists of a number of core properties such as name, coordinates, description etc accessible through standard member functions. For information on accessing landmark properties through the attributes function see Landmark Attributes.
Each QLandmark may 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 setCategoryId() 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. Localization is only possible for landmarks that are read-only. If the landmark store supports localization, the locale may be set through a QLandmarkManager's parameters and whenever landmarks are retrieved, the translated names are used. The QLandmarkManager::isReadOnly(const QLandmarkyId &) function may be used to determine if a category is 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()).
Constructs an new landmark.
A new landmark will be assigned with invalid QLandmarkId.
Constructs a new landmark from other.
If other is a QLandmark instance this is equivalent to QLandmark(const QLandmark &other).
If other::type() is QGeoPlace instance this will initialize just the coordinate and address of this landmark.
Otherwise this is equivalent to QLandmark().
Constructs a copy of other.
Destroys the landmark.
Adds another category that this landmark will be associated with via its categoryId.
See also setCategoryIds() and removeCategoryId().
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 a of list identifiers of categories that this landmark belongs to.
See also setCategoryIds().
Clears all the data fields of the landmark.
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 a description of the landmark.
See also setDescription().
Returns the url of the landmark's icon.
See also setIconUrl().
Returns the identifier of the landmark.
See also setLandmarkId().
Returns the name of the landmark.
See also setName().
Returns the phone number of the landmark.
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.
See also setRadius().
Removes the attribute corresponding to key. Common cross platform attributes cannot be removed, only extended attributes may be removed using this function.
Removes a category from a landmark, by using its categoryId.
See also addCategoryId() and categoryIds().
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 categories that this landmark belongs to via a list of categoryIds.
See also categoryIds(), addCategoryId(), and removeCategoryId().
Sets the value of the custom attribute corresponding to key. Setting an invalid QVariant removes the key.
See also customAttribute().
Sets the description of the landmark.
See also description().
Sets the url of the landmark's icon.
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.
See also landmarkId().
Sets the name of the landmark.
See also name().
Sets the phoneNumber of the landmark.
See also phoneNumber().
Sets the coverage radius of the landmark. The unit of the radius is meters.
See also radius().
Sets the url of the landmark.
See also url().
Returns the url of the landmark.
See also setUrl().
Returns true if this landmark not is equal to other, otherwise returns false.
See also operator==().
Assigns other to this landmark and returns a reference to this landmark.
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.
See also operator!=().