diff options
Diffstat (limited to 'framework/domain/accountfactory.h')
-rw-r--r-- | framework/domain/accountfactory.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/framework/domain/accountfactory.h b/framework/domain/accountfactory.h index 0c6afe50..ed3c21d9 100644 --- a/framework/domain/accountfactory.h +++ b/framework/domain/accountfactory.h | |||
@@ -28,21 +28,23 @@ | |||
28 | class AccountFactory : public QObject | 28 | class AccountFactory : public QObject |
29 | { | 29 | { |
30 | Q_OBJECT | 30 | Q_OBJECT |
31 | Q_PROPERTY(QString accountId MEMBER mAccountId); | 31 | Q_PROPERTY(QString accountId MEMBER mAccountId WRITE setAccountId); |
32 | Q_PROPERTY(QString name READ name); | 32 | Q_PROPERTY(QString name MEMBER mName NOTIFY accountLoaded); |
33 | Q_PROPERTY(QString icon READ icon); | 33 | Q_PROPERTY(QString icon MEMBER mIcon NOTIFY accountLoaded); |
34 | Q_PROPERTY(QVariant ui READ ui); | 34 | Q_PROPERTY(QString uiPath MEMBER mUiPath NOTIFY accountLoaded); |
35 | Q_PROPERTY(QString uiPath READ uiPath); | ||
36 | public: | 35 | public: |
37 | explicit AccountFactory(QObject *parent = Q_NULLPTR); | 36 | explicit AccountFactory(QObject *parent = Q_NULLPTR); |
38 | 37 | ||
39 | QString name() const; | 38 | void setAccountId(const QString &); |
40 | QString icon() const; | 39 | |
41 | QVariant ui() const; | 40 | signals: |
42 | QString uiPath() const; | 41 | void accountLoaded(); |
43 | 42 | ||
44 | Q_INVOKABLE QVariant createComponent(const QByteArray &accountType) const; | ||
45 | private: | 43 | private: |
46 | QByteArray getAccountType() const; | 44 | void loadPackage(); |
47 | QString mAccountId; | 45 | QString mAccountId; |
46 | QString mName; | ||
47 | QString mIcon; | ||
48 | QString mUiPath; | ||
49 | QByteArray mAccountType; | ||
48 | }; | 50 | }; |