2022-02-14 14:38:41 +00:00
|
|
|
#ifndef WALLET_ACCOUNT_VIEW_H
|
|
|
|
#define WALLET_ACCOUNT_VIEW_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include "model.h"
|
|
|
|
|
2022-02-16 21:51:04 +00:00
|
|
|
namespace Modules::Main::Wallet::Accounts
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
|
|
|
class View : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2022-02-16 21:51:04 +00:00
|
|
|
Q_PROPERTY(Model* model READ getModel NOTIFY modelChanged)
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
explicit View(QObject* parent = nullptr);
|
|
|
|
~View() = default;
|
|
|
|
|
|
|
|
void load();
|
2022-02-21 18:03:38 +00:00
|
|
|
void setModelItems(QVector<Item>& accounts);
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
private:
|
2022-02-16 21:51:04 +00:00
|
|
|
Model* m_modelPtr;
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
Model* getModel();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void viewLoaded();
|
|
|
|
void modelChanged();
|
|
|
|
};
|
2022-02-16 21:51:04 +00:00
|
|
|
} // namespace Modules::Main::Wallet::Accounts
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
#endif // WALLET_ACCOUNT_VIEW_H
|