avialableWidgets
svn path=/trunk/KDE/kdebase/workspace/; revision=1119853
This commit is contained in:
parent
fa83ab3f21
commit
9fe0a6d34f
@ -189,6 +189,20 @@ QScriptValue ScriptEngine::panelById(QScriptContext *context, QScriptEngine *eng
|
||||
return engine->undefinedValue();
|
||||
}
|
||||
|
||||
QScriptValue ScriptEngine::availableWidgets(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
Q_UNUSED(context)
|
||||
|
||||
QStringList widgets;
|
||||
KPluginInfo::List info = Plasma::Applet::listAppletInfo();
|
||||
|
||||
foreach (const KPluginInfo &info, info) {
|
||||
widgets.append(info.pluginName());
|
||||
}
|
||||
|
||||
return qScriptValueFromValue(engine, widgets);
|
||||
}
|
||||
|
||||
QScriptValue ScriptEngine::activities(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
Q_UNUSED(context)
|
||||
@ -314,6 +328,7 @@ void ScriptEngine::setupEngine()
|
||||
m_scriptSelf.setProperty("QRectF", constructQRectFClass(this));
|
||||
m_scriptSelf.setProperty("Activity", newFunction(ScriptEngine::newActivity));
|
||||
m_scriptSelf.setProperty("Panel", newFunction(ScriptEngine::newPanel));
|
||||
m_scriptSelf.setProperty("availableWidgets", newFunction(ScriptEngine::availableWidgets));
|
||||
m_scriptSelf.setProperty("activities", newFunction(ScriptEngine::activities));
|
||||
m_scriptSelf.setProperty("activityById", newFunction(ScriptEngine::activityById));
|
||||
m_scriptSelf.setProperty("activityForScreen", newFunction(ScriptEngine::activityForScreen));
|
||||
|
@ -62,6 +62,7 @@ private:
|
||||
void setupEngine();
|
||||
|
||||
// containment accessors
|
||||
static QScriptValue availableWidgets(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue newActivity(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue newPanel(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue activities(QScriptContext *context, QScriptEngine *engine);
|
||||
|
Loading…
x
Reference in New Issue
Block a user