12 #include "headerstyle.h"
13 #include <GrantleeTheme/GrantleeTheme>
15 using namespace MessageViewer;
19 class MessageViewer::HeaderStylePrivate
22 HeaderStylePrivate() =
default;
29 QObject *mSourceObject =
nullptr;
31 bool mPrinting =
false;
32 bool mTopLevel =
true;
33 bool mAllowAsync =
false;
34 bool mReadOnlyMessage =
false;
35 bool mShowEmoticons =
true;
38 HeaderStyle::HeaderStyle()
39 : d(new MessageViewer::HeaderStylePrivate)
43 HeaderStyle::~HeaderStyle() =
default;
45 void HeaderStyle::setAttachmentHtml(
const QString &html)
47 d->mAttachmentHtml = html;
50 QString HeaderStyle::attachmentHtml()
const
52 return d->mAttachmentHtml;
55 void HeaderStyle::setHeaderStrategy(
const HeaderStrategy *strategy)
57 d->mStrategy = strategy;
65 void HeaderStyle::setVCardName(
const QString &vCardName)
67 d->mVCardName = vCardName;
70 QString HeaderStyle::vCardName()
const
75 void HeaderStyle::setPrinting(
bool printing)
77 d->mPrinting = printing;
80 bool HeaderStyle::isPrinting()
const
85 void HeaderStyle::setTopLevel(
bool topLevel)
87 d->mTopLevel = topLevel;
90 bool HeaderStyle::isTopLevel()
const
97 d->mNodeHelper = nodeHelper;
102 return d->mNodeHelper;
105 void HeaderStyle::setAllowAsync(
bool allowAsync)
107 d->mAllowAsync = allowAsync;
110 bool HeaderStyle::allowAsync()
const
112 return d->mAllowAsync;
115 void HeaderStyle::setSourceObject(
QObject *sourceObject)
117 d->mSourceObject = sourceObject;
120 QObject *HeaderStyle::sourceObject()
const
122 return d->mSourceObject;
127 d->mMessageStatus =
status;
132 return d->mMessageStatus;
145 bool HeaderStyle::readOnlyMessage()
const
147 return d->mReadOnlyMessage;
150 void HeaderStyle::setReadOnlyMessage(
bool readOnlyMessage)
152 d->mReadOnlyMessage = readOnlyMessage;
155 bool HeaderStyle::showEmoticons()
const
157 return d->mShowEmoticons;
160 void HeaderStyle::setShowEmoticons(
bool b)
162 d->mShowEmoticons = b;