expose the plugin name

This commit is contained in:
Marco Martin 2014-03-25 15:13:22 +01:00
parent 7a6008d58a
commit c4e6f06f42
2 changed files with 12 additions and 0 deletions

View File

@ -148,6 +148,11 @@ uint AppletInterface::id() const
return applet()->id(); return applet()->id();
} }
QString AppletInterface::pluginName() const
{
return applet()->pluginInfo().pluginName();
}
QString AppletInterface::icon() const QString AppletInterface::icon() const
{ {
return applet()->icon(); return applet()->icon();

View File

@ -62,6 +62,11 @@ class AppletInterface : public PlasmaQuick::AppletQuickItem
*/ */
Q_PROPERTY(int apiVersion READ apiVersion CONSTANT) Q_PROPERTY(int apiVersion READ apiVersion CONSTANT)
/**
* Plugin name of the plasmoid
*/
Q_PROPERTY(QString pluginName READ pluginName CONSTANT)
/** /**
* User friendly title for the plasmoid: it's the localized applet name by default * User friendly title for the plasmoid: it's the localized applet name by default
*/ */
@ -223,6 +228,8 @@ public:
} }
//PROPERTY ACCESSORS------------------------------------------------------------------- //PROPERTY ACCESSORS-------------------------------------------------------------------
QString pluginName() const;
QString icon() const; QString icon() const;
void setIcon(const QString &icon); void setIcon(const QString &icon);