mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
show last few transactions on overview page
This commit is contained in:
@@ -15,7 +15,8 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
|
||||
dateTo(MAX_DATE),
|
||||
addrPrefix(),
|
||||
typeFilter(ALL_TYPES),
|
||||
minAmount(0)
|
||||
minAmount(0),
|
||||
limitRows(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -65,3 +66,20 @@ void TransactionFilterProxy::setMinAmount(qint64 minimum)
|
||||
this->minAmount = minimum;
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransactionFilterProxy::setLimit(int limit)
|
||||
{
|
||||
this->limitRows = limit;
|
||||
}
|
||||
|
||||
int TransactionFilterProxy::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
if(limitRows != -1)
|
||||
{
|
||||
return std::min(QSortFilterProxyModel::rowCount(parent), limitRows);
|
||||
}
|
||||
else
|
||||
{
|
||||
return QSortFilterProxyModel::rowCount(parent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user