The QContactDetailRangeFilter class provides a filter based around a detail value range criterion. More...
#include <QContactDetailRangeFilter>
Inherits: QContactFilter.
This class was introduced in Qt Mobility 1.0.
enum | RangeFlag { IncludeLower, IncludeUpper, ExcludeLower, ExcludeUpper } |
flags | RangeFlags |
QContactDetailRangeFilter () | |
QContactDetailRangeFilter ( const QContactFilter & other ) | |
QString | detailDefinitionName () const |
QString | detailFieldName () const |
QContactFilter::MatchFlags | matchFlags () const |
QVariant | maxValue () const |
QVariant | minValue () const |
RangeFlags | rangeFlags () const |
void | setDetailDefinitionName ( const QString & definitionName, const QString & fieldName = QString() ) |
void | setMatchFlags ( QContactFilter::MatchFlags flags ) |
void | setRange ( const QVariant & min, const QVariant & max, RangeFlags flags = 0 ) |
The QContactDetailRangeFilter class provides a filter based around a detail value range criterion.
It may be used to select contacts which contain a detail of a particular definition with a particular value that lies in a range (either open or closed).
Enumerates the semantics of the boundary conditions of the detail range filter
Constant | Value | Description |
---|---|---|
QContactDetailRangeFilter::IncludeLower | 0 | The filter will match if the field value is equal to or greater than the minimum value |
QContactDetailRangeFilter::IncludeUpper | 1 | The filter will match if the field value is equal to or less than the maximum value |
QContactDetailRangeFilter::ExcludeLower | 2 | The filter will match if the field value is greater than the minimum value (but not equal) |
QContactDetailRangeFilter::ExcludeUpper | 0 | The filter will match if the field value is less than the maximum value (but not equal) |
The RangeFlags type is a typedef for QFlags<RangeFlag>. It stores an OR combination of RangeFlag values.
Constructs a new detail range filter
Constructs a copy of other if possible, otherwise constructs a new detail range filter
This function was introduced in Qt Mobility 1.0.
Returns the definition name of the details which will be inspected for matching values
This function was introduced in Qt Mobility 1.0.
See also setDetailDefinitionName().
Returns the name of the field which contains the value which will be matched against the value criterion
This function was introduced in Qt Mobility 1.0.
See also setDetailDefinitionName().
Returns the match flags of the criterion, which define semantics such as case sensitivity, and exact matching.
This function was introduced in Qt Mobility 1.0.
See also setMatchFlags().
Returns the upper bound of the value range criterion If this value is null, there is no upper bound. If it is valid, the rangeFlags() determines whether this value is included in the valid values.
This function was introduced in Qt Mobility 1.0.
See also setRange().
Returns the lower bound of the value range criterion. If this value is null, there is no lower bound. If it is valid, the rangeFlags() determines whether this value is included in the valid values.
This function was introduced in Qt Mobility 1.0.
See also setRange().
Returns a set of flags which defines the boundary condition semantics of the value range criterion
This function was introduced in Qt Mobility 1.0.
See also setRange().
Sets the name of the detail definition of which type details will be inspected for matching values to definitionName, and the name of the field which will be inspected in details of that definition to fieldName.
This function was introduced in Qt Mobility 1.0.
See also detailDefinitionName() and detailFieldName().
Sets the match flags of the filter criterion to flags
Not all flags are supported by a range filter. The supported flags include:
Unsupported flags will be ignored.
This function was introduced in Qt Mobility 1.0.
See also matchFlags().
Sets the value range criterion of the filter to within min and max, with boundary conditions specified in the given flags. If min or max is a null variant, that condition will not be checked. For example, to check for fields with a value greater than 7, you would specify:
filter.setRange(7, QVariant(), QContactDetailRangeFilter::ExcludeLower);
This function was introduced in Qt Mobility 1.0.