kimmoli icon

Untitled

kimmoli | PRO | 05/04/14 10:00:23 AM UTC | 0 ⭐ | 452 👁️ | Never ⏰ | []
text |

810 B

|

None

|

0 👍

/

0 👎

void myapp::notificationSend(QString summary, QString body)
{
     QDBusInterface notifyCall("org.freedesktop.Notifications", "/org/freedesktop/Notifications", "");
     QVariantHash hints;
    hints.insert("x-nemo-preview-summary", summary);
     QList<QVariant> args;
    args.append("myapp");
    args.append(ssNotifyReplacesId);
    args.append("icon-m-notifications");
    args.append(summary);
    args.append(body);
    args.append((QStringList() << "default" << ""));
    args.append(hints);
    args.append(-1);
     QDBusMessage notifyCallReply = notifyCall.callWithArgumentList(QDBus::AutoDetect, "Notify", args);
     QList<QVariant> outArgs = notifyCallReply.arguments();
     ssNotifyReplacesId = outArgs.at(0).toInt();
     printf("Notification sent, got id %d\n", ssNotifyReplacesId);
 }

Comments