mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
qt: GUI for conflicted transactions
- Exclamation mark icon for conflicted transactions - Show mouseover status for conflicted transactions as "conflicted" - Don't show inactive transactions on overview page overview
This commit is contained in:
committed by
Gavin Andresen
parent
2b72d46f42
commit
9a3d936fc2
@@ -5,6 +5,7 @@
|
||||
#include "transactionfilterproxy.h"
|
||||
|
||||
#include "transactiontablemodel.h"
|
||||
#include "transactionrecord.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -22,7 +23,8 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
|
||||
addrPrefix(),
|
||||
typeFilter(ALL_TYPES),
|
||||
minAmount(0),
|
||||
limitRows(-1)
|
||||
limitRows(-1),
|
||||
showInactive(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -35,7 +37,10 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
|
||||
QString address = index.data(TransactionTableModel::AddressRole).toString();
|
||||
QString label = index.data(TransactionTableModel::LabelRole).toString();
|
||||
qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
|
||||
int status = index.data(TransactionTableModel::StatusRole).toInt();
|
||||
|
||||
if(!showInactive && status == TransactionStatus::Conflicted)
|
||||
return false;
|
||||
if(!(TYPE(type) & typeFilter))
|
||||
return false;
|
||||
if(datetime < dateFrom || datetime > dateTo)
|
||||
@@ -78,6 +83,12 @@ void TransactionFilterProxy::setLimit(int limit)
|
||||
this->limitRows = limit;
|
||||
}
|
||||
|
||||
void TransactionFilterProxy::setShowInactive(bool showInactive)
|
||||
{
|
||||
this->showInactive = showInactive;
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
int TransactionFilterProxy::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
if(limitRows != -1)
|
||||
|
||||
Reference in New Issue
Block a user