mirror of
https://github.com/status-im/status-app.git
synced 2026-08-31 17:11:10 +00:00
feat: add empty main module
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
#include "module.h"
|
||||
#include "controller.h"
|
||||
#include "singleton.h"
|
||||
#include "view.h"
|
||||
#include <QDebug>
|
||||
#include <QObject>
|
||||
#include <QQmlContext>
|
||||
#include <QVariant>
|
||||
|
||||
namespace Modules
|
||||
{
|
||||
namespace Main
|
||||
{
|
||||
Module::Module(AppControllerDelegate* d)
|
||||
|
||||
{
|
||||
m_delegate = d;
|
||||
m_controller = new Controller(this);
|
||||
m_view = new View(this);
|
||||
}
|
||||
|
||||
Module::~Module()
|
||||
{
|
||||
delete m_controller;
|
||||
delete m_view;
|
||||
}
|
||||
|
||||
void Module::load()
|
||||
{
|
||||
Global::Singleton::instance()->engine()->rootContext()->setContextProperty("mainModule", m_view);
|
||||
m_controller->init();
|
||||
m_view->load();
|
||||
}
|
||||
|
||||
void Module::checkIfModuleDidLoad()
|
||||
{
|
||||
m_delegate->mainDidLoad();
|
||||
}
|
||||
|
||||
void Module::viewDidLoad()
|
||||
{
|
||||
Module::checkIfModuleDidLoad();
|
||||
}
|
||||
|
||||
} // namespace Main
|
||||
} // namespace Modules
|
||||
Reference in New Issue
Block a user