MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / addressColor

Method addressColor

src/qt/transactiontablemodel.cpp:403–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
404{
405 // Show addresses without label in a less visible color
406 switch(wtx->type)
407 {
408 case TransactionRecord::RecvWithAddress:
409 case TransactionRecord::SendToAddress:
410 case TransactionRecord::Generated:
411 {
412 QString label = walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(wtx->address));
413 if(label.isEmpty())
414 return COLOR_BAREADDRESS;
415 } break;
416 case TransactionRecord::SendToSelf:
417 return COLOR_BAREADDRESS;
418 default:
419 break;
420 }
421 return QVariant();
422}
423
424QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators) const
425{

Callers

nothing calls this directly

Calls 2

labelForAddressMethod · 0.80
getAddressTableModelMethod · 0.45

Tested by

no test coverage detected