File indexing completed on 2024-05-12 17:24:10
0001 // This file is generated by kconfig_compiler_kf5 from powerplantconfig.kcfg. 0002 // All changes you do to this file will be lost. 0003 0004 #include "powerplantconfig.h" 0005 0006 #include <qglobal.h> 0007 #include <QFile> 0008 0009 class powerplantConfigHelper 0010 { 0011 public: 0012 powerplantConfigHelper() : q(nullptr) {} 0013 ~powerplantConfigHelper() { delete q; q = nullptr; } 0014 powerplantConfigHelper(const powerplantConfigHelper&) = delete; 0015 powerplantConfigHelper& operator=(const powerplantConfigHelper&) = delete; 0016 powerplantConfig *q; 0017 }; 0018 Q_GLOBAL_STATIC(powerplantConfigHelper, s_globalpowerplantConfig) 0019 powerplantConfig *powerplantConfig::self() 0020 { 0021 if (!s_globalpowerplantConfig()->q) { 0022 new powerplantConfig; 0023 s_globalpowerplantConfig()->q->read(); 0024 } 0025 0026 return s_globalpowerplantConfig()->q; 0027 } 0028 0029 powerplantConfig::powerplantConfig( QObject *parent ) 0030 : KConfigSkeleton() 0031 { 0032 setParent(parent); 0033 Q_ASSERT(!s_globalpowerplantConfig()->q); 0034 s_globalpowerplantConfig()->q = this; 0035 KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&powerplantConfig::itemChanged); 0036 0037 setCurrentGroup( QStringLiteral( "General" ) ); 0038 0039 KConfigCompilerSignallingItem *itemSomeSetting; 0040 KConfigSkeleton::ItemBool *innerItemSomeSetting; 0041 innerItemSomeSetting = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "someSetting" ), mSomeSetting, true ); 0042 itemSomeSetting = new KConfigCompilerSignallingItem(innerItemSomeSetting, this, notifyFunction, signalSomeSettingChanged); 0043 addItem( itemSomeSetting, QStringLiteral( "someSetting" ) ); 0044 } 0045 0046 bool powerplantConfig::defaultSomeSettingValue_helper() 0047 { 0048 0049 return true; 0050 } 0051 0052 powerplantConfig::~powerplantConfig() 0053 { 0054 if (s_globalpowerplantConfig.exists() && !s_globalpowerplantConfig.isDestroyed()) { 0055 s_globalpowerplantConfig()->q = nullptr; 0056 } 0057 } 0058 0059 0060 void powerplantConfig::itemChanged(quint64 signalFlag) { 0061 0062 switch (signalFlag) { 0063 case signalSomeSettingChanged: 0064 Q_EMIT someSettingChanged(); 0065 break; 0066 } 0067 } 0068 0069 #include "powerplantconfig.moc" 0070