wowlet/src/model/TransactionHistoryProxyModel.h

34 lines
890 B
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
2021-03-30 09:52:29 +00:00
#ifndef WOWLET_TRANSACTIONHISTORYPROXYMODEL_H
#define WOWLET_TRANSACTIONHISTORYPROXYMODEL_H
#include "libwalletqt/TransactionHistory.h"
#include "libwalletqt/Wallet.h"
2021-02-03 18:36:03 +00:00
#include "libwalletqt/TransactionHistory.h"
#include <QSortFilterProxyModel>
class TransactionHistoryProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
public:
explicit TransactionHistoryProxyModel(Wallet *wallet, QObject* parent = nullptr);
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
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;
QRegExp m_searchRegExp;
};
2021-03-30 09:52:29 +00:00
#endif //WOWLET_TRANSACTIONHISTORYPROXYMODEL_H