1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// This file is generated by kconfig_compiler from preferences.kcfg.
// All changes you do to this file will be lost.
#include "preferences.h"
#include <kstaticdeleter.h>
Preferences *Preferences::mSelf = 0;
static KStaticDeleter<Preferences> staticPreferencesDeleter;
Preferences *Preferences::self()
{
if ( !mSelf ) {
staticPreferencesDeleter.setObject( mSelf, new Preferences() );
mSelf->readConfig();
}
return mSelf;
}
Preferences::Preferences( )
: KConfigSkeleton( QString::fromLatin1( "klcddimmerrc" ) )
{
mSelf = this;
setCurrentGroup( QString::fromLatin1( "general" ) );
KConfigSkeleton::ItemString *itemProgram;
itemProgram = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Program" ), mProgram, QString::fromLatin1( "smartdimmer" ) );
addItem( itemProgram, QString::fromLatin1( "Program" ) );
KConfigSkeleton::ItemString *itemSetArgument;
itemSetArgument = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "SetArgument" ), mSetArgument, QString::fromLatin1( "-s" ) );
addItem( itemSetArgument, QString::fromLatin1( "SetArgument" ) );
KConfigSkeleton::ItemString *itemGetArgument;
itemGetArgument = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "GetArgument" ), mGetArgument, QString::fromLatin1( "-g" ) );
addItem( itemGetArgument, QString::fromLatin1( "GetArgument" ) );
KConfigSkeleton::ItemString *itemMinValue;
itemMinValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MinValue" ), mMinValue, QString::fromLatin1( "1" ) );
addItem( itemMinValue, QString::fromLatin1( "MinValue" ) );
KConfigSkeleton::ItemString *itemMaxValue;
itemMaxValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "MaxValue" ), mMaxValue, QString::fromLatin1( "21" ) );
addItem( itemMaxValue, QString::fromLatin1( "MaxValue" ) );
KConfigSkeleton::ItemString *itemStep;
itemStep = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "Step" ), mStep, QString::fromLatin1( "1" ) );
addItem( itemStep, QString::fromLatin1( "Step" ) );
KConfigSkeleton::ItemBool *itemSaveCurrent;
itemSaveCurrent = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "SaveCurrent" ), mSaveCurrent, false );
addItem( itemSaveCurrent, QString::fromLatin1( "SaveCurrent" ) );
KConfigSkeleton::ItemString *itemCurrentValue;
itemCurrentValue = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "CurrentValue" ), mCurrentValue );
addItem( itemCurrentValue, QString::fromLatin1( "CurrentValue" ) );
}
Preferences::~Preferences()
{
if ( mSelf == this )
staticPreferencesDeleter.setObject( mSelf, 0, false );
}
|