mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
73 lines
2.4 KiB
Text
73 lines
2.4 KiB
Text
// 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 <kglobal.h>
|
|
#include <QtCore/QFile>
|
|
|
|
class TestSignalHelper
|
|
{
|
|
public:
|
|
TestSignalHelper() : q(0) {}
|
|
~TestSignalHelper() { delete q; }
|
|
TestSignal *q;
|
|
};
|
|
K_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()
|
|
{
|
|
if (!s_globalTestSignal.isDestroyed()) {
|
|
s_globalTestSignal->q = 0;
|
|
}
|
|
}
|
|
|
|
void TestSignal::usrWriteConfig()
|
|
{
|
|
KConfigSkeleton::usrWriteConfig();
|
|
|
|
if ( mSettingsChanged & signalEmoticonSettingsChanged )
|
|
emit emoticonSettingsChanged();
|
|
|
|
if ( mSettingsChanged & signalStyleChanged )
|
|
emit styleChanged(mStylePath, mStyleCSSVariant);
|
|
|
|
mSettingsChanged = 0;
|
|
}
|
|
|
|
#include "test_signal.moc"
|
|
|