From cf450e1b4c5d11b2adeef8d9aa5aadde5c15a96b Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 15 Jun 2011 20:07:21 +0200 Subject: [PATCH] icons test --- src/qt/transactiontablemodel.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 47cab1b233..d46704a922 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include const QString TransactionTableModel::Sent = "s"; @@ -112,7 +113,7 @@ struct TransactionTablePriv if(inWallet && !inModel) { - /* Added */ + /* Added -- insert at the right position */ QList toInsert = TransactionRecord::decomposeTransaction(mi->second); if(!toInsert.isEmpty()) /* only if something to insert */ @@ -129,7 +130,7 @@ struct TransactionTablePriv } else if(!inWallet && inModel) { - /* Removed */ + /* Removed -- remove entire transaction from table */ parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1); cachedWallet.erase(lower, upper); parent->endRemoveRows(); @@ -413,14 +414,14 @@ QVariant TransactionTableModel::formatTxDecoration(const TransactionRecord *wtx) case TransactionStatus::Unconfirmed: if(wtx->status.depth) { - return QColor(255,0,0); + return QIcon(":/icons/bitcoin"); } else { - return QColor(192,192,192); + return QIcon::fromTheme("stock_lock.png"); } case TransactionStatus::HaveConfirmations: - return QColor(0,255,0); + return QIcon::fromTheme("stock_lock-ok.png"); } return QColor(0,0,0); }