QtMobility Reference Documentation

QMessageAccountFilter Class Reference

The QMessageAccountFilter class defines the parameters used for querying a subset of all available accounts from the messaging store. More...

 #include <QMessageAccountFilter>

This class was introduced in Qt Mobility 1.0.

Public Functions

QMessageAccountFilter ()
QMessageAccountFilter ( const QMessageAccountFilter & other )
virtual ~QMessageAccountFilter ()
bool isEmpty () const
bool isSupported () const
QMessageDataComparator::MatchFlags matchFlags () const
void setMatchFlags ( QMessageDataComparator::MatchFlags matchFlags )
QMessageAccountFilter operator& ( const QMessageAccountFilter & other ) const
const QMessageAccountFilter & operator&= ( const QMessageAccountFilter & other )
QMessageAccountFilter operator| ( const QMessageAccountFilter & other ) const
const QMessageAccountFilter & operator|= ( const QMessageAccountFilter & other )
QMessageAccountFilter operator~ () const

Static Public Members

QMessageAccountFilter byId ( const QMessageAccountId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageAccountFilter byId ( const QMessageAccountIdList & ids, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageAccountFilter byId ( const QMessageAccountFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageAccountFilter byName ( const QString & pattern, QMessageDataComparator::LikeComparator cmp )
QMessageAccountFilter byName ( const QString & value, QMessageDataComparator::EqualityComparator cmp )
QMessageAccountFilter byName ( const QString & value, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )

Detailed Description

The QMessageAccountFilter class defines the parameters used for querying a subset of all available accounts from the messaging store.

A QMessageAccountFilter is composed of an account property, an optional comparison operator and a comparison value. The QMessageAccountFilter class is used in conjunction with the QMessageManager::queryAccounts() and QMessageManager::countAccounts() functions to filter results which meet the criteria defined by the filter.

QMessageAccountFilters can be combined using the overloaded operators (&), (|) and (~) as logical operators to create more refined queries.

Evaluation of filters is delayed until they are used in a QMessageManager function such as queryAccounts, except where explicitly documented otherwise.

See also QMessageManager and QMessageAccount.

Member Function Documentation

QMessageAccountFilter::QMessageAccountFilter ()

Creates a QMessageAccountFilter without specifying matching parameters.

A default-constructed filter (one for which isEmpty() returns true) matches all accounts.

See also isEmpty().

QMessageAccountFilter::QMessageAccountFilter ( const QMessageAccountFilter & other )

Constructs a copy of other.

This function was introduced in Qt Mobility 1.0.

QMessageAccountFilter::~QMessageAccountFilter () [virtual]

Destroys the filter.

QMessageAccountFilter QMessageAccountFilter::byId ( const QMessageAccountId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal ) [static]

Returns a filter matching accounts whose identifier matches id, according to cmp.

This function was introduced in Qt Mobility 1.0.

See also QMessageAccount::id().

QMessageAccountFilter QMessageAccountFilter::byId ( const QMessageAccountIdList & ids, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes ) [static]

Returns a filter matching accounts whose identifier is a member of ids, according to cmp.

This function was introduced in Qt Mobility 1.0.

See also QMessageAccount::id().

QMessageAccountFilter QMessageAccountFilter::byId ( const QMessageAccountFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes ) [static]

Returns a filter matching accounts whose identifier is a member of the set yielded by filter, according to cmp.

This function was introduced in Qt Mobility 1.0.

See also QMessageAccount::id().

QMessageAccountFilter QMessageAccountFilter::byName ( const QString & pattern, QMessageDataComparator::LikeComparator cmp ) [static]

Returns a filter matching accounts who name matches pattern, according to cmp.

This filter is evaluated when it is constructed.

This function was introduced in Qt Mobility 1.2.

See also QMessageAccount::name().

QMessageAccountFilter QMessageAccountFilter::byName ( const QString & value, QMessageDataComparator::EqualityComparator cmp ) [static]

Returns a filter matching accounts whose name matches value, according to cmp.

Not supported on Linux, Harmattan and Meego.com (use InclusionComparator).

This function was introduced in Qt Mobility 1.0.

See also QMessageAccount::name().

QMessageAccountFilter QMessageAccountFilter::byName ( const QString & value, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes ) [static]

Returns a filter matching accounts whose name matches the substring value, according to cmp.

This function was introduced in Qt Mobility 1.0.

See also QMessageAccount::name().

bool QMessageAccountFilter::isEmpty () const

Returns true if the filter remains empty after default construction; otherwise returns false.

An empty filter matches all accounts.

The result of combining an empty filter with a non-empty filter using an AND operation is the original non-empty filter.

The result of combining an empty filter with a non-empty filter using an OR operation is the empty filter.

The result of combining two empty filters is an empty filter.

This function was introduced in Qt Mobility 1.0.

bool QMessageAccountFilter::isSupported () const

Returns true if the filter is supported on the current platform; otherwise returns false.

This function was introduced in Qt Mobility 1.0.

QMessageDataComparator::MatchFlags QMessageAccountFilter::matchFlags () const

Return the match flags for the search filter.

Default is no match flags set.

This function was introduced in Qt Mobility 1.0.

See also setMatchFlags().

void QMessageAccountFilter::setMatchFlags ( QMessageDataComparator::MatchFlags matchFlags )

Set the match flags for the search filter to matchFlags.

This function was introduced in Qt Mobility 1.0.

See also matchFlags().

QMessageAccountFilter QMessageAccountFilter::operator& ( const QMessageAccountFilter & other ) const

Returns a filter that is the logical AND of this filter and the value of filter other.

This function was introduced in Qt Mobility 1.0.

const QMessageAccountFilter & QMessageAccountFilter::operator&= ( const QMessageAccountFilter & other )

Performs a logical AND with this filter and the filter other and assigns the result to this filter.

This function was introduced in Qt Mobility 1.0.

QMessageAccountFilter QMessageAccountFilter::operator| ( const QMessageAccountFilter & other ) const

Returns a filter that is the logical OR of this filter and the value of filter other.

This function was introduced in Qt Mobility 1.0.

const QMessageAccountFilter & QMessageAccountFilter::operator|= ( const QMessageAccountFilter & other )

Performs a logical OR with this filter and the filter other and assigns the result to this filter.

This function was introduced in Qt Mobility 1.0.

QMessageAccountFilter QMessageAccountFilter::operator~ () const

Returns a filter that is the logical NOT of the value of this filter (ignoring any matchFlags() set on the filter).

If this filter is empty, the result will be a non-matching filter; if this filter is non-matching, the result will be an empty filter.

This function was introduced in Qt Mobility 1.0.

See also isEmpty().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.