mirror of
https://github.com/wownero/wowlet.git
synced 2026-12-05 14:33:59 +01:00
Feather, a free Monero desktop wallet
Co-Authored-By: tobtoht <thotbot@protonmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020, The Monero Project.
|
||||
|
||||
#include "CoinsProxyModel.h"
|
||||
#include "CoinsModel.h"
|
||||
|
||||
CoinsProxyModel::CoinsProxyModel(QObject *parent)
|
||||
: QSortFilterProxyModel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool CoinsProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
|
||||
{
|
||||
QModelIndex spentIndex = sourceModel()->index(sourceRow, CoinsModel::Spent, sourceParent);
|
||||
bool isSpent = sourceModel()->data(spentIndex).toBool();
|
||||
|
||||
return !(!m_showSpent && isSpent);
|
||||
}
|
||||
Reference in New Issue
Block a user