6 #ifndef PIVX_QT_TRANSACTIONTABLEMODEL_H
7 #define PIVX_QT_TRANSACTIONTABLEMODEL_H
11 #include <QAbstractTableModel>
12 #include <QStringList>
78 int rowCount(
const QModelIndex& parent)
const override;
79 int columnCount(
const QModelIndex& parent)
const override;
81 QVariant
data(
const QModelIndex&
index,
int role)
const override;
82 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
83 QModelIndex
index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
88 void txLoaded(
const QString& hash,
const int txType,
const int txStatus);
90 void txArrived(
const QString& hash,
const bool isCoinStake,
const bool isMNReward,
const bool isCSAnyType);
106 QString
lookupAddress(
const std::string& address,
bool tooltip)
const;
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
UI model for a transaction.
UI model for the transaction table of a wallet.
QVariant txStatusDecoration(const TransactionRecord *wtx) const
void subscribeToCoreSignals()
TransactionTablePriv * priv
void unsubscribeFromCoreSignals()
QVariant addressColor(const TransactionRecord *wtx) const
RoleIndex
Roles to get specific information from a transaction row.
@ SizeRole
Transaction size in bytes.
@ LabelRole
Label of address related to transaction.
@ TypeRole
Type of transaction.
@ StatusRole
Transaction status (TransactionRecord::Status)
@ DateRole
Date and time this transaction was created.
@ TxHashRole
Transaction hash.
@ ShieldedCreditAmountRole
Credit amount of transaction.
@ AddressRole
Address of transaction.
@ WatchonlyDecorationRole
Watch-only icon.
@ WatchonlyRole
Watch-only boolean.
@ AmountRole
Net amount of transaction.
@ ConfirmedRole
Is transaction confirmed?
@ FormattedAmountRole
Formatted amount, without brackets when unconfirmed.
QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard) const
QString formatTooltip(const TransactionRecord *rec) const
void updateConfirmations()
QVariant data(const QModelIndex &index, int role) const override
void txArrived(const QString &hash, const bool isCoinStake, const bool isMNReward, const bool isCSAnyType)
bool processingQueuedTransactions() const
QVariant txWatchonlyDecoration(const TransactionRecord *wtx) const
void updateTransaction(const QString &hash, int status, bool showTransaction)
QString formatTxStatus(const TransactionRecord *wtx) const
bool fProcessingQueuedTransactions
WalletModel * walletModel
void setProcessingQueuedTransactions(bool value)
std::unique_ptr< interfaces::Handler > m_handler_transaction_changed
int columnCount(const QModelIndex &parent) const override
void txLoaded(const QString &hash, const int txType, const int txStatus)
TransactionTableModel(CWallet *wallet, WalletModel *parent=nullptr)
~TransactionTableModel() override
std::unique_ptr< interfaces::Handler > m_handler_show_progress
int rowCount(const QModelIndex &parent) const override
void updateAmountColumnTitle()
Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table hea...
QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QString formatTxType(const TransactionRecord *wtx) const
QString lookupAddress(const std::string &address, bool tooltip) const
QVariant txAddressDecoration(const TransactionRecord *wtx) const
QString formatTxDate(const TransactionRecord *wtx) const
Interface to PIVX wallet from Qt view code.