File indexing completed on 2024-05-19 05:06:59

0001 /*
0002     SPDX-FileCopyrightText: 2017-2018 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef SECURITIESFILTERPROXYMODEL_H
0007 #define SECURITIESFILTERPROXYMODEL_H
0008 
0009 #include "kmm_models_export.h"
0010 
0011 // ----------------------------------------------------------------------------
0012 // QT Includes
0013 
0014 #include <QStandardItemModel>
0015 #include <QSortFilterProxyModel>
0016 
0017 // ----------------------------------------------------------------------------
0018 // KDE Includes
0019 
0020 // ----------------------------------------------------------------------------
0021 // Project Includes
0022 
0023 #include "securitiesmodel.h"
0024 
0025 /**
0026  * This model provides a filter for security accounts.
0027  */
0028 class KMM_MODELS_EXPORT SecuritiesFilterProxyModel : public QSortFilterProxyModel
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033     SecuritiesFilterProxyModel(QObject *parent, SecuritiesModel *model);
0034     ~SecuritiesFilterProxyModel();
0035 
0036 protected:
0037     bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override;
0038 
0039 private:
0040     class Private;
0041     Private* const d;
0042 
0043 };
0044 
0045 #undef QSortFilterProxyModel
0046 #endif // SECURITIESFILTERPROXYMODEL_H