Messagelib

plugineditorcheckbeforesendparams.cpp
1/*
2 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "plugineditorcheckbeforesendparams.h"
8
9using namespace MessageComposer;
10
11class MessageComposer::PluginEditorCheckBeforeSendParamsPrivate
12{
13public:
14 PluginEditorCheckBeforeSendParamsPrivate() = default;
15
16 QString ccAddresses;
17 QString bccAddresses;
18 QString toAddresses;
19 QString plainText;
20 QString subject;
21 QString defaultDomain;
22 int transportId = -1;
23 bool isHtml = false;
24 uint identity = 0;
25 bool hasAttachment = false;
26};
27
28PluginEditorCheckBeforeSendParams::PluginEditorCheckBeforeSendParams()
29 : d(new MessageComposer::PluginEditorCheckBeforeSendParamsPrivate)
30{
31}
32
33PluginEditorCheckBeforeSendParams::PluginEditorCheckBeforeSendParams(const PluginEditorCheckBeforeSendParams &other)
34 : d(new MessageComposer::PluginEditorCheckBeforeSendParamsPrivate)
35{
36 (*this) = other;
37}
38
39PluginEditorCheckBeforeSendParams::~PluginEditorCheckBeforeSendParams() = default;
40
41PluginEditorCheckBeforeSendParams &PluginEditorCheckBeforeSendParams::operator=(const PluginEditorCheckBeforeSendParams &other)
42{
43 if (this != &other) {
44 d->subject = other.subject();
45 d->identity = other.identity();
46 d->isHtml = other.isHtmlMail();
47 d->plainText = other.plainText();
48 d->defaultDomain = other.defaultDomain();
49 d->hasAttachment = other.hasAttachment();
50 d->transportId = other.transportId();
51 d->bccAddresses = other.bccAddresses();
52 d->ccAddresses = other.ccAddresses();
53 d->toAddresses = other.toAddresses();
54 }
55 return *this;
56}
57
58bool PluginEditorCheckBeforeSendParams::operator==(const PluginEditorCheckBeforeSendParams &other) const
59{
60 return (d->subject == other.subject()) && (d->identity == other.identity()) && (d->isHtml == other.isHtmlMail()) && (d->plainText == other.plainText())
61 && (d->defaultDomain == other.defaultDomain()) && (d->hasAttachment == other.hasAttachment()) && (d->transportId == other.transportId())
62 && (d->bccAddresses == other.bccAddresses()) && (d->ccAddresses == other.ccAddresses()) && (d->toAddresses == other.toAddresses());
63}
64
65void PluginEditorCheckBeforeSendParams::setSubject(const QString &subject)
66{
67 d->subject = subject;
68}
69
70QString PluginEditorCheckBeforeSendParams::subject() const
71{
72 return d->subject;
73}
74
75void PluginEditorCheckBeforeSendParams::setIdentity(uint currentIdentity)
76{
77 d->identity = currentIdentity;
78}
79
80uint PluginEditorCheckBeforeSendParams::identity() const
81{
82 return d->identity;
83}
84
85bool PluginEditorCheckBeforeSendParams::isHtmlMail() const
86{
87 return d->isHtml;
88}
89
90void PluginEditorCheckBeforeSendParams::setHtmlMail(bool html)
91{
92 d->isHtml = html;
93}
94
95void PluginEditorCheckBeforeSendParams::setPlainText(const QString &text)
96{
97 d->plainText = text;
98}
99
100QString PluginEditorCheckBeforeSendParams::plainText() const
101{
102 return d->plainText;
103}
104
105void PluginEditorCheckBeforeSendParams::setBccAddresses(const QString &lst)
106{
107 d->bccAddresses = lst;
108}
109
110QString PluginEditorCheckBeforeSendParams::bccAddresses() const
111{
112 return d->bccAddresses;
113}
114
115void PluginEditorCheckBeforeSendParams::setToAddresses(const QString &lst)
116{
117 d->toAddresses = lst;
118}
119
120QString PluginEditorCheckBeforeSendParams::toAddresses() const
121{
122 return d->toAddresses;
123}
124
125void PluginEditorCheckBeforeSendParams::setCcAddresses(const QString &lst)
126{
127 d->ccAddresses = lst;
128}
129
130QString PluginEditorCheckBeforeSendParams::ccAddresses() const
131{
132 return d->ccAddresses;
133}
134
135void PluginEditorCheckBeforeSendParams::setDefaultDomain(const QString &domain)
136{
137 d->defaultDomain = domain;
138}
139
140QString PluginEditorCheckBeforeSendParams::defaultDomain() const
141{
142 return d->defaultDomain;
143}
144
145bool PluginEditorCheckBeforeSendParams::hasAttachment() const
146{
147 return d->hasAttachment;
148}
149
150void PluginEditorCheckBeforeSendParams::setHasAttachment(bool b)
151{
152 d->hasAttachment = b;
153}
154
155int PluginEditorCheckBeforeSendParams::transportId() const
156{
157 return d->transportId;
158}
159
160void PluginEditorCheckBeforeSendParams::setTransportId(int id)
161{
162 d->transportId = id;
163}
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.