MessageList::Core::Item
#include <item.h>

Classes | |
class | ChildItemStats |
Public Types | |
enum | InitialExpandStatus { ExpandNeeded, NoExpandNeeded, ExpandExecuted } |
enum | Type { GroupHeader, Message, InvisibleRoot } |
Protected Member Functions | |
Item (Type type) | |
Item (Type type, ItemPrivate *dd) | |
Protected Attributes | |
ItemPrivate *const | d_ptr |
Detailed Description
A single item of the MessageList tree managed by MessageList::Model.
This class stores basic information needed in all the subclasses which at the moment of writing are MessageItem and GroupHeaderItem.
Member Enumeration Documentation
Specifies the initial expand status for the item that should be applied when it's attached to the viewable tree.
Needed as a workaround for QTreeView limitations in handling item expansion.
Enumerator | |
---|---|
ExpandNeeded |
Must expand when this item becomes viewable. |
NoExpandNeeded |
No expand needed at all. |
ExpandExecuted |
Item already expanded. |
Constructor & Destructor Documentation
|
protected |
|
virtual |
Member Function Documentation
Item * Item::childItem | ( | int | idx | ) | const |
int Item::childItemCount | ( | ) | const |
void Item::childItemStats | ( | ChildItemStats & | stats | ) | const |
Item * Item::deepestItem | ( | ) |
QString Item::displaySenderOrReceiver | ( | ) | const |
void Item::dump | ( | const QString & | prefix | ) |
Item * Item::firstChildItem | ( | ) | const |
const QString & Item::folder | ( | ) | const |
QString Item::formattedDate | ( | ) | const |
QString Item::formattedMaxDate | ( | ) | const |
QString Item::formattedSize | ( | ) | const |
bool Item::hasAncestor | ( | const Item * | it | ) | const |
bool Item::hasChildren | ( | ) | const |
int Item::indexOfChildItem | ( | Item * | item | ) | const |
Item::InitialExpandStatus Item::initialExpandStatus | ( | ) | const |
bool Item::isViewable | ( | ) | const |
Item * Item::itemAbove | ( | ) |
Item * Item::itemBelow | ( | ) |
void Item::killAllChildItems | ( | ) |
time_t Item::maxDate | ( | ) | const |
Item * Item::parent | ( | ) | const |
void Item::rawAppendChildItem | ( | Item * | child | ) |
const QString & Item::receiver | ( | ) | const |
bool Item::recomputeMaxDate | ( | ) |
const QString & Item::sender | ( | ) | const |
const QString & Item::senderOrReceiver | ( | ) | const |
Returns the sender or the receiver, depending on the underlying StorageModel settings.
void Item::setDate | ( | time_t | date | ) |
void Item::setFolder | ( | const QString & | folder | ) |
void Item::setIndexGuess | ( | int | index | ) |
Sets the cached guess for the index of this item in the parent's child list.
This is used to speed up the index lookup with the following algorithm: Ask the parent if this item is at the position specified by index guess (this costs ~O(1)). If the position matches we have finished, if it doesn't then perform a linear search via indexOfChildItem() (which costs ~O(n)).
void Item::setInitialExpandStatus | ( | InitialExpandStatus | initialExpandStatus | ) |
void Item::setMaxDate | ( | time_t | date | ) |
void Item::setParent | ( | Item * | pParent | ) |
void Item::setReceiver | ( | const QString & | receiver | ) |
void Item::setSender | ( | const QString & | sender | ) |
void Item::setSize | ( | size_t | size | ) |
void Item::setStatus | ( | Akonadi::MessageStatus | status | ) |
void Item::setSubject | ( | const QString & | subject | ) |
void MessageList::Core::Item::setSubjectAndStatus | ( | const QString & | subject, |
Akonadi::MessageStatus | status | ||
) |
This is meant to be called right after the constructor for MessageItem objects.
It sets up several items at once (so even if not inlined it's still a single call).
void Item::setViewable | ( | Model * | model, |
bool | bViewable | ||
) |
size_t Item::size | ( | ) | const |
const Akonadi::MessageStatus & Item::status | ( | ) | const |
QString Item::statusDescription | ( | ) | const |
const QString & Item::subject | ( | ) | const |
Item * Item::topmostNonRoot | ( | ) |
Item::Type Item::type | ( | ) | const |
bool Item::useReceiver | ( | ) | const |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 23:16:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.