MessageList::Core::Aggregation

Search for usage in LXR

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 QList< QPair< QString, int > > enumerateFillViewStrategyOptions ()
 
static QList< QPair< QString, int > > enumerateGroupExpandPolicyOptions (Grouping g)
 
static QList< QPair< QString, int > > enumerateGroupingOptions ()
 
static QList< QPair< QString, int > > enumerateThreadExpandPolicyOptions (Threading t)
 
static QList< QPair< QString, int > > enumerateThreadingOptions ()
 
static QList< QPair< QString, int > > enumerateThreadLeaderOptions (Grouping g, Threading t)
 

Additional Inherited Members

- Protected Member Functions inherited from MessageList::Core::OptionSet
- Protected Attributes inherited from MessageList::Core::OptionSet
QString mDescription
 
QString mId
 
QString mName
 
bool mReadOnly = false
 

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 28 of file aggregation.h.

Member Enumeration Documentation

◆ FillViewStrategy

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 104 of file aggregation.h.

◆ GroupExpandPolicy

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.

◆ Grouping

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.

◆ ThreadExpandPolicy

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 90 of file aggregation.h.

◆ Threading

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.

◆ ThreadLeader

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.

Constructor & Destructor Documentation

◆ Aggregation() [1/2]

Aggregation::Aggregation ( )
explicit

Definition at line 47 of file aggregation.cpp.

◆ Aggregation() [2/2]

Aggregation::Aggregation ( const QString & name,
const QString & description,
Grouping grouping,
GroupExpandPolicy groupExpandPolicy,
Threading threading,
ThreadLeader threadLeader,
ThreadExpandPolicy threadExpandPolicy,
FillViewStrategy fillViewStrategy,
bool readOnly )
explicit

Definition at line 19 of file aggregation.cpp.

Member Function Documentation

◆ compareName()

static bool MessageList::Core::Aggregation::compareName ( Aggregation * agg1,
Aggregation * agg2 )
inlinestaticnodiscard

Definition at line 131 of file aggregation.h.

◆ enumerateFillViewStrategyOptions()

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

◆ enumerateGroupExpandPolicyOptions()

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

◆ enumerateGroupingOptions()

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

◆ enumerateThreadExpandPolicyOptions()

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

◆ enumerateThreadingOptions()

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

◆ enumerateThreadLeaderOptions()

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

◆ fillViewStrategy()

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

Returns the current fill view strategy.

Definition at line 261 of file aggregation.h.

◆ groupExpandPolicy()

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

Returns the current GroupExpandPolicy.

Definition at line 160 of file aggregation.h.

◆ grouping()

Aggregation::Grouping Aggregation::grouping ( ) const
nodiscard

Returns the currently set Grouping option.

Definition at line 38 of file aggregation.cpp.

◆ load()

bool Aggregation::load ( QDataStream & stream)
overridevirtual

Pure virtual reimplemented from OptionSet.

Implements MessageList::Core::OptionSet.

Definition at line 58 of file aggregation.cpp.

◆ save()

void Aggregation::save ( QDataStream & stream) const
overridevirtual

Pure virtual reimplemented from OptionSet.

Implements MessageList::Core::OptionSet.

Definition at line 161 of file aggregation.cpp.

◆ setFillViewStrategy()

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

Sets the current fill view strategy.

Definition at line 269 of file aggregation.h.

◆ setGroupExpandPolicy()

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 169 of file aggregation.h.

◆ setGrouping()

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

Sets the Grouping option.

Definition at line 145 of file aggregation.h.

◆ setThreadExpandPolicy()

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 245 of file aggregation.h.

◆ setThreading()

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

Sets the threading method option.

Definition at line 193 of file aggregation.h.

◆ setThreadLeader()

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 218 of file aggregation.h.

◆ threadExpandPolicy()

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

Returns the current thread expand policy.

Definition at line 235 of file aggregation.h.

◆ threading()

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

Returns the current threading method.

Definition at line 185 of file aggregation.h.

◆ threadLeader()

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

Returns the current thread leader determination method.

Definition at line 208 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-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:53:08 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.