messagelist
sortorder.cpp
Go to the documentation of this file.
38 QList< QPair< QString, int > > SortOrder::enumerateMessageSortingOptions( Aggregation::Threading t )
41 ret.append( QPair< QString, int >( i18n( "None (Storage Order)" ), SortOrder::NoMessageSorting ) );
42 ret.append( QPair< QString, int >( i18n( "By Date/Time" ), SortOrder::SortMessagesByDateTime ) );
44 ret.append( QPair< QString, int >( i18n( "By Date/Time of Most Recent in Subtree" ), SortOrder::SortMessagesByDateTimeOfMostRecent ) );
47 ret.append( QPair< QString, int >( i18n( "By Smart Sender/Receiver" ), SortOrder::SortMessagesBySenderOrReceiver ) );
50 ret.append( QPair< QString, int >( i18n( "By Action Item Status" ), SortOrder::SortMessagesByActionItemStatus ) );
51 ret.append( QPair< QString, int >( i18n( "By Unread Status" ), SortOrder::SortMessagesByUnreadStatus ) );
52 ret.append( QPair< QString, int >( i18n( "By Important Status" ), SortOrder::SortMessagesByImportantStatus ) );
53 ret.append( QPair< QString, int >( i18n( "By Attachment Status" ), SortOrder::SortMessagesByAttachmentStatus ) );
57 QList< QPair< QString, int > > SortOrder::enumerateMessageSortDirectionOptions( MessageSorting ms )
73 ret.append( QPair< QString, int >( i18nc( "Sort order for messages", "Ascending" ), SortOrder::Ascending ) );
74 ret.append( QPair< QString, int >( i18nc( "Sort order for messages", "Descending" ), SortOrder::Descending ) );
79 QList< QPair< QString, int > > SortOrder::enumerateGroupSortingOptions( Aggregation::Grouping g )
87 ret.append( QPair< QString, int >( i18n( "None (Storage Order)" ), SortOrder::NoGroupSorting ) );
88 ret.append( QPair< QString, int >( i18n( "by Date/Time of Most Recent Message in Group" ), SortOrder::SortGroupsByDateTimeOfMostRecent ) );
92 ret.append( QPair< QString, int >( i18n( "by Sender/Receiver" ), SortOrder::SortGroupsBySenderOrReceiver ) );
101 QList< QPair< QString, int > > SortOrder::enumerateGroupSortDirectionOptions( Aggregation::Grouping g,
114 ret.append( QPair< QString, int >( i18nc( "Sort order for mail groups", "Ascending" ), SortOrder::Ascending ) );
115 ret.append( QPair< QString, int >( i18nc( "Sort order for mail groups", "Descending" ), SortOrder::Descending ) );
144 bool messageSortDirectionOk = optionListHasOption( messageSortDirections, mMessageSortDirection,
173 messageSortDirectionOk = optionListHasOption( messageSortDirections, oldSortOrder.messageSortDirection(),
Sort the messages by date and time of the most recent message in subtree.
Definition: sortorder.h:82
A class which holds information about sorting, e.g.
Definition: sortorder.h:37
Sort the messages by subject.
Definition: sortorder.h:86
A set of aggregation options that can be applied to the MessageList::Model in a single shot...
Definition: aggregation.h:43
static bool optionListHasOption(const OptionList &optionList, int optionValue, int defaultOptionValue)
Definition: sortorder.cpp:121
Sort groups by date/time of the group.
Definition: sortorder.h:54
static bool isValidMessageSorting(SortOrder::MessageSorting ms)
Returns true if the ms parameter specifies a valid MessageSorting option.
Definition: sortorder.cpp:267
Perform no threading at all.
Definition: aggregation.h:85
void setGroupSortDirection(SortDirection groupSortDirection)
Sets the SortDirection for the groups.
Definition: sortorder.h:121
Group the messages by the date of the thread leader.
Definition: aggregation.h:55
Sort groups by receiver (makes sense only with GroupByReceiver)
Definition: sortorder.h:58
MESSAGELIST_EXPORT QString groupSortingConfigName()
Definition: messagelistutil.cpp:41
Use smart (thread leader) date ranges ("Today","Yesterday","Last Week"...)
Definition: aggregation.h:56
MESSAGELIST_EXPORT QString messageSortingConfigName()
Definition: messagelistutil.cpp:31
SortDirection
The "generic" sort direction: used for groups and for messages If you add values here please look at ...
Definition: sortorder.h:67
Sort the messages by receiver.
Definition: sortorder.h:85
void writeConfig(KConfigGroup &conf, const QString &storageId, bool storageUsesPrivateSortOrder) const
Writes the sort order to a config group.
Definition: sortorder.cpp:244
Don't sort the groups at all, add them as they come in.
Definition: sortorder.h:53
static QList< QPair< QString, int > > enumerateMessageSortDirectionOptions(MessageSorting ms)
Enumerates the available message sorting directions for the specified MessageSorting option...
Definition: sortorder.cpp:57
void append(const T &value)
MessageSorting messageSorting() const
Returns the current message sorting option.
Definition: sortorder.h:127
Group by receiver, always.
Definition: aggregation.h:59
SortDirection messageSortDirection() const
Returns the current message SortDirection.
Definition: sortorder.h:139
const char * constData() const
MESSAGELIST_EXPORT QString groupSortDirectionConfigName()
Definition: messagelistutil.cpp:46
static QList< QPair< QString, int > > enumerateGroupSortDirectionOptions(Aggregation::Grouping g, GroupSorting groupSorting)
Enumerates the group sort direction options compatible with the specified Grouping and GroupSorting...
Definition: sortorder.cpp:101
MESSAGELIST_EXPORT QString messageSortDirectionConfigName()
Definition: messagelistutil.cpp:36
Sort the messages by sender.
Definition: sortorder.h:84
Sort groups by sender (makes sense only with GroupBySender)
Definition: sortorder.h:57
static SortOrder defaultForAggregation(const Aggregation *aggregation, const SortOrder &oldSortOrder)
Returns the default sort order for the given aggregation.
Definition: sortorder.cpp:155
void readConfig(KConfigGroup &conf, const QString &storageId, bool *storageUsesPrivateSortOrder)
Reads the sort order from a config group.
Definition: sortorder.cpp:231
Don't sort the messages at all.
Definition: sortorder.h:80
void setMessageSortDirection(SortDirection messageSortDirection)
Sets the SortDirection for the message.
Definition: sortorder.h:146
GroupSorting
How to sort the groups If you add values here please look at the implementations of the enumerate* fu...
Definition: sortorder.h:51
QByteArray toLatin1() const
Sort the messages by sender or receiver.
Definition: sortorder.h:83
static QList< QPair< QString, int > > enumerateMessageSortingOptions(Aggregation::Threading t)
Enumerates the message sorting options compatible with the specified Threading setting.
Definition: sortorder.cpp:38
Sort groups by sender or receiver (makes sense only with GroupBySenderOrReceiver) ...
Definition: sortorder.h:56
Sort the messages by the "Unread" flags of status.
Definition: sortorder.h:89
Sort the messages by size.
Definition: sortorder.h:87
Sort the messages by date and time.
Definition: sortorder.h:81
void setMessageSorting(MessageSorting ms)
Sets the current message sorting option.
Definition: sortorder.h:133
Group by sender (incoming) or receiver (outgoing) field.
Definition: aggregation.h:57
Sort the messages by the "Action Item" flag of status.
Definition: sortorder.h:88
bool validForAggregation(const Aggregation *aggregation) const
Checks if this sort order can be used in combination with the given aggregation.
Definition: sortorder.cpp:134
Sort groups by date/time of the most recent message.
Definition: sortorder.h:55
Sort the messages By "Important" flags of status.
Definition: sortorder.h:91
static QList< QPair< QString, int > > enumerateGroupSortingOptions(Aggregation::Grouping g)
Enumerates the group sorting options compatible with the specified Grouping.
Definition: sortorder.cpp:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.