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

#include "settings.h"

#include <kstaticdeleter.h>

Settings *Settings::mSelf = 0;
static KStaticDeleter<Settings> staticSettingsDeleter;

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

  return mSelf;
}

Settings::Settings(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "ktronrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Game" ) );

  TDEConfigSkeleton::ItemColor  *itemColor_Background;
  itemColor_Background = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Color_Background" ), mColor_Background, TQColor( "black" ) );
  addItem( itemColor_Background, TQString::fromLatin1( "Color_Background" ) );
  TDEConfigSkeleton::ItemColor  *itemColor_Player1;
  itemColor_Player1 = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Color_Player1" ), mColor_Player1, TQColor( "red" ) );
  addItem( itemColor_Player1, TQString::fromLatin1( "Color_Player1" ) );
  TDEConfigSkeleton::ItemColor  *itemColor_Player2;
  itemColor_Player2 = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "Color_Player2" ), mColor_Player2, TQColor( "blue" ) );
  addItem( itemColor_Player2, TQString::fromLatin1( "Color_Player2" ) );
  TDEConfigSkeleton::ItemBool  *itemChangeWinnerColor;
  itemChangeWinnerColor = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "ChangeWinnerColor" ), mChangeWinnerColor, true );
  addItem( itemChangeWinnerColor, TQString::fromLatin1( "ChangeWinnerColor" ) );
  TDEConfigSkeleton::ItemBool  *itemAcceleratorBlocked;
  itemAcceleratorBlocked = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "AcceleratorBlocked" ), mAcceleratorBlocked, false );
  addItem( itemAcceleratorBlocked, TQString::fromLatin1( "AcceleratorBlocked" ) );
  TDEConfigSkeleton::ItemBool  *itemOppositeDirCrashes;
  itemOppositeDirCrashes = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "OppositeDirCrashes" ), mOppositeDirCrashes, false );
  addItem( itemOppositeDirCrashes, TQString::fromLatin1( "OppositeDirCrashes" ) );
  TDEConfigSkeleton::ItemInt  *itemRectSize;
  itemRectSize = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "RectSize" ), mRectSize, 10 );
  addItem( itemRectSize, TQString::fromLatin1( "RectSize" ) );
  TDEConfigSkeleton::ItemInt  *itemVelocity;
  itemVelocity = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Velocity" ), mVelocity, 5 );
  addItem( itemVelocity, TQString::fromLatin1( "Velocity" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesSkill;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Easy" );
    valuesSkill.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Medium" );
    valuesSkill.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Hard" );
    valuesSkill.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemSkill;
  itemSkill = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Skill" ), mSkill, valuesSkill, EnumSkill::Medium );
  addItem( itemSkill, TQString::fromLatin1( "Skill" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesStyle;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "OLine" );
    valuesStyle.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "ORect" );
    valuesStyle.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Line" );
    valuesStyle.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Circle" );
    valuesStyle.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemStyle;
  itemStyle = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "Style" ), mStyle, valuesStyle, EnumStyle::OLine );
  addItem( itemStyle, TQString::fromLatin1( "Style" ) );
  TDEConfigSkeleton::ItemBool  *itemBackgroundImageChoice;
  itemBackgroundImageChoice = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "BackgroundImageChoice" ), mBackgroundImageChoice, false );
  addItem( itemBackgroundImageChoice, TQString::fromLatin1( "BackgroundImageChoice" ) );
  TDEConfigSkeleton::ItemPath  *itemBackgroundImage;
  itemBackgroundImage = new TDEConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "BackgroundImage" ), mBackgroundImage );
  addItem( itemBackgroundImage, TQString::fromLatin1( "BackgroundImage" ) );
  TDEConfigSkeleton::ItemBool  *itemComputerplayer1;
  itemComputerplayer1 = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Computerplayer1" ), mComputerplayer1, true );
  addItem( itemComputerplayer1, TQString::fromLatin1( "Computerplayer1" ) );
  TDEConfigSkeleton::ItemBool  *itemComputerplayer2;
  itemComputerplayer2 = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Computerplayer2" ), mComputerplayer2, false );
  addItem( itemComputerplayer2, TQString::fromLatin1( "Computerplayer2" ) );
  TDEConfigSkeleton::ItemString  *itemNamePlayer1;
  itemNamePlayer1 = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Name_Pl1" ), mNamePlayer1 );
  addItem( itemNamePlayer1, TQString::fromLatin1( "NamePlayer1" ) );
  TDEConfigSkeleton::ItemString  *itemNamePlayer2;
  itemNamePlayer2 = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Name_Pl2" ), mNamePlayer2 );
  addItem( itemNamePlayer2, TQString::fromLatin1( "NamePlayer2" ) );
}

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

