Port the notification backend to KNotifications

This commit is contained in:
Tobias Fella
2020-11-02 22:46:51 +00:00
parent 3c4eff0759
commit 8e7c84fd78
8 changed files with 61 additions and 207 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <QImage>
#include <QMap>
#include <QObject>
#include <QString>
#include <KNotification>
class NotificationsManager : public QObject
{
Q_OBJECT
public:
NotificationsManager(QObject *parent = nullptr);
Q_INVOKABLE void postNotification(const QString &roomId, const QString &eventId, const QString &roomName, const QString &senderName, const QString &text, const QImage &icon);
private:
QMultiMap<QString, KNotification *> m_notifications;
};