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

#include "prefs.h"

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

class PrefsHelper
{
  public:
    PrefsHelper() : q(nullptr) {}
    ~PrefsHelper() { delete q; q = nullptr; }
    PrefsHelper(const PrefsHelper&) = delete;
    PrefsHelper& operator=(const PrefsHelper&) = delete;
    Prefs *q;
};
Q_GLOBAL_STATIC(PrefsHelper, s_globalPrefs)
Prefs *Prefs::self()
{
  if (!s_globalPrefs()->q) {
    new Prefs;
    s_globalPrefs()->q->read();
  }

  return s_globalPrefs()->q;
}

Prefs::Prefs( )
  : KConfigSkeleton( QStringLiteral( "kjumpingcuberc" ) )
{
  Q_ASSERT(!s_globalPrefs()->q);
  s_globalPrefs()->q = this;
  setCurrentGroup( QStringLiteral( "Game" ) );

  KConfigSkeleton::ItemInt  *itemAnimationSpeed;
  itemAnimationSpeed = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "AnimationSpeed" ), mAnimationSpeed, 4 );
  itemAnimationSpeed->setMinValue(1);
  itemAnimationSpeed->setMaxValue(10);
  addItem( itemAnimationSpeed, QStringLiteral( "AnimationSpeed" ) );
  KConfigSkeleton::ItemBool  *itemAnimationNone;
  itemAnimationNone = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimationNone" ), mAnimationNone, false );
  addItem( itemAnimationNone, QStringLiteral( "AnimationNone" ) );
  KConfigSkeleton::ItemBool  *itemAnimationDelay;
  itemAnimationDelay = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimationDelay" ), mAnimationDelay, false );
  addItem( itemAnimationDelay, QStringLiteral( "AnimationDelay" ) );
  KConfigSkeleton::ItemBool  *itemAnimationBlink;
  itemAnimationBlink = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimationBlink" ), mAnimationBlink, false );
  addItem( itemAnimationBlink, QStringLiteral( "AnimationBlink" ) );
  KConfigSkeleton::ItemBool  *itemAnimationSpread;
  itemAnimationSpread = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimationSpread" ), mAnimationSpread, true );
  addItem( itemAnimationSpread, QStringLiteral( "AnimationSpread" ) );
  KConfigSkeleton::ItemColor  *itemColor0;
  itemColor0 = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Color0" ), mColor0, QColor( "#debc85" ) );
  addItem( itemColor0, QStringLiteral( "Color0" ) );
  KConfigSkeleton::ItemColor  *itemColor1;
  itemColor1 = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Color1" ), mColor1, QColor( "#77b753" ) );
  addItem( itemColor1, QStringLiteral( "Color1" ) );
  KConfigSkeleton::ItemColor  *itemColor2;
  itemColor2 = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Color2" ), mColor2, QColor( "#6193cf" ) );
  addItem( itemColor2, QStringLiteral( "Color2" ) );
  KConfigSkeleton::ItemInt  *itemCubeDim;
  itemCubeDim = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CubeDim" ), mCubeDim, 6 );
  itemCubeDim->setMinValue(3);
  itemCubeDim->setMaxValue(15);
  addItem( itemCubeDim, QStringLiteral( "CubeDim" ) );
  KConfigSkeleton::ItemBool  *itemComputerPlayer1;
  itemComputerPlayer1 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Computer_Pl_1" ), mComputerPlayer1, false );
  addItem( itemComputerPlayer1, QStringLiteral( "ComputerPlayer1" ) );
  KConfigSkeleton::ItemBool  *itemKepler1;
  itemKepler1 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Kepler1" ), mKepler1, true );
  addItem( itemKepler1, QStringLiteral( "Kepler1" ) );
  KConfigSkeleton::ItemBool  *itemNewton1;
  itemNewton1 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Newton1" ), mNewton1, false );
  addItem( itemNewton1, QStringLiteral( "Newton1" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSkill1;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Beginner");
    valuesSkill1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Novice");
    valuesSkill1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Average");
    valuesSkill1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Strong");
    valuesSkill1.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Expert");
    valuesSkill1.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemSkill1;
  itemSkill1 = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Skill1" ), mSkill1, valuesSkill1, EnumSkill1::Average );
  addItem( itemSkill1, QStringLiteral( "Skill1" ) );
  KConfigSkeleton::ItemBool  *itemComputerPlayer2;
  itemComputerPlayer2 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Computer_Pl_2" ), mComputerPlayer2, true );
  addItem( itemComputerPlayer2, QStringLiteral( "ComputerPlayer2" ) );
  KConfigSkeleton::ItemBool  *itemKepler2;
  itemKepler2 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Kepler2" ), mKepler2, true );
  addItem( itemKepler2, QStringLiteral( "Kepler2" ) );
  KConfigSkeleton::ItemBool  *itemNewton2;
  itemNewton2 = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Newton2" ), mNewton2, false );
  addItem( itemNewton2, QStringLiteral( "Newton2" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesSkill2;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Beginner");
    valuesSkill2.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Novice");
    valuesSkill2.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Average");
    valuesSkill2.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Strong");
    valuesSkill2.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Expert");
    valuesSkill2.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemSkill2;
  itemSkill2 = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Skill2" ), mSkill2, valuesSkill2, EnumSkill2::Average );
  addItem( itemSkill2, QStringLiteral( "Skill2" ) );
  KConfigSkeleton::ItemBool  *itemPauseForComputer;
  itemPauseForComputer = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PauseForComputer" ), mPauseForComputer, false );
  addItem( itemPauseForComputer, QStringLiteral( "PauseForComputer" ) );
  KConfigSkeleton::ItemBool  *itemPauseForStep;
  itemPauseForStep = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PauseForStep" ), mPauseForStep, false );
  addItem( itemPauseForStep, QStringLiteral( "PauseForStep" ) );
}

Prefs::~Prefs()
{
  if (s_globalPrefs.exists() && !s_globalPrefs.isDestroyed()) {
    s_globalPrefs()->q = nullptr;
  }
}

