2020-10-07 10:36:04 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2024-01-01 17:07:58 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
#ifndef FEATHER_TRANSACTIONHISTORYPROXYMODEL_H
|
|
|
|
#define FEATHER_TRANSACTIONHISTORYPROXYMODEL_H
|
|
|
|
|
2021-06-28 17:20:16 +00:00
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
|
2020-10-07 10:36:04 +00:00
|
|
|
#include "libwalletqt/TransactionHistory.h"
|
|
|
|
#include "libwalletqt/Wallet.h"
|
|
|
|
|
|
|
|
class TransactionHistoryProxyModel : public QSortFilterProxyModel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit TransactionHistoryProxyModel(Wallet *wallet, QObject* parent = nullptr);
|
|
|
|
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
2021-03-08 20:03:20 +00:00
|
|
|
TransactionHistory* history();
|
2020-10-07 10:36:04 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void setSearchFilter(const QString& searchString){
|
|
|
|
m_searchRegExp.setPattern(searchString);
|
|
|
|
invalidateFilter();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2021-02-03 18:36:03 +00:00
|
|
|
Wallet *m_wallet;
|
|
|
|
TransactionHistory *m_history;
|
2020-10-07 10:36:04 +00:00
|
|
|
|
2021-06-28 17:20:16 +00:00
|
|
|
QRegularExpression m_searchRegExp;
|
2020-10-07 10:36:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_TRANSACTIONHISTORYPROXYMODEL_H
|