Qt Mobility Reference Documentation

QLandmarkAttributeFilter Class Reference

The QLandmarkAttributeFilter class provides filtering based on generic landmark attributes. More...

 #include <QLandmarkAttributeFilter>

Inherits QLandmarkFilter.


Public Functions

QLandmarkAttributeFilter ()
QLandmarkAttributeFilter ( const QLandmarkFilter & other )
virtual ~QLandmarkAttributeFilter ()
QVariant attribute ( const QString & key ) const
QStringList attributeKeys () const
void clearAttributes ()
void removeAttribute ( const QString & key )
void setAttribute ( const QString & key, const QVariant & value )

Detailed Description

The QLandmarkAttributeFilter class provides filtering based on generic landmark attributes.

The QLandmarkAttributeFilter class may be used to filter landmarks whose attributes match certain values. If an invalid QVariant is provided as the value for an attribute, then any landmark that has that attribute is returned, regardless of its value. More than one attribute may be set in the filter, a landmark will only match if all attributes are matched.


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.

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.

See also setAttribute().

QStringList QLandmarkAttributeFilter::attributeKeys () const

Returns the keys of all attributes set in the filter.

void QLandmarkAttributeFilter::clearAttributes ()

Clears all attributes from the filter.

void QLandmarkAttributeFilter::removeAttribute ( const QString & key )

Removes the attribute corresponding to key from the filter.

void QLandmarkAttributeFilter::setAttribute ( const QString & key, const QVariant & value )

Sets the value of the attribute corresponding to key.

Setting an invalid QVariant to an attribute means that the filter will match any landmark that has that attribute set, regardless of its value. Setting a valid QVariant means that the filter will match only landmarks whose values exactly match that of value.

See also attribute().


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0