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

#include "preferences.h"

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

class PreferencesHelper
{
  public:
    PreferencesHelper() : q(nullptr) {}
    ~PreferencesHelper() { delete q; }
    Preferences *q;
};
Q_GLOBAL_STATIC(PreferencesHelper, s_globalPreferences)
Preferences *Preferences::self()
{
  if (!s_globalPreferences()->q) {
    new Preferences;
    s_globalPreferences()->q->read();
  }

  return s_globalPreferences()->q;
}

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

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

Preferences::~Preferences()
{
  s_globalPreferences()->q = nullptr;
}

