diff --git a/scriptengines/javascript/appletinterface.cpp b/scriptengines/javascript/appletinterface.cpp index 619c5b5ed..750a1eb9c 100644 --- a/scriptengines/javascript/appletinterface.cpp +++ b/scriptengines/javascript/appletinterface.cpp @@ -210,6 +210,11 @@ QSizeF AppletInterface::size() const return applet()->size(); } +QRectF AppletInterface::rect() const +{ + return applet()->contentRect(); +} + void AppletInterface::setAction(const QString &name, const QString &text, const QString &icon, const QString &shortcut) { Plasma::Applet *a = applet(); diff --git a/scriptengines/javascript/appletinterface.h b/scriptengines/javascript/appletinterface.h index 8b1d9fff1..b6cfa20ae 100644 --- a/scriptengines/javascript/appletinterface.h +++ b/scriptengines/javascript/appletinterface.h @@ -133,6 +133,7 @@ enum QtAlignment { Q_INVOKABLE void setConfigurationRequired(bool needsConfiguring, const QString &reason = QString()); Q_INVOKABLE QSizeF size() const; + Q_INVOKABLE QRectF rect() const; Q_INVOKABLE void setAction(const QString &name, const QString &text, const QString &icon = QString(), const QString &shortcut = QString());