File indexing completed on 2024-05-19 05:54:11

0001 /*  This file was part of the KDE libraries
0002 
0003     SPDX-FileCopyrightText: 2021 Tomaz Canabrava <tcanabrava@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <QSortFilterProxyModel>
0011 
0012 class FilterModel : public QSortFilterProxyModel
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit FilterModel(QObject *parent);
0017     ~FilterModel() override;
0018     bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
0019     void setInvertFilter(bool invert);
0020 
0021 private:
0022     bool m_invertFilter = false;
0023 };