File indexing completed on 2024-02-25 16:44:35

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include <QSortFilterProxyModel>
0009 
0010 #include "libruqolacore_export.h"
0011 #include <QSortFilterProxyModel>
0012 
0013 class LIBRUQOLACORE_EXPORT BannerInfosFilterProxyModel : public QSortFilterProxyModel
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit BannerInfosFilterProxyModel(QObject *parent = nullptr);
0018     ~BannerInfosFilterProxyModel() override;
0019 
0020     [[nodiscard]] bool showUnread() const;
0021     void setShowUnread(bool newShowUnread);
0022 
0023 protected:
0024     bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
0025 
0026 private:
0027     bool mShowUnread = false;
0028 };