Messagelib
16 #include <KMime/Headers>
18 #include <Akonadi/MessageStatus>
20 #include "messagelist_export.h"
21 #include <core/model.h>
35 class MESSAGELIST_EXPORT
Item
38 friend class ModelPrivate;
55 enum InitialExpandStatus {
66 Item(Type type, ItemPrivate *dd);
78 Q_REQUIRED_RESULT
Type type()
const;
93 Q_REQUIRED_RESULT
bool isViewable()
const;
99 Q_REQUIRED_RESULT
bool hasAncestor(
const Item *it)
const;
107 void setViewable(
Model *model,
bool bViewable);
117 Q_REQUIRED_RESULT
Item *childItem(
int idx)
const;
122 Q_REQUIRED_RESULT
Item *firstChildItem()
const;
128 Q_REQUIRED_RESULT
Item *itemBelowChild(
Item *child);
134 Q_REQUIRED_RESULT
Item *itemAboveChild(
Item *child);
139 Q_REQUIRED_RESULT
Item *deepestItem();
145 Q_REQUIRED_RESULT
Item *itemBelow();
151 Q_REQUIRED_RESULT
Item *itemAbove();
156 void dump(
const QString &prefix);
161 Q_REQUIRED_RESULT
int childItemCount()
const;
166 Q_REQUIRED_RESULT
bool hasChildren()
const;
175 unsigned int mTotalChildCount;
176 unsigned int mUnreadChildCount;
179 : mTotalChildCount(0)
180 , mUnreadChildCount(0)
196 int indexOfChildItem(
Item *item)
const;
206 void setIndexGuess(
int index);
213 Q_REQUIRED_RESULT
Item *parent()
const;
219 void setParent(
Item *pParent);
224 Q_REQUIRED_RESULT
Item *topmostNonRoot();
239 Q_REQUIRED_RESULT
QString statusDescription()
const;
249 void setSize(
size_t size);
255 Q_REQUIRED_RESULT
QString formattedSize()
const;
265 void setDate(time_t date);
271 Q_REQUIRED_RESULT
QString formattedDate()
const;
277 time_t maxDate()
const;
282 void setMaxDate(time_t date);
288 Q_REQUIRED_RESULT
QString formattedMaxDate()
const;
294 bool recomputeMaxDate();
299 Q_REQUIRED_RESULT
const QString &sender()
const;
304 void setSender(
const QString &sender);
309 Q_REQUIRED_RESULT
QString displaySender()
const;
314 const QString &receiver()
const;
319 void setReceiver(
const QString &receiver);
324 Q_REQUIRED_RESULT
QString displayReceiver()
const;
329 const QString &senderOrReceiver()
const;
334 Q_REQUIRED_RESULT
QString displaySenderOrReceiver()
const;
339 bool useReceiver()
const;
344 const QString &subject()
const;
349 void setSubject(
const QString &subject);
359 void setFolder(
const QString &folder);
366 void initialSetup(time_t date,
size_t size,
const QString &sender,
const QString &receiver,
bool useReceiver);
368 void setItemId(qint64
id);
369 Q_REQUIRED_RESULT qint64 itemId()
const;
371 void setParentCollectionId(qint64
id);
372 Q_REQUIRED_RESULT qint64 parentCollectionId()
const;
384 int appendChildItem(
Model *model,
Item *child);
391 void rawAppendChildItem(
Item *child);
397 void takeChildItem(
Model *model,
Item *child);
403 void killAllChildItems();
406 ItemPrivate *
const d_ptr;
407 Q_DECLARE_PRIVATE(
Item)
A structure used with MessageList::Item::childItemStats().
Q_SCRIPTABLE CaptureState status()
InitialExpandStatus
Specifies the initial expand status for the item that should be applied when it's attached to the vie...
Type
The type of the Item.
This class manages the huge tree of displayable objects: GroupHeaderItems and MessageItems.
A single item of the MessageList tree managed by MessageList::Model.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:08:17 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.