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

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.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 NotificationHistoryListView;
0013 class QLineEdit;
0014 class ServersComboBox;
0015 class NotificationHistoryModelFilterProxyModel;
0016 
0017 namespace TextEditTextToSpeech
0018 {
0019 class TextToSpeechContainerWidget;
0020 }
0021 
0022 class LIBRUQOLAWIDGETS_TESTS_EXPORT NotificationHistoryWidget : public QWidget
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit NotificationHistoryWidget(QWidget *parent = nullptr);
0027     ~NotificationHistoryWidget() override;
0028 
0029     void addServerList(const QStringList &serverNames);
0030 
0031 Q_SIGNALS:
0032     void showNotifyMessage(const QString &accountName, const QString &messageId, const QString &roomId);
0033 
0034 private:
0035     LIBRUQOLAWIDGETS_NO_EXPORT void slotTextToSpeech(const QString &messageText);
0036     LIBRUQOLAWIDGETS_NO_EXPORT void slotCustomContextMenuRequested(const QPoint &pos);
0037     LIBRUQOLAWIDGETS_NO_EXPORT void slotShowMessage(const QModelIndex &index);
0038     LIBRUQOLAWIDGETS_NO_EXPORT void slotTextChanged(const QString &str);
0039     LIBRUQOLAWIDGETS_NO_EXPORT void slotFilterAccount(const QString &accountName);
0040     NotificationHistoryListView *const mListNotificationsListView;
0041     QLineEdit *const mSearchLineEdit;
0042     NotificationHistoryModelFilterProxyModel *const mNotificationFilterProxyModel;
0043     TextEditTextToSpeech::TextToSpeechContainerWidget *const mTextToSpeechWidget = nullptr;
0044     ServersComboBox *const mServersComboBox;
0045 };