Warning, file /network/ruqola/src/core/model/filesforroomfilterproxymodel.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002    SPDX-FileCopyrightText: 2018-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 FilesForRoomModel;
0012 class LIBRUQOLACORE_EXPORT FilesForRoomFilterProxyModel : public QSortFilterProxyModel
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit FilesForRoomFilterProxyModel(FilesForRoomModel *fileModel = nullptr, QObject *parent = nullptr);
0017     ~FilesForRoomFilterProxyModel() override;
0018 
0019     void setFilterString(const QString &string);
0020     [[nodiscard]] int total() const;
0021 
0022     [[nodiscard]] bool hasFullList() const;
0023 
0024     [[nodiscard]] int attachmentCount() const;
0025 
0026     void setTypeGroup(const QString &typeGroup);
0027     void resetTypeGroup();
0028 
0029     void clear();
0030 
0031 protected:
0032     bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
0033 
0034 Q_SIGNALS:
0035     void hasFullListChanged();
0036     void totalChanged();
0037     void loadingInProgressChanged();
0038 
0039 private:
0040     QString mTypeGroup;
0041     FilesForRoomModel *const mFilesForRoomModel;
0042 };