Add lockWidgets to containment interface
This commit is contained in:
parent
0859a1fe58
commit
0b5d791e2b
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user