summaryrefslogtreecommitdiffstats
path: root/framework/mail/composer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/mail/composer.cpp')
-rw-r--r--framework/mail/composer.cpp109
1 files changed, 109 insertions, 0 deletions
diff --git a/framework/mail/composer.cpp b/framework/mail/composer.cpp
new file mode 100644
index 00000000..aa1ec7fc
--- /dev/null
+++ b/framework/mail/composer.cpp
@@ -0,0 +1,109 @@
1/*
2 Copyright (c) 2016 Michael Bohlender <michael.bohlender@kdemail.net>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20
21#include "composer.h"
22
23Composer::Composer(QObject *parent) : QObject(parent)
24{
25
26}
27
28QString Composer::to() const
29{
30 return m_to;
31}
32
33void Composer::setTo(const QString &to)
34{
35 if(m_to != to) {
36 m_to = to;
37 emit toChanged();
38 }
39}
40
41QString Composer::cc() const
42{
43 return m_cc;
44}
45
46void Composer::setCc(const QString &cc)
47{
48 if(m_cc != cc) {
49 m_cc = cc;
50 emit ccChanged();
51 }
52}
53
54QString Composer::bcc() const
55{
56 return m_bcc;
57}
58
59void Composer::setBcc(const QString &bcc)
60{
61 if(m_bcc != bcc) {
62 m_bcc = bcc;
63 emit bccChanged();
64 }
65}
66
67QString Composer::subject() const
68{
69 return m_subject;
70}
71
72void Composer::setSubject(const QString &subject)
73{
74 if(m_subject != subject) {
75 m_subject = subject;
76 emit subjectChanged();
77 }
78}
79
80QString Composer::body() const
81{
82 return m_body;
83}
84
85void Composer::setBody(const QString &body)
86{
87 if(m_body != body) {
88 m_body = body;
89 emit bodyChanged();
90 }
91}
92
93void Composer::send()
94{
95 //TODO
96 clear();
97}
98
99void Composer::saveAsDraft()
100{
101 //TODO
102 clear();
103}
104
105void Composer::clear()
106{
107 setSubject("");
108 setBody("");
109} \ No newline at end of file