Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QLandmark Class Reference

The QLandmark class represents a point of interest. More...

 #include <QLandmark>

Inherits: QGeoPlace.

This class was introduced in Qt Mobility 1.1.

Public Functions

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
  • 10 public functions inherited from QGeoPlace

Detailed Description

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.

Member Function Documentation

QLandmark::QLandmark ()

Constructs an new landmark.

A new landmark will be assigned with invalid QLandmarkId.

QLandmark::QLandmark ( const QGeoPlace & other )

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.

QLandmark::QLandmark ( const QLandmark & other )

Constructs a copy of other.

This function was introduced in Qt Mobility 1.1.

QLandmark::~QLandmark ()

Destroys the landmark.

void QLandmark::addCategoryId ( const QLandmarkCategoryId & categoryId )

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().

QList<QLandmarkCategoryId> QLandmark::categoryIds () const

Returns a of list identifiers of categories that this landmark belongs to.

This function was introduced in Qt Mobility 1.1.

See also setCategoryIds().

void QLandmark::clear ()

Clears all the data fields of the landmark.

This function was introduced in Qt Mobility 1.1.

QString QLandmark::description () const

Returns a description of the landmark.

This function was introduced in Qt Mobility 1.1.

See also setDescription().

QUrl QLandmark::iconUrl () const

Returns the url of the landmark's icon.

This function was introduced in Qt Mobility 1.1.

See also setIconUrl().

QLandmarkId QLandmark::landmarkId () const

Returns the identifier of the landmark.

This function was introduced in Qt Mobility 1.1.

See also setLandmarkId().

QString QLandmark::name () const

Returns the name of the landmark.

This function was introduced in Qt Mobility 1.1.

See also setName().

QString QLandmark::phoneNumber () const

Returns the phone number of the landmark.

This function was introduced in Qt Mobility 1.1.

See also setPhoneNumber().

qreal QLandmark::radius () const

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().

void QLandmark::removeCategoryId ( const QLandmarkCategoryId & categoryId )

Removes a category from a landmark, by using its categoryId.

This function was introduced in Qt Mobility 1.1.

See also addCategoryId() and categoryIds().

void QLandmark::setCategoryIds ( const QList<QLandmarkCategoryId> & 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().

void QLandmark::setDescription ( const QString & description )

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().

void QLandmark::setIconUrl ( const QUrl & url )

Sets the url of the landmark's icon.

This function was introduced in Qt Mobility 1.1.

See also iconUrl().

void QLandmark::setLandmarkId ( const QLandmarkId & id )

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().

void QLandmark::setName ( const QString & name )

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().

void QLandmark::setPhoneNumber ( const QString & phoneNumber )

Sets the phoneNumber of the landmark.

This function was introduced in Qt Mobility 1.1.

See also phoneNumber().

void QLandmark::setRadius ( qreal radius )

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().

void QLandmark::setUrl ( const QUrl & url )

Sets the url of the landmark.

This function was introduced in Qt Mobility 1.1.

See also url().

QUrl QLandmark::url () const

Returns the url of the landmark.

This function was introduced in Qt Mobility 1.1.

See also setUrl().

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

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==().

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

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

This function was introduced in Qt Mobility 1.1.

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

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!=().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 43
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.2
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web