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

45 lines
772 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)
: 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()
{
// 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()
{
return static_cast<int>(m_appState);
2022-01-06 19:29:19 +00:00
}
void View::setAppState(AppState state)
{
if(m_appState == state)
{
return;
}
2022-01-06 19:29:19 +00:00
m_appState = state;
appStateChanged(static_cast<int>(m_appState));
2022-01-06 19:29:19 +00:00
}
void View::emitLogOut()
{
logOut();
2022-01-06 19:29:19 +00:00
}
} // namespace Startup
} // namespace Modules