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
55 void MessageDisplayFormatAttribute::setMessageFormat(Viewer::DisplayFormatMessage format)
57 d->messageFormat = format;
60 void MessageDisplayFormatAttribute::setRemoteContent(
bool remote)
62 d->remoteContent = remote;
65 bool MessageDisplayFormatAttribute::remoteContent()
const
67 return d->remoteContent;
72 return (d->messageFormat == other.messageFormat()) && (d->remoteContent == other.remoteContent());
75 Viewer::DisplayFormatMessage MessageDisplayFormatAttribute::messageFormat()
const
77 return d->messageFormat;
80 void MessageDisplayFormatAttribute::deserialize(
const QByteArray &data)
85 d->messageFormat =
static_cast<Viewer::DisplayFormatMessage
>(value);
86 s >> d->remoteContent;
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:11 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.