From 15122a4d6eb185f3383ed53057bb9b444bcda94c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 28 Feb 2011 20:42:06 +0100 Subject: [PATCH] export action() --- scriptengines/javascript/plasmoid/appletinterface.cpp | 5 +++++ scriptengines/javascript/plasmoid/appletinterface.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/scriptengines/javascript/plasmoid/appletinterface.cpp b/scriptengines/javascript/plasmoid/appletinterface.cpp index 668faae00..2564cb8b0 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.cpp +++ b/scriptengines/javascript/plasmoid/appletinterface.cpp @@ -294,6 +294,11 @@ void AppletInterface::removeAction(const QString &name) m_actions.remove(name); } +QAction *AppletInterface::action(QString name) const +{ + return applet()->action(name); +} + void AppletInterface::resize(qreal w, qreal h) { applet()->resize(w,h); diff --git a/scriptengines/javascript/plasmoid/appletinterface.h b/scriptengines/javascript/plasmoid/appletinterface.h index da5b8b261..51caf424c 100644 --- a/scriptengines/javascript/plasmoid/appletinterface.h +++ b/scriptengines/javascript/plasmoid/appletinterface.h @@ -249,6 +249,8 @@ enum IntervalAlignment { Q_INVOKABLE void removeAction(const QString &name); + Q_INVOKABLE QAction *action(QString name) const; + Q_INVOKABLE void resize(qreal w, qreal h); Q_INVOKABLE void setMinimumSize(qreal w, qreal h);