Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMailAccountKey class defines the parameters used for querying a subset of all available accounts from the mail store. More...
#include <QMailAccountKey>
This class is under development and is subject to change.
The QMailAccountKey class defines the parameters used for querying a subset of all available accounts from the mail store.
A QMailAccountKey is composed of an account property, an optional comparison operator and a comparison value. The QMailAccountKey class is used in conjunction with the QMailStore::queryAccounts() and QMailStore::countAccounts() functions to filter results which meet the criteria defined by the key.
QMailAccountKey's can be combined using the logical operators (&), (|) and (~) to build more sophisticated queries.
For example:
To create a query for all email accounts:
QMailAccountKey emailKey(QMailAccountKey::MessageType, QMailMessage::Email); QMailAccountIdList results = QMailStore::instance()->queryAccounts(emailKey);
To query all accounts handling SMS or MMS messages:
QMailAccountKey mmsAccount(QMailAccountKey::MessageType, QMailMessage::Mms); QMailAccountKey smsAccount(QMailAccountKey::MessageType, QMailMessage::Sms); QMailAccountIdList results = QMailStore::instance()->queryAccounts(mmsAccount | smsAccount);
See also QMailStore and QMailAccount.
This enum type describes the queryable data properties of a QMailAccount.
Constant | Value | Description |
---|---|---|
QMailAccountKey::Id | 0 | The ID of the account. |
QMailAccountKey::Name | 1 | The name of the account. |
QMailAccountKey::MessageType | 2 | The type of messages handled by the account. |
QMailAccountKey::EmailAddress | 3 | The email address associated with this account. |
Create a QMailAccountKey with specifying matching parameters.
A default-constructed key (one for which isEmpty() returns true) matches all accounts. The logical negation of an empty key also matches all accounts.
The result of combining an empty key with a non-empty key is the same as the original non-empty key. This is true regardless of whether the combination is formed by a logical AND or a logical OR operation.
The result of combining two empty keys is an empty key.
Construct a QMailAccountKey which defines a query parameter where QMailAccount::Property p is compared using comparison operator c with a value value.
Construct a QMailAccountKey which defines a query parameter where folder id's matching those in ids are returned.
Create a copy of the QMailAccountKey other.
Destroys this QMailAccountKey.
Reads the contents of a QMailAccountKey from stream.
Returns true if the key remains empty after default construction; otherwise returns false.
See also isNonMatching().
Returns true if the key is a non-matching key; otherwise returns false.
See also isEmpty().
Returns a key that does not match any accounts (unlike an empty key).
See also isNonMatching() and isEmpty().
Writes the contents of a QMailAccountKey to a stream.
Returns the QVariant representation of this QMailAccountKey.
Returns true if the value of this key is not the same as the key other. Returns false otherwise.
Returns a key that is the logical AND of this key and the value of key other.
Performs a logical AND with this key and the key other and assigns the result to this key.
Assign the value of the QMailAccountKey other to this.
Returns true if the value of this key is the same as the key other. Returns false otherwise.
Returns a key that is the logical OR of this key and the value of key other.
Performs a logical OR with this key and the key other and assigns the result to this key.
Returns a key that is the logical NOT of the value of this key.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |