File indexing completed on 2024-05-05 05:35:17
0001 #ifndef oxygensettingsprovider_h 0002 #define oxygensettingsprovider_h 0003 /* 0004 * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0005 * SPDX-FileCopyrightText: 2015 David Edmundson <davidedmundson@kde.org> 0006 * 0007 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0008 */ 0009 0010 #include "oxygen.h" 0011 #include "oxygendecoration.h" 0012 0013 #include <KSharedConfig> 0014 #include <QObject> 0015 0016 namespace Oxygen 0017 { 0018 class DecoHelper; 0019 class ShadowCache; 0020 0021 class SettingsProvider : public QObject 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 //* destructor 0027 ~SettingsProvider(); 0028 0029 //* singleton 0030 static SettingsProvider *self(); 0031 0032 //* helper 0033 DecoHelper *helper(void) const 0034 { 0035 return m_decoHelper; 0036 } 0037 0038 //* shadow cache 0039 ShadowCache *shadowCache(void) const 0040 { 0041 return m_shadowCache; 0042 } 0043 0044 //* internal settings for given decoration 0045 InternalSettingsPtr internalSettings(const Decoration *) const; 0046 0047 public Q_SLOTS: 0048 0049 //* reconfigure 0050 void reconfigure(void); 0051 0052 private: 0053 //* contructor 0054 SettingsProvider(void); 0055 0056 //* default configuration 0057 InternalSettingsPtr m_defaultSettings; 0058 0059 //* exceptions 0060 InternalSettingsList m_exceptions; 0061 0062 //* config object 0063 KSharedConfigPtr m_config; 0064 0065 //* decoration helper 0066 DecoHelper *m_decoHelper = nullptr; 0067 0068 //* shadow cache 0069 ShadowCache *m_shadowCache = nullptr; 0070 0071 //* singleton 0072 static SettingsProvider *s_self; 0073 }; 0074 } 0075 0076 #endif