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

#include "options.h"

#include <kstaticdeleter.h>

Options *Options::mSelf = 0;
static KStaticDeleter<Options> staticOptionsDeleter;

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

  return mSelf;
}

Options::Options(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "kspaceduelrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Game" ) );

  TDEConfigSkeleton::ItemDouble  *itemTimeAfterKill;
  itemTimeAfterKill = new TDEConfigSkeleton::ItemDouble( currentGroup(), TQString::fromLatin1( "timeAfterKill" ), mTimeAfterKill, 42.9 );
  addItem( itemTimeAfterKill, TQString::fromLatin1( "TimeAfterKill" ) );
  TDEConfigSkeleton::ItemInt  *itemStartHitPoints[2];
  itemStartHitPoints[0] = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "startHitPointsP0" ), mStartHitPoints[0], 99 );
  addItem( itemStartHitPoints[0], TQString::fromLatin1( "StartHitPoints0" ) );
  itemStartHitPoints[1] = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "startHitPointsP1" ), mStartHitPoints[1], 99 );
  addItem( itemStartHitPoints[1], TQString::fromLatin1( "StartHitPoints1" ) );
  TDEConfigSkeleton::ItemBool  *itemPlayerIsAi[2];
  itemPlayerIsAi[0] = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "player0IsAi" ), mPlayerIsAi[0], false );
  addItem( itemPlayerIsAi[0], TQString::fromLatin1( "Player0IsAi" ) );
  itemPlayerIsAi[1] = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "player1IsAi" ), mPlayerIsAi[1], true );
  addItem( itemPlayerIsAi[1], TQString::fromLatin1( "Player1IsAi" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesAiDifficulty;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Trainee" );
    valuesAiDifficulty.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Normal" );
    valuesAiDifficulty.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Hard" );
    valuesAiDifficulty.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Insane" );
    valuesAiDifficulty.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemAiDifficulty[2];
  itemAiDifficulty[0] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ai0Difficulty" ), mAiDifficulty[0], valuesAiDifficulty, EnumAiDifficulty::Normal );
  addItem( itemAiDifficulty[0], TQString::fromLatin1( "AiDifficulty0" ) );
  itemAiDifficulty[1] = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "ai1Difficulty" ), mAiDifficulty[1], valuesAiDifficulty, EnumAiDifficulty::Normal );
  addItem( itemAiDifficulty[1], TQString::fromLatin1( "AiDifficulty1" ) );
  TDEConfigSkeleton::ItemInt  *itemLastConfig;
  itemLastConfig = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "lastConfig" ), mLastConfig, 0 );
  addItem( itemLastConfig, TQString::fromLatin1( "LastConfig" ) );
  TDEConfigSkeleton::ItemInt  *itemRefreshTime;
  itemRefreshTime = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "refreshTime" ), mRefreshTime, 33 );
  itemRefreshTime->setMinValue(10);
  itemRefreshTime->setMaxValue(100);
  addItem( itemRefreshTime, TQString::fromLatin1( "RefreshTime" ) );
}

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

