1 #ifndef oxygenexceptionlist_h
2 #define oxygenexceptionlist_h
3 
4 //////////////////////////////////////////////////////////////////////////////
5 // oxygenexceptionlist.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 "oxygensettings.h"
15 #include "oxygen.h"
16 
17 #include <KSharedConfig>
18 
19 namespace Oxygen
20 {
21 
22     //* oxygen 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         private:
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         //* exceptions
55         InternalSettingsList _exceptions;
56 
57     };
58 
59 }
60 
61 #endif
62