![]() |
Home | ![]() |
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.
typedef | ArgumentType |
enum | Property { Id, Name, MessageType, Status, LastSynchronized } |
QMailAccountSortKey () | |
QMailAccountSortKey ( const QMailAccountSortKey & other ) | |
virtual | ~QMailAccountSortKey () |
const QList<ArgumentType> & | arguments () const |
void | deserialize ( Stream & stream ) |
bool | isEmpty () const |
void | serialize ( Stream & stream ) const |
bool | operator!= ( const QMailAccountSortKey & other ) const |
QMailAccountSortKey | operator& ( const QMailAccountSortKey & other ) const |
QMailAccountSortKey & | operator&= ( const QMailAccountSortKey & other ) |
QMailAccountSortKey & | operator= ( const QMailAccountSortKey & other ) |
bool | operator== ( const QMailAccountSortKey & other ) const |
QMailAccountSortKey | id ( Qt::SortOrder order = Qt::AscendingOrder ) |
QMailAccountSortKey | lastSynchronized ( Qt::SortOrder order = Qt::AscendingOrder ) |
QMailAccountSortKey | messageType ( Qt::SortOrder order = Qt::AscendingOrder ) |
QMailAccountSortKey | name ( Qt::SortOrder order = Qt::AscendingOrder ) |
QMailAccountSortKey | status ( quint64 mask, Qt::SortOrder order = Qt::DescendingOrder ) |
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.
Defines the type used to represent a single sort criterion of an account sort key.
This enum type describes the sortable data properties of a QMailFolder.
Constant | Value | Description |
---|---|---|
QMailAccountSortKey::Id | 0 | The ID of the account. |
QMailAccountSortKey::Name | 1 | The name of the account. |
QMailAccountSortKey::MessageType | 2 | The type of messages handled by the account. |
QMailAccountSortKey::Status | 3 | The status value of the account. |
QMailAccountSortKey::LastSynchronized | 4 | The most recent time that a check for new mail in all folders of the account was completed successfully. |
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.
Create a copy of the QMailAccountSortKey other.
Destroys this QMailAccountSortKey.
Returns the list of arguments to this QMailAccountSortKey.
Reads the contents of a QMailAccountSortKey from stream.
Returns a key that sorts accounts by their identifiers, according to order.
See also QMailAccount::id().
Returns true if the key remains empty after default construction; otherwise returns false.
Returns a key that sorts accounts by the message type they handle, according to order.
See also QMailAccount::lastSynchronized().
Returns a key that sorts accounts by the message type they handle, according to order.
See also QMailAccount::messageType().
Returns a key that sorts accounts by their names, according to order.
See also QMailAccount::name().
Writes the contents of a QMailAccountSortKey to a stream.
Returns a key that sorts accounts by comparing their status value bitwise ANDed with mask, according to order.
See also QMailAccount::status().
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 QMailAccountSortKey other to this.
Returns true if the value of this key is the same as the key other. Returns false otherwise.
Copyright © 2010 QtSoftware | Messaging Framework |