File indexing completed on 2025-01-12 04:34:10

0001 /*
0002    SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QWidget>
0010 
0011 #include "libruqolawidgets_private_export.h"
0012 class MessageListView;
0013 class QLabel;
0014 class CommonMessageFilterProxyModel;
0015 class RocketChatAccount;
0016 
0017 namespace TextEditTextToSpeech
0018 {
0019 class TextToSpeechContainerWidget;
0020 }
0021 
0022 class LIBRUQOLAWIDGETS_TESTS_EXPORT ModerationMessagesWidget : public QWidget
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit ModerationMessagesWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0027     ~ModerationMessagesWidget() override;
0028 
0029     void setModel(CommonMessageFilterProxyModel *model);
0030 
0031 Q_SIGNALS:
0032     void goToMessageRequested(const QString &messageId, const QString &messageDateTimeUtc);
0033 
0034 private:
0035     LIBRUQOLAWIDGETS_NO_EXPORT void updateLabel();
0036     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString displayShowSearch() const;
0037     QLabel *const mSearchLabel;
0038     MessageListView *const mResultListWidget;
0039     CommonMessageFilterProxyModel *mModel = nullptr;
0040     RocketChatAccount *const mCurrentRocketChatAccount;
0041     TextEditTextToSpeech::TextToSpeechContainerWidget *const mTextToSpeechWidget = nullptr;
0042 };