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

#include "preferences.h"

#include <kglobal.h>
#include <QtCore/QFile>

class PreferencesHelper
{
  public:
    PreferencesHelper() : q(0) {}
    ~PreferencesHelper() { delete q; }
    Preferences *q;
};
K_GLOBAL_STATIC(PreferencesHelper, s_globalPreferences)
Preferences *Preferences::self()
{
  if (!s_globalPreferences->q) {
    new Preferences;
    s_globalPreferences->q->readConfig();
  }

  return s_globalPreferences->q;
}

Preferences::Preferences(  )
  : KConfigSkeleton( QLatin1String( "kreversirc" ) )
{
  Q_ASSERT(!s_globalPreferences->q);
  s_globalPreferences->q = this;
  setCurrentGroup( QLatin1String( "Game" ) );

  QList<KConfigSkeleton::ItemEnum::Choice2> valuesAnimationSpeed;
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Slow");
    valuesAnimationSpeed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Normal");
    valuesAnimationSpeed.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Fast");
    valuesAnimationSpeed.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemAnimationSpeed;
  itemAnimationSpeed = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "AnimationSpeed" ), mAnimationSpeed, valuesAnimationSpeed, EnumAnimationSpeed::Normal );
  addItem( itemAnimationSpeed, QLatin1String( "AnimationSpeed" ) );
  KConfigSkeleton::ItemBool  *itemCompetitiveGameChoice;
  itemCompetitiveGameChoice = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "CompetitiveGameChoice" ), mCompetitiveGameChoice, true );
  addItem( itemCompetitiveGameChoice, QLatin1String( "CompetitiveGameChoice" ) );
  KConfigSkeleton::ItemBool  *itemUseColoredChips;
  itemUseColoredChips = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "UseColoredChips" ), mUseColoredChips, false );
  addItem( itemUseColoredChips, QLatin1String( "UseColoredChips" ) );
}

Preferences::~Preferences()
{
  if (!s_globalPreferences.isDestroyed()) {
    s_globalPreferences->q = 0;
  }
}

