mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
42 lines
876 B
C++
42 lines
876 B
C++
#include "shutdownplugin.h"
|
|
|
|
#include <QIcon>
|
|
|
|
ShutdownPlugin::ShutdownPlugin(QObject *parent)
|
|
: QObject(parent)
|
|
{
|
|
m_icon.addFile(":/icons/resources/icons/fashion.svg");
|
|
}
|
|
|
|
const QString ShutdownPlugin::pluginName()
|
|
{
|
|
return "shutdown";
|
|
}
|
|
|
|
PluginsItemInterface::PluginType ShutdownPlugin::pluginType(const QString &itemKey)
|
|
{
|
|
Q_UNUSED(itemKey);
|
|
|
|
return Simple;
|
|
}
|
|
|
|
void ShutdownPlugin::init(PluginProxyInterface *proxyInter)
|
|
{
|
|
m_proxyInter = proxyInter;
|
|
m_proxyInter->itemAdded(this, QString());
|
|
}
|
|
|
|
const QIcon ShutdownPlugin::itemIcon(const QString &itemKey)
|
|
{
|
|
Q_UNUSED(itemKey);
|
|
|
|
return m_icon;
|
|
}
|
|
|
|
const QString ShutdownPlugin::itemCommand(const QString &itemKey)
|
|
{
|
|
Q_UNUSED(itemKey);
|
|
|
|
return QString("dbus-send --print-reply --dest=com.deepin.dde.shutdownFront /com/deepin/dde/shutdownFront com.deepin.dde.shutdownFront.Show");
|
|
}
|