diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-16 10:02:36 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-16 10:19:34 +0200 |
commit | 80859db2fb6746441668efc851c500695aaf4d58 (patch) | |
tree | cb6f1dfbc3c1876d9edb6e3744102fa0029b23ce /accounts/maildir/maildirsettings.h | |
parent | 824ddd0fd4e3333c7c2afec83929c5b4795c16b7 (diff) | |
download | kube-80859db2fb6746441668efc851c500695aaf4d58.tar.gz kube-80859db2fb6746441668efc851c500695aaf4d58.zip |
Share the settings implementation
Diffstat (limited to 'accounts/maildir/maildirsettings.h')
-rw-r--r-- | accounts/maildir/maildirsettings.h | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/accounts/maildir/maildirsettings.h b/accounts/maildir/maildirsettings.h index a02944d9..42336535 100644 --- a/accounts/maildir/maildirsettings.h +++ b/accounts/maildir/maildirsettings.h | |||
@@ -18,56 +18,15 @@ | |||
18 | */ | 18 | */ |
19 | #pragma once | 19 | #pragma once |
20 | 20 | ||
21 | #include <QObject> | 21 | #include <domain/settings/accountsettings.h> |
22 | #include <QValidator> | ||
23 | 22 | ||
24 | class MaildirSettings : public QObject | 23 | class MaildirSettings : public AccountSettings |
25 | { | 24 | { |
26 | Q_OBJECT | 25 | Q_OBJECT |
27 | Q_PROPERTY(QByteArray accountIdentifier READ accountIdentifier WRITE setAccountIdentifier) | ||
28 | Q_PROPERTY(QUrl path READ path WRITE setPath NOTIFY pathChanged) | ||
29 | Q_PROPERTY(QValidator* pathValidator READ pathValidator CONSTANT) | ||
30 | Q_PROPERTY(QString icon MEMBER mIcon NOTIFY changed) | ||
31 | Q_PROPERTY(QString accountName MEMBER mName NOTIFY changed) | ||
32 | Q_PROPERTY(QString userName MEMBER mUsername NOTIFY identityChanged) | ||
33 | Q_PROPERTY(QString emailAddress MEMBER mEmailAddress NOTIFY identityChanged) | ||
34 | Q_PROPERTY(QString smtpServer MEMBER mSmtpServer NOTIFY smtpResourceChanged) | ||
35 | Q_PROPERTY(QValidator* smtpServerValidator READ smtpServerValidator CONSTANT) | ||
36 | Q_PROPERTY(QString smtpUsername MEMBER mSmtpUsername NOTIFY smtpResourceChanged) | ||
37 | Q_PROPERTY(QString smtpPassword MEMBER mSmtpPassword NOTIFY smtpResourceChanged) | ||
38 | |||
39 | public: | 26 | public: |
40 | MaildirSettings(QObject *parent = 0); | 27 | MaildirSettings(QObject *parent = 0); |
41 | 28 | ||
42 | void setAccountIdentifier(const QByteArray &); | 29 | Q_INVOKABLE virtual void load() Q_DECL_OVERRIDE; |
43 | QByteArray accountIdentifier() const; | 30 | Q_INVOKABLE virtual void save() Q_DECL_OVERRIDE; |
44 | 31 | Q_INVOKABLE virtual void remove() Q_DECL_OVERRIDE; | |
45 | void setPath(const QUrl &); | ||
46 | QUrl path() const; | ||
47 | QValidator *pathValidator() const; | ||
48 | |||
49 | QValidator *smtpServerValidator() const; | ||
50 | |||
51 | Q_INVOKABLE void save(); | ||
52 | Q_INVOKABLE void remove(); | ||
53 | |||
54 | signals: | ||
55 | void pathChanged(); | ||
56 | void smtpResourceChanged(); | ||
57 | void identityChanged(); | ||
58 | void changed(); | ||
59 | |||
60 | private: | ||
61 | QByteArray mIdentifier; | ||
62 | QByteArray mAccountIdentifier; | ||
63 | QByteArray mMailtransportIdentifier; | ||
64 | QByteArray mIdentityIdentifier; | ||
65 | QString mPath; | ||
66 | QString mIcon; | ||
67 | QString mName; | ||
68 | QString mUsername; | ||
69 | QString mEmailAddress; | ||
70 | QString mSmtpServer; | ||
71 | QString mSmtpUsername; | ||
72 | QString mSmtpPassword; | ||
73 | }; | 32 | }; |