|  | Home |

# QMailThreadSortKey Class Reference

The QMailThreadSortKey class defines the parameters used for sorting a subset of threads from the mail store. More...

        #include <QMailThreadSortKey>

This class is under development and is subject to change.

- List of all members, including inherited members

## Public Types

typedef | ArgumentType
enum | Property { Id, ServerUid }

## Public Functions

| QMailThreadSortKey ()
| QMailThreadSortKey ( const QMailThreadSortKey & other )
virtual | ~QMailThreadSortKey ()
const QList<ArgumentType> & | arguments () const
void | deserialize ( Stream & stream )
bool | isEmpty () const
void | serialize ( Stream & stream ) const
bool | operator!= ( const QMailThreadSortKey & other ) const
QMailThreadSortKey | operator& ( const QMailThreadSortKey & other ) const
QMailThreadSortKey & | operator&= ( const QMailThreadSortKey & other )
QMailThreadSortKey & | operator= ( const QMailThreadSortKey & other )
bool | operator== ( const QMailThreadSortKey & other ) const

## Static Public Members

QMailThreadSortKey | id ( Qt::SortOrder order = Qt::AscendingOrder )
QMailThreadSortKey | serverUid ( Qt::SortOrder order = Qt::AscendingOrder )

## Detailed Description

The QMailThreadSortKey class defines the parameters used for sorting a subset of threads from the mail store.

See also QMailStore and QMailThreadKey.

## Member Type Documentation

### typedef QMailThreadSortKey::ArgumentType

Defines the type used to represent a single sort criterion of a message sort key.

### enum QMailThreadSortKey::Property

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

Constant | Value | Description
--- | --- | ---
`QMailThreadSortKey::Id` | `0` | The ID of the thread.
`QMailThreadSortKey::ServerUid` | `1` | The ServerUid of the thread.

## Member Function Documentation

### QMailThreadSortKey::QMailThreadSortKey ()

Create a QMailThreadSortyKey.

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.

### QMailThreadSortKey::QMailThreadSortKey ( const QMailThreadSortKey & other )

Create a copy of the QMailThreadSortKey other.

### QMailThreadSortKey::~QMailThreadSortKey () `[virtual]`

Destroys this QMailThreadSortKey.

### const QList<ArgumentType> & QMailThreadSortKey::arguments () const

Returns the list of arguments to this QMailThreadSortKey.

### void QMailThreadSortKey::deserialize ( Stream & stream )

Reads the contents of a QMailThreadSortKey from stream.

### QMailThreadSortKey QMailThreadSortKey::id ( Qt::SortOrder order = Qt::AscendingOrder ) `[static]`

Returns a key that sorts threads by their identifiers, according to order.

See also QMailThread::id().

### bool QMailThreadSortKey::isEmpty () const

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

### void QMailThreadSortKey::serialize ( Stream & stream ) const

Writes the contents of a QMailThreadSortKey to a stream.

### QMailThreadSortKey QMailThreadSortKey::serverUid ( Qt::SortOrder order = Qt::AscendingOrder ) `[static]`

Returns a key that sorts threads by their server uid string according to order.

See also QMailThread::serverUid().

### bool QMailThreadSortKey::operator!= ( const QMailThreadSortKey & other ) const

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

### QMailThreadSortKey QMailThreadSortKey::operator& ( const QMailThreadSortKey & other ) const

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

### QMailThreadSortKey & QMailThreadSortKey::operator&= ( const QMailThreadSortKey & other )

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

### QMailThreadSortKey & QMailThreadSortKey::operator= ( const QMailThreadSortKey & other )

Assign the value of the QMailThreadSortKey other to this.

### bool QMailThreadSortKey::operator== ( const QMailThreadSortKey & other ) const

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