make wallpaper configuration work after wallpaper switch

This commit is contained in:
Marco Martin 2013-03-07 16:59:32 +01:00
parent f7e8fd5bcf
commit 5b7af5f117
2 changed files with 9 additions and 1 deletions

View File

@ -115,11 +115,18 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper)
m_currentWallpaper = wallpaper;
emit currentWallpaperChanged();
emit wallpaperConfigurationChanged();
}
void ContainmentConfigView::applyWallpaper()
{
m_contianmentInterface->containment()->setWallpaper(m_currentWallpaper);
if (m_currentWallpaperConfig != m_contianmentInterface->wallpaperInterface()->configuration()) {
delete m_currentWallpaperConfig;
m_currentWallpaperConfig = m_contianmentInterface->wallpaperInterface()->configuration();
emit wallpaperConfigurationChanged();
}
}
#include "moc_containmentconfigview.cpp"

View File

@ -32,7 +32,7 @@ class ContainmentConfigView : public ConfigView
{
Q_OBJECT
Q_PROPERTY(ConfigModel *wallpaperConfigModel READ wallpaperConfigModel CONSTANT)
Q_PROPERTY(ConfigPropertyMap *wallpaperConfiguration READ wallpaperConfiguration CONSTANT)
Q_PROPERTY(ConfigPropertyMap *wallpaperConfiguration READ wallpaperConfiguration NOTIFY wallpaperConfigurationChanged)
Q_PROPERTY(QString currentWallpaper READ currentWallpaper WRITE setCurrentWallpaper NOTIFY currentWallpaperChanged)
public:
@ -48,6 +48,7 @@ public:
Q_SIGNALS:
void currentWallpaperChanged();
void wallpaperConfigurationChanged();
private:
ContainmentInterface *m_contianmentInterface;