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

QMailAccountSortKey Class Reference
[QtMessagingModule, QtPimModule]

The QMailAccountSortKey class defines the parameters used for sorting a subset of queried accounts from the store. More...

    #include <QMailAccountSortKey>

This class is under development and is subject to change.

Public Types

Public Functions


Detailed Description

The QMailAccountSortKey class defines the parameters used for sorting a subset of queried accounts from the store.

A QMailAccountSortKey is composed of an account property to sort and a sort order. The QMailAccountSortKey class is used in conjunction with the QMailStore::query() function to sort account results according to the criteria defined by the sort key.

For example: To create a query for all accounts sorted by the name in ascending order:

    QMailAccountSortKey sortNameKey(QMailAccountSortKey::Name,Qt::Ascending);
    QMailAccountIdList results = QMailStore::instance()->query(sortNameKey);

See also QMailStore.


Member Type Documentation

enum QMailAccountSortKey::Property

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

ConstantValueDescription
QMailAccountSortKey::Id0The ID of the account.
QMailAccountSortKey::Name1The name of the account.
QMailAccountSortKey::MessageType2The type of messages handled by the account.
QMailAccountSortKey::EmailAddress3The email address that is tied to the account.


Member Function Documentation

QMailAccountSortKey::QMailAccountSortKey ()

Create a QMailAccountSortKey with specifying matching parameters.

A default-constructed key (one for which isEmpty() returns true) sorts no folders.

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.

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

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

QMailAccountSortKey::QMailAccountSortKey ( const QMailAccountSortKey & other )

Create a copy of the QMailAccountSortKey other.

QMailAccountSortKey::~QMailAccountSortKey ()   [virtual]

Destroys this QMailAccountSortKey.

bool QMailAccountSortKey::isEmpty () const

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

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

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

QMailAccountSortKey QMailAccountSortKey::operator& ( const QMailAccountSortKey & other ) const

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

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

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

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

Assign the value of the QMailAccountSortKey other to this.

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

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