add immutabile property

svn path=/trunk/KDE/kdebase/runtime/; revision=1048765
This commit is contained in:
Aaron J. Seigo 2009-11-13 22:27:30 +00:00
parent 8acb059ded
commit cb34ebdf8f
2 changed files with 7 additions and 0 deletions

View File

@ -298,4 +298,9 @@ void AppletInterface::setLayout(QGraphicsLayout *layout)
applet()->setLayout(layout);
}
bool AppletInterface::immutable() const
{
return applet()->immutability() != Plasma::Mutable;
}
#include "appletinterface.moc"

View File

@ -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<QAction*> contextualActions() const;
QGraphicsLayout *layout() const;
void setLayout(QGraphicsLayout *);
bool immutable() const;
inline Plasma::Applet *applet() const { return m_appletScriptEngine->applet(); }