messagelist
#include <sortorder.h>
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
How to sort the groups If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.
Definition at line 51 of file sortorder.h.
The available message sorting options.
If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.
Definition at line 78 of file sortorder.h.
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
|
explicit |
Definition at line 30 of file sortorder.cpp.
Member Function Documentation
|
static |
Returns the default sort order for the given aggregation.
- Parameters
-
oldSortOrder the 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.
|
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.
|
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.
|
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.
|
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.
|
inline |
Returns the current group SortDirection.
Definition at line 113 of file sortorder.h.
|
inline |
Returns the GroupSorting.
Definition at line 99 of file sortorder.h.
|
static |
Returns true if the ms parameter specifies a valid MessageSorting option.
Definition at line 266 of file sortorder.cpp.
|
inline |
Returns the current message SortDirection.
Definition at line 138 of file sortorder.h.
|
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
-
storageId the 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 storageUsesPrivateSortOrder this 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.
|
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.
|
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.
|
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.
|
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
-
storageUsesPrivateSortOrder if 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:
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.