propagate drawWallpaperChanged
This commit is contained in:
parent
e5b2907b53
commit
6bbc8cb420
@ -453,7 +453,12 @@ int Containment::screen() const
|
||||
|
||||
void Containment::setDrawWallpaper(bool drawWallpaper)
|
||||
{
|
||||
if (d->drawWallpaper == drawWallpaper) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->drawWallpaper = drawWallpaper;
|
||||
emit drawWallpaperChanged();
|
||||
}
|
||||
|
||||
bool Containment::drawWallpaper()
|
||||
|
@ -273,6 +273,11 @@ Q_SIGNALS:
|
||||
*/
|
||||
void uiReadyChanged(bool uiReady);
|
||||
|
||||
/**
|
||||
* Emitted when the value of drawWallpaper() has changed
|
||||
*/
|
||||
void drawWallpaperChanged();
|
||||
|
||||
public Q_SLOTS:
|
||||
/**
|
||||
* Informs the Corona as to what position it is in. This is informational
|
||||
|
@ -39,6 +39,10 @@ AppletScript::AppletScript(QObject *parent)
|
||||
d(new AppletScriptPrivate)
|
||||
{
|
||||
d->applet = 0;
|
||||
Plasma::Containment *cont = qobject_cast<Plasma::Containment *>(d->applet);
|
||||
if (cont) {
|
||||
connect(cont, &Plasma::Containment::drawWallpaperChanged, this, &AppletScript::drawWallpaperChanged);
|
||||
}
|
||||
}
|
||||
|
||||
AppletScript::~AppletScript()
|
||||
|
@ -150,6 +150,11 @@ Q_SIGNALS:
|
||||
*/
|
||||
void uiReadyChanged(bool uiReady);
|
||||
|
||||
/**
|
||||
* Emitted when the value of drawWallpaper() has changed
|
||||
*/
|
||||
void drawWallpaperChanged();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
/**
|
||||
|
@ -67,6 +67,8 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent)
|
||||
this, &ContainmentInterface::activityChanged);
|
||||
connect(containment(), &Plasma::Containment::wallpaperChanged,
|
||||
this, &ContainmentInterface::loadWallpaper);
|
||||
connect(containment(), &Plasma::Containment::drawWallpaperChanged,
|
||||
this, &ContainmentInterface::drawWallpaperChanged);
|
||||
|
||||
if (containment()->corona()) {
|
||||
connect(containment()->corona(), &Plasma::Corona::availableScreenRegionChanged,
|
||||
|
@ -44,14 +44,14 @@ class ContainmentInterface : public AppletInterface
|
||||
Q_PROPERTY(QList <QObject *> applets READ applets NOTIFY appletsChanged)
|
||||
|
||||
/**
|
||||
* True if the containment should draw a wallpaper TODO: notify
|
||||
* True if the containment should draw a wallpaper
|
||||
*/
|
||||
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper)
|
||||
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper NOTIFY drawWallpaperChanged)
|
||||
|
||||
/**
|
||||
* Type of this containment TODO: notify
|
||||
*/
|
||||
Q_PROPERTY(Plasma::Types::ContainmentType containmentType READ containmentType WRITE setContainmentType)
|
||||
Q_PROPERTY(Plasma::Types::ContainmentType containmentType READ containmentType WRITE setContainmentType NOTIFY containmentTypeChanged)
|
||||
|
||||
/**
|
||||
* Activity name of this containment
|
||||
@ -124,6 +124,8 @@ Q_SIGNALS:
|
||||
void activityChanged();
|
||||
void availableScreenRegionChanged();
|
||||
void appletsChanged();
|
||||
void drawWallpaperChanged();
|
||||
void containmentTypeChanged();
|
||||
///void immutableChanged();
|
||||
|
||||
protected Q_SLOTS:
|
||||
|
Loading…
Reference in New Issue
Block a user