File indexing completed on 2024-05-05 05:28:59
0001 /* 0002 * SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #pragma once 0008 0009 #include "breeze.h" 0010 #include "breezedecoration.h" 0011 #include "breezesettings.h" 0012 0013 #include <KSharedConfig> 0014 0015 #include <QObject> 0016 0017 namespace Breeze 0018 { 0019 class SettingsProvider : public QObject 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 //* destructor 0025 ~SettingsProvider(); 0026 0027 //* singleton 0028 static SettingsProvider *self(); 0029 0030 //* internal settings for given decoration 0031 InternalSettingsPtr internalSettings(Decoration *) const; 0032 0033 public Q_SLOTS: 0034 0035 //* reconfigure 0036 void reconfigure(); 0037 0038 private: 0039 //* constructor 0040 SettingsProvider(); 0041 0042 //* default configuration 0043 InternalSettingsPtr m_defaultSettings; 0044 0045 //* exceptions 0046 InternalSettingsList m_exceptions; 0047 0048 //* config object 0049 KSharedConfigPtr m_config; 0050 0051 //* singleton 0052 static SettingsProvider *s_self; 0053 }; 0054 0055 }