MessageList::Core::Aggregation

MessageList::Core::Aggregation Class Reference

#include <aggregation.h>

Inheritance diagram for MessageList::Core::Aggregation:

Public Types

enum  FillViewStrategy { FavorInteractivity, FavorSpeed, BatchNoInteractivity }
 
enum  GroupExpandPolicy { NeverExpandGroups, ExpandRecentGroups, AlwaysExpandGroups }
 
enum  Grouping {
  NoGrouping, GroupByDate, GroupByDateRange, GroupBySenderOrReceiver,
  GroupBySender, GroupByReceiver
}
 
enum  ThreadExpandPolicy {
  NeverExpandThreads, ExpandThreadsWithNewMessages, ExpandThreadsWithUnreadMessages, AlwaysExpandThreads,
  ExpandThreadsWithUnreadOrImportantMessages
}
 
enum  Threading { NoThreading, PerfectOnly, PerfectAndReferences, PerfectReferencesAndSubject }
 
enum  ThreadLeader { TopmostMessage, MostRecentMessage }
 

Public Member Functions

 Aggregation (const Aggregation &opt)
 
 Aggregation (const QString &name, const QString &description, Grouping grouping, GroupExpandPolicy groupExpandPolicy, Threading threading, ThreadLeader threadLeader, ThreadExpandPolicy threadExpandPolicy, FillViewStrategy fillViewStrategy, bool readOnly)
 
FillViewStrategy fillViewStrategy () const
 
GroupExpandPolicy groupExpandPolicy () const
 
Grouping grouping () const
 
bool load (QDataStream &stream) override
 
void save (QDataStream &stream) const override
 
void setFillViewStrategy (FillViewStrategy fillViewStrategy)
 
void setGroupExpandPolicy (GroupExpandPolicy groupExpandPolicy)
 
void setGrouping (Grouping g)
 
void setThreadExpandPolicy (ThreadExpandPolicy threadExpandPolicy)
 
void setThreading (Threading t)
 
void setThreadLeader (ThreadLeader tl)
 
ThreadExpandPolicy threadExpandPolicy () const
 
Threading threading () const
 
ThreadLeader threadLeader () const
 
- Public Member Functions inherited from MessageList::Core::OptionSet
 OptionSet (const OptionSet &src)
 
 OptionSet (const QString &name, const QString &description, bool readOnly=false)
 
const QStringdescription () const
 
void generateUniqueId ()
 
const QStringid () const
 
bool loadFromString (const QString &data)
 
const QStringname () const
 
bool readOnly () const
 
QString saveToString () const
 
void setDescription (const QString &description)
 
void setName (const QString &name)
 
void setReadOnly (bool b)
 

Static Public Member Functions

static bool compareName (Aggregation *agg1, Aggregation *agg2)
 
static QVector< QPair< QString, int > > enumerateFillViewStrategyOptions ()
 
static QVector< QPair< QString, int > > enumerateGroupExpandPolicyOptions (Grouping g)
 
static QVector< QPair< QString, int > > enumerateGroupingOptions ()
 
static QVector< QPair< QString, int > > enumerateThreadExpandPolicyOptions (Threading t)
 
static QVector< QPair< QString, int > > enumerateThreadingOptions ()
 
static QVector< QPair< QString, int > > enumerateThreadLeaderOptions (Grouping g, Threading t)
 

Additional Inherited Members

- Protected Attributes inherited from MessageList::Core::OptionSet
QString mDescription
 
QString mId
 
QString mName
 
bool mReadOnly
 

Detailed Description

A set of aggregation options that can be applied to the MessageList::Model in a single shot.

The set defines the behaviours related to the population of the model, threading of messages and grouping.

Definition at line 27 of file aggregation.h.

Member Enumeration Documentation

The available fill view strategies.

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

Enumerator
FavorInteractivity 

Do small chunks of work, small intervals between chunks to allow for UI event processing.

FavorSpeed 

Do larger chunks of work, zero intervals between chunks.

BatchNoInteractivity 

Do one large chunk, no interactivity at all.

Definition at line 103 of file aggregation.h.

The available group expand policies.

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

Enumerator
NeverExpandGroups 

Never expand groups during a view fill algorithm.

ExpandRecentGroups 

Makes sense only with GroupByDate or GroupByDateRange.

AlwaysExpandGroups 

All groups are expanded as they are inserted.

Definition at line 53 of file aggregation.h.

Message grouping.

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

Enumerator
NoGrouping 

Don't group messages at all.

GroupByDate 

Group the messages by the date of the thread leader.

GroupByDateRange 

Use smart (thread leader) date ranges ("Today","Yesterday","Last Week"...)

GroupBySenderOrReceiver 

Group by sender (incoming) or receiver (outgoing) field.

GroupBySender 

Group by sender, always.

GroupByReceiver 

Group by receiver, always.

Definition at line 36 of file aggregation.h.

The available thread expand policies.

Meaningless when threading is set to NoThreading. If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.

Enumerator
NeverExpandThreads 

Never expand any thread, this is fast.

ExpandThreadsWithNewMessages 

DEPRECATED. New message status no longer exists.

ExpandThreadsWithUnreadMessages 

