summaryrefslogtreecommitdiffstats
path: root/framework/mail/composer.h
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2016-02-04 16:47:08 +0100
committerMichael Bohlender <michael.bohlender@kdemail.net>2016-02-04 16:47:08 +0100
commitbd098e7ed6f8e52e3b97f60def974c5d8c47369a (patch)
tree8569ad234f8fbab128114409f146e59512177797 /framework/mail/composer.h
parentfc1f6b2f4276f67008010e1f12e2eb1bf79da4a9 (diff)
downloadkube-bd098e7ed6f8e52e3b97f60def974c5d8c47369a.tar.gz
kube-bd098e7ed6f8e52e3b97f60def974c5d8c47369a.zip
inintial composer controller + hook up to composer ui
Diffstat (limited to 'framework/mail/composer.h')
-rw-r--r--framework/mail/composer.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/framework/mail/composer.h b/framework/mail/composer.h
new file mode 100644
index 00000000..a9741f6b
--- /dev/null
+++ b/framework/mail/composer.h
@@ -0,0 +1,71 @@
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#pragma once
21
22#include <QObject>
23#include <QString>
24
25
26class Composer : public QObject
27{
28 Q_OBJECT
29 Q_PROPERTY (QString to READ to WRITE setTo NOTIFY toChanged)
30 Q_PROPERTY (QString cc READ cc WRITE setCc NOTIFY ccChanged)
31 Q_PROPERTY (QString bcc READ bcc WRITE setBcc NOTIFY bccChanged)
32 Q_PROPERTY (QString subject READ subject WRITE setSubject NOTIFY subjectChanged)
33 Q_PROPERTY (QString body READ body WRITE setBody NOTIFY bodyChanged)
34
35public:
36 explicit Composer(QObject *parent = Q_NULLPTR);
37
38 QString to() const;
39 void setTo(const QString &to);
40
41 QString cc() const;
42 void setCc(const QString &cc);
43
44 QString bcc() const;
45 void setBcc(const QString &bcc);
46
47 QString subject() const;
48 void setSubject(const QString &subject);
49
50 QString body() const;
51 void setBody(const QString &body);
52
53signals:
54 void subjectChanged();
55 void bodyChanged();
56 void toChanged();
57 void ccChanged();
58 void bccChanged();
59
60public slots:
61 void send();
62 void saveAsDraft();
63 void clear();
64
65private:
66 QString m_to;
67 QString m_cc;
68 QString m_bcc;
69 QString m_subject;
70 QString m_body;
71};