dde-dock/plugins/shutdown/shutdownplugin.cpp
石博文 654accbaf5 add some plugins interface method
Change-Id: I863da1169a5aceb1aa4891edd3ac000014e2eaa1
2016-08-02 09:28:06 +08:00

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");
}