Expand threads with unread messages (this includes new)

AlwaysExpandThreads 

Expand all threads (this might be very slow)

ExpandThreadsWithUnreadOrImportantMessages 

Expand threads with "hot" messages (this includes new, unread, important, todo)

Definition at line 89 of file aggregation.h.

The available threading methods.

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

Enumerator
NoThreading 

Perform no threading at all.

PerfectOnly 

Thread by "In-Reply-To" field only.

PerfectAndReferences 

Thread by "In-Reply-To" and "References" fields.

PerfectReferencesAndSubject 

Thread by all of the above and try to match subjects too.

Definition at line 65 of file aggregation.h.

The available thread leading options.

Meaningless when threading is set to NoThreading. If you add values here please look at the implementations of the enumerate* functions and add appropriate descriptors.

Enumerator
TopmostMessage 

The thread grouping is computed from the topmost message (very similar to least recent, but might be different if timezones or machine clocks are screwed)

MostRecentMessage 

The thread grouping is computed from the most recent message.

Definition at line 78 of file aggregation.h.

Member Function Documentation

QVector< QPair< QString, int > > Aggregation::enumerateFillViewStrategyOptions ( )
static

Enumerates the fill view strategies.

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 263 of file aggregation.cpp.

QVector< QPair< QString, int > > Aggregation::enumerateGroupExpandPolicyOptions ( Grouping  g)
static

Enumerates the group sort direction 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 199 of file aggregation.cpp.

QVector< QPair< QString, int > > Aggregation::enumerateGroupingOptions ( )
static

Enumerates the available grouping options as a QList of 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 177 of file aggregation.cpp.

QVector< QPair< QString, int > > Aggregation::enumerateThreadExpandPolicyOptions ( Threading  t)
static

Enumerates the thread expand policies compatible with the specified Threading 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 243 of file aggregation.cpp.

QVector< QPair< QString, int > > Aggregation::enumerateThreadingOptions ( )
static

Enumerates the available threading method options.

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 213 of file aggregation.cpp.

QVector< QPair< QString, int > > Aggregation::enumerateThreadLeaderOptions ( Grouping  g,
Threading  t 
)
static

Enumerates the thread leader determination methods compatible with the specified Threading and the specified Grouping options.

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 229 of file aggregation.cpp.

FillViewStrategy MessageList::Core::Aggregation::fillViewStrategy ( ) const
inline

Returns the current fill view strategy.

Definition at line 253 of file aggregation.h.

GroupExpandPolicy MessageList::Core::Aggregation::groupExpandPolicy ( ) const
inline

Returns the current GroupExpandPolicy.

Definition at line 152 of file aggregation.h.

Aggregation::Grouping Aggregation::grouping ( ) const

Returns the currently set Grouping option.

Definition at line 31 of file aggregation.cpp.

bool Aggregation::load ( QDataStream stream)
overridevirtual

Pure virtual reimplemented from OptionSet.

Implements MessageList::Core::OptionSet.

Definition at line 59 of file aggregation.cpp.

void Aggregation::save ( QDataStream stream) const
overridevirtual

Pure virtual reimplemented from OptionSet.

Implements MessageList::Core::OptionSet.

Definition at line 162 of file aggregation.cpp.

void MessageList::Core::Aggregation::setFillViewStrategy ( FillViewStrategy  fillViewStrategy)
inline

Sets the current fill view strategy.

Definition at line 261 of file aggregation.h.

void MessageList::Core::Aggregation::setGroupExpandPolicy ( GroupExpandPolicy  groupExpandPolicy)
inline

Sets the GroupExpandPolicy for the groups.

Note that this option has no meaning if grouping is set to NoGrouping.

Definition at line 161 of file aggregation.h.

void MessageList::Core::Aggregation::setGrouping ( Grouping  g)
inline

Sets the Grouping option.

Definition at line 137 of file aggregation.h.

void MessageList::Core::Aggregation::setThreadExpandPolicy ( ThreadExpandPolicy  threadExpandPolicy)
inline

Sets the current thread expand policy.

Please note that when Threading is set to NoThreading this value is meaningless and by policy should be set to NeverExpandThreads.

Definition at line 237 of file aggregation.h.

void MessageList::Core::Aggregation::setThreading ( Threading  t)
inline

Sets the threading method option.

Definition at line 185 of file aggregation.h.

void MessageList::Core::Aggregation::setThreadLeader ( ThreadLeader  tl)
inline

Sets the current thread leader determination method.

Please note that when Threading is set to NoThreading this value is meaningless and by policy should be set to TopmostMessage.

Definition at line 210 of file aggregation.h.

ThreadExpandPolicy MessageList::Core::Aggregation::threadExpandPolicy ( ) const
inline

Returns the current thread expand policy.

Definition at line 227 of file aggregation.h.

Threading MessageList::Core::Aggregation::threading ( ) const
inline

Returns the current threading method.

Definition at line 177 of file aggregation.h.

ThreadLeader MessageList::Core::Aggregation::threadLeader ( ) const
inline

Returns the current thread leader determination method.

Definition at line 200 of file aggregation.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 28 2020 23:14:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.