Messagelib
8 #include "messagedisplayformatattribute.h"
10 #include <QDataStream>
13 using namespace MessageViewer;
15 class MessageViewer::MessageDisplayFormatAttributePrivate
18 MessageDisplayFormatAttributePrivate() =
default;
20 Viewer::DisplayFormatMessage messageFormat = Viewer::UseGlobalSetting;
21 bool remoteContent =
false;
24 MessageDisplayFormatAttribute::MessageDisplayFormatAttribute()
25 : d(new MessageDisplayFormatAttributePrivate)
29 MessageDisplayFormatAttribute::~MessageDisplayFormatAttribute() =
default;
34 messageDisplayFormatAttr->setMessageFormat(messageFormat());
35 messageDisplayFormatAttr->setRemoteContent(remoteContent());
36 return messageDisplayFormatAttr;
39 QByteArray MessageDisplayFormatAttribute::type()
const
41 static const QByteArray sType(
"MessageDisplayFormatAttribute");
45 QByteArray MessageDisplayFormatAttribute::serialized()
const
56 void MessageDisplayFormatAttribute::setMessageFormat(Viewer::DisplayFormatMessage format)
58 d->messageFormat = format;
61 void MessageDisplayFormatAttribute::setRemoteContent(
bool remote)
63 d->remoteContent = remote;
66 bool MessageDisplayFormatAttribute::remoteContent()
const
68 return d->remoteContent;
73 return (d->messageFormat == other.messageFormat()) && (d->remoteContent == other.remoteContent());
76 Viewer::DisplayFormatMessage MessageDisplayFormatAttribute::messageFormat()
const
78 return d->messageFormat;
81 void MessageDisplayFormatAttribute::deserialize(
const QByteArray &data)
87 d->messageFormat =
static_cast<Viewer::DisplayFormatMessage
>(value);
88 s >> d->remoteContent;
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:03:17 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.