Home · All Classes · All Functions ·

QMessageOrdering Class Reference

The QMessageOrdering class defines the parameters used for sorting a subset of queried messages from the messaging store. More...

    #include <QMessageOrdering>

This class is under development and is subject to change.


Public Functions

QMessageOrdering ()
QMessageOrdering ( const QMessageOrdering & other )
virtual ~QMessageOrdering ()
bool isEmpty () const
bool isSupported () const
QMessageOrdering operator+ ( const QMessageOrdering & other ) const
QMessageOrdering & operator+= ( const QMessageOrdering & other )

Static Public Members

QMessageOrdering byPriority ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering byReceptionTimeStamp ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering byRecipients ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering bySender ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering bySize ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering byStatus ( QMessage::Status flag, Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering bySubject ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering byTimeStamp ( Qt::SortOrder order = Qt::AscendingOrder )
QMessageOrdering byType ( Qt::SortOrder order = Qt::AscendingOrder )

Detailed Description

The QMessageOrdering class defines the parameters used for sorting a subset of queried messages from the messaging store.

A QMessageOrdering is composed of a message property to sort and a sort order. The QMessageOrdering class is used in conjunction with the QMessageStore::queryMessages() and QMessageServiceAction::queryMessages() functions to sort message results according to the criteria defined by the ordering.

For example: To create a query for all messages sorted by their timestamp in decending order:

    QMessageOrdering ordering(QMessageOrdering::byTimeStamp(Qt::DescendingOrder));
    QMessageIdList results = QMessageStore::instance()->queryMessages(QMessageFilter(), ordering);

See also QMessageStore and QMessageFilter.


Member Function Documentation

QMessageOrdering::QMessageOrdering ()

Create a QMessageOrdering with specifying matching parameters.

A default-constructed ordering (one for which isEmpty() returns true) sorts no messages.

The result of combining an empty ordering with a non-empty ordering is the same as the original non-empty ordering.

The result of combining two empty keys is an empty ordering.

Windows mobile and desktop platforms do not support ordering bySender() and byRecipients(), additionally the Windows mobile platform does not support ordering byTimeStamp() and bySize().

QMessageOrdering::QMessageOrdering ( const QMessageOrdering & other )

Constructs a copy of other.

QMessageOrdering::~QMessageOrdering ()   [virtual]

Destroys the ordering.

QMessageOrdering QMessageOrdering::byPriority ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their priority, according to order.

See also QMessage::priority().

QMessageOrdering QMessageOrdering::byReceptionTimeStamp ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their reception timestamp, according to order.

See also QMessage::receivedDate().

QMessageOrdering QMessageOrdering::byRecipients ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by the addresses to which they were sent, according to order.

Not supported on the Windows mobile and desktop platforms.

See also QMessage::to().

QMessageOrdering QMessageOrdering::bySender ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by the address from which they were sent, according to order.

Not supported on the Windows mobile and desktop platforms.

See also QMessage::from().

QMessageOrdering QMessageOrdering::bySize ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their size, according to order.

Not supported on the Windows mobile platform.

See also QMessage::size().

QMessageOrdering QMessageOrdering::byStatus ( QMessage::Status flag, Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their status value flag, according to order.

See also QMessage::status().

QMessageOrdering QMessageOrdering::bySubject ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their subject, according to order.

See also QMessage::subject().

QMessageOrdering QMessageOrdering::byTimeStamp ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their origination timestamp, according to order.

Not supported on the Windows mobile platform.

See also QMessage::date() and byReceptionTimeStamp().

QMessageOrdering QMessageOrdering::byType ( Qt::SortOrder order = Qt::AscendingOrder )   [static]

Returns an ordering that sorts messages by their message type, according to order.

See also QMessage::type().

bool QMessageOrdering::isEmpty () const

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

bool QMessageOrdering::isSupported () const

Returns true if the ordering is supported on the current platform; otherwise returns false.

QMessageOrdering QMessageOrdering::operator+ ( const QMessageOrdering & other ) const

Returns an ordering that which is the result of concatenating the vaue of this ordering and the value of ordering other.

This function determines sorting precedence.

On the Windows Mobile platform bySubject() and byReceptionTimeStamp() orderings can not be combined with each other.

QMessageOrdering & QMessageOrdering::operator+= ( const QMessageOrdering & other )

Appends the value of the ordering other with the value of this ordering and assigns the result to this ordering.

This function determines sorting precedence.

On the Windows Mobile platform bySubject() and byReceptionTimeStamp() orderings can not be combined with each other.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0 (Technology Preview)