File indexing completed on 2024-06-09 04:58:47

0001 /*
0002    SPDX-FileCopyrightText: 2021-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 "misc/searchtreebasewidget.h"
0011 class QWidget;
0012 class LIBRUQOLAWIDGETS_TESTS_EXPORT AdministratorCustomEmojiWidget : public SearchTreeBaseWidget
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit AdministratorCustomEmojiWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0017     ~AdministratorCustomEmojiWidget() override;
0018 
0019 protected:
0020     void updateLabel() override;
0021     void slotLoadElements(int offset = -1, int count = -1, const QString &searchName = {}) override;
0022     void slotCustomContextMenuRequested(const QPoint &pos) override;
0023 
0024 private:
0025     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString displayShowMessage() const;
0026     LIBRUQOLAWIDGETS_NO_EXPORT void slotModifyCustomEmoji(const QModelIndex &index);
0027     LIBRUQOLAWIDGETS_NO_EXPORT void slotAddCustomEmoji();
0028     LIBRUQOLAWIDGETS_NO_EXPORT void slotRemoveCustomEmoji(const QModelIndex &index);
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotEmojiRemoved(const QString &emojiId);
0030 };