2022-02-14 14:38:41 +00:00
|
|
|
#ifndef WALLET_ACCOUNT_ITEM_H
|
|
|
|
#define WALLET_ACCOUNT_ITEM_H
|
|
|
|
|
2022-02-21 17:07:16 +00:00
|
|
|
#include <QObject>
|
2022-02-14 14:38:41 +00:00
|
|
|
#include <QString>
|
|
|
|
|
2022-02-16 21:51:04 +00:00
|
|
|
namespace Modules::Main::Wallet::Accounts
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
2022-02-21 17:07:16 +00:00
|
|
|
class Item: public QObject
|
2022-02-14 14:38:41 +00:00
|
|
|
{
|
2022-02-21 17:07:16 +00:00
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QString name READ getName NOTIFY nameChanged);
|
|
|
|
Q_PROPERTY(QString address READ getAddress NOTIFY addressChanged);
|
|
|
|
Q_PROPERTY(QString path READ getPath NOTIFY pathChanged);
|
|
|
|
Q_PROPERTY(QString color READ getColor NOTIFY colorChanged);
|
|
|
|
Q_PROPERTY(QString publicKey READ getPublicKey NOTIFY publicKeyChanged);
|
|
|
|
Q_PROPERTY(QString walletType READ getWalletType NOTIFY walletTypeChanged);
|
|
|
|
Q_PROPERTY(bool isWallet READ getIsWallet NOTIFY isWalletChanged);
|
|
|
|
Q_PROPERTY(bool isChat READ getIsChat NOTIFY isChatChanged);
|
|
|
|
Q_PROPERTY(float currencyBalance READ getCurrencyBalance NOTIFY currencyBalanceChanged);
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
public:
|
2022-02-21 17:07:16 +00:00
|
|
|
Item(QObject* parent = nullptr,
|
|
|
|
const QString& name = "",
|
|
|
|
const QString& address = "",
|
|
|
|
const QString& path = "",
|
|
|
|
const QString& color = "",
|
|
|
|
const QString& publicKey = "",
|
|
|
|
const QString& walletType = "",
|
|
|
|
bool isWallet = false,
|
|
|
|
bool isChat = false,
|
|
|
|
float currencyBalance = 0);
|
2022-02-14 14:38:41 +00:00
|
|
|
~Item() = default;
|
|
|
|
|
2022-02-16 21:51:04 +00:00
|
|
|
const QString& getName() const;
|
|
|
|
const QString& getAddress() const;
|
|
|
|
const QString& getPath() const;
|
|
|
|
const QString& getColor() const;
|
|
|
|
const QString& getPublicKey() const;
|
|
|
|
const QString& getWalletType() const;
|
|
|
|
bool getIsWallet() const;
|
|
|
|
bool getIsChat() const;
|
|
|
|
float getCurrencyBalance() const;
|
2022-02-21 17:07:16 +00:00
|
|
|
void setData(Item *item);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void nameChanged();
|
|
|
|
void addressChanged();
|
|
|
|
void pathChanged();
|
|
|
|
void colorChanged();
|
|
|
|
void publicKeyChanged();
|
|
|
|
void walletTypeChanged();
|
|
|
|
void isWalletChanged();
|
|
|
|
void isChatChanged();
|
|
|
|
void currencyBalanceChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_name;
|
|
|
|
QString m_address;
|
|
|
|
QString m_path;
|
|
|
|
QString m_color;
|
|
|
|
QString m_publicKey;
|
|
|
|
QString m_walletType;
|
|
|
|
bool m_isWallet;
|
|
|
|
bool m_isChat;
|
|
|
|
float m_currencyBalance;
|
|
|
|
|
2022-02-14 14:38:41 +00:00
|
|
|
};
|
2022-02-16 21:51:04 +00:00
|
|
|
} // namespace Modules::Main::Wallet::Accounts
|
2022-02-14 14:38:41 +00:00
|
|
|
|
|
|
|
#endif // WALLET_ACCOUNT_ITEM_H
|