aboutsummaryrefslogtreecommitdiff
path: root/notifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'notifications.cpp')
-rw-r--r--notifications.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/notifications.cpp b/notifications.cpp
new file mode 100644
index 0000000..712e37e
--- /dev/null
+++ b/notifications.cpp
@@ -0,0 +1,21 @@
+#include <KNotification>
+#include "notifications.h"
+
+DcNotifications::DcNotifications(QObject *parent)
+ : QObject{parent}
+{
+}
+
+void
+DcNotifications::send(QString event, QString pfpPath, QString title, QString message) {
+
+ KNotification *newMess = new KNotification(event);
+ newMess->setPixmap(QPixmap(pfpPath));
+ newMess->setIconName("chat.delta.KDeltaChat");
+ newMess->setComponentName("kdeltachat");
+ newMess->setTitle(title);
+ newMess->setText(message);
+ newMess->sendEvent();
+
+}
+//newMess->setPixmap(QPixmap(":/res/chat.delta.KDeltaChat.png"));