You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wowlet/src/model/TransactionHistoryProxyModel.h

32 lines
810 B

// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2020, The Monero Project.
#ifndef FEATHER_TRANSACTIONHISTORYPROXYMODEL_H
#define FEATHER_TRANSACTIONHISTORYPROXYMODEL_H
#include "libwalletqt/TransactionHistory.h"
#include "libwalletqt/Wallet.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:
Wallet * m_wallet;
QRegExp m_searchRegExp;
};
#endif //FEATHER_TRANSACTIONHISTORYPROXYMODEL_H