// This file is generated by kconfig_compiler from ksnake.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(  )
  : KConfigSkeleton( QString::fromLatin1( "ksnakerc" ) )
{
  mSelf = this;
  setCurrentGroup( QString::fromLatin1( "Game" ) );

  KConfigSkeleton::ItemBool  *itemBgcolor_enabled;
  itemBgcolor_enabled = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "bgcolor_enabled" ), mBgcolor_enabled, false );
  addItem( itemBgcolor_enabled, QString::fromLatin1( "bgcolor_enabled" ) );
  KConfigSkeleton::ItemColor  *itemBgcolor;
  itemBgcolor = new KConfigSkeleton::ItemColor( currentGroup(), QString::fromLatin1( "bgcolor" ), mBgcolor, QColor( "white" ) );
  addItem( itemBgcolor, QString::fromLatin1( "bgcolor" ) );
  KConfigSkeleton::ItemBool  *itemBgimage_enabled;
  itemBgimage_enabled = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "bgimage_enabled" ), mBgimage_enabled, true );
  addItem( itemBgimage_enabled, QString::fromLatin1( "bgimage_enabled" ) );
  KConfigSkeleton::ItemInt  *itemBgimage;
  itemBgimage = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "bgimage" ), mBgimage, 4 );
  addItem( itemBgimage, QString::fromLatin1( "bgimage" ) );
  KConfigSkeleton::ItemInt  *itemSkill;
  itemSkill = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Skill" ), mSkill, 0 );
  addItem( itemSkill, QString::fromLatin1( "Skill" ) );
  KConfigSkeleton::ItemInt  *itemComputerSnakes;
  itemComputerSnakes = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "ComputerSnakes" ), mComputerSnakes, 1 );
  addItem( itemComputerSnakes, QString::fromLatin1( "ComputerSnakes" ) );
  KConfigSkeleton::ItemInt  *itemSnakesAI;
  itemSnakesAI = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "SnakesAI" ), mSnakesAI, 0 );
  addItem( itemSnakesAI, QString::fromLatin1( "SnakesAI" ) );
  KConfigSkeleton::ItemInt  *itemBalls;
  itemBalls = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "Balls" ), mBalls, 1 );
  addItem( itemBalls, QString::fromLatin1( "Balls" ) );
  KConfigSkeleton::ItemInt  *itemBallsAI;
  itemBallsAI = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "BallsAI" ), mBallsAI, 0 );
  addItem( itemBallsAI, QString::fromLatin1( "BallsAI" ) );
  KConfigSkeleton::ItemInt  *itemStartingRoom;
  itemStartingRoom = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "StartingRoom" ), mStartingRoom, 1 );
  addItem( itemStartingRoom, QString::fromLatin1( "StartingRoom" ) );
}

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

