File indexing completed on 2024-05-12 05:06:17
0001 /* 0002 SPDX-FileCopyrightText: 2023 Thomas Baumgart <tbaumgart@kde.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef SECURITYACCOUNTSPROXYMODEL_H 0007 #define SECURITYACCOUNTSPROXYMODEL_H 0008 0009 #include "kmm_models_export.h" 0010 0011 // ---------------------------------------------------------------------------- 0012 // QT Includes 0013 0014 #include <QSortFilterProxyModel> 0015 0016 // ---------------------------------------------------------------------------- 0017 // KDE Includes 0018 0019 // ---------------------------------------------------------------------------- 0020 // Project Includes 0021 0022 class KMM_MODELS_EXPORT SecurityAccountsProxyModel : public QSortFilterProxyModel 0023 { 0024 Q_OBJECT 0025 public: 0026 SecurityAccountsProxyModel(QObject* parent = nullptr); 0027 ~SecurityAccountsProxyModel() = default; 0028 0029 void setSourceModel(QAbstractItemModel* sourceModel) override; 0030 0031 QVariant data(const QModelIndex& idx, int role) const override; 0032 0033 int columnCount(const QModelIndex& parent = QModelIndex()) const override; 0034 0035 Qt::ItemFlags flags(const QModelIndex& idx) const override; 0036 0037 QModelIndex index(int row, int column, const QModelIndex& parent) const override; 0038 0039 protected: 0040 bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const override; 0041 }; 0042 0043 #endif // SECURITYACCOUNTSPROXYMODEL_H