From d5ad7202ea77e8a512073f9ce09b6c07e37d6305 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Sun, 6 Feb 2022 20:42:01 +0100 Subject: Move notifications to own header file - also make a skel for files in /usr/, useful for sounds and notifyrc - build.sh use plain simple cp -r to copy the skel. also copies the knotifications5 in the current directory for qml.qrc embedding in case the app is used on android. --- notifications.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 notifications.cpp (limited to 'notifications.cpp') 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 +#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")); -- cgit v1.2.3-70-g09d2