The QLandmarkAttributeFilter class provides filtering based on generic landmark attributes. More...
#include <QLandmarkAttributeFilter>
Inherits QLandmarkFilter.
enum | AttributeType { ManagerAttributes, CustomAttributes } |
enum | OperationType { AndOperation, OrOperation } |
QLandmarkAttributeFilter () | |
QLandmarkAttributeFilter ( const QLandmarkFilter & other ) | |
virtual | ~QLandmarkAttributeFilter () |
QVariant | attribute ( const QString & key ) const |
QStringList | attributeKeys () const |
AttributeType | attributeType () 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 = QVariant(), QLandmarkFilter::MatchFlags flags = 0 ) |
void | setAttributeType ( AttributeType attributeType ) |
void | setAttributes ( const QStringList & keys, const QVariant & value = QVariant(), QLandmarkFilter::MatchFlags flags = 0 ) |
void | setOperationType ( OperationType operationType ) |
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 considered a match, regardless of its value. More than one attribute may be set in the filter and may be combined using an AND or OR operation. The filter may only be used to search through either manager attributes (ie. common cross platform attributes and extended attributes specific to a manager) or custom attributes.
Defines type of landmark attributes this filter operates on.
Constant | Value | Description |
---|---|---|
QLandmarkAttributeFilter::ManagerAttributes | 0 | The filter operates on standard cross platform attributes and extended attributes. |
QLandmarkAttributeFilter::CustomAttributes | 1 | The filter operates on custom attributes. |
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.
Destroys the filter.
Returns the value of the attribute corresponding to key.
If the attribute isn't set an invalid QVariant is returned.
See also setAttribute().
Returns the keys of all attributes set in the filter.
Returns the type of attribute this filter will operate on.
See also setAttributeType().
Clears all attributes from the filter.
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.
Returns the operation to be used by the filter when multiple attributes are provided.
See also setOperationType().
Removes the attribute corresponding to key from the filter.
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, regardless of its value. Setting a valid QVariant means that the filter will match only landmarks whose values match that of value. 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.
See also attribute().
Sets the type of attribute this filter will operate on to attributeType.
See also attributeType().
Sets the value of all the attributes correponding to those in keys.
Setting an invalid QVariant to an attribute means that the filter will match any landmark that has that attribute, regardless of its value. Setting a valid QVariant means that the filter will match only landmarks whose values match that of value. 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.
Sets the operation to be used by the filter when multiple attributes are provided to operationType.
See also operationType().