1 #ifndef breezeexceptionlist_h 2 #define breezeexceptionlist_h 3 4 ////////////////////////////////////////////////////////////////////////////// 5 // breezeexceptionlist.h 6 // window decoration exceptions 7 // ------------------- 8 // 9 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> 10 // 11 // SPDX-License-Identifier: MIT 12 ////////////////////////////////////////////////////////////////////////////// 13 14 #include "breezesettings.h" 15 #include "breeze.h" 16 17 #include <KSharedConfig> 18 19 namespace Breeze 20 { 21 22 //! breeze exceptions list 23 class ExceptionList 24 { 25 26 public: 27 28 //! constructor from list 29 explicit ExceptionList( const InternalSettingsList& exceptions = InternalSettingsList() ): _exceptions(exceptions)30 _exceptions( exceptions ) 31 {} 32 33 //! exceptions get(void)34 const InternalSettingsList& get( void ) const 35 { return _exceptions; } 36 37 //! read from KConfig 38 void readConfig( KSharedConfig::Ptr ); 39 40 //! write to kconfig 41 void writeConfig( KSharedConfig::Ptr ); 42 43 protected: 44 45 //! generate exception group name for given exception index 46 static QString exceptionGroupName( int index ); 47 48 //! read configuration 49 static void readConfig( KCoreConfigSkeleton*, KConfig*, const QString& ); 50 51 //! write configuration 52 static void writeConfig( KCoreConfigSkeleton*, KConfig*, const QString& ); 53 54 private: 55 56 //! exceptions 57 InternalSettingsList _exceptions; 58 59 }; 60 61 } 62 63 #endif 64