Add lockWidgets to containment interface

This commit is contained in:
Sebastian Kügler 2013-08-13 04:19:13 +02:00
parent 0859a1fe58
commit 0b5d791e2b
2 changed files with 9 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include <QDebug>
#include <KLocalizedString>
#include <plasma.h>
#include <Plasma/ContainmentActions>
#include <Plasma/Corona>
#include <Plasma/Package>
@ -120,6 +121,12 @@ int ContainmentInterface::screen() const
return containment()->screen();
}
void ContainmentInterface::lockWidgets(bool locked)
{
containment()->setImmutability(!locked ? Plasma::Types::Mutable : Plasma::Types::UserImmutable);
emit immutableChanged();
}
QRectF ContainmentInterface::screenGeometry(int id) const
{
QRectF rect;

View File

@ -66,6 +66,7 @@ public:
QString activity() const;
Q_INVOKABLE void lockWidgets(bool locked);
Q_INVOKABLE QRectF screenGeometry(int id) const;
Q_INVOKABLE QVariantList availableScreenRegion(int id) const;
@ -84,6 +85,7 @@ Q_SIGNALS:
void activityChanged();
void availableScreenRegionChanged();
void appletsChanged();
///void immutableChanged();
protected Q_SLOTS:
void appletAddedForward(Plasma::Applet *applet);