Messagelib
11 #include "core/item.h"
12 #include "core/modelinvariantindex.h"
14 #include "messagelist_export.h"
30 class 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 Q_REQUIRED_RESULT
QString annotation()
const;
85 void editAnnotation(
QWidget *parent);
91 const Tag *findTag(
const QString &szTagId)
const;
93 Q_REQUIRED_RESULT
QString tagListDescription()
const;
97 void invalidateTagCache();
100 void invalidateAnnotationCache();
102 const QColor &textColor()
const;
104 const QColor &backgroundColor()
const;
106 Q_REQUIRED_RESULT
bool isBold()
const
108 return font().bold();
111 Q_REQUIRED_RESULT
bool isItalic()
const
113 return font().italic();
116 Q_REQUIRED_RESULT SignatureState signatureState()
const;
118 void setSignatureState(SignatureState state);
120 Q_REQUIRED_RESULT EncryptionState encryptionState()
const;
122 void setEncryptionState(EncryptionState state);
124 Q_REQUIRED_RESULT
QByteArray messageIdMD5()
const;
128 Q_REQUIRED_RESULT
QByteArray inReplyToIdMD5()
const;
130 void setInReplyToIdMD5(
const QByteArray &md5);
132 Q_REQUIRED_RESULT
QByteArray referencesIdMD5()
const;
134 void setReferencesIdMD5(
const QByteArray &md5);
136 void setSubjectIsPrefixed(
bool subjectIsPrefixed);
138 Q_REQUIRED_RESULT
bool subjectIsPrefixed()
const;
140 Q_REQUIRED_RESULT
QByteArray strippedSubjectMD5()
const;
142 void setStrippedSubjectMD5(
const QByteArray &md5);
144 Q_REQUIRED_RESULT
bool aboutToBeRemoved()
const;
146 void setAboutToBeRemoved(
bool aboutToBeRemoved);
148 Q_REQUIRED_RESULT ThreadingStatus threadingStatus()
const;
150 void setThreadingStatus(ThreadingStatus threadingStatus);
152 Q_REQUIRED_RESULT
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;
189 Q_DECLARE_PRIVATE(MessageItem)
192 class FakeItemPrivate;
An invariant index that can be ALWAYS used to reference an item inside a QAbstractItemModel.
QList< Tag * > tagList() const override
Reimplemented to return the fake tag list.
@ 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
bool hasAnnotation() const override
Reimplemented to always return true.
The Theme class defines the visual appearance of the MessageList.
A message item that can have a fake tag list and a fake annotation.
@ PerfectParentFound
this message found a perfect parent to attach to
A single item of the MessageList tree managed by MessageList::Model.
void setFakeTags(const QList< Tag * > &tagList)
Sets a list of fake tags for this item.
Type
The available ContentItem types.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:59:18 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.