|
|
|
// 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( TQString::fromLatin1( "klcddimmerrc" ) )
|
|
|
|
{
|
|
|
|
mSelf = this;
|
|
|
|
setCurrentGroup( TQString::fromLatin1( "general" ) );
|
|
|
|
|
|
|
|
KConfigSkeleton::ItemString *itemProgram;
|
|
|
|
itemProgram = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Program" ), mProgram, TQString::fromLatin1( "smartdimmer" ) );
|
|
|
|
addItem( itemProgram, TQString::fromLatin1( "Program" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemSetArgument;
|
|
|
|
itemSetArgument = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "SetArgument" ), mSetArgument, TQString::fromLatin1( "-s" ) );
|
|
|
|
addItem( itemSetArgument, TQString::fromLatin1( "SetArgument" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemGetArgument;
|
|
|
|
itemGetArgument = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "GetArgument" ), mGetArgument, TQString::fromLatin1( "-g" ) );
|
|
|
|
addItem( itemGetArgument, TQString::fromLatin1( "GetArgument" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemMinValue;
|
|
|
|
itemMinValue = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MinValue" ), mMinValue, TQString::fromLatin1( "1" ) );
|
|
|
|
addItem( itemMinValue, TQString::fromLatin1( "MinValue" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemMaxValue;
|
|
|
|
itemMaxValue = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "MaxValue" ), mMaxValue, TQString::fromLatin1( "21" ) );
|
|
|
|
addItem( itemMaxValue, TQString::fromLatin1( "MaxValue" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemStep;
|
|
|
|
itemStep = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Step" ), mStep, TQString::fromLatin1( "1" ) );
|
|
|
|
addItem( itemStep, TQString::fromLatin1( "Step" ) );
|
|
|
|
KConfigSkeleton::ItemBool *itemSaveCurrent;
|
|
|
|
itemSaveCurrent = new KConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "SaveCurrent" ), mSaveCurrent, false );
|
|
|
|
addItem( itemSaveCurrent, TQString::fromLatin1( "SaveCurrent" ) );
|
|
|
|
KConfigSkeleton::ItemString *itemCurrentValue;
|
|
|
|
itemCurrentValue = new KConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "CurrentValue" ), mCurrentValue );
|
|
|
|
addItem( itemCurrentValue, TQString::fromLatin1( "CurrentValue" ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
Preferences::~Preferences()
|
|
|
|
{
|
|
|
|
if ( mSelf == this )
|
|
|
|
staticPreferencesDeleter.setObject( mSelf, 0, false );
|
|
|
|
}
|
|
|
|
|