mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 12:54:30 +00:00
TransactionInfo: add isCoinbase and description
This commit is contained in:
parent
b970cad48b
commit
57c205206c
2 changed files with 17 additions and 0 deletions
|
@ -47,6 +47,10 @@ bool TransactionInfo::isFailed() const
|
|||
return m_failed;
|
||||
}
|
||||
|
||||
bool TransactionInfo::isCoinbase() const
|
||||
{
|
||||
return m_coinbase;
|
||||
}
|
||||
|
||||
double TransactionInfo::amount() const
|
||||
{
|
||||
|
@ -126,6 +130,11 @@ QString TransactionInfo::paymentId() const
|
|||
return m_paymentId;
|
||||
}
|
||||
|
||||
QString TransactionInfo::description() const
|
||||
{
|
||||
return m_description;
|
||||
}
|
||||
|
||||
QString TransactionInfo::destinations_formatted() const
|
||||
{
|
||||
QString destinations;
|
||||
|
@ -144,10 +153,12 @@ TransactionInfo::TransactionInfo(const Monero::TransactionInfo *pimpl, QObject *
|
|||
, m_confirmations(pimpl->confirmations())
|
||||
, m_direction(static_cast<Direction>(pimpl->direction()))
|
||||
, m_failed(pimpl->isFailed())
|
||||
, m_coinbase(pimpl->isCoinbase())
|
||||
, m_fee(pimpl->fee())
|
||||
, m_hash(QString::fromStdString(pimpl->hash()))
|
||||
, m_label(QString::fromStdString(pimpl->label()))
|
||||
, m_paymentId(QString::fromStdString(pimpl->paymentId()))
|
||||
, m_description(QString::fromStdString(pimpl->description()))
|
||||
, m_pending(pimpl->isPending())
|
||||
, m_subaddrAccount(pimpl->subaddrAccount())
|
||||
, m_timestamp(QDateTime::fromTime_t(pimpl->timestamp()))
|
||||
|
|
|
@ -42,6 +42,7 @@ class TransactionInfo : public QObject
|
|||
Q_PROPERTY(Direction direction READ direction)
|
||||
Q_PROPERTY(bool isPending READ isPending)
|
||||
Q_PROPERTY(bool isFailed READ isFailed)
|
||||
Q_PROPERTY(bool isCoinbase READ isCoinbase)
|
||||
Q_PROPERTY(double amount READ amount)
|
||||
Q_PROPERTY(quint64 atomicAmount READ atomicAmount)
|
||||
Q_PROPERTY(QString displayAmount READ displayAmount)
|
||||
|
@ -57,6 +58,7 @@ class TransactionInfo : public QObject
|
|||
Q_PROPERTY(QString date READ date)
|
||||
Q_PROPERTY(QString time READ time)
|
||||
Q_PROPERTY(QString paymentId READ paymentId)
|
||||
Q_PROPERTY(QString description READ description)
|
||||
Q_PROPERTY(QString destinations_formatted READ destinations_formatted)
|
||||
|
||||
public:
|
||||
|
@ -71,6 +73,7 @@ public:
|
|||
Direction direction() const;
|
||||
bool isPending() const;
|
||||
bool isFailed() const;
|
||||
bool isCoinbase() const;
|
||||
double amount() const;
|
||||
quint64 atomicAmount() const;
|
||||
QString displayAmount() const;
|
||||
|
@ -87,6 +90,7 @@ public:
|
|||
QString date() const;
|
||||
QString time() const;
|
||||
QString paymentId() const;
|
||||
QString description() const;
|
||||
//! only applicable for output transactions
|
||||
//! used in tx details popup
|
||||
QString destinations_formatted() const;
|
||||
|
@ -104,7 +108,9 @@ private:
|
|||
QString m_hash;
|
||||
QString m_label;
|
||||
QString m_paymentId;
|
||||
QString m_description;
|
||||
bool m_pending;
|
||||
bool m_coinbase;
|
||||
quint32 m_subaddrAccount;
|
||||
QSet<quint32> m_subaddrIndex;
|
||||
QDateTime m_timestamp;
|
||||
|
|
Loading…
Reference in a new issue