File indexing completed on 2024-12-01 04:36:35

0001 /*
0002    SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 #pragma once
0007 
0008 #include "libruqolawidgets_private_export.h"
0009 #include "misc/messagelistviewbase.h"
0010 class RocketChatAccount;
0011 class BannerInfoListViewDelegate;
0012 class LIBRUQOLAWIDGETS_TESTS_EXPORT BannerInfoListView : public MessageListViewBase
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit BannerInfoListView(RocketChatAccount *account, QWidget *parent = nullptr);
0017     ~BannerInfoListView() override;
0018 
0019 protected:
0020     [[nodiscard]] bool maybeStartDrag(QMouseEvent *event, const QStyleOptionViewItem &option, const QModelIndex &index) override;
0021     [[nodiscard]] bool mouseEvent(QMouseEvent *event, const QStyleOptionViewItem &option, const QModelIndex &index) override;
0022 
0023 private:
0024     LIBRUQOLAWIDGETS_NO_EXPORT void slotCustomContextMenuRequested(const QPoint &pos);
0025     LIBRUQOLAWIDGETS_NO_EXPORT void slotSelectAll(const QModelIndex &index);
0026     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString selectedText(const QModelIndex &index) override;
0027     [[nodiscard]] LIBRUQOLAWIDGETS_NO_EXPORT QString selectedText() const;
0028     BannerInfoListViewDelegate *const mBannerInfoListViewDelegate;
0029 };