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 |
|
AttachmentStatusChanged |
|
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 1956 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::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 183 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 343 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 338 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 323 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 333 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 308 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 328 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 318 of file model_p.h.
qint32 MessageList::Core::ModelPrivate::mCachedWatchedOrIgnoredStatusBits |
Cached bits that we use for fast status checks.
Definition at line 348 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 313 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 362 of file model_p.h.
QTimer MessageList::Core::ModelPrivate::mFillStepTimer |
The timer involved in breaking the "fill" operation in steps.
Definition at line 203 of file model_p.h.
const Filter* MessageList::Core::ModelPrivate::mFilter |
The filter to apply on messages.
Shallow. Never 0.
Definition at line 198 of file model_p.h.
Group Key (usually the label) -> GroupHeaderItem, used to quickly find groups, pointers are shallow copies.
Definition at line 208 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 231 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 354 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 396 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 370 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 416 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 251 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 410 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 382 of file model_p.h.
int MessageList::Core::ModelPrivate::mRecursionCounterForReset |
counter to avoid infinite recursions in the setStorageModel() function
Definition at line 173 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 268 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 193 of file model_p.h.
StorageModel* MessageList::Core::ModelPrivate::mStorageModel |
The currently set storage model: shallow pointer.
Definition at line 178 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 188 of file model_p.h.
Threading cache.
MessageIdMD5 -> MessageItem, pointers are shallow copies
Definition at line 214 of file model_p.h.
Threading cache.
MessageInReplyToIdMD5 -> MessageItem, pointers are shallow copies
Definition at line 220 of file model_p.h.
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 262 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 236 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 241 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 246 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 273 of file model_p.h.
QList< ViewItemJob * > MessageList::Core::ModelPrivate::mViewItemJobs |
Pending fill view jobs, pointers are owned.
Definition at line 256 of file model_p.h.
int MessageList::Core::ModelPrivate::mViewItemJobStepChunkTimeout |
The timeout for a single ViewItemJob step.
Definition at line 284 of file model_p.h.
int MessageList::Core::ModelPrivate::mViewItemJobStepIdleInterval |
The idle time between two ViewItemJob steps.
Definition at line 289 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 295 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 279 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-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.