From fd31aa9b05ea215e8071cf76fe21ec746204f3a3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 3 Mar 2016 22:30:07 +0100 Subject: 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. --- accounts/maildir/maildirsettings.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 accounts/maildir/maildirsettings.h (limited to 'accounts/maildir/maildirsettings.h') 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 @@ +/* + Copyright (c) 2016 Christian Mollekopf + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + This library is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public + License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. +*/ +#pragma once + +#include + +class MaildirSettings : public QObject +{ + Q_OBJECT + Q_PROPERTY(QByteArray identifier READ identifier WRITE setIdentifier) + +public: + MaildirSettings(QObject *parent = 0); + + void setIdentifier(const QByteArray &); + QByteArray identifier() const; + + Q_INVOKABLE void save(); + +private: + QByteArray mIdentifier; +}; -- cgit v1.2.3