mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-20 11:29:20 +00:00
0c88da4d81
fixes #4824
47 lines
911 B
C++
47 lines
911 B
C++
#ifndef MODULE_H
|
|
#define MODULE_H
|
|
|
|
#include <QObject>
|
|
#include <QPointer>
|
|
|
|
#include "interfaces/module_access_interface.h"
|
|
#include "wallet_accounts/service_interface.h"
|
|
|
|
#include "controller.h"
|
|
#include "view.h"
|
|
|
|
namespace Modules::Main
|
|
{
|
|
class Module : public QObject, virtual public IModuleAccess
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(Modules::Main::IModuleAccess)
|
|
|
|
private:
|
|
bool m_moduleLoaded;
|
|
|
|
View* m_viewPtr;
|
|
Controller* m_controllerPtr;
|
|
Modules::Main::IModuleAccess* m_walletModulePtr;
|
|
|
|
void connect();
|
|
void checkIfModuleDidLoad();
|
|
|
|
public:
|
|
explicit Module(std::shared_ptr<Wallets::ServiceInterface> walletService, QObject* parent = nullptr);
|
|
~Module() = default;
|
|
|
|
void load() override;
|
|
bool isLoaded() override;
|
|
|
|
public slots:
|
|
void viewDidLoad();
|
|
void walletDidLoad();
|
|
|
|
signals:
|
|
void loaded() override;
|
|
};
|
|
} // namespace Modules::Main
|
|
|
|
#endif // MODULE_H
|