// This file is generated by tdeconfig_compiler from klettres.kcfg.
// All changes you do to this file will be lost.

#include "prefs.h"

#include <kstaticdeleter.h>

Prefs *Prefs::mSelf = 0;
static KStaticDeleter<Prefs> staticPrefsDeleter;

Prefs *Prefs::self()
{
  if ( !mSelf ) {
    staticPrefsDeleter.setObject( mSelf, new Prefs() );
    mSelf->readConfig();
  }

  return mSelf;
}

Prefs::Prefs(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "klettresrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "General" ) );

  TDEConfigSkeleton::ItemString  *itemLanguage;
  itemLanguage = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Language" ), mLanguage );
  addItem( itemLanguage, TQString::fromLatin1( "Language" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesTheme;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "classroom" );
    valuesTheme.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "arctic" );
    valuesTheme.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "desert" );
    valuesTheme.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemTheme;
  itemTheme = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "myTheme" ), mTheme, valuesTheme, EnumTheme::arctic );
  addItem( itemTheme, TQString::fromLatin1( "Theme" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesMode;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "kid" );
    valuesMode.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "grownup" );
    valuesMode.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemMode;
  itemMode = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "myMode" ), mMode, valuesMode, EnumMode::grownup );
  addItem( itemMode, TQString::fromLatin1( "Mode" ) );
  TDEConfigSkeleton::ItemInt  *itemLevel;
  itemLevel = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "myLevel" ), mLevel, 1 );
  itemLevel->setMinValue(1);
  itemLevel->setMaxValue(4);
  addItem( itemLevel, TQString::fromLatin1( "Level" ) );
  TDEConfigSkeleton::ItemInt  *itemKidTimer;
  itemKidTimer = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "KidTimer" ), mKidTimer, 4 );
  addItem( itemKidTimer, TQString::fromLatin1( "KidTimer" ) );
  TDEConfigSkeleton::ItemInt  *itemGrownTimer;
  itemGrownTimer = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "GrownTimer" ), mGrownTimer, 2 );
  addItem( itemGrownTimer, TQString::fromLatin1( "GrownTimer" ) );

  setCurrentGroup( TQString::fromLatin1( "mFont" ) );

TQFont defaultFont = TDEGlobalSettings::largeFont();
    	defaultFont.setPointSize(48);
    	defaultFont.setBold(true);
      
  TDEConfigSkeleton::ItemFont  *itemFont;
  itemFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "mFont" ), mFont, defaultFont );
  addItem( itemFont, TQString::fromLatin1( "Font" ) );
}

Prefs::~Prefs()
{
  if ( mSelf == this )
    staticPrefsDeleter.setObject( mSelf, 0, false );
}

