File indexing completed on 2024-05-12 16:58:23
0001 #ifndef breezeexceptionlist_h 0002 #define breezeexceptionlist_h 0003 0004 ////////////////////////////////////////////////////////////////////////////// 0005 // breezeexceptionlist.h 0006 // window decoration exceptions 0007 // ------------------- 0008 // 0009 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0010 // 0011 // SPDX-License-Identifier: MIT 0012 ////////////////////////////////////////////////////////////////////////////// 0013 0014 #include "breeze.h" 0015 #include "breezesettings.h" 0016 0017 #include <KSharedConfig> 0018 0019 namespace Breeze 0020 { 0021 //! breeze exceptions list 0022 class ExceptionList 0023 { 0024 public: 0025 //! constructor from list 0026 explicit ExceptionList(const InternalSettingsList &exceptions = InternalSettingsList()) 0027 : _exceptions(exceptions) 0028 { 0029 } 0030 0031 //! exceptions 0032 const InternalSettingsList &get(void) const 0033 { 0034 return _exceptions; 0035 } 0036 0037 //! read from KConfig 0038 void readConfig(KSharedConfig::Ptr); 0039 0040 //! write to kconfig 0041 void writeConfig(KSharedConfig::Ptr); 0042 0043 protected: 0044 //! generate exception group name for given exception index 0045 static QString exceptionGroupName(int index); 0046 0047 //! read configuration 0048 static void readConfig(KCoreConfigSkeleton *, KConfig *, const QString &); 0049 0050 //! write configuration 0051 static void writeConfig(KCoreConfigSkeleton *, KConfig *, const QString &); 0052 0053 private: 0054 //! exceptions 0055 InternalSettingsList _exceptions; 0056 }; 0057 0058 } 0059 0060 #endif