File indexing completed on 2024-05-12 16:27:15
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 QListView; 0014 class FilesForRoomFilterProxyModel; 0015 class ShowAttachmentComboBox; 0016 class RocketChatAccount; 0017 class LIBRUQOLAWIDGETS_TESTS_EXPORT ShowAttachmentWidget : public QWidget 0018 { 0019 Q_OBJECT 0020 public: 0021 explicit ShowAttachmentWidget(RocketChatAccount *account, QWidget *parent = nullptr); 0022 ~ShowAttachmentWidget() override; 0023 void setModel(FilesForRoomFilterProxyModel *model); 0024 0025 Q_SIGNALS: 0026 void loadMoreFileAttachment(); 0027 void deleteAttachment(const QString &fileId); 0028 0029 private: 0030 LIBRUQOLAWIDGETS_NO_EXPORT void slotSearchMessageTextChanged(const QString &str); 0031 LIBRUQOLAWIDGETS_NO_EXPORT void slotChangeAttachmentType(int index); 0032 LIBRUQOLAWIDGETS_NO_EXPORT void updateLabel(); 0033 [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString displayShowMessageInRoom() const; 0034 QLineEdit *const mSearchAttachmentFileLineEdit; 0035 ShowAttachmentComboBox *const mAttachmentCombobox; 0036 QLabel *const mInfo; 0037 QListView *const mListAttachment; 0038 FilesForRoomFilterProxyModel *mModel = nullptr; 0039 };