File indexing completed on 2024-12-08 04:34:21

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolawidgets_private_export.h"
0010 #include <QWidget>
0011 class QLineEdit;
0012 class QLabel;
0013 class DiscussionListView;
0014 class DiscussionsFilterProxyModel;
0015 class RocketChatAccount;
0016 
0017 namespace TextEditTextToSpeech
0018 {
0019 class TextToSpeechContainerWidget;
0020 }
0021 
0022 class LIBRUQOLAWIDGETS_TESTS_EXPORT ShowDiscussionsWidget : public QWidget
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit ShowDiscussionsWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0027     ~ShowDiscussionsWidget() override;
0028 
0029     void setModel(DiscussionsFilterProxyModel *model);
0030 
0031 Q_SIGNALS:
0032     void loadMoreDiscussion();
0033 
0034 private:
0035     LIBRUQOLAWIDGETS_NO_EXPORT void slotSearchMessageTextChanged(const QString &str);
0036     LIBRUQOLAWIDGETS_NO_EXPORT void updateLabel();
0037     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString displayShowDiscussionInRoom() const;
0038     QLineEdit *const mSearchDiscussionLineEdit;
0039     QLabel *const mDiscussionInfoLabel;
0040     DiscussionListView *const mListDiscussionsListView;
0041     DiscussionsFilterProxyModel *mDiscussionModel = nullptr;
0042     TextEditTextToSpeech::TextToSpeechContainerWidget *const mTextToSpeechWidget = nullptr;
0043 };