From cb34ebdf8f372d0c3d97ea70cc3562c82a1a553d Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 13 Nov 2009 22:27:30 +0000 Subject: [PATCH] add immutabile property svn path=/trunk/KDE/kdebase/runtime/; revision=1048765 --- scriptengines/javascript/appletinterface.cpp | 5 +++++ scriptengines/javascript/appletinterface.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/scriptengines/javascript/appletinterface.cpp b/scriptengines/javascript/appletinterface.cpp index 90bfc15d5..1650ccd08 100644 --- a/scriptengines/javascript/appletinterface.cpp +++ b/scriptengines/javascript/appletinterface.cpp @@ -298,4 +298,9 @@ void AppletInterface::setLayout(QGraphicsLayout *layout) applet()->setLayout(layout); } +bool AppletInterface::immutable() const +{ + return applet()->immutability() != Plasma::Mutable; +} + #include "appletinterface.moc" diff --git a/scriptengines/javascript/appletinterface.h b/scriptengines/javascript/appletinterface.h index 5c3736227..22e7d5d79 100644 --- a/scriptengines/javascript/appletinterface.h +++ b/scriptengines/javascript/appletinterface.h @@ -62,6 +62,7 @@ class AppletInterface : public QObject Q_PROPERTY(bool busy WRITE setBusy READ isBusy) Q_PROPERTY(BackgroundHints backgroundHints WRITE setBackgroundHints READ backgroundHints) Q_PROPERTY(QGraphicsLayout *layout WRITE setLayout READ layout) + Q_PROPERTY(bool immutable READ immutable) public: AppletInterface(SimpleJavaScriptApplet *parent); @@ -217,6 +218,7 @@ enum QtAlignment { QList contextualActions() const; QGraphicsLayout *layout() const; void setLayout(QGraphicsLayout *); + bool immutable() const; inline Plasma::Applet *applet() const { return m_appletScriptEngine->applet(); }