Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QMessageFilter Class Reference

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

    #include <QMessageFilter>

This class is under development and is subject to change.


Public Functions

QMessageFilter ()
QMessageFilter ( const QMessageFilter & other )
virtual ~QMessageFilter ()
bool isEmpty () const
bool isSupported () const
QMessageDataComparator::Options options () const
void setOptions ( QMessageDataComparator::Options options )
QMessageFilter operator& ( const QMessageFilter & other ) const
const QMessageFilter & operator&= ( const QMessageFilter & other )
QMessageFilter operator| ( const QMessageFilter & other ) const
const QMessageFilter & operator|= ( const QMessageFilter & other )
QMessageFilter operator~ () const

Static Public Members

QMessageFilter byAncestorFolderIds ( const QMessageFolderId & id, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byAncestorFolderIds ( const QMessageFolderFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byId ( const QMessageId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byId ( const QMessageIdList & ids, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byId ( const QMessageFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byParentAccountId ( const QMessageAccountId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byParentAccountId ( const QMessageAccountFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byParentFolderId ( const QMessageFolderId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byParentFolderId ( const QMessageFolderFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byPriority ( QMessage::Priority value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byReceptionTimeStamp ( const QDateTime & value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byReceptionTimeStamp ( const QDateTime & value, QMessageDataComparator::RelationComparator cmp )
QMessageFilter byRecipients ( const QString & value, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter bySender ( const QString & value, QMessageDataComparator::EqualityComparator cmp )
QMessageFilter bySender ( const QString & value, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter bySize ( int value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter bySize ( int value, QMessageDataComparator::RelationComparator cmp )
QMessageFilter byStandardFolder ( QMessage::StandardFolder folder, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byStatus ( QMessage::Status value, QMessageDataComparator::EqualityComparator cmp )
QMessageFilter byStatus ( QMessage::StatusFlags mask, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter bySubject ( const QString & value, QMessageDataComparator::EqualityComparator cmp )
QMessageFilter bySubject ( const QString & value, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )
QMessageFilter byTimeStamp ( const QDateTime & value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byTimeStamp ( const QDateTime & value, QMessageDataComparator::RelationComparator cmp )
QMessageFilter byType ( QMessage::Type type, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )
QMessageFilter byType ( QMessage::TypeFlags type, QMessageDataComparator::InclusionComparator cmp )

Detailed Description

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

A QMessageFilter is composed of a message property, an optional comparison operator and a comparison value. The QMessageFilter class is used in conjunction with the QMessageStore::queryMessages(), QMessageStore::countMessages(), QMessageServiceAction::queryMessages(), and QMessageServiceAction::countMessages() functions to filter results which meet the criteria defined by the filter.

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

For example:

To create a query for all messages sent from "joe@user.com" with subject "meeting":

    QMessageFilter subjectFilter(QMessageFilter::bySubject("meeting"));
    QMessageFilter senderFilter(QMessageFilter::bySender("joe@user.com"));
    QMessageIdList results = QMessageStore::instance()->queryMessages(subjectFilter & senderFilter);

See also QMessageStore and QMessage.


Member Function Documentation

QMessageFilter::QMessageFilter ()

Creates a QMessageFilter without specifying matching parameters.

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

See also isEmpty().

QMessageFilter::QMessageFilter ( const QMessageFilter & other )

Constructs a copy of other.

QMessageFilter::~QMessageFilter ()   [virtual]

Destroys the filter.

QMessageFilter QMessageFilter::byAncestorFolderIds ( const QMessageFolderId & id, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )   [static]

Returns a filter matching messages whose ancestor folders' identifiers contain id, according to cmp.

See also QMessage::parentFolderId().

QMessageFilter QMessageFilter::byAncestorFolderIds ( const QMessageFolderFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )   [static]

Returns a filter matching messages whose ancestor folders' identifiers contain a member of the set yielded by filter, according to cmp.

See also QMessage::parentFolderId().

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

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

See also QMessage::id().

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

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

See also QMessage::id().

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

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

See also QMessage::id().

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

Returns a filter matching messages whose parent account's identifier matches id, according to cmp.

See also QMessage::parentAccountId().

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

Returns a filter matching messages whose parent account's identifier is a member of the set yielded by filter, according to cmp.

See also QMessage::parentAccountId().

QMessageFilter QMessageFilter::byParentFolderId ( const QMessageFolderId & id, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose parent folder's identifier matches id, according to cmp.

See also QMessage::parentFolderId().

QMessageFilter QMessageFilter::byParentFolderId ( const QMessageFolderFilter & filter, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )   [static]

Returns a filter matching messages whose parent folder's identifier is a member of the set yielded by filter, according to cmp.

See also QMessage::parentFolderId().

QMessageFilter QMessageFilter::byPriority ( QMessage::Priority value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose priority matches value, according to cmp.

See also QMessage::priority().

QMessageFilter QMessageFilter::byReceptionTimeStamp ( const QDateTime & value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose reception timestamp matches value, according to cmp.

See also QMessage::receivedDate().

QMessageFilter QMessageFilter::byReceptionTimeStamp ( const QDateTime & value, QMessageDataComparator::RelationComparator cmp )   [static]

Returns a filter matching messages whose reception timestamp has the relation to value that is specified by cmp.

See also QMessage::receivedDate().

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

Returns a filter matching messages whose recipients include the substring value, according to cmp.

See also QMessage::to(), QMessage::cc(), and QMessage::bcc().

QMessageFilter QMessageFilter::bySender ( const QString & value, QMessageDataComparator::EqualityComparator cmp )   [static]

Returns a filter matching messages whose sender matches value, according to cmp.

See also QMessage::from().

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

Returns a filter matching messages whose sender matches the substring value, according to cmp.

See also QMessage::from().

QMessageFilter QMessageFilter::bySize ( int value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose size matches value, according to cmp.

See also QMessage::size().

QMessageFilter QMessageFilter::bySize ( int value, QMessageDataComparator::RelationComparator cmp )   [static]

Returns a filter matching messages whose size matches value, according to cmp.

See also QMessage::size().

QMessageFilter QMessageFilter::byStandardFolder ( QMessage::StandardFolder folder, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose standard folder location matches folder, according to cmp.

See also QMessage::parentAccountId().

QMessageFilter QMessageFilter::byStatus ( QMessage::Status value, QMessageDataComparator::EqualityComparator cmp )   [static]

Returns a filter matching messages whose status matches value, according to cmp.

See also QMessage::status().

QMessageFilter QMessageFilter::byStatus ( QMessage::StatusFlags mask, QMessageDataComparator::InclusionComparator cmp = QMessageDataComparator::Includes )   [static]

Returns a filter matching messages whose status is a bitwise match to mask, according to cmp.

See also QMessage::status().

QMessageFilter QMessageFilter::bySubject ( const QString & value, QMessageDataComparator::EqualityComparator cmp )   [static]

Returns a filter matching messages whose subject matches value, according to cmp.

See also QMessage::subject().

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

Returns a filter matching messages whose subject matches the substring value, according to cmp.

See also QMessage::subject().

QMessageFilter QMessageFilter::byTimeStamp ( const QDateTime & value, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose timestamp matches value, according to cmp.

See also QMessage::date().

QMessageFilter QMessageFilter::byTimeStamp ( const QDateTime & value, QMessageDataComparator::RelationComparator cmp )   [static]

Returns a filter matching messages whose timestamp has the relation to value that is specified by cmp.

See also QMessage::date().

QMessageFilter QMessageFilter::byType ( QMessage::Type type, QMessageDataComparator::EqualityComparator cmp = QMessageDataComparator::Equal )   [static]

Returns a filter matching messages whose type matches type, according to cmp.

See also QMessage::type().

QMessageFilter QMessageFilter::byType ( QMessage::TypeFlags type, QMessageDataComparator::InclusionComparator cmp )   [static]

Returns a filter matching accounts whose type is a bitwise match to type, according to cmp.

See also QMessage::type().

bool QMessageFilter::isEmpty () const

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

An empty filter matches all messages.

The result of combining an empty filter with a non-empty filter is the original non-empty filter. This is true regardless of whether the combination is formed by an AND or an OR operation.

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

bool QMessageFilter::isSupported () const

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

QMessageDataComparator::Options QMessageFilter::options () const

Return the options for the search filter.

Default is no options set.

See also setOptions().

void QMessageFilter::setOptions ( QMessageDataComparator::Options options )

Set the options for the search filter to options.

See also options().

QMessageFilter QMessageFilter::operator& ( const QMessageFilter & other ) const

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

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

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

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

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

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

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

QMessageFilter QMessageFilter::operator~ () const

Returns a filter that is the logical NOT of the value of this filter (ignoring any options() 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.

See also isEmpty().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  4. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  5. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  6. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.0-tp
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web