You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
782 B
C++
31 lines
782 B
C++
#include "wallpaper.h"
|
|
|
|
Wallpaper::Wallpaper(QObject *parent)
|
|
: QObject(parent)
|
|
, m_interface("org.cutefish.Settings",
|
|
"/Theme", "org.cutefish.Theme",
|
|
QDBusConnection::sessionBus(), this)
|
|
{
|
|
if (m_interface.isValid()) {
|
|
connect(&m_interface, SIGNAL(wallpaperChanged(QString)), this, SLOT(onPathChanged(QString)));
|
|
connect(&m_interface, SIGNAL(darkModeDimsWallpaerChanged()), this, SIGNAL(dimsWallpaperChanged()));
|
|
}
|
|
}
|
|
|
|
QString Wallpaper::path() const
|
|
{
|
|
return m_interface.property("wallpaper").toString();
|
|
}
|
|
|
|
bool Wallpaper::dimsWallpaper() const
|
|
{
|
|
return m_interface.property("darkModeDimsWallpaer").toBool();
|
|
}
|
|
|
|
void Wallpaper::onPathChanged(QString path)
|
|
{
|
|
Q_UNUSED(path);
|
|
|
|
emit pathChanged();
|
|
}
|