• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messagelist

  • MessageList
  • Core
  • SortOrder
Public Types | Public Member Functions | Static Public Member Functions | List of all members
MessageList::Core::SortOrder Class Reference

#include <sortorder.h>

Public Types

enum  GroupSorting {
  NoGroupSorting, SortGroupsByDateTime, SortGroupsByDateTimeOfMostRecent, SortGroupsBySenderOrReceiver,
  SortGroupsBySender, SortGroupsByReceiver
}
 
enum  MessageSorting {
  NoMessageSorting, SortMessagesByDateTime, SortMessagesByDateTimeOfMostRecent, SortMessagesBySenderOrReceiver,
  SortMessagesBySender, SortMessagesByReceiver, SortMessagesBySubject, SortMessagesBySize,
  SortMessagesByActionItemStatus, SortMessagesByUnreadStatus, SortMessagesByImportantStatus
}
 
enum  SortDirection { Ascending, Descending }
 

Public Member Functions

 SortOrder ()
 
SortDirection groupSortDirection () const
 
GroupSorting groupSorting () const
 
SortDirection messageSortDirection () const
 
MessageSorting messageSorting () const
 
void readConfig (KConfigGroup &conf, const QString &storageId, bool *storageUsesPrivateSortOrder)
 
void setGroupSortDirection (SortDirection groupSortDirection)
 
void setGroupSorting (GroupSorting gs)
 
void setMessageSortDirection (SortDirection messageSortDirection)
 
void setMessageSorting (MessageSorting ms)
 
bool validForAggregation (const Aggregation *aggregation) const
 
void writeConfig (KConfigGroup &conf, const QString &storageId, bool storageUsesPrivateSortOrder) const
 

Static Public Member Functions

static SortOrder defaultForAggregation (const Aggregation *aggregation, const SortOrder &oldSortOrder)
 
static QList< QPair< QString,
int > > 
enumerateGroupSortDirectionOptions (Aggregation::Grouping g, GroupSorting groupSorting)
 
static QList< QPair< QString,
int > > 
enumerateGroupSortingOptions (Aggregation::Grouping g)
 
static QList< QPair< QString,
int > > 
enumerateMessageSortDirectionOptions (MessageSorting ms)
 
static QList< QPair< QString,
int > > 
enumerateMessageSortingOptions (Aggregation::Threading t)
 
static bool isValidMessageSorting (SortOrder::MessageSorting ms)
 

Detailed Description

A class which holds information about sorting, e.g.

the sorting and sort direction of messages and groups.

Definition at line 37 of file sortorder.h.

Member Enumeration Documentation

enum MessageList::Core::SortOrder::GroupSorting

How to sort the groups If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.

Enumerator
NoGroupSorting 

Don't sort the groups at all, add them as they come in.

SortGroupsByDateTime 

Sort groups by date/time of the group.

SortGroupsByDateTimeOfMostRecent 

Sort groups by date/time of the most recent message.

SortGroupsBySenderOrReceiver 

Sort groups by sender or receiver (makes sense only with GroupBySenderOrReceiver)

SortGroupsBySender 

Sort groups by sender (makes sense only with GroupBySender)

SortGroupsByReceiver 

Sort groups by receiver (makes sense only with GroupByReceiver)

Definition at line 51 of file sortorder.h.

enum MessageList::Core::SortOrder::MessageSorting

The available message sorting options.

If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.

Enumerator
NoMessageSorting 

Don't sort the messages at all.

SortMessagesByDateTime 

Sort the messages by date and time.

SortMessagesByDateTimeOfMostRecent 

Sort the messages by date and time of the most recent message in subtree.

SortMessagesBySenderOrReceiver 

Sort the messages by sender or receiver.

SortMessagesBySender 

Sort the messages by sender.

SortMessagesByReceiver 

Sort the messages by receiver.

SortMessagesBySubject 

Sort the messages by subject.

SortMessagesBySize 

Sort the messages by size.

SortMessagesByActionItemStatus 

Sort the messages by the "Action Item" flag of status.

SortMessagesByUnreadStatus 

Sort the messages by the "Unread" flags of status.

SortMessagesByImportantStatus 

Sort the messages By "Important" flags of status.

Definition at line 78 of file sortorder.h.

enum MessageList::Core::SortOrder::SortDirection

The "generic" sort direction: used for groups and for messages If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.

Enumerator
Ascending 
Descending 

Definition at line 67 of file sortorder.h.

Constructor & Destructor Documentation

SortOrder::SortOrder ( )
explicit

Definition at line 30 of file sortorder.cpp.

Member Function Documentation

SortOrder SortOrder::defaultForAggregation ( const Aggregation *  aggregation,
const SortOrder &  oldSortOrder 
)
static

Returns the default sort order for the given aggregation.

