Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMailMessageSortKey class defines the parameters used for sorting a subset of queried messages from the mail store. More...
#include <QMailMessageSortKey>
This class is under development and is subject to change.
The QMailMessageSortKey class defines the parameters used for sorting a subset of queried messages from the mail store.
A QMailMessageSortKey is composed of a message property to sort and a sort order. The QMailMessageSortKey class is used in conjunction with the QMailStore::queryMessages() function to sort message results according to the criteria defined by the sort key.
For example: To create a query for all messages sorted by their timestamp in decending order:
QMailMessageSortKey sortArrivalTimeKey(QMailMessageSortKey::TimeStamp,Qt::DescendingOrder); QMailIdList results = QMailStore::instance()->queryMessages(QMailMessageKey(),sortArrivalTimeKey);
See also QMailStore and QMailMessageKey.
This enum type describes the sortable data properties of a QMailFolder.
Constant | Value | Description |
---|---|---|
QMailMessageSortKey::Id | 0 | The ID of the message. |
QMailMessageSortKey::Type | 1 | The type of the message. |
QMailMessageSortKey::ParentFolderId | 2 | The parent folder ID this message is contained in. |
QMailMessageSortKey::Sender | 3 | The message sender address string. |
QMailMessageSortKey::Recipients | 4 | The message recipient address string. |
QMailMessageSortKey::Subject | 5 | The message subject string. |
QMailMessageSortKey::TimeStamp | 6 | The message timestamp |
QMailMessageSortKey::Status | 7 | The message status flags. |
QMailMessageSortKey::FromMailbox | 8 | The imap mailbox the message was downloaded from. |
QMailMessageSortKey::ServerUid | 9 | The IMAP server UID of the message. |
QMailMessageSortKey::ParentAccountId | 11 | The ID of the account the mesasge was downloaded from. |
QMailMessageSortKey::Size | 10 | The size of the message. |
QMailMessageSortKey::ContentType | 12 | The type of data contained within the message. |
QMailMessageSortKey::PreviousParentFolderId | 13 | The parent folder ID this message was contained in, prior to moving to the current parent folder. |
Create a QMailMessageSortKey with specifying matching parameters.
A default-constructed key (one for which isEmpty() returns true) sorts no messages.
The result of combining an empty key with a non-empty key is the same as the original non-empty key.
The result of combining two empty keys is an empty key.
Construct a QMailMessageSortKey which sorts a set of results based on the QMailMessageSortKey::Property p and the Qt::SortOrder order
Create a copy of the QMailMessageSortKey other.
Destroys this QMailMessageSortKey.
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 QMailMessageSortKey other to this.
Returns true if the value of this key is the same as the key other. Returns false otherwise.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |