| Home · All Classes · Grouped Classes · Annotated · Functions | ![]() |
The QMailFolderKey class defines the parameters used for querying a subset of all available mail folders from the mail store. More...
#include <QMailFolderKey>
This class is under development and is subject to change.
The QMailFolderKey class defines the parameters used for querying a subset of all available mail folders from the mail store.
A QMailFolderKey is composed of a folder property, an optional comparison operator and a comparison value. The QMailFolderKey class is used in conjunction with the QMailStore::queryFolders() and QMailStore::countFolders() functions to filter results which meet the criteria defined by the key.
QMailFolderKey's can be combined using the logical operators (&), (|) and (~) to build more sophisticated queries.
For example: To create a query for all folders named "inbox" or "sms"
QMailFolderKey inboxKey(QMailFolderKey::Name,"inbox");
QMailFolderKey smsKey(QMailFolderKey::Name,"sms");
QMailIdList results = QMailStore::instance()->queryFolders(inboxKey | smsKey);
To query all subfolders with name "foo" for a given folder parent:
\\assuming parent has been retrieved from the mail store.
QMailFolder parent;
QMailFolderKey nameKey(QMailFolderKey::Name,"foo");
QMailFolderKey childKey(QMailFolderKey::ParentId,parent.id());
QMailIdList results = QMailStore::instance()->queryFolders(nameKey & childKey);
See also QMailStore and QMailMessageKey.
Defines the comparison operators that can be used to comapare QMailFolder::Property elements with user sepecified values.
| Constant | Value | Description |
|---|---|---|
| QMailFolderKey::LessThan | 0 | represents the '<' operator. |
| QMailFolderKey::LessThanEqual | 1 | represents the '<=' operator. |
| QMailFolderKey::GreaterThan | 2 | represents the '>' operator. |
| QMailFolderKey::GreaterThanEqual | 3 | represents the '>= operator'. |
| QMailFolderKey::Equal | 4 | represents the '=' operator. |
| QMailFolderKey::NotEqual | 5 | represents the '!=' operator. |
| QMailFolderKey::Contains | 6 | represents an operation in which an associated property is checked to see if it contains a provided value. For most property types this will perform a string based check. For Status type properties this will perform a check to see if a status flag bit value is set. |
This enum type describes the queryable data properties of a QMailFolder.
| Constant | Value | Description |
|---|---|---|
| QMailFolderKey::Id | 0 | The ID of the folder. |
| QMailFolderKey::Name | 1 | The name of the folder. |
| QMailFolderKey::ParentId | 2 | the ID of the parent folder for a given folder. |
Create a QMailFolderKey with specifying matching parameters.
A default-constructed key (one for which isEmpty() returns true) matches all folders. The logical negation of an empty key also matches all folders.
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 QMailFolderKey which defines a query parameter where QMailFolder::Property p is compared using comparison operator c with a value value.
Construct a QMailFolderKey which defines a query parameter where folder id's matching those in ids are returned.
Create a copy of the QMailFolderKey other.
Destroys this QMailFolderKey.
Returns true if the key remains empty after default construction; otherwise returns false.
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 QMailFolderKey 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 © 2008 Nokia | Trademarks | Qtopia 4.3.3 |