diff options
author | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
---|---|---|
committer | Jenkins CI <null@kde.org> | 2013-12-18 00:45:18 +0000 |
commit | c38b88497a833e482e6892b72c8f52adec6de857 (patch) | |
tree | 8c2d4b788cf54ab2179ffe53515d276feaeba2d1 /tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref | |
download | kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.gz kconfig-c38b88497a833e482e6892b72c8f52adec6de857.tar.bz2 |
Initial import from the monolithic kdelibs.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, kdelibs frameworks branch, at commit
162066dbbecde401a7347a1cff4fe72a9c919f58
Diffstat (limited to 'tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref')
-rw-r--r-- | tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref b/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref new file mode 100644 index 00000000..1dad37b5 --- /dev/null +++ b/tier1/kconfig/autotests/kconfig_compiler/test_signal.cpp.ref @@ -0,0 +1,73 @@ +// This file is generated by kconfig_compiler from test_signal.kcfg. +// All changes you do to this file will be lost. + +#include "test_signal.h" + +#include <qglobal.h> +#include <QtCore/QFile> + +class TestSignalHelper +{ + public: + TestSignalHelper() : q(0) {} + ~TestSignalHelper() { delete q; } + TestSignal *q; +}; +Q_GLOBAL_STATIC(TestSignalHelper, s_globalTestSignal) +TestSignal *TestSignal::self() +{ + if (!s_globalTestSignal()->q) { + new TestSignal; + s_globalTestSignal()->q->readConfig(); + } + + return s_globalTestSignal()->q; +} + +TestSignal::TestSignal( ) + : KConfigSkeleton( QLatin1String( "kconfig_compiler_test_rc" ) ) + , mSettingsChanged(0) +{ + Q_ASSERT(!s_globalTestSignal()->q); + s_globalTestSignal()->q = this; + setCurrentGroup( QLatin1String( "Appearance" ) ); + + KConfigSkeleton::ItemString *itemEmoticonTheme; + itemEmoticonTheme = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "emoticonTheme" ), mEmoticonTheme, QLatin1String( "Default" ) ); + addItem( itemEmoticonTheme, QLatin1String( "emoticonTheme" ) ); + KConfigSkeleton::ItemBool *itemUseEmoticon; + itemUseEmoticon = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useEmoticon" ), mUseEmoticon, true ); + addItem( itemUseEmoticon, QLatin1String( "useEmoticon" ) ); + KConfigSkeleton::ItemBool *itemEmoticonRequireSpace; + itemEmoticonRequireSpace = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "emoticonRequireSpace" ), mEmoticonRequireSpace, true ); + addItem( itemEmoticonRequireSpace, QLatin1String( "emoticonRequireSpace" ) ); + KConfigSkeleton::ItemString *itemStylePath; + itemStylePath = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "stylePath" ), mStylePath ); + addItem( itemStylePath, QLatin1String( "stylePath" ) ); + KConfigSkeleton::ItemString *itemStyleCSSVariant; + itemStyleCSSVariant = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "styleVariant" ), mStyleCSSVariant ); + addItem( itemStyleCSSVariant, QLatin1String( "StyleCSSVariant" ) ); +} + +TestSignal::~TestSignal() +{ + s_globalTestSignal()->q = 0; +} + +bool TestSignal::usrWriteConfig() +{ + const bool res = KConfigSkeleton::usrWriteConfig(); + if (!res) return false; + + if ( mSettingsChanged & signalEmoticonSettingsChanged ) + emit emoticonSettingsChanged(); + + if ( mSettingsChanged & signalStyleChanged ) + emit styleChanged(mStylePath, mStyleCSSVariant); + + mSettingsChanged = 0; + return true; +} + +#include "test_signal.moc" + |