messagelist
item.cpp
Go to the documentation of this file.
88 return d_ptr->mChildItems ? ( d_ptr->mChildItems->count() > 0 ? d_ptr->mChildItems->at( 0 ) : 0 ) : 0;
320 return d_ptr->mParent ? ( d_ptr->mParent == it ? true : d_ptr->mParent->hasAncestor( it ) ) : false;
345 //qDebug("BEGIN INSERT ROWS FOR PARENT %x: from %d to %d, (will) have %d children",this,0,tmp->count()-1,tmp->count());
362 // It seems that we can avoid removing child items here since the parent has been removed: this is a hack tough
386 delete d_ptr->mChildItems->first(); // this will call childDead() which will remove the child from the list
512 // FIXME: Try to "cache item insertions" and call beginInsertRows() and endInsertRows() in a chunked fashion...
529 model->beginInsertRows( model->index( this, 0 ), idx, idx ); // THIS IS EXTREMELY UGLY, BUT IT'S THE ONLY POSSIBLE WAY WITH QT4 AT THE TIME OF WRITING
533 model->endInsertRows(); // THIS IS EXTREMELY UGLY, BUT IT'S THE ONLY POSSIBLE WAY WITH QT4 AT THE TIME OF WRITING
545 QString out = QString::fromLatin1( "%1 %x VIEWABLE:%2" ).arg(prefix).arg(d_ptr->mIsViewable ? QLatin1String( "yes" ) : QLatin1String( "no" ));
static void append_string(QString &buffer, const QString &append)
Definition: item.cpp:206
Akonadi::MessageStatus mStatus
The status of the message (may be extended to groups in the future)
Definition: item_p.h:247
const KMime::DateFormatter * dateFormatter() const
Definition: manager.h:118
void childItemStats(ChildItemStats &stats) const
Gathers statistics about child items.
Definition: item.cpp:55
void rawAppendChildItem(Item *child)
Appends a child item without inserting it via the model.
Definition: item.cpp:514
void setIndexGuess(int index)
Sets the cached guess for the index of this item in the parent's child list.
Definition: item.cpp:187
const QString & senderOrReceiver() const
Returns the sender or the receiver, depending on the underlying StorageModel settings.
Definition: item.cpp:462
void setSize(size_t size)
Sets the size of this item (size of the Message, mainly)
Definition: item.cpp:417
QString formattedSize() const
A string with a text rappresentation of size().
Definition: item.cpp:255
Definition: item_p.h:41
const QString & cachedLocalizedUnknownText() const
Definition: manager.h:183
const QString & receiver() const
Returns the receiver associated to this item.
Definition: item.cpp:452
void setViewable(Model *model, bool bViewable)
Makes this item viewable, that is, notifies its existence to any listener attacched to the "rowsInser...
Definition: item.cpp:323
void setSubject(const QString &subject)
Sets the subject associated to this Item.
Definition: item.cpp:477
const QString & subject() const
Returns the subject associated to this Item.
Definition: item.cpp:472
unsigned int mUnreadChildCount
Definition: item.h:195
size_t size() const
Returns the size of this item (size of the Message, mainly)
Definition: item.cpp:412
bool recomputeMaxDate()
Recompute the maximum date from the current children list.
Definition: item.cpp:276
unsigned int mTotalChildCount
Definition: item.h:194
void setSubjectAndStatus(const QString &subject, const Akonadi::MessageStatus &status)
This is meant to be called right after the constructor for MessageItem objects.
Definition: item.cpp:505
This class manages the huge tree of displayable objects: GroupHeaderItems and MessageItems.
Definition: model.h:77
void setInitialExpandStatus(InitialExpandStatus initialExpandStatus)
Set the initial expand status we have to honor when attacching to the viewable root.
Definition: item.cpp:308
QString formattedMaxDate() const
A string with a text rappresentation of maxDate() obtained via Manager.
Definition: item.cpp:268
int appendChildItem(Model *model, Item *child)
Appends an Item to this item's child list.
Definition: item.cpp:521
bool useReceiver() const
Returns whether sender or receiver is supposed to be displayed.
Definition: item.cpp:467
Item * itemAboveChild(Item *child)
Returns the item that is visually above the specified child if this item.
Definition: item.cpp:134
bool hasAncestor(const Item *it) const
Return true if Item pointed by it is an ancestor of this item (that is, if it is its parent...
Definition: item.cpp:318
void killAllChildItems()
Kills all the child items without emitting any signal, recursively.
Definition: item.cpp:380
Item * childItem(int idx) const
Returns the child item at position idx or 0 if idx is out of the allowable range. ...
Definition: item.cpp:75
InitialExpandStatus initialExpandStatus() const
The initial expand status we have to honor when attacching to the viewable root.
Definition: item.cpp:303
Item::InitialExpandStatus mInitialExpandStatus
The expand status we have to honor when we attach to the viewable root.
Definition: item_p.h:250
InitialExpandStatus
Specifies the initial expand status for the item that should be applied when it's attached to the vie...
Definition: item.h:73
QString formattedDate() const
A string with a text rappresentation of date() obtained via Manager.
Definition: item.cpp:260
This item is just Item and it's the only InvisibleRoot per Model.
Definition: item.h:65
A single item of the MessageList tree managed by MessageList::Model.
Definition: item.h:52
A structure used with MessageList::Item::childItemStats().
Definition: item.h:191
Item * itemBelow()
Returns the item that is visually below this item in the tree.
Definition: item.cpp:109
time_t maxDate() const
Returns the maximum date in the subtree originating from this item.
Definition: item.cpp:432
QString statusDescription(bool hasNepomukTag) const
Returns a string describing the status e.g: "Read, Forwarded, Important".
Definition: item.cpp:213
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: model.cpp:545
void setMaxDate(time_t date)
Sets the maximum date in the subtree originating from this item.
Definition: item.cpp:437
Item * topmostNonRoot()
Returns the topmost parent item that is not a Root item (that is, is a Message or GroupHeader)...
Definition: item.cpp:192
Item * itemAbove()
Returns the item that is visually above this item in the tree.
Definition: item.cpp:149
Item * deepestItem()
Returns the deepest item in the subtree originating at this item.
Definition: item.cpp:123
const Akonadi::MessageStatus & status() const
Returns the status associated to this Item.
Definition: item.cpp:402
void takeChildItem(Model *model, Item *child)
Removes a child from this item's child list without deleting it.
Definition: item.cpp:559
Item * parent() const
Returns the parent Item in the tree, or 0 if this item isn't attached to the tree.
Definition: item.cpp:392
bool hasChildren() const
Convenience function that returns true if this item has children.
Definition: item.cpp:168
void initialSetup(time_t date, size_t size, const QString &sender, const QString &receiver, bool useReceiver)
This is meant to be called right after the constructor.
Definition: item.cpp:482
Item * itemBelowChild(Item *child)
Returns the item that is visually below the specified child if this item.
Definition: item.cpp:91
void setReceiver(const QString &receiver)
Sets the sender associated to this item.
Definition: item.cpp:457
int indexOfChildItem(Item *item) const
Returns the actual index of the child Item item or -1 if item is not a child of this Item...
Definition: item.cpp:173
void childItemDead(Item *child)
Internal handler for managing the children list.
Definition: item.cpp:604
void setSender(const QString &sender)
Sets the sender associated to this item.
Definition: item.cpp:447
void setStatus(const Akonadi::MessageStatus &status)
Sets the status associated to this Item.
Definition: item.cpp:407
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
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.