File indexing completed on 2024-12-01 13:09:03
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "libruqolacore_export.h" 0010 #include <QSortFilterProxyModel> 0011 class DiscussionsModel; 0012 class LIBRUQOLACORE_EXPORT DiscussionsFilterProxyModel : public QSortFilterProxyModel 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit DiscussionsFilterProxyModel(DiscussionsModel *model = nullptr, QObject *parent = nullptr); 0017 ~DiscussionsFilterProxyModel() override; 0018 0019 void setFilterString(const QString &string); 0020 void clearFilter(); 0021 [[nodiscard]] int total() const; 0022 0023 [[nodiscard]] bool hasFullList() const; 0024 [[nodiscard]] bool loadMoreDiscussionsInProgress() const; 0025 0026 void clear(); 0027 0028 Q_SIGNALS: 0029 void hasFullListChanged(); 0030 void loadingInProgressChanged(); 0031 0032 private: 0033 DiscussionsModel *const mDiscussionsModel; 0034 };