QContactDetailFilter Class

The QContactDetailFilter class provides a filter based around a detail value criterion More...

Header: #include <QContactDetailFilter>
Inherits: QContactFilter.

Public Functions

QContactDetailFilter()
QContactDetailFilter(const QContactFilter & other)
int detailField() const
QContactDetail::DetailType detailType() const
QContactFilter::MatchFlags matchFlags() const
void setDetailType(QContactDetail::DetailType type, int field = -1)
void setMatchFlags(QContactFilter::MatchFlags flags)
void setValue(const QVariant & value)
QVariant value() const

Detailed Description

The QContactDetailFilter class provides a filter based around a detail value criterion

It may be used to select contacts which contain a detail of a particular type with a particular value

Member Function Documentation

QContactDetailFilter::QContactDetailFilter()

Constructs a new detail filter

QContactDetailFilter::QContactDetailFilter(const QContactFilter & other)

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

int QContactDetailFilter::detailField() const

Returns the detail field containing the value which will be matched against the value criterion

See also setDetailType().

QContactDetail::DetailType QContactDetailFilter::detailType() const

Returns the type of the details which will be inspected for matching values

See also setDetailType().

QContactFilter::MatchFlags QContactDetailFilter::matchFlags() const

Returns the semantics of the value matching criterion

See also setMatchFlags().

void QContactDetailFilter::setDetailType(QContactDetail::DetailType type, int field = -1)

Sets the type of detail which will be matched to type, and the field of the detail which will contain the value criterion to field.

If type is QContactDetail::TypeUndefined, the detail filter will match no contacts. If field is not specified, or equal to -1, the detail filter acts like a "detail exists" filter; if any detail of the specified type is present in a contact, that contact will match the filter, regardless of what values might be stored in that detail.

See also detailType() and detailField().

void QContactDetailFilter::setMatchFlags(QContactFilter::MatchFlags flags)

Sets the semantics of the value matching criterion to those defined in flags

See also matchFlags().

void QContactDetailFilter::setValue(const QVariant & value)

Sets the value criterion of the filter to value. If the field criterion (set via setDetailType()) of the filter is not specified or equal to -1, this value will be ignored. Note that certain backends might perform backend specific sanitization of value for those detail types that are supported by them. If the provided value cannot be sanitized, the filter is considered invalid.

See also value() and setDetailType().

QVariant QContactDetailFilter::value() const

Returns the value criterion of the detail filter

See also setValue().