#pragma once #include #include #include #include "item.h" namespace Modules::Main::Wallet::Accounts { class Model : public QAbstractListModel { Q_OBJECT public: enum ModelRole { Name = Qt::UserRole + 1, Address, Path, Color, PublicKey, WalletType, IsWallet, IsChat, Assets, CurrencyBalance }; explicit Model(QObject* parent = nullptr); QHash roleNames() const override; int rowCount(const QModelIndex&) const override; QVariant data(const QModelIndex& index, int role) const override; void setItems(const QVector& items); Item* getItemByIndex(int index) const; private: QVector m_items; }; } // namespace Modules::Main::Wallet::Accounts