File indexing completed on 2024-12-08 12:53:31

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 CommonMessagesModel;
0012 class LIBRUQOLACORE_EXPORT CommonMessageFilterProxyModel : public QSortFilterProxyModel
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit CommonMessageFilterProxyModel(CommonMessagesModel *model = nullptr, QObject *parent = nullptr);
0017     ~CommonMessageFilterProxyModel() override;
0018     [[nodiscard]] bool loadCommonMessagesInProgress() const;
0019 
0020     void clearModel();
0021     void setSearchText(const QString &str);
0022 Q_SIGNALS:
0023     void stringNotFoundChanged();
0024     void loadingInProgressChanged();
0025 
0026 private:
0027     CommonMessagesModel *const mCommonMessagesModel;
0028 };