Messagelib

itippart.cpp
1 /*
2  SPDX-FileCopyrightText: 2023 Daniel Vr├ítil <dvratil@kde.org>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "itippart.h"
8 
9 using namespace MessageComposer;
10 
11 class ItipPart::ItipPartPrivate
12 {
13 public:
14  QString invitation;
15  QString invitationBody;
16  QString method = QStringLiteral("request");
17  bool outlookComnformInvitation = false;
18 };
19 
20 ItipPart::ItipPart(QObject *parent)
21  : MessagePart(parent)
22  , d(std::make_unique<ItipPartPrivate>())
23 {
24 }
25 
26 ItipPart::~ItipPart() = default;
27 
28 bool ItipPart::outlookConformInvitation() const
29 {
30  return d->outlookComnformInvitation;
31 }
32 
33 void ItipPart::setOutlookConformInvitation(bool enabled)
34 {
35  if (d->outlookComnformInvitation == enabled) {
36  return;
37  }
38 
39  d->outlookComnformInvitation = enabled;
40  Q_EMIT outlookConformInvitationChanged();
41 }
42 
43 QString ItipPart::method() const
44 {
45  return d->method;
46 }
47 
48 void ItipPart::setMethod(const QString &method)
49 {
50  if (d->method == method) {
51  return;
52  }
53 
54  d->method = method;
55  Q_EMIT methodChanged();
56 }
57 
58 QString ItipPart::invitation() const
59 {
60  return d->invitation;
61 }
62 
63 void ItipPart::setInvitation(const QString &invitation)
64 {
65  if (d->invitation == invitation) {
66  return;
67  }
68 
69  d->invitation = invitation;
70  Q_EMIT invitationChanged();
71 }
72 
73 QString ItipPart::invitationBody() const
74 {
75  return d->invitationBody;
76 }
77 
78 void ItipPart::setInvitationBody(const QString &invitationBody)
79 {
80  if (d->invitationBody == invitationBody) {
81  return;
82  }
83 
84  d->invitationBody = invitationBody;
85  Q_EMIT invitationBodyChanged();
86 }
87 
88 #include "moc_itippart.cpp"
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
Q_EMITQ_EMIT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.