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

42 lines
756 B
C
Raw Normal View History

2022-01-06 19:29:19 +00:00
#pragma once
#include "interfaces/module_view_delegate_interface.h"
#include <QObject>
namespace Modules
{
namespace Startup
{
enum AppState
{
OnboardingState = 0,
LoginState = 1,
MainAppState = 2
// TODO: is Pending
2022-01-06 19:29:19 +00:00
};
class View : public QObject
{
Q_OBJECT
Q_PROPERTY(int appState READ getAppState NOTIFY appStateChanged)
2022-01-06 19:29:19 +00:00
public:
explicit View(ModuleViewDelegateInterface* delegate, QObject* parent = nullptr);
void emitLogOut();
void setAppState(AppState state);
void load();
2022-01-06 19:29:19 +00:00
signals:
void appStateChanged(int state);
void logOut();
2022-01-06 19:29:19 +00:00
private:
ModuleViewDelegateInterface* m_delegate;
AppState m_appState;
2022-01-06 19:29:19 +00:00
public slots:
int getAppState();
2022-01-06 19:29:19 +00:00
};
} // namespace Startup
} // namespace Modules