10 #include <QModelIndex>
12 #define ADDRESS_SIZE 12
21 void TxViewHolder::init(QWidget* holder,
const QModelIndex &index,
bool isHovered,
bool isSelected)
const
23 QModelIndex rIndex = (
filter) ?
filter->mapToSource(index) : index;
31 QString label = indexType.data(Qt::DisplayRole).toString();
41 QString address = rIndex.data(Qt::DisplayRole).toString();
42 if (!address.isEmpty()) {
49 if (address.length() > 20) {
52 label +=
" " + address;
56 label += rIndex.data(Qt::DisplayRole).toString();
67 if (hasDoubleAmount) {
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
@ SendToSelfShieldToTransparent
@ ZerocoinSpend_Change_zPiv
@ SendToSelfShieldedAddress
@ Unconfirmed
Not yet mined into a block.
@ Immature
Generated (mined) transactions.
@ NotAccepted
Mined but not accepted.
@ Conflicted
Conflicts with other transaction or mempool.
@ TypeRole
Type of transaction.
@ StatusRole
Transaction status (TransactionRecord::Status)
@ DateRole
Date and time this transaction was created.
@ ShieldedCreditAmountRole
Credit amount of transaction.
@ AmountRole
Net amount of transaction.
void showHideSecondAmount(bool show)
void init(bool isLightTheme)
void updateStatus(bool isLightTheme, bool isHover, bool isSelected)
void setAmount(QString top, QString bottom)
void setType(bool isLightTheme, int type, bool isConfirmed)
TransactionFilterProxy * filter
void init(QWidget *holder, const QModelIndex &index, bool isHovered, bool isSelected) const override
QColor rectColor(bool isHovered, bool isSelected) override
QWidget * createHolder(int pos) override
QColor getRowColor(bool isLightTheme, bool isHovered, bool isSelected)