mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-19 19:09:03 +00:00
7cf0170a8a
Integrate token count in UI Use delete later for QML exposed items to avoid errors Closes #6321
46 lines
991 B
C++
46 lines
991 B
C++
#pragma once
|
|
|
|
#include <StatusGo/Wallet/Token.h>
|
|
#include <StatusGo/Wallet/BigInt.h>
|
|
|
|
#include <QtQmlIntegration>
|
|
|
|
namespace WalletGo = Status::StatusGo::Wallet;
|
|
|
|
namespace Status::Wallet {
|
|
|
|
class WalletAsset : public QObject
|
|
{
|
|
Q_OBJECT
|
|
QML_ELEMENT
|
|
QML_UNCREATABLE("C++ only, for now")
|
|
|
|
Q_PROPERTY(QString name READ name CONSTANT)
|
|
Q_PROPERTY(QString symbol READ symbol CONSTANT)
|
|
Q_PROPERTY(QColor color READ color CONSTANT)
|
|
Q_PROPERTY(quint64 count READ count CONSTANT)
|
|
Q_PROPERTY(float value READ value CONSTANT)
|
|
|
|
public:
|
|
explicit WalletAsset(const WalletGo::TokenPtr token, StatusGo::Wallet::BigInt balance, QObject *parent = nullptr);
|
|
|
|
const QString name() const;
|
|
|
|
const QString symbol() const;
|
|
|
|
const QColor color() const;
|
|
|
|
quint64 count() const;
|
|
|
|
float value() const;
|
|
|
|
private:
|
|
const WalletGo::TokenPtr m_token;
|
|
// const GoWallet::NativeToken m_nativeToken;
|
|
|
|
StatusGo::Wallet::BigInt m_balance;
|
|
int m_count;
|
|
};
|
|
|
|
}
|