diff options
Diffstat (limited to 'accounts/maildir/maildircontroller.h')
-rw-r--r-- | accounts/maildir/maildircontroller.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/accounts/maildir/maildircontroller.h b/accounts/maildir/maildircontroller.h new file mode 100644 index 00000000..80ffb8ca --- /dev/null +++ b/accounts/maildir/maildircontroller.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Michael Bohlender, <michael.bohlender@kdemail.net> | ||
3 | * Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License along | ||
16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | ||
19 | |||
20 | #pragma once | ||
21 | |||
22 | #include <QObject> | ||
23 | #include <QString> | ||
24 | #include <QByteArray> | ||
25 | #include <QUrl> | ||
26 | |||
27 | class MaildirController : public QObject | ||
28 | { | ||
29 | Q_OBJECT | ||
30 | |||
31 | Q_PROPERTY(QByteArray accountIdentifier READ accountIdentifier WRITE setAccountIdentifier NOTIFY accountIdentifierChanged) | ||
32 | |||
33 | Q_PROPERTY(QString name MEMBER mName NOTIFY nameChanged) | ||
34 | Q_PROPERTY(QString icon MEMBER mIcon NOTIFY iconChanged) | ||
35 | Q_PROPERTY(QUrl path READ path WRITE setPath NOTIFY pathChanged) | ||
36 | |||
37 | public: | ||
38 | explicit MaildirController(QObject *parent = Q_NULLPTR); | ||
39 | |||
40 | QByteArray accountIdentifier() const; | ||
41 | void setAccountIdentifier(const QByteArray &id); | ||
42 | |||
43 | QUrl path() const; | ||
44 | void setPath(const QUrl &path); | ||
45 | |||
46 | signals: | ||
47 | void accountIdentifierChanged(); | ||
48 | void nameChanged(); | ||
49 | void iconChanged(); | ||
50 | void pathChanged(); | ||
51 | |||
52 | public slots: | ||
53 | void createAccount(); | ||
54 | void loadAccount(const QByteArray &id); | ||
55 | void modifyAccount(); | ||
56 | void deleteAccount(); | ||
57 | |||
58 | private: | ||
59 | QByteArray mAccountIdentifier; | ||
60 | QString mIcon; | ||
61 | QString mName; | ||
62 | QUrl mPath; | ||
63 | }; | ||
64 | |||