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  · 

QLandmarkAttributeFilter Class Reference

The QLandmarkAttributeFilter class provides filtering on various landmark attributes. More...

 #include <QLandmarkAttributeFilter>

Inherits: QLandmarkFilter.

This class was introduced in Qt Mobility 1.1.

Public Types

enum OperationType { AndOperation, OrOperation }

Public Functions

QLandmarkAttributeFilter ()
QLandmarkAttributeFilter ( const QLandmarkFilter & other )
virtual ~QLandmarkAttributeFilter ()
QVariant attribute ( const QString & key ) const
QStringList attributeKeys () const
void clearAttributes ()
QLandmarkFilter::MatchFlags matchFlags ( const QString & key ) const
OperationType operationType () const
void removeAttribute ( const QString & key )
void setAttribute ( const QString & key, const QVariant & value, QLandmarkFilter::MatchFlags flags = 0 )
void setAttributes ( const QStringList & keys, const QVariant & value, QLandmarkFilter::MatchFlags flags = 0 )
void setOperationType ( OperationType operationType )

Detailed Description

The QLandmarkAttributeFilter class provides filtering on various landmark attributes.

You can provide various keys which describe the attribute(s) to search. Precisely which keys may be used depends on the manager and these can be retrieved by using QLandmarkManager::searchableLandmarkAttributeKeys(). The table below outlines some keys that may be used with the default managers on the currently supported platforms. The match flags may be used for attributes which are of string type (typically most, if not all searchable attributes are string types).

Searchable attributes
"city""country"countryCode"
"county""description""district"
"name""state""phoneNumber"
"postcode""street"

Please note that different platforms support different capabilities with the attribute filter.

  • The S60 3.1, 3.2 and 5.0 platforms do not support an OR type attribute filter.
  • The S60 3.1, 3.2, 5.0 and Symbian platforms do not support the MatchContains flag.
  • The S60 3.1, 3.2, 5.0 and Symbian platforms do not support multiple attributes with an AND type attribute filter(using a single attribute however is supported).

Member Type Documentation

enum QLandmarkAttributeFilter::OperationType

Defines how the attribute criteria are combined if more than one attribute is defined.

ConstantValueDescription
QLandmarkAttributeFilter::AndOperation0Landmarks must match all the attributes provided by the filter.
QLandmarkAttributeFilter::OrOperation1Landmarks must match at least one attribute provided by the filter.

Member Function Documentation

QLandmarkAttributeFilter::QLandmarkAttributeFilter ()

Creates an attribute filter.

QLandmarkAttributeFilter::QLandmarkAttributeFilter ( const QLandmarkFilter & other )

Constructs a copy of other if possible, otherwise constructs a new attribute filter.

This function was introduced in Qt Mobility 1.1.

QLandmarkAttributeFilter::~QLandmarkAttributeFilter () [virtual]

Destroys the filter.

QVariant QLandmarkAttributeFilter::attribute ( const QString & key ) const

Returns the value of the attribute corresponding to key.

If the attribute isn't set an invalid QVariant is returned.

This function was introduced in Qt Mobility 1.1.

See also setAttribute().

QStringList QLandmarkAttributeFilter::attributeKeys () const

Returns the keys of all attributes set in the filter.

This function was introduced in Qt Mobility 1.1.

void QLandmarkAttributeFilter::clearAttributes ()

Clears all attributes from the filter.

This function was introduced in Qt Mobility 1.1.

QLandmarkFilter::MatchFlags QLandmarkAttributeFilter::matchFlags ( const QString & key ) const

Returns the match flags for a particular key. The match flags are only take into consideration when the attribute for a particular key is a string. In all other cases the match flags are ignored.

This function was introduced in Qt Mobility 1.1.

OperationType QLandmarkAttributeFilter::operationType () const

Returns the operation to be used by the filter when multiple attributes are provided.

This function was introduced in Qt Mobility 1.1.

See also setOperationType().

void QLandmarkAttributeFilter::removeAttribute ( const QString & key )

Removes the attribute corresponding to key from the filter.

This function was introduced in Qt Mobility 1.1.

void QLandmarkAttributeFilter::setAttribute ( const QString & key, const QVariant & value, QLandmarkFilter::MatchFlags flags = 0 )

Sets the value of the attribute corresponding to key.

For string based attributes a set of matching flags can be provided to define how the string values should be matched. For non-string based attributes the flags are ignored. The beahviour of the filter is undefined if an invalid QVariant is used as a value

This function was introduced in Qt Mobility 1.1.

See also attribute().

void QLandmarkAttributeFilter::setAttributes ( const QStringList & keys, const QVariant & value, QLandmarkFilter::MatchFlags flags = 0 )

Sets the value of all the attributes correponding to those in keys.

For string based attributes a set of matching flags can be provided to define how the string values should be matched. For non-string based attributes the flags are ignored. The behaviour of the filter is undefined if an invalid QVariant is used as value.

This function was introduced in Qt Mobility 1.1.

void QLandmarkAttributeFilter::setOperationType ( OperationType operationType )

Sets the operation to be used by the filter when multiple attributes are provided to operationType.

This function was introduced in Qt Mobility 1.1.

See also operationType().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 26
  2. «Le projet de loi des droits du développeur» : quelles conditions doivent remplir les entreprises pour que le développeur puisse réussir ? 60
  3. Une nouvelle ère d'IHM 3D pour les automobiles, un concept proposé par Digia et implémenté avec Qt 3
  4. Qt Creator 2.5 est sorti en beta, l'EDI supporte maintenant plus de fonctionnalités de C++11 2
  5. PySide devient un add-on Qt et rejoint le Qt Project et le modèle d'open gouvernance 1
  6. Vingt sociétés montrent leurs décodeurs basés sur Qt au IPTV World Forum, en en exploitant diverses facettes (déclaratif, Web, widgets) 0
  7. Thread travailleur avec Qt en utilisant les signaux et les slots, un article de Christophe Dumez traduit par Thibaut Cuvelier 1
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 97
  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 ? 50
  4. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 26
  5. «Le projet de loi des droits du développeur» : quelles conditions doivent remplir les entreprises pour que le développeur puisse réussir ? 57
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Labs au hasard

Logo

Qt et Box2D c'est facile

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. 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