Messagelib
12#include "core/modelinvariantindex.h"
14#include "messagelist_export.h"
30class MessageItemPrivate;
37 class MESSAGELIST_EXPORT Tag
45 const QColor &textColor()
const;
46 const QColor &backgroundColor()
const;
47 const QFont &font()
const;
50 void setTextColor(
const QColor &textColor);
51 void setBackgroundColor(
const QColor &backgroundColor);
52 void setFont(
const QFont &font);
53 void setPriority(
int priority);
57 std::unique_ptr<TagPrivate>
const d;
67 enum EncryptionState { NotEncrypted, PartiallyEncrypted, FullyEncrypted, EncryptionStateUnknown };
69 enum SignatureState { NotSigned, PartiallySigned, FullySigned, SignatureStateUnknown };
71 explicit MessageItem();
72 ~MessageItem()
override;
79 virtual bool hasAnnotation()
const;
82 [[nodiscard]]
QString annotation()
const;
85 void editAnnotation(
QWidget *parent);
91 const Tag *findTag(
const QString &szTagId)
const;
93 [[nodiscard]]
QString tagListDescription()
const;
97 void invalidateTagCache();
100 void invalidateAnnotationCache();
102 const QColor &textColor()
const;
104 const QColor &backgroundColor()
const;
106 [[nodiscard]]
bool isBold()
const
108 return font().bold();
111 [[nodiscard]]
bool isItalic()
const
113 return font().italic();
116 [[nodiscard]] SignatureState signatureState()
const;
118 void setSignatureState(SignatureState state);
120 [[nodiscard]] EncryptionState encryptionState()
const;
122 void setEncryptionState(EncryptionState state);
124 [[nodiscard]]
QByteArray messageIdMD5()
const;
128 [[nodiscard]]
QByteArray inReplyToIdMD5()
const;
130 void setInReplyToIdMD5(
const QByteArray &md5);
132 [[nodiscard]]
QByteArray referencesIdMD5()
const;
134 void setReferencesIdMD5(
const QByteArray &md5);
136 void setSubjectIsPrefixed(
bool subjectIsPrefixed);
138 [[nodiscard]]
bool subjectIsPrefixed()
const;
140 [[nodiscard]]
QByteArray strippedSubjectMD5()
const;
142 void setStrippedSubjectMD5(
const QByteArray &md5);
144 [[nodiscard]]
bool aboutToBeRemoved()
const;
146 void setAboutToBeRemoved(
bool aboutToBeRemoved);
148 [[nodiscard]] ThreadingStatus threadingStatus()
const;
150 void setThreadingStatus(ThreadingStatus threadingStatus);
152 [[nodiscard]]
unsigned long uniqueId()
const;
157 MessageItem *topmostMessage();
173 static void setUnreadMessageColor(
const QColor &color);
174 static void setImportantMessageColor(
const QColor &color);
175 static void setToDoMessageColor(
const QColor &color);
176 static void setGeneralFont(
const QFont &font);
177 static void setUnreadMessageFont(
const QFont &font);
178 static void setImportantMessageFont(
const QFont &font);
179 static void setToDoMessageFont(
const QFont &font);
182 explicit MessageItem(MessageItemPrivate *dd);
185 MESSAGELIST_NO_EXPORT
const QFont &font()
const;
187 MESSAGELIST_NO_EXPORT
QString accessibleTextForField(Theme::ContentItem::Type field);
189 Q_DECLARE_PRIVATE(MessageItem)
192class FakeItemPrivate;
A message item that can have a fake tag list and a fake annotation.
void setFakeTags(const QList< Tag * > &tagList)
Sets a list of fake tags for this item.
QList< Tag * > tagList() const override
Reimplemented to return the fake tag list.
bool hasAnnotation() const override
Reimplemented to always return true.
A single item of the MessageList tree managed by MessageList::Model.
@ ImperfectParentFound
this message found an imperfect parent to attach to (might be fixed later)
@ ParentMissing
this message might belong to a thread but its parent is actually missing
@ PerfectParentFound
this message found a perfect parent to attach to
An invariant index that can be ALWAYS used to reference an item inside a QAbstractItemModel.
The Theme class defines the visual appearance of the MessageList.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.