QtMobility Reference Documentation

QMessageSortOrder Class Reference

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

 #include <QMessageSortOrder>

This class was introduced in Qt Mobility 1.0.

Public Functions

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

Static Public Members

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

Detailed Description

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

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

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

 QMessageSortOrder sortOrder(QMessageSortOrder::byTimeStamp(Qt::DescendingOrder));
 QMessageIdList results = QMessageManager().queryMessages(QMessageFilter(), sortOrder);

See also QMessageManager and QMessageFilter.

Member Function Documentation

QMessageSortOrder::QMessageSortOrder ()

Create a QMessageSortOrder with specifying matching parameters.

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

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

The result of combining two empty sort orders is an empty sort order.

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

QMessageSortOrder::QMessageSortOrder ( const QMessageSortOrder & other )

Constructs a copy of other.

This function was introduced in Qt Mobility 1.0.

QMessageSortOrder::~QMessageSortOrder () [virtual]

Destroys the sort order.

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

Returns a sort order that sorts messages by their priority, according to order.

This function was introduced in Qt Mobility 1.0.

See also QMessage::priority().

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

Returns a sort order that sorts messages by their reception timestamp, according to order.

This function was introduced in Qt Mobility 1.0.

See also QMessage::receivedDate().

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

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

Not supported on the Windows mobile and desktop platforms.

This function was introduced in Qt Mobility 1.0.

See also QMessage::to().

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

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

Not supported on the Windows mobile and desktop platforms.

This function was introduced in Qt Mobility 1.0.

See also QMessage::from().

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

Returns a sort order that sorts messages by their size, according to order.

Not supported on the Windows mobile platform.

This function was introduced in Qt Mobility 1.0.

See also QMessage::size().

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

Returns a sort order that sorts messages by their status value flag, according to order.

This function was introduced in Qt Mobility 1.0.

See also QMessage::status().

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

Returns a sort order that sorts messages by their subject, according to order.

This function was introduced in Qt Mobility 1.0.

See also QMessage::subject().

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

Returns a sort order that sorts messages by their origination timestamp, according to order.

Not supported on the Windows mobile platform.

This function was introduced in Qt Mobility 1.0.

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

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

Returns a sort order that sorts messages by their message type, according to order.

This function was introduced in Qt Mobility 1.0.

See also QMessage::type().

bool QMessageSortOrder::isEmpty () const

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

This function was introduced in Qt Mobility 1.0.

bool QMessageSortOrder::isSupported () const

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

This function was introduced in Qt Mobility 1.0.

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

Returns a sort order that which is the result of concatenating the vaue of this sort order and the value of sort order other.

This function determines sorting precedence.

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

This function was introduced in Qt Mobility 1.0.

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

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

This function determines sorting precedence.

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

This function was introduced in Qt Mobility 1.0.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.