mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
29 lines
698 B
C
29 lines
698 B
C
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
// Copyright (c) 2020, The Monero Project.
|
||
|
|
||
|
#ifndef FEATHER_ADDRESSBOOKPROXYMODEL_H
|
||
|
#define FEATHER_ADDRESSBOOKPROXYMODEL_H
|
||
|
|
||
|
#include <QSortFilterProxyModel>
|
||
|
|
||
|
class AddressBookProxyModel : public QSortFilterProxyModel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit AddressBookProxyModel(QObject* parent = nullptr);
|
||
|
bool filterAcceptsRow(int sourceRow,
|
||
|
const QModelIndex &sourceParent) const override;
|
||
|
|
||
|
public slots:
|
||
|
void setSearchFilter(const QString& searchString){
|
||
|
m_searchRegExp.setPattern(searchString);
|
||
|
invalidateFilter();
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
QRegExp m_searchRegExp;
|
||
|
};
|
||
|
|
||
|
#endif //FEATHER_ADDRESSBOOKPROXYMODEL_H
|