16#include <KMime/Headers>
18#include <Akonadi/MessageStatus>
20#include "core/model.h"
21#include "messagelist_export.h"
35class MESSAGELIST_EXPORT
Item
38 friend class ModelPrivate;
66 Item(Type type, ItemPrivate *dd);
78 [[nodiscard]] Type type()
const;
83 [[nodiscard]] InitialExpandStatus initialExpandStatus()
const;
88 void setInitialExpandStatus(InitialExpandStatus initialExpandStatus);
93 [[nodiscard]]
bool isViewable()
const;
99 [[nodiscard]]
bool hasAncestor(
const Item *it)
const;
107 void setViewable(
Model *model,
bool bViewable);
117 [[nodiscard]]
Item *childItem(
int idx)
const;
122 [[nodiscard]]
Item *firstChildItem()
const;
128 [[nodiscard]]
Item *itemBelowChild(
Item *child);
134 [[nodiscard]]
Item *itemAboveChild(
Item *child);
139 [[nodiscard]]
Item *deepestItem();
145 [[nodiscard]]
Item *itemBelow();
151 [[nodiscard]]
Item *itemAbove();
156 void dump(
const QString &prefix);
161 [[nodiscard]]
int childItemCount()
const;
166 [[nodiscard]]
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 [[nodiscard]]
Item *parent()
const;
219 void setParent(
Item *pParent);
224 [[nodiscard]]
Item *topmostNonRoot();
239 [[nodiscard]]
QString statusDescription()
const;
249 void setSize(
size_t size);
255 [[nodiscard]]
QString formattedSize()
const;
265 void setDate(time_t date);
271 [[nodiscard]]
QString formattedDate()
const;
277 time_t maxDate()
const;
282 void setMaxDate(time_t date);
288 [[nodiscard]]
QString formattedMaxDate()
const;
294 bool recomputeMaxDate();
299 [[nodiscard]]
const QString &sender()
const;
304 void setSender(
const QString &sender);
309 [[nodiscard]]
QString displaySender()
const;
314 const QString &receiver()
const;
319 void setReceiver(
const QString &receiver);
324 [[nodiscard]]
QString displayReceiver()
const;
329 const QString &senderOrReceiver()
const;
334 [[nodiscard]]
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 [[nodiscard]] qint64 itemId()
const;
371 void setParentCollectionId(qint64
id);
372 [[nodiscard]] 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().
A single item of the MessageList tree managed by MessageList::Model.
InitialExpandStatus
Specifies the initial expand status for the item that should be applied when it's attached to the vie...
@ ExpandNeeded
Must expand when this item becomes viewable.
@ NoExpandNeeded
No expand needed at all.
Type
The type of the Item.
@ Message
This item is a MessageItem.
@ GroupHeader
This item is a GroupHeaderItem.
This class manages the huge tree of displayable objects: GroupHeaderItems and MessageItems.
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.