The QLandmarkAttributeFilter class provides filtering on various landmark attributes. More...
#include <QLandmarkAttributeFilter>
Inherits: QLandmarkFilter.
This class was introduced in Qt Mobility 1.1.
enum | OperationType { AndOperation, OrOperation } |
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 ) |
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.
Defines how the attribute criteria are combined if more than one attribute is defined.
Constant | Value | Description |
---|---|---|
QLandmarkAttributeFilter::AndOperation | 0 | Landmarks must match all the attributes provided by the filter. |
QLandmarkAttributeFilter::OrOperation | 1 | Landmarks must match at least one attribute provided by the filter. |
Creates an attribute filter.
Constructs a copy of other if possible, otherwise constructs a new attribute filter.
This function was introduced in Qt Mobility 1.1.
Destroys the filter.
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().
Returns the keys of all attributes set in the filter.
This function was introduced in Qt Mobility 1.1.
Clears all attributes from the filter.
This function was introduced in Qt Mobility 1.1.
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.
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().
Removes the attribute corresponding to key from the filter.
This function was introduced in Qt Mobility 1.1.
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().
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.
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().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.