File indexing completed on 2025-10-12 04:54:24

0001 #ifndef oxygenexceptionlist_h
0002 #define oxygenexceptionlist_h
0003 
0004 //////////////////////////////////////////////////////////////////////////////
0005 // oxygenexceptionlist.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 "oxygen.h"
0015 #include "oxygensettings.h"
0016 
0017 #include <KSharedConfig>
0018 
0019 namespace Oxygen
0020 {
0021 //* oxygen 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 private:
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     //* exceptions
0054     InternalSettingsList _exceptions;
0055 };
0056 }
0057 
0058 #endif