Messagelib

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

KDE's Doxygen guidelines are available online.