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

#include "commonprefs.h"

#include <kstaticdeleter.h>

CommonPrefs *CommonPrefs::mSelf = 0;
static KStaticDeleter<CommonPrefs> staticCommonPrefsDeleter;

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

  return mSelf;
}

CommonPrefs::CommonPrefs(  )
  : BasePrefs()
{
  mSelf = this;
  setCurrentGroup( QString::fromLatin1( "Options" ) );

  KConfigSkeleton::ItemBool  *itemShowNextPiece;
  itemShowNextPiece = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "show next piece" ), mShowNextPiece, true );
  addItem( itemShowNextPiece, QString::fromLatin1( "ShowNextPiece" ) );
  KConfigSkeleton::ItemBool  *itemShowPieceShadow;
  itemShowPieceShadow = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "show piece shadow" ), mShowPieceShadow, true );
  addItem( itemShowPieceShadow, QString::fromLatin1( "ShowPieceShadow" ) );
  KConfigSkeleton::ItemBool  *itemShowDetailedRemoved;
  itemShowDetailedRemoved = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "show detailed removed" ), mShowDetailedRemoved, false );
  addItem( itemShowDetailedRemoved, QString::fromLatin1( "ShowDetailedRemoved" ) );
  KConfigSkeleton::ItemInt  *itemInitialGameLevel;
  itemInitialGameLevel = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "init level" ), mInitialGameLevel, 1 );
  itemInitialGameLevel->setMinValue(1);
  itemInitialGameLevel->setMaxValue(20);
  addItem( itemInitialGameLevel, QString::fromLatin1( "InitialGameLevel" ) );
  KConfigSkeleton::ItemBool  *itemDirectDropDownEnabled;
  itemDirectDropDownEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "direct drop down" ), mDirectDropDownEnabled, false );
  addItem( itemDirectDropDownEnabled, QString::fromLatin1( "DirectDropDownEnabled" ) );

  setCurrentGroup( QString::fromLatin1( "AI" ) );

  KConfigSkeleton::ItemInt  *itemThinkingDepth;
  itemThinkingDepth = new KConfigSkeleton::ItemInt( currentGroup(), QString::fromLatin1( "thinking depth" ), mThinkingDepth, 2 );
  addItem( itemThinkingDepth, QString::fromLatin1( "ThinkingDepth" ) );
}

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