Parameters
oldSortOrderthe previously used sort order. If possible, the new sort order will be based on that old sort order, i.e. the message sorting and message sort direction is adopted.

Definition at line 154 of file sortorder.cpp.

QList< QPair< QString, int > > SortOrder::enumerateGroupSortDirectionOptions ( Aggregation::Grouping  g,
GroupSorting  groupSorting 
)
static

Enumerates the group sort direction options compatible with the specified Grouping and GroupSorting.

The returned descriptors are pairs in that the first item is the localized description of the option value and the second item is the integer option value itself. If the returned list is empty then the value of the option is meaningless in the current context.

Definition at line 100 of file sortorder.cpp.

QList< QPair< QString, int > > SortOrder::enumerateGroupSortingOptions ( Aggregation::Grouping  g)
static

Enumerates the group sorting options compatible with the specified Grouping.

The returned descriptors are pairs in that the first item is the localized description of the option value and the second item is the integer option value itself. If the returned list is empty then the value of the option is meaningless in the current context.

Definition at line 78 of file sortorder.cpp.

QList< QPair< QString, int > > SortOrder::enumerateMessageSortDirectionOptions ( MessageSorting  ms)
static

Enumerates the available message sorting directions for the specified MessageSorting option.

The returned descriptors are pairs in that the first item is the localized description of the option value and the second item is the integer option value itself. If the returned list is empty then the value of the option is meaningless in the current context.

Definition at line 56 of file sortorder.cpp.

QList< QPair< QString, int > > SortOrder::enumerateMessageSortingOptions ( Aggregation::Threading  t)
static

Enumerates the message sorting options compatible with the specified Threading setting.

The returned descriptors are pairs in that the first item is the localized description of the option value and the second item is the integer option value itself.

Definition at line 38 of file sortorder.cpp.

SortDirection MessageList::Core::SortOrder::groupSortDirection ( ) const
inline

Returns the current group SortDirection.

Definition at line 113 of file sortorder.h.

GroupSorting MessageList::Core::SortOrder::groupSorting ( ) const
inline

Returns the GroupSorting.

Definition at line 99 of file sortorder.h.

bool SortOrder::isValidMessageSorting ( SortOrder::MessageSorting  ms)
static

Returns true if the ms parameter specifies a valid MessageSorting option.

Definition at line 266 of file sortorder.cpp.

SortDirection MessageList::Core::SortOrder::messageSortDirection ( ) const
inline

Returns the current message SortDirection.

Definition at line 138 of file sortorder.h.

MessageSorting MessageList::Core::SortOrder::messageSorting ( ) const
inline

Returns the current message sorting option.

Definition at line 126 of file sortorder.h.

void SortOrder::readConfig ( KConfigGroup &  conf,
const QString &  storageId,
bool *  storageUsesPrivateSortOrder 
)

Reads the sort order from a config group.

Parameters
storageIdthe id of the folder, which is prepended to each key. This way, more than one sort order can be saved in the same config group
storageUsesPrivateSortOrderthis boolean will be true if the sort order is private for that folder, and false if the sort order is the global sort order.

Definition at line 230 of file sortorder.cpp.

void MessageList::Core::SortOrder::setGroupSortDirection ( SortDirection  groupSortDirection)
inline

Sets the SortDirection for the groups.

Note that this option has no meaning if group sorting is set to NoGroupSorting.

Definition at line 120 of file sortorder.h.

void MessageList::Core::SortOrder::setGroupSorting ( GroupSorting  gs)
inline

Sets the GroupSorting option.

This may not have any effect, depending on the Aggregation this sort order is used in.

Definition at line 107 of file sortorder.h.

void MessageList::Core::SortOrder::setMessageSortDirection ( SortDirection  messageSortDirection)
inline

Sets the SortDirection for the message.

Note that this option has no meaning if message sorting is set to NoMessageSorting.

Definition at line 145 of file sortorder.h.

void MessageList::Core::SortOrder::setMessageSorting ( MessageSorting  ms)
inline

Sets the current message sorting option.

Definition at line 132 of file sortorder.h.

bool SortOrder::validForAggregation ( const Aggregation *  aggregation) const

Checks if this sort order can be used in combination with the given aggregation.

Some combinations are not valid, for example the message sorting "most recent in subtree" with a non-threaded aggregation.

Definition at line 133 of file sortorder.cpp.

void SortOrder::writeConfig ( KConfigGroup &  conf,
const QString &  storageId,
bool  storageUsesPrivateSortOrder 
) const

Writes the sort order to a config group.

Parameters
storageUsesPrivateSortOrderif false, this sort order will be saved as the global sort order.
See also
readConfig

Definition at line 243 of file sortorder.cpp.


The documentation for this class was generated from the following files:
  • sortorder.h
  • sortorder.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal