Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiontablemodel.cpp
Show First 20 Lines • Show All 558 Lines • ▼ Show 20 Lines | switch (role) { | ||||
return rec->time; | return rec->time; | ||||
case Type: | case Type: | ||||
return formatTxType(rec); | return formatTxType(rec); | ||||
case Watchonly: | case Watchonly: | ||||
return (rec->involvesWatchAddress ? 1 : 0); | return (rec->involvesWatchAddress ? 1 : 0); | ||||
case ToAddress: | case ToAddress: | ||||
return formatTxToAddress(rec, true); | return formatTxToAddress(rec, true); | ||||
case Amount: | case Amount: | ||||
return qint64(rec->credit + rec->debit); | return qint64((rec->credit + rec->debit).GetSatoshis()); | ||||
} | } | ||||
break; | break; | ||||
case Qt::ToolTipRole: | case Qt::ToolTipRole: | ||||
return formatTooltip(rec); | return formatTooltip(rec); | ||||
case Qt::TextAlignmentRole: | case Qt::TextAlignmentRole: | ||||
return column_alignments[index.column()]; | return column_alignments[index.column()]; | ||||
case Qt::ForegroundRole: | case Qt::ForegroundRole: | ||||
// Use the "danger" color for abandoned transactions | // Use the "danger" color for abandoned transactions | ||||
Show All 24 Lines | switch (role) { | ||||
return priv->describe( | return priv->describe( | ||||
rec, walletModel->getOptionsModel()->getDisplayUnit()); | rec, walletModel->getOptionsModel()->getDisplayUnit()); | ||||
case AddressRole: | case AddressRole: | ||||
return QString::fromStdString(rec->address); | return QString::fromStdString(rec->address); | ||||
case LabelRole: | case LabelRole: | ||||
return walletModel->getAddressTableModel()->labelForAddress( | return walletModel->getAddressTableModel()->labelForAddress( | ||||
QString::fromStdString(rec->address)); | QString::fromStdString(rec->address)); | ||||
case AmountRole: | case AmountRole: | ||||
return qint64(rec->credit + rec->debit); | return qint64((rec->credit + rec->debit).GetSatoshis()); | ||||
case TxIDRole: | case TxIDRole: | ||||
return rec->getTxID(); | return rec->getTxID(); | ||||
case TxHashRole: | case TxHashRole: | ||||
return QString::fromStdString(rec->hash.ToString()); | return QString::fromStdString(rec->hash.ToString()); | ||||
case TxHexRole: | case TxHexRole: | ||||
return priv->getTxHex(rec); | return priv->getTxHex(rec); | ||||
case TxPlainTextRole: { | case TxPlainTextRole: { | ||||
QString details; | QString details; | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |