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

QMailFolderSortKey Class Reference
[QtMessagingModule, QtPimModule]

The QMailFolderSortKey class defines the parameters used for sorting a subset of queried folders from the mail store. More...

    #include <QMailFolderSortKey>

This class is under development and is subject to change.

Public Types

Public Functions


Detailed Description

The QMailFolderSortKey class defines the parameters used for sorting a subset of queried folders from the mail store.

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

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

    QMailFolderSortKey sortNameKey(QMailFolderSortKey::Name,Qt::Ascending);
    QMailIdList results = QMailStore::instance()->queryFolders(QMailFolderKey(),sortNameKey);

See also QMailStore and QMailFolderKey.


Member Type Documentation

enum QMailFolderSortKey::Property

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

ConstantValueDescription
QMailFolderSortKey::Id0The ID of the folder.
QMailFolderSortKey::Name1The name of the folder in native form.
QMailFolderSortKey::ParentId2The ID of the parent folder for a given folder.
QMailFolderSortKey::ParentAccountId3The ID of the parent account for a given folder.
QMailFolderSortKey::DisplayName4The name of the folder, designed for display to users.
QMailFolderSortKey::Status5The status value of the folder.


Member Function Documentation

QMailFolderSortKey::QMailFolderSortKey ()

Create a QMailFolderSortKey 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.

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

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

QMailFolderSortKey::QMailFolderSortKey ( const QMailFolderSortKey & other )

Create a copy of the QMailFolderSortKey other.

QMailFolderSortKey::~QMailFolderSortKey ()   [virtual]

Destroys this QMailFolderSortKey.

bool QMailFolderSortKey::isEmpty () const

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

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

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

QMailFolderSortKey QMailFolderSortKey::operator& ( const QMailFolderSortKey & other ) const

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

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

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

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

Assign the value of the QMailFolderSortKey other to this.

bool QMailFolderSortKey::operator== ( const QMailFolderSortKey & 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