diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-14 21:06:00 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-14 21:06:00 +0200 |
commit | a790ec5884bdec8eadcfc1f31c6a8c94a0240976 (patch) | |
tree | d5bc971a14d0c96402d82317db34655f33481b1d /src/qt/transactiontablemodel.cpp | |
parent | 5363cb05f682a7954b6fa5c74fbe589c41b955e3 (diff) |
Make status column narrow (icon only, details on tooltip)
Diffstat (limited to 'src/qt/transactiontablemodel.cpp')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 64d99a5bc1..47cab1b233 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -443,8 +443,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const /* Delegate to specific column handlers */ switch(index.column()) { - case Status: - return formatTxStatus(rec); + //case Status: + // return formatTxStatus(rec); case Date: return formatTxDate(rec); case Description: @@ -472,6 +472,13 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const return rec->credit; } } + else if (role == Qt::ToolTipRole) + { + if(index.column() == Status) + { + return formatTxStatus(rec); + } + } else if (role == Qt::TextAlignmentRole) { return column_alignments[index.column()]; @@ -522,6 +529,21 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat else if (role == Qt::TextAlignmentRole) { return column_alignments[section]; + } else if (role == Qt::ToolTipRole) + { + switch(section) + { + case Status: + return tr("Transaction status. Hover over this field to show number of transactions."); + case Date: + return tr("Date and time that the transaction was received."); + case Description: + return tr("Short description of the transaction."); + case Debit: + return tr("Amount removed from balance."); + case Credit: + return tr("Amount added to balance."); + } } } return QVariant(); |