propagate containmentTypeChanged

This commit is contained in:
Marco Martin 2013-09-10 12:43:25 +02:00
parent 6bbc8cb420
commit bfbeae9969
3 changed files with 10 additions and 2 deletions

View File

@ -303,6 +303,7 @@ void Containment::setContainmentType(Plasma::Types::ContainmentType type)
} }
d->type = type; d->type = type;
emit containmentTypeChanged();
} }
Corona *Containment::corona() const Corona *Containment::corona() const

View File

@ -255,6 +255,11 @@ Q_SIGNALS:
*/ */
void wallpaperChanged(); void wallpaperChanged();
/**
* Emitted when the value of drawWallpaper() has changed
*/
void drawWallpaperChanged();
/** /**
* Emitted when the location has changed * Emitted when the location has changed
* @since 5.0 * @since 5.0
@ -274,9 +279,9 @@ Q_SIGNALS:
void uiReadyChanged(bool uiReady); 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: public Q_SLOTS:
/** /**

View File

@ -69,6 +69,8 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent)
this, &ContainmentInterface::loadWallpaper); this, &ContainmentInterface::loadWallpaper);
connect(containment(), &Plasma::Containment::drawWallpaperChanged, connect(containment(), &Plasma::Containment::drawWallpaperChanged,
this, &ContainmentInterface::drawWallpaperChanged); this, &ContainmentInterface::drawWallpaperChanged);
connect(containment(), &Plasma::Containment::containmentTypeChanged,
this, &ContainmentInterface::containmentTypeChanged);
if (containment()->corona()) { if (containment()->corona()) {
connect(containment()->corona(), &Plasma::Corona::availableScreenRegionChanged, connect(containment()->corona(), &Plasma::Corona::availableScreenRegionChanged,