#include "systemnotification.h" #include "src/utils/confighandler.h" #include #include #include #include SystemNotification::SystemNotification(QObject *parent) : QObject(parent) { m_interface = new QDBusInterface("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications", QDBusConnection::sessionBus(), this); } void SystemNotification::sendMessage( const QString &text, const QString &title, const int timeout) { if(!ConfigHandler().desktopNotificationValue()) { return; } QList args; args << (qAppName()) //appname << static_cast(0) //id << "flameshot.png" //icon << title //summary << text //body << QStringList() //actions << QVariantMap() //hints << timeout; //timeout m_interface->callWithArgumentList(QDBus::AutoDetect, "Notify", args); }