File indexing completed on 2024-04-28 16:11:05

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 "libruqolacore_export.h"
0010 #include "notificationinfo.h"
0011 #include <QObject>
0012 class NotificationHistoryModel;
0013 
0014 class LIBRUQOLACORE_EXPORT NotificationHistoryManager : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit NotificationHistoryManager(QObject *parent = nullptr);
0019     ~NotificationHistoryManager() override;
0020 
0021     static NotificationHistoryManager *self();
0022 
0023     [[nodiscard]] NotificationHistoryModel *notificationHistoryModel() const;
0024 
0025     void addNotification(const NotificationInfo &info);
0026 
0027 Q_SIGNALS:
0028     void newNotification();
0029 
0030 private:
0031     NotificationHistoryModel *const mNotificationHistoryModel;
0032 };