File indexing completed on 2024-04-28 05:48:38

0001 /***************************************************************************
0002  *   This file is part of Kate build plugin                                *
0003  *   SPDX-FileCopyrightText: 2014 Kåre Särs <kare.sars@iki.fi>                           *
0004  *                                                                         *
0005  *   SPDX-License-Identifier: LGPL-2.0-or-later
0006  ***************************************************************************/
0007 #pragma once
0008 
0009 #include <QModelIndex>
0010 #include <QObject>
0011 #include <QSortFilterProxyModel>
0012 #include <QString>
0013 
0014 class TargetFilterProxyModel : public QSortFilterProxyModel
0015 {
0016 public:
0017     explicit TargetFilterProxyModel(QObject *parent = nullptr);
0018 
0019     bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
0020     void setFilter(const QString &filter);
0021     bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
0022 
0023     QString m_filter;
0024 };