2022-02-22 08:02:34 +00:00
|
|
|
#pragma once
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
#include "../modules/main/interfaces/module_access_interface.h"
|
2022-01-20 14:48:57 +00:00
|
|
|
#include "../modules/startup/module_access_interface.h"
|
2022-02-21 18:03:38 +00:00
|
|
|
#include "accounts/service.h"
|
2022-01-06 19:29:19 +00:00
|
|
|
#include "app_controller_delegate.h"
|
|
|
|
#include "app_service.h"
|
2022-02-21 18:03:38 +00:00
|
|
|
#include "wallet_accounts/service.h"
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
class AppController : public QObject, AppControllerDelegate
|
2022-01-06 19:29:19 +00:00
|
|
|
{
|
2022-02-14 14:38:41 +00:00
|
|
|
Q_OBJECT
|
|
|
|
//statusFoundation: StatusFoundation
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
// Global
|
|
|
|
//localAppSettingsVariant: QVariant
|
|
|
|
//localAccountSettingsVariant: QVariant
|
|
|
|
//localAccountSensitiveSettingsVariant: QVariant
|
|
|
|
//userProfileVariant: QVariant
|
|
|
|
//globalUtilsVariant: QVariant
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
// Services
|
2022-02-22 08:02:34 +00:00
|
|
|
// FIXME: don't use raw pointers
|
2022-02-14 14:38:41 +00:00
|
|
|
Accounts::Service* m_accountsService;
|
|
|
|
std::shared_ptr<Wallets::Service> m_walletServicePtr;
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
// Modules
|
|
|
|
// To-Do make this a shared pointer and remove circular dependency.
|
|
|
|
Modules::Startup::ModuleAccessInterface* m_startupModule;
|
2022-02-16 21:51:04 +00:00
|
|
|
Modules::Main::IModuleAccess* m_mainModulePtr;
|
2022-01-06 19:29:19 +00:00
|
|
|
|
|
|
|
public:
|
2022-02-14 14:38:41 +00:00
|
|
|
AppController();
|
2022-02-22 08:02:34 +00:00
|
|
|
~AppController() override;
|
2022-02-14 14:38:41 +00:00
|
|
|
void start();
|
2022-02-22 08:02:34 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
public slots:
|
|
|
|
void mainDidLoad();
|
2022-02-21 18:03:38 +00:00
|
|
|
|
2022-01-06 19:29:19 +00:00
|
|
|
private:
|
2022-02-14 14:38:41 +00:00
|
|
|
void connect();
|
|
|
|
void startupDidLoad() override;
|
|
|
|
void load();
|
|
|
|
void userLoggedIn() override;
|
|
|
|
void buildAndRegisterLocalAccountSensitiveSettings();
|
|
|
|
void buildAndRegisterUserProfile();
|
2022-01-06 19:29:19 +00:00
|
|
|
};
|