Dekko
Loading...
Searching...
No Matches
NotifySendService.cpp
1#include "NotifySendService.h"
2
3NotifySendService::NotifySendService(QObject *parent) : ServicePlugin(parent)
4{
5}
6
7QString NotifySendService::pluginId() const
8{
9 return QStringLiteral("notify-send-service");
10}
11
12QString NotifySendService::location() const
13{
14 return QStringLiteral("Dekko::Service");
15}
16
17QString NotifySendService::i18n() const
18{
19 return QString();
20}
21
22QVariantMap NotifySendService::documentation() const
23{
24 return QVariantMap();
25}
26
27void NotifySendService::start() {
28 QStringList options;
29 options.append("-i");
30 options.append("/usr/share/icons/dekko.png");
31 options.append(QStringLiteral("Hello Service"));
32 options.append(QStringLiteral("This is pretty cool"));
33 m_process.start("notify-send", options);
34}
35
36
37QString NotifySendPlugin::name() const
38{
39 return QStringLiteral("notify-send-service");
40}
41
42QString NotifySendPlugin::description() const
43{
44 return QStringLiteral("Plugin that sends a simple notification");
45}
46
47PluginInfo *NotifySendPlugin::create(QObject *parent) const
48{
49 return new NotifySendService(parent);
50}