messagelist
#include <model_p.h>
|
| ModelPrivate (Model *owner) |
|
void | addMessageToSubjectBasedThreadingCache (MessageItem *mi) |
|
bool | applyFilterToSubtree (Item *item, const QModelIndex &parentIndex) |
|
void | attachGroup (GroupHeaderItem *ghi) |
|
void | attachMessageToGroupHeader (MessageItem *mi) |
|
void | attachMessageToParent (Item *pParent, MessageItem *mi) |
|
void | checkIfDateChanged () |
|
void | clear () |
|
void | clearJobList () |
|
void | clearOrphanChildrenHash () |
|
void | clearThreadingCacheMessageSubjectMD5ToMessageItem () |
|
void | clearUnassignedMessageLists () |
|
void | fillView () |
|
MessageItem * | findMessageParent (MessageItem *mi) |
|
MessageItem * | guessMessageParent (MessageItem *mi) |
|
bool | handleItemPropertyChanges (int propertyChangeMask, Item *parent, Item *item) |
|
void | messageDetachedUpdateParentProperties (Item *oldParent, MessageItem *mi) |
|
void | propagateItemPropertiesToParent (Item *item) |
|
void | removeMessageFromSubjectBasedThreadingCache (MessageItem *mi) |
|
void | saveExpandedStateOfSubtree (Item *root) |
|
void | slotApplyFilter () |
|
void | slotStorageModelDataChanged (const QModelIndex &fromIndex, const QModelIndex &toIndex) |
|
void | slotStorageModelHeaderDataChanged (Qt::Orientation orientation, int first, int last) |
|
void | slotStorageModelLayoutChanged () |
|
void | slotStorageModelRowsInserted (const QModelIndex &parent, int from, int to) |
|
void | slotStorageModelRowsRemoved (const QModelIndex &parent, int from, int to) |
|
void | syncExpandedStateOfSubtree (Item *root) |
|
void | viewItemJobStep () |
|
ViewItemJobResult | viewItemJobStepInternal () |
|
ViewItemJobResult | viewItemJobStepInternalForJob (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass1Cleanup (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass1Fill (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass1Update (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass2 (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass3 (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass4 (ViewItemJob *job, const QTime &tStart) |
|
ViewItemJobResult | viewItemJobStepInternalForJobPass5 (ViewItemJob *job, const QTime &tStart) |
|
Definition at line 33 of file model_p.h.
Enumerator |
---|
DateChanged |
|
MaxDateChanged |
|
ActionItemStatusChanged |
|
UnreadStatusChanged |
|
ImportantStatusChanged |
|
Definition at line 113 of file model_p.h.
Enumerator |
---|
ViewItemJobCompleted |
|
ViewItemJobInterrupted |
|
Definition at line 69 of file model_p.h.
MessageList::Core::ModelPrivate::ModelPrivate |
( |
Model * |
owner | ) |
|
|
inline |
void ModelPrivate::addMessageToSubjectBasedThreadingCache |
( |
MessageItem * |
mi | ) |
|
bool ModelPrivate::applyFilterToSubtree |
( |
Item * |
item, |
|
|
const QModelIndex & |
parentIndex |
|
) |
| |
Recursively applies the current filter to the tree originating at the specified item.
The item is hidden if the filter doesn't match (the item or any children of it) and this function returns false. If the filter matches somewhere in the subtree then the item isn't hidden and this function returns true.
Assumes that the specified item is viewable.
Definition at line 377 of file model.cpp.
void ModelPrivate::attachMessageToGroupHeader |
( |
MessageItem * |
mi | ) |
|
void ModelPrivate::attachMessageToParent |
( |
Item * |
pParent, |
|
|
MessageItem * |
mi |
|
) |
| |
void ModelPrivate::checkIfDateChanged |
( |
| ) |
|
This is called by MessageList::Manager once in a while.
It is a good place to check if the date has changed and trigger a view reload.
Definition at line 871 of file model.cpp.
void ModelPrivate::clear |
( |
| ) |
|
void ModelPrivate::clearJobList |
( |
| ) |
|
void ModelPrivate::clearOrphanChildrenHash |
( |
| ) |
|
void ModelPrivate::clearThreadingCacheMessageSubjectMD5ToMessageItem |
( |
| ) |
|
void ModelPrivate::clearUnassignedMessageLists |
( |
| ) |
|
void MessageList::Core::ModelPrivate::fillView |
( |
| ) |
|
Attempt to find the threading parent for the specified message item.
Sets the message threading status to the appropriate value.
This function performs In-Reply-To and References threading.
Definition at line 1376 of file model.cpp.
Attempt to find the threading parent for the specified message item.
Sets the message threading status to the appropriate value.
This function performs Subject based threading.
Definition at line 1603 of file model.cpp.
bool ModelPrivate::handleItemPropertyChanges |
( |
int |
propertyChangeMask, |
|
|
Item * |
parent, |
|
|
Item * |
item |
|
) |
| |
Handle the specified property changes in item.
Depending on the item position inside the parent and the types of item and parent the item might need re-grouping or re-sorting. This function takes care of that. It is meant to be called from somewhere inside viewItemJobStepInternal() as it postpones group updates to Pass5.
parent and item must not be null. propertyChangeMask should not be zero.
Return true if parent might be affected by the item property changes and false otherwise.
Definition at line 1715 of file model.cpp.
void ModelPrivate::messageDetachedUpdateParentProperties |
( |
Item * |
oldParent, |
|
|
MessageItem * |
mi |
|
) |
| |
void ModelPrivate::propagateItemPropertiesToParent |
( |
Item * |
item | ) |
|
This one checks if the parent of item requires an update due to the properties of item (that might have been changed or the item might have been simply added to the parent).
The properties are propagated up to the root item. As optimization we ASSUME that the item->parent() exists (is non 0) and is NOT the root item. Be sure to check it before calling this function (it will assert in debug mode anyway). ... ah... and don't be afraid: this is NOT (directly) recursive :)
Definition at line 1942 of file model.cpp.
void ModelPrivate::removeMessageFromSubjectBasedThreadingCache |
( |
MessageItem * |
mi | ) |
|
void ModelPrivate::saveExpandedStateOfSubtree |
( |
Item * |
root | ) |
|
Save the expanded state of the subtree with the specified root.
The state will be saved in the initialExpandStatus() variable. For optimization purposes the specified root is assumed to be expanded and viewable.
Definition at line 1162 of file model.cpp.
void ModelPrivate::slotApplyFilter |
( |
| ) |
|
void ModelPrivate::slotStorageModelDataChanged |
( |
const QModelIndex & |
fromIndex, |
|
|
const QModelIndex & |
toIndex |
|
) |
| |
void ModelPrivate::slotStorageModelHeaderDataChanged |
( |
Qt::Orientation |
orientation, |
|
|
int |
first, |
|
|
int |
last |
|
) |
| |
void ModelPrivate::slotStorageModelLayoutChanged |
( |
| ) |
|
void ModelPrivate::slotStorageModelRowsInserted |
( |
const QModelIndex & |
parent, |
|
|
int |
from, |
|
|
int |
to |
|
) |
| |
void ModelPrivate::slotStorageModelRowsRemoved |
( |
const QModelIndex & |
parent, |
|
|
int |
from, |
|
|
int |
to |
|
) |
| |
void ModelPrivate::syncExpandedStateOfSubtree |
( |
Item * |
root | ) |
|
Sync the expanded state of the subtree with the specified root.
This will cause the items that are marked with Item::ExpandNeeded to be expanded also in the view. For optimization purposes the specified root is assumed to be marked as Item::ExpandNeeded so be sure to check it before calling this function.
Definition at line 1184 of file model.cpp.
void ModelPrivate::viewItemJobStep |
( |
| ) |
|
const Aggregation* MessageList::Core::ModelPrivate::mAggregation |
The currently set aggregation mode: shallow pointer set by Widget.
Definition at line 182 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedFiveWeeksAgoLabel |
The label for the "Five Weeks Ago" group item, cached, so we don't translate it multiple times.
Definition at line 342 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedFourWeeksAgoLabel |
The label for the "Four Weeks Ago" group item, cached, so we don't translate it multiple times.
Definition at line 337 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedLastWeekLabel |
The label for the "Last Week" group item, cached, so we don't translate it multiple times.
Definition at line 322 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedThreeWeeksAgoLabel |
The label for the "Three Weeks Ago" group item, cached, so we don't translate it multiple times.
Definition at line 332 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedTodayLabel |
The label for the "Today" group item, cached, so we don't translate it multiple times.
Definition at line 307 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedTwoWeeksAgoLabel |
The label for the "Two Weeks Ago" group item, cached, so we don't translate it multiple times.
Definition at line 327 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedUnknownLabel |
The label for the "Unknown" group item, cached, so we don't translate it multiple times.
Definition at line 317 of file model_p.h.
qint32 MessageList::Core::ModelPrivate::mCachedWatchedOrIgnoredStatusBits |
Cached bits that we use for fast status checks.
Definition at line 347 of file model_p.h.
QString MessageList::Core::ModelPrivate::mCachedYesterdayLabel |
The label for the "Yesterday" group item, cached, so we don't translate it multiple times.
Definition at line 312 of file model_p.h.
Item* MessageList::Core::ModelPrivate::mCurrentItemToRestoreAfterViewItemJobStep |
We need to save the current item before each job step.
This is because our job may cause items to be reparented (thus removed and readded with the current Qt API) and QTreeView will loose the current setting. We also use this to force the current to a specific item after a cleanup job.
Definition at line 361 of file model_p.h.
QTimer MessageList::Core::ModelPrivate::mFillStepTimer |
The timer involved in breaking the "fill" operation in steps.
Definition at line 202 of file model_p.h.
const Filter* MessageList::Core::ModelPrivate::mFilter |
The filter to apply on messages.
Shallow. Never 0.
Definition at line 197 of file model_p.h.
QHash< QString, GroupHeaderItem * > MessageList::Core::ModelPrivate::mGroupHeaderItemHash |
Group Key (usually the label) -> GroupHeaderItem, used to quickly find groups, pointers are shallow copies.
Definition at line 207 of file model_p.h.
List of group headers that either need to be re-sorted or must be removed because empty.
Definition at line 230 of file model_p.h.
bool MessageList::Core::ModelPrivate::mInLengthyJobBatch |
Flag signaling a possibly long job batch.
This is checked by other classes and used to display some kind of "please wait" feedback to the user.
Definition at line 353 of file model_p.h.
MessageItem* MessageList::Core::ModelPrivate::mLastSelectedMessageInFolder |
The id of the preselected ;essage is "translated" to a message pointer when it's fetched from the storage.
This message is then selected when it becomes viewable (so at the end of the job). 0 if we have no message to select.
See also setStorageModel() and abortMessagePreSelection()
Definition at line 395 of file model_p.h.
bool MessageList::Core::ModelPrivate::mLoading |
Set to true in the first large loading job.
Reset to false when the job finishes.
Please note that this is NOT set for later jobs: only for the first (possibly huge) one.
Definition at line 369 of file model_p.h.
Model* MessageList::Core::ModelPrivate::mModelForItemFunctions |
This pointer is passed to the Item functions that insert children.
When we work with disconnected UI this pointer becomes 0.
Definition at line 415 of file model_p.h.
MessageItem* MessageList::Core::ModelPrivate::mNewestItem |
MessageItem* MessageList::Core::ModelPrivate::mOldestItem |
Hash of orphan children used in Pass1Cleanup.
Definition at line 250 of file model_p.h.
The "persistent message item sets" are (guess what?) sets of messages that can be referenced globally via a persistent id.
The MessageItemSetManager and this class keep the persistent sets coherent: messages that are deleted are automatically removed from all the sets.
Users of this class typically create persistent sets when they start an asynchronous job and they query them back on the way or when the job is terminated.
So mPersistentSetManager is in fact the manager for the outstanding "user" jobs. 0 if no jobs are pending (so there are no persistent sets at the moment).
Definition at line 409 of file model_p.h.
Pre-selection is the action of automatically selecting a message just after the folder has finished loading.
We may want to select the message that was selected the last time this folder has been open, or we may want to select the first unread message. We also may want to do no pre-selection at all (for example, when the user starts navigating the view before the pre-selection could actually be made and pre-selecting would confuse him). This member holds the option.
See also setStorageModel() and abortMessagePreSelection()
Definition at line 381 of file model_p.h.
int MessageList::Core::ModelPrivate::mRecursionCounterForReset |
counter to avoid infinite recursions in the setStorageModel() function
Definition at line 172 of file model_p.h.
Item* MessageList::Core::ModelPrivate::mRootItem |
Owned invisible root item, useful to implement algorithms that not need to handle the special case of parentless items.
This is never 0.
Definition at line 267 of file model_p.h.
const SortOrder* MessageList::Core::ModelPrivate::mSortOrder |
The currently used sort order.
Pointer not owned by us, but by the Widget.
Definition at line 192 of file model_p.h.
StorageModel* MessageList::Core::ModelPrivate::mStorageModel |
The currently set storage model: shallow pointer.
Definition at line 177 of file model_p.h.
bool MessageList::Core::ModelPrivate::mStorageModelContainsOutboundMessages |
const Theme* MessageList::Core::ModelPrivate::mTheme |
The currently used theme: shallow pointer.
Definition at line 187 of file model_p.h.
QHash< QByteArray, MessageItem * > MessageList::Core::ModelPrivate::mThreadingCacheMessageIdMD5ToMessageItem |
Threading cache.
MessageIdMD5 -> MessageItem, pointers are shallow copies
Definition at line 213 of file model_p.h.
QMultiHash< QByteArray, MessageItem * > MessageList::Core::ModelPrivate::mThreadingCacheMessageInReplyToIdMD5ToMessageItem |
Threading cache.
MessageInReplyToIdMD5 -> MessageItem, pointers are shallow copies
Definition at line 219 of file model_p.h.
QHash< QByteArray, QList< MessageItem * > * > MessageList::Core::ModelPrivate::mThreadingCacheMessageSubjectMD5ToMessageItem |
QDate MessageList::Core::ModelPrivate::mTodayDate |
The today's date.
Set when the StorageModel is set and thus grouping is performed. This is used to put the today's messages in the "Today" group, for instance.
Definition at line 261 of file model_p.h.
QList< MessageItem * > MessageList::Core::ModelPrivate::mUnassignedMessageListForPass2 |
List of unassigned messages, used to handle threading in two passes, pointers are owned!
Definition at line 235 of file model_p.h.
QList< MessageItem * > MessageList::Core::ModelPrivate::mUnassignedMessageListForPass3 |
List of unassigned messages, used to handle threading in two passes, pointers are owned!
Definition at line 240 of file model_p.h.
QList< MessageItem * > MessageList::Core::ModelPrivate::mUnassignedMessageListForPass4 |
List of unassigned messages, used to handle threading in two passes, pointers are owned!
Definition at line 245 of file model_p.h.
View* MessageList::Core::ModelPrivate::mView |
The view we're attacched to.
Shallow pointer (the View owns us).
Definition at line 272 of file model_p.h.
QList< ViewItemJob * > MessageList::Core::ModelPrivate::mViewItemJobs |
Pending fill view jobs, pointers are owned.
Definition at line 255 of file model_p.h.
int MessageList::Core::ModelPrivate::mViewItemJobStepChunkTimeout |
The timeout for a single ViewItemJob step.
Definition at line 283 of file model_p.h.
int MessageList::Core::ModelPrivate::mViewItemJobStepIdleInterval |
The idle time between two ViewItemJob steps.
Definition at line 288 of file model_p.h.
int MessageList::Core::ModelPrivate::mViewItemJobStepMessageCheckCount |
The number of messages we process at once in a ViewItemJob step without checking the timeouts above.
Definition at line 294 of file model_p.h.
time_t MessageList::Core::ModelPrivate::mViewItemJobStepStartTime |
The time at the current ViewItemJob step started.
Used to compute the time we spent inside this step and eventually jump out on timeout.
Definition at line 278 of file model_p.h.
Model* const MessageList::Core::ModelPrivate::q |
The documentation for this class was generated from the following files:
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.