// This file is generated by tdeconfig_compiler from kreversi.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( "kreversirc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Game" ) );

  TDEConfigSkeleton::ItemBool  *itemGrayscale;
  itemGrayscale = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Grayscale" ), mGrayscale, false );
  addItem( itemGrayscale, TQString::fromLatin1( "Grayscale" ) );
  TDEConfigSkeleton::ItemInt  *itemHumanColor;
  itemHumanColor = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "HumanColor" ), mHumanColor, 1 );
  addItem( itemHumanColor, TQString::fromLatin1( "HumanColor" ) );
  TDEConfigSkeleton::ItemInt  *itemComputerColor;
  itemComputerColor = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "ComputerColor" ), mComputerColor, 0 );
  addItem( itemComputerColor, TQString::fromLatin1( "ComputerColor" ) );
  TDEConfigSkeleton::ItemBool  *itemAnimation;
  itemAnimation = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "Animation" ), mAnimation, true );
  addItem( itemAnimation, TQString::fromLatin1( "Animation" ) );
  TDEConfigSkeleton::ItemInt  *itemAnimationSpeed;
  itemAnimationSpeed = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "AnimationSpeed" ), mAnimationSpeed, 4 );
  itemAnimationSpeed->setMinValue(1);
  itemAnimationSpeed->setMaxValue(10);
  addItem( itemAnimationSpeed, TQString::fromLatin1( "AnimationSpeed" ) );
  TDEConfigSkeleton::ItemInt  *itemZoom;
  itemZoom = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Zoom" ), mZoom, 100 );
  itemZoom->setMinValue(10);
  itemZoom->setMaxValue(300);
  addItem( itemZoom, TQString::fromLatin1( "Zoom" ) );
  TDEConfigSkeleton::ItemBool  *itemCompetitiveGameChoice;
  itemCompetitiveGameChoice = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "CompetitiveGameChoice" ), mCompetitiveGameChoice, true );
  addItem( itemCompetitiveGameChoice, TQString::fromLatin1( "CompetitiveGameChoice" ) );
  TDEConfigSkeleton::ItemInt  *itemSkill;
  itemSkill = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "skill" ), mSkill, 1 );
  itemSkill->setMinValue(1);
  itemSkill->setMaxValue(7);
  addItem( itemSkill, TQString::fromLatin1( "skill" ) );
  TDEConfigSkeleton::ItemBool  *itemBackgroundImageChoice;
  itemBackgroundImageChoice = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "BackgroundImageChoice" ), mBackgroundImageChoice, true );
  addItem( itemBackgroundImageChoice, TQString::fromLatin1( "BackgroundImageChoice" ) );
  TDEConfigSkeleton::ItemColor  *itemBackgroundColor;
  itemBackgroundColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "BackgroundColor" ), mBackgroundColor, TQColor( "#ffffff" ) );
  addItem( itemBackgroundColor, TQString::fromLatin1( "BackgroundColor" ) );
#define PICDATA(x) TDEGlobal::dirs()->findResource("appdata", TQString("pics/")+ x)
  TDEConfigSkeleton::ItemPath  *itemBackgroundImage;
  itemBackgroundImage = new TDEConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "BackgroundImage" ), mBackgroundImage, PICDATA("background/Light_Wood.png") );
  addItem( itemBackgroundImage, TQString::fromLatin1( "BackgroundImage" ) );
  TDEConfigSkeleton::ItemBool  *itemMenubarVisible;
  itemMenubarVisible = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "menubar visible" ), mMenubarVisible, true );
  addItem( itemMenubarVisible, TQString::fromLatin1( "MenubarVisible" ) );
}

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

