2022-02-22 08:02:34 +00:00
|
|
|
#pragma once
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "wallet_accounts/service_interface.h"
|
2022-02-16 21:51:04 +00:00
|
|
|
|
|
|
|
#include "../interfaces/module_access_interface.h"
|
2022-02-14 14:38:41 +00:00
|
|
|
#include "controller.h"
|
|
|
|
#include "view.h"
|
|
|
|
|
2022-02-16 21:51:04 +00:00
|
|
|
namespace Modules::Main::Wallet
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
2022-02-16 21:51:04 +00:00
|
|
|
class Module : public QObject, virtual public IModuleAccess
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2022-02-16 21:51:04 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
public:
|
2022-02-16 21:51:04 +00:00
|
|
|
explicit Module(std::shared_ptr<Wallets::ServiceInterface> walletsService, QObject* parent);
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
void load() override;
|
|
|
|
bool isLoaded() override;
|
|
|
|
|
|
|
|
void checkIfModuleDidLoad();
|
2022-02-21 17:07:16 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
public slots:
|
|
|
|
void viewDidLoad();
|
|
|
|
void accountsDidLoad();
|
2022-02-21 17:07:16 +00:00
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
signals:
|
|
|
|
void loaded() override;
|
2022-02-21 17:07:16 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void connect();
|
|
|
|
|
|
|
|
View* m_viewPtr;
|
|
|
|
Controller* m_controllerPtr;
|
|
|
|
IModuleAccess* m_accountsModulePtr;
|
|
|
|
bool m_moduleLoaded;
|
2022-02-14 14:38:41 +00:00
|
|
|
};
|
2022-02-16 21:51:04 +00:00
|
|
|
} // namespace Modules::Main::Wallet
|