From d6ded01b2e07981b8c1f6139b25935c8c26db0eb Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Tue, 22 Nov 2016 18:03:24 +0100 Subject: connect maildir controller and maildir account wizzard page --- accounts/maildir/maildircontroller.h | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 accounts/maildir/maildircontroller.h (limited to 'accounts/maildir/maildircontroller.h') 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 @@ +/* + * Copyright (C) 2016 Michael Bohlender, + * Copyright (c) 2016 Christian Mollekopf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#pragma once + +#include +#include +#include +#include + +class MaildirController : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QByteArray accountIdentifier READ accountIdentifier WRITE setAccountIdentifier NOTIFY accountIdentifierChanged) + + Q_PROPERTY(QString name MEMBER mName NOTIFY nameChanged) + Q_PROPERTY(QString icon MEMBER mIcon NOTIFY iconChanged) + Q_PROPERTY(QUrl path READ path WRITE setPath NOTIFY pathChanged) + +public: + explicit MaildirController(QObject *parent = Q_NULLPTR); + + QByteArray accountIdentifier() const; + void setAccountIdentifier(const QByteArray &id); + + QUrl path() const; + void setPath(const QUrl &path); + +signals: + void accountIdentifierChanged(); + void nameChanged(); + void iconChanged(); + void pathChanged(); + +public slots: + void createAccount(); + void loadAccount(const QByteArray &id); + void modifyAccount(); + void deleteAccount(); + +private: + QByteArray mAccountIdentifier; + QString mIcon; + QString mName; + QUrl mPath; +}; + -- cgit v1.2.3