status-desktop/src-cpp/app/modules/startup/view.cpp

44 lines
729 B
C++
Raw Normal View History

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-01-06 19:29:19 +00:00
: QObject(parent)
, m_appState(AppState::OnboardingState)
2022-01-20 15:50:10 +00:00
, m_delegate(delegate)
{ }
2022-01-06 19:29:19 +00:00
void View::load()
{
// In some point, here, we will setup some exposed main module related things.
m_delegate->viewDidLoad();
}
int View::getAppState()
{
return static_cast<int>(m_appState);
}
void View::setAppState(AppState state)
{
if(m_appState == state)
{
return;
}
m_appState = state;
appStateChanged(static_cast<int>(m_appState));
}
void View::emitLogOut()
{
logOut();
}
} // namespace Startup
} // namespace Modules