// This file is generated by kconfig_compiler_kf5 from test_signal.kcfg. // All changes you do to this file will be lost. #include "test_signal.h" #include #include class TestSignalHelper { public: TestSignalHelper() : q(nullptr) {} ~TestSignalHelper() { delete q; } TestSignalHelper(const TestSignalHelper&) = delete; TestSignalHelper& operator=(const TestSignalHelper&) = delete; TestSignal *q; }; Q_GLOBAL_STATIC(TestSignalHelper, s_globalTestSignal) TestSignal *TestSignal::self() { if (!s_globalTestSignal()->q) { new TestSignal; s_globalTestSignal()->q->read(); } return s_globalTestSignal()->q; } TestSignal::TestSignal( ) : KConfigSkeleton( QStringLiteral( "kconfig_compiler_kf5_test_rc" ) ) , mSettingsChanged(0) { Q_ASSERT(!s_globalTestSignal()->q); s_globalTestSignal()->q = this; KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast(&TestSignal::itemChanged); setCurrentGroup( QStringLiteral( "Appearance" ) ); KConfigCompilerSignallingItem *itemEmoticonTheme; itemEmoticonTheme = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "emoticonTheme" ), mEmoticonTheme, QStringLiteral( "Default" ) ), this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemEmoticonTheme, QStringLiteral( "emoticonTheme" ) ); KConfigCompilerSignallingItem *itemUseEmoticon; itemUseEmoticon = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useEmoticon" ), mUseEmoticon, true ), this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemUseEmoticon, QStringLiteral( "useEmoticon" ) ); KConfigCompilerSignallingItem *itemEmoticonRequireSpace; itemEmoticonRequireSpace = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "emoticonRequireSpace" ), mEmoticonRequireSpace, true ), this, notifyFunction, signalEmoticonSettingsChanged); addItem( itemEmoticonRequireSpace, QStringLiteral( "emoticonRequireSpace" ) ); KConfigCompilerSignallingItem *itemStylePath; itemStylePath = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "stylePath" ), mStylePath ), this, notifyFunction, signalStyleChanged); addItem( itemStylePath, QStringLiteral( "stylePath" ) ); KConfigSkeleton::ItemString *itemStyleCSSVariant; itemStyleCSSVariant = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "styleVariant" ), mStyleCSSVariant ); addItem( itemStyleCSSVariant, QStringLiteral( "StyleCSSVariant" ) ); } TestSignal::~TestSignal() { s_globalTestSignal()->q = nullptr; } bool TestSignal::usrSave() { const bool res = KConfigSkeleton::usrSave(); if (!res) return false; if ( mSettingsChanged & signalEmoticonSettingsChanged ) Q_EMIT emoticonSettingsChanged(); if ( mSettingsChanged & signalStyleChanged ) Q_EMIT styleChanged(mStylePath, mStyleCSSVariant); mSettingsChanged = 0; return true; } void TestSignal::itemChanged(quint64 flags) { mSettingsChanged |= flags; } #include "test_signal.moc"