diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 22:30:07 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 22:30:07 +0100 |
commit | fd31aa9b05ea215e8071cf76fe21ec746204f3a3 (patch) | |
tree | fd656cf389060e6a5c7ef3253d3337e0a48864c8 /accounts/maildir/maildirsettings.h | |
parent | 54c3e5912b0d64bad5a1c66bc96f0552ac5e21f5 (diff) | |
download | kube-fd31aa9b05ea215e8071cf76fe21ec746204f3a3.tar.gz kube-fd31aa9b05ea215e8071cf76fe21ec746204f3a3.zip |
Added a maildir configuration controller that can edit the config in
sink.
The property binding only works when using actual QObject::property'ies.
It doesn't work at all with Q_PROPERTY, even with a NOTIFY signal.
Diffstat (limited to 'accounts/maildir/maildirsettings.h')
-rw-r--r-- | accounts/maildir/maildirsettings.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/accounts/maildir/maildirsettings.h b/accounts/maildir/maildirsettings.h new file mode 100644 index 00000000..c0ad95c3 --- /dev/null +++ b/accounts/maildir/maildirsettings.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsys.com> | ||
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 | #pragma once | ||
20 | |||
21 | #include <QObject> | ||
22 | |||
23 | class MaildirSettings : public QObject | ||
24 | { | ||
25 | Q_OBJECT | ||
26 | Q_PROPERTY(QByteArray identifier READ identifier WRITE setIdentifier) | ||
27 | |||
28 | public: | ||
29 | MaildirSettings(QObject *parent = 0); | ||
30 | |||
31 | void setIdentifier(const QByteArray &); | ||
32 | QByteArray identifier() const; | ||
33 | |||
34 | Q_INVOKABLE void save(); | ||
35 | |||
36 | private: | ||
37 | QByteArray mIdentifier; | ||
38 | }; | ||