status-desktop/src-cpp/app/modules/startup/onboarding/controller.h

42 lines
1.2 KiB
C
Raw Normal View History

2022-01-06 19:29:19 +00:00
#pragma once
#include "accounts/generated_account.h"
#include "accounts/service_interface.h"
#include "controller_interface.h"
#include "interfaces/module_controller_delegate_interface.h"
#include "signals.h"
#include <QObject>
#include <QString>
namespace Modules
{
namespace Startup
{
namespace Onboarding
{
class Controller : public QObject, ControllerInterface
{
Q_OBJECT
2022-01-06 19:29:19 +00:00
public:
Controller(ModuleControllerDelegateInterface* delegate,
Accounts::ServiceInterface* accountsService,
QObject* parent = nullptr);
void init() override;
QVector<Accounts::GeneratedAccountDto> getGeneratedAccounts() override;
Accounts::GeneratedAccountDto getImportedAccount() override;
void setSelectedAccountByIndex(int index) override;
void storeSelectedAccountAndLogin(QString password) override;
QString validateMnemonic(QString mnemonic) override;
void importMnemonic(QString mnemonic) override;
void onLogin(Signals::NodeSignal signal);
2022-01-06 19:29:19 +00:00
private:
Accounts::ServiceInterface* m_accountsService;
ModuleControllerDelegateInterface* m_delegate;
QString m_selectedAccountId;
2022-01-06 19:29:19 +00:00
};
} // namespace Onboarding
} // namespace Startup
} // namespace Modules