From bfbeae9969956a6640dadd2f2653e4d0586b1d77 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 10 Sep 2013 12:43:25 +0200 Subject: [PATCH] propagate containmentTypeChanged --- src/plasma/containment.cpp | 1 + src/plasma/containment.h | 9 +++++++-- src/scriptengines/qml/plasmoid/containmentinterface.cpp | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index a40023e77..e5a29ff71 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -303,6 +303,7 @@ void Containment::setContainmentType(Plasma::Types::ContainmentType type) } d->type = type; + emit containmentTypeChanged(); } Corona *Containment::corona() const diff --git a/src/plasma/containment.h b/src/plasma/containment.h index 61d277638..5e810546c 100644 --- a/src/plasma/containment.h +++ b/src/plasma/containment.h @@ -255,6 +255,11 @@ Q_SIGNALS: */ void wallpaperChanged(); + /** + * Emitted when the value of drawWallpaper() has changed + */ + void drawWallpaperChanged(); + /** * Emitted when the location has changed * @since 5.0 @@ -274,9 +279,9 @@ Q_SIGNALS: void uiReadyChanged(bool uiReady); /** - * Emitted when the value of drawWallpaper() has changed + * emitted when the containment type changed */ - void drawWallpaperChanged(); + void containmentTypeChanged(); public Q_SLOTS: /** diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index b520b3a95..0fdb3936a 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -69,6 +69,8 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent) this, &ContainmentInterface::loadWallpaper); connect(containment(), &Plasma::Containment::drawWallpaperChanged, this, &ContainmentInterface::drawWallpaperChanged); + connect(containment(), &Plasma::Containment::containmentTypeChanged, + this, &ContainmentInterface::containmentTypeChanged); if (containment()->corona()) { connect(containment()->corona(), &Plasma::Corona::availableScreenRegionChanged,