File indexing completed on 2024-03-24 05:30:32
0001 /* 0002 SPDX-FileCopyrightText: 2020 Cyril Rossi <cyril.rossi@enioka.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #pragma once 0007 0008 #include <QObject> 0009 0010 #include <KCoreConfigSkeleton> 0011 #include <KPackage/Package> 0012 0013 namespace ScreenLocker 0014 { 0015 class WallpaperIntegration; 0016 class LnFIntegration; 0017 } 0018 0019 class KConfigPropertyMap; 0020 0021 class AppearanceSettings : public QObject 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit AppearanceSettings(QObject *parent = nullptr); 0027 0028 QUrl lnfConfigFile() const; 0029 QUrl wallpaperConfigFile() const; 0030 0031 KConfigPropertyMap *wallpaperConfiguration() const; 0032 KConfigPropertyMap *lnfConfiguration() const; 0033 0034 ScreenLocker::WallpaperIntegration *wallpaperIntegration() const; 0035 0036 void load(); 0037 void save(); 0038 void defaults(); 0039 0040 bool isDefaults() const; 0041 bool isSaveNeeded() const; 0042 0043 void loadWallpaperConfig(); 0044 0045 Q_SIGNALS: 0046 void currentWallpaperChanged(); 0047 0048 private: 0049 void loadLnfConfig(); 0050 0051 KPackage::Package m_package; 0052 ScreenLocker::WallpaperIntegration *m_wallpaperIntegration = nullptr; 0053 KCoreConfigSkeleton *m_wallpaperSettings = nullptr; 0054 QUrl m_wallpaperConfigFile; 0055 ScreenLocker::LnFIntegration *m_lnfIntegration = nullptr; 0056 KCoreConfigSkeleton *m_lnfSettings = nullptr; 0057 QUrl m_lnfConfigFile; 0058 };