Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QMailMessageSortKey Class Reference
[QtMessagingModule, QtPimModule]

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.

Public Types

Public Functions


Detailed Description

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.


Member Type Documentation

enum QMailMessageSortKey::Property

This enum type describes the sortable data properties of a QMailFolder.

ConstantValueDescription
QMailMessageSortKey::Id0The ID of the message.
QMailMessageSortKey::Type1The type of the message.
QMailMessageSortKey::ParentFolderId2The parent folder ID this message is contained in.
QMailMessageSortKey::Sender3The message sender address string.
QMailMessageSortKey::Recipients4The message recipient address string.
QMailMessageSortKey::Subject5The message subject string.
QMailMessageSortKey::TimeStamp6The message timestamp
QMailMessageSortKey::Status7The message status flags.
QMailMessageSortKey::FromMailbox8The imap mailbox the message was downloaded from.
QMailMessageSortKey::ServerUid9The IMAP server UID of the message.
QMailMessageSortKey::ParentAccountId11The ID of the account the mesasge was downloaded from.
QMailMessageSortKey::Size10The size of the message.
QMailMessageSortKey::ContentType12The type of data contained within the message.
QMailMessageSortKey::PreviousParentFolderId13The parent folder ID this message was contained in, prior to moving to the current parent folder.


Member Function Documentation

QMailMessageSortKey::QMailMessageSortKey ()

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.

QMailMessageSortKey::QMailMessageSortKey ( Property p, Qt::SortOrder order = Qt::AscendingOrder )

Construct a QMailMessageSortKey which sorts a set of results based on the QMailMessageSortKey::Property p and the Qt::SortOrder order

QMailMessageSortKey::QMailMessageSortKey ( const QMailMessageSortKey & other )

Create a copy of the QMailMessageSortKey other.

QMailMessageSortKey::~QMailMessageSortKey ()   [virtual]

Destroys this QMailMessageSortKey.

bool QMailMessageSortKey::isEmpty () const

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

bool QMailMessageSortKey::operator!= ( const QMailMessageSortKey & other ) const

Returns true if the value of this key is not the same as the key other. Returns false otherwise.

QMailMessageSortKey QMailMessageSortKey::operator& ( const QMailMessageSortKey & other ) const

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

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

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

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

Assign the value of the QMailMessageSortKey other to this.

bool QMailMessageSortKey::operator== ( const QMailMessageSortKey & other ) const

Returns true if the value of this key is the same as the key other. Returns false otherwise.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3