2022-01-06 19:29:19 +00:00
|
|
|
#include "view.h"
|
|
|
|
#include "interfaces/module_view_delegate_interface.h"
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
namespace Modules
|
|
|
|
{
|
|
|
|
namespace Startup
|
|
|
|
{
|
|
|
|
|
2022-01-20 15:50:10 +00:00
|
|
|
View::View(ModuleViewDelegateInterface* delegate, QObject* parent)
|
2022-02-21 18:03:38 +00:00
|
|
|
: QObject(parent)
|
|
|
|
, m_appState(AppState::OnboardingState)
|
|
|
|
, m_delegate(delegate)
|
2022-01-20 15:50:10 +00:00
|
|
|
{ }
|
2022-01-06 19:29:19 +00:00
|
|
|
|
|
|
|
void View::load()
|
|
|
|
{
|
2022-02-21 18:03:38 +00:00
|
|
|
// In some point, here, we will setup some exposed main module related things.
|
|
|
|
m_delegate->viewDidLoad();
|
2022-01-06 19:29:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int View::getAppState()
|
|
|
|
{
|
2022-02-21 18:03:38 +00:00
|
|
|
return static_cast<int>(m_appState);
|
2022-01-06 19:29:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void View::setAppState(AppState state)
|
|
|
|
{
|
2022-02-21 18:03:38 +00:00
|
|
|
if(m_appState == state)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2022-01-06 19:29:19 +00:00
|
|
|
|
2022-02-21 18:03:38 +00:00
|
|
|
m_appState = state;
|
|
|
|
appStateChanged(static_cast<int>(m_appState));
|
2022-01-06 19:29:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void View::emitLogOut()
|
|
|
|
{
|
2022-02-21 18:03:38 +00:00
|
|
|
logOut();
|
2022-01-06 19:29:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Startup
|
2022-02-21 18:03:38 +00:00
|
|
|
} // namespace Modules
|