File indexing completed on 2024-12-01 04:37:01

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 "channelcounterinfo.h"
0010 #include "libruqolawidgets_private_export.h"
0011 #include <KMessageWidget>
0012 
0013 class LIBRUQOLAWIDGETS_TESTS_EXPORT RoomCounterInfoWidget : public KMessageWidget
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit RoomCounterInfoWidget(QWidget *parent = nullptr);
0018     ~RoomCounterInfoWidget() override;
0019 
0020     [[nodiscard]] ChannelCounterInfo channelCounterInfo() const;
0021     void setChannelCounterInfo(const ChannelCounterInfo &channelCounterInfo);
0022 
0023 Q_SIGNALS:
0024     void markAsRead();
0025     void jumpToUnreadMessage(qint64 numberOfMessages);
0026 
0027 private:
0028     LIBRUQOLAWIDGETS_NO_EXPORT void updateInfo();
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotLinkActivated(const QString &contents);
0030     ChannelCounterInfo mChannelCounterInfo;
0031 };