status-desktop/src-cpp/app/modules/main/module.h

47 lines
911 B
C
Raw Normal View History

#ifndef MODULE_H
#define MODULE_H
#include <QObject>
#include <QPointer>
#include "interfaces/module_access_interface.h"
#include "wallet_accounts/service_interface.h"
2022-01-20 14:48:57 +00:00
#include "controller.h"
#include "view.h"
namespace Modules::Main
2022-01-20 14:48:57 +00:00
{
class Module : public QObject, virtual public IModuleAccess
2022-01-20 14:48:57 +00:00
{
Q_OBJECT
Q_INTERFACES(Modules::Main::IModuleAccess)
2022-01-20 14:48:57 +00:00
private:
bool m_moduleLoaded;
View* m_viewPtr;
Controller* m_controllerPtr;
Modules::Main::IModuleAccess* m_walletModulePtr;
void connect();
void checkIfModuleDidLoad();
2022-01-20 14:48:57 +00:00
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;
2022-01-20 14:48:57 +00:00
};
} // namespace Modules::Main
#endif // MODULE_H