diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:17:04 +0100 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-01-05 15:17:04 +0100 |
commit | a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce (patch) | |
tree | 3ca0df1d96c01baef1575b4d961365ed227531e1 /framework/accounts/accountfactory.h | |
parent | bc7879eca0d242934ec2051af93fd58b66845461 (diff) | |
download | kube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.tar.gz kube-a2fda0ad4fc013e4f9dd7d68ce2ec5385c1717ce.zip |
move accounts related files to seperate folder
Diffstat (limited to 'framework/accounts/accountfactory.h')
-rw-r--r-- | framework/accounts/accountfactory.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/framework/accounts/accountfactory.h b/framework/accounts/accountfactory.h new file mode 100644 index 00000000..047454ae --- /dev/null +++ b/framework/accounts/accountfactory.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | Copyright (c) 2016 Christian Mollekopf <mollekopf@kolabsystems.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 | |||
20 | #pragma once | ||
21 | |||
22 | #include <QObject> | ||
23 | #include <QVariant> | ||
24 | |||
25 | /** | ||
26 | * A factory to instantiate accountp plugins. | ||
27 | */ | ||
28 | class AccountFactory : public QObject | ||
29 | { | ||
30 | Q_OBJECT | ||
31 | Q_PROPERTY(QString accountId MEMBER mAccountId WRITE setAccountId); | ||
32 | Q_PROPERTY(QString name MEMBER mName READ name NOTIFY accountLoaded); | ||
33 | Q_PROPERTY(QString icon MEMBER mIcon NOTIFY accountLoaded); | ||
34 | Q_PROPERTY(QString uiPath MEMBER mUiPath NOTIFY accountLoaded); | ||
35 | public: | ||
36 | explicit AccountFactory(QObject *parent = Q_NULLPTR); | ||
37 | |||
38 | void setAccountId(const QString &); | ||
39 | QString name() const; | ||
40 | |||
41 | signals: | ||
42 | void accountLoaded(); | ||
43 | |||
44 | private: | ||
45 | void loadPackage(); | ||
46 | QString mAccountId; | ||
47 | QString mName; | ||
48 | QString mIcon; | ||
49 | QString mUiPath; | ||
50 | QByteArray mAccountType; | ||
51 | }; | ||