allow access to configuration

svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=906336
This commit is contained in:
Aaron J. Seigo 2009-01-05 23:27:55 +00:00
parent 728f6cbfcf
commit 9cf1237aee
2 changed files with 13 additions and 0 deletions

View File

@ -109,6 +109,17 @@ void AppletInterface::update()
applet()->update(); applet()->update();
} }
QVariant AppletInterface::readConfig(const QString &entry) const
{
Plasma::ConfigLoader *config = applet()->configScheme();
if (config) {
return config->property(entry);
}
return QVariant();
}
const Plasma::Package *AppletInterface::package() const const Plasma::Package *AppletInterface::package() const
{ {
return m_appletScriptEngine->package(); return m_appletScriptEngine->package();

View File

@ -136,6 +136,8 @@ enum QtOrientation {
Q_INVOKABLE void update(); Q_INVOKABLE void update();
Q_INVOKABLE QVariant readConfig(const QString &entry) const;
//FIXME bindings //FIXME bindings
Plasma::DataEngine *dataEngine(const QString &name); Plasma::DataEngine *dataEngine(const QString &name);