Debian Codegraph @

plugins/plugman/example/NotifySendService.cpp

raw symbols SCIP
1 #include "NotifySendService.h"
2
3 NotifySendService::NotifySendService(QObject *parent) : ServicePlugin(parent)
4 {
5 }
6
7 QString NotifySendService::pluginId() const
8 {
9 return QStringLiteral("notify-send-service");
10 }
11
12 QString NotifySendService::location() const
13 {
14 return QStringLiteral("Dekko::Service");
15 }
16
17 QString NotifySendService::i18n() const
18 {
19 return QString();
20 }
21
22 QVariantMap NotifySendService::documentation() const
23 {
24 return QVariantMap();
25 }
26
27 void 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
37 QString NotifySendPlugin::name() const
38 {
39 return QStringLiteral("notify-send-service");
40 }
41
42 QString NotifySendPlugin::description() const
43 {
44 return QStringLiteral("Plugin that sends a simple notification");
45 }
46
47 PluginInfo *NotifySendPlugin::create(QObject *parent) const
48 {
49 return new NotifySendService(parent);
50 }