From e94eba888244174740de90a9257e5c7cadb915a8 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Fri, 27 Jul 2007 11:42:43 +0000 Subject: [PATCH] Some applet mustn't be move (for example desktop applets) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693187 --- applet.cpp | 13 ++++++++++++- applet.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/applet.cpp b/applet.cpp index 784173dfa..0021018a9 100644 --- a/applet.cpp +++ b/applet.cpp @@ -65,7 +65,8 @@ public: scriptEngine(0), immutable(false), hasConfigurationInterface(false), - failed(false) + failed(false), + canMove(true) { if (appletId == 0) { appletId = nextId(); @@ -259,6 +260,7 @@ public: bool immutable : 1; bool hasConfigurationInterface : 1; bool failed : 1; + bool canMove : 1; }; uint Applet::Private::s_maxAppletId = 0; @@ -757,6 +759,15 @@ void Applet::setLockApplet(bool lock) slotLockApplet(lock); } +bool Applet::canBeMoved() const +{ + return d->canMove; +} + +void Applet::setCanBeMoved( bool move) +{ + d->canMove = move; +} } // Plasma namespace diff --git a/applet.h b/applet.h index ae515cfad..1e03e4195 100644 --- a/applet.h +++ b/applet.h @@ -389,6 +389,9 @@ class PLASMA_EXPORT Applet : public QObject, public Widget void setLockApplet(bool lock); + bool canBeMoved() const; + + void setCanBeMoved( bool move); Q_SIGNALS: /**