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

#include "settings.h"

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

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

  return s_globalSettings()->q;
}

Settings::Settings( )
  : KConfigSkeleton( QStringLiteral( "kpatrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General Settings" ) );

  mAutoDropEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Autodrop" ), mAutoDropEnabled, true );
  mAutoDropEnabledItem->setLabel( QCoreApplication::translate("Settings", "Autodrop") );
  addItem( mAutoDropEnabledItem, QStringLiteral( "AutoDropEnabled" ) );
  mSolverEnabledItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Solver" ), mSolverEnabled, true );
  mSolverEnabledItem->setLabel( QCoreApplication::translate("Settings", "Solver") );
  addItem( mSolverEnabledItem, QStringLiteral( "SolverEnabled" ) );
  mPlaySoundsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PlaySounds" ), mPlaySounds, false );
  mPlaySoundsItem->setLabel( QCoreApplication::translate("Settings", "PlaySounds") );
  addItem( mPlaySoundsItem, QStringLiteral( "PlaySounds" ) );
  mRememberStateOnExitItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RememberStateOnExit" ), mRememberStateOnExit, false );
  mRememberStateOnExitItem->setLabel( QCoreApplication::translate("Settings", "RememberStateOnExit") );
  addItem( mRememberStateOnExitItem, QStringLiteral( "RememberStateOnExit" ) );
  mCardThemeItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Cardname" ), mCardTheme, QStringLiteral( "svg-oxygen-air" ) );
  mCardThemeItem->setLabel( QCoreApplication::translate("Settings", "Cardname") );
  addItem( mCardThemeItem, QStringLiteral( "CardTheme" ) );
  mKlondikeIsDrawOneItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "KlondikeEasy" ), mKlondikeIsDrawOne, true );
  mKlondikeIsDrawOneItem->setLabel( QCoreApplication::translate("Settings", "KlondikeEasy") );
  addItem( mKlondikeIsDrawOneItem, QStringLiteral( "KlondikeIsDrawOne" ) );
  mSpiderSuitCountItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SpiderSuits" ), mSpiderSuitCount, 2 );
  mSpiderSuitCountItem->setLabel( QCoreApplication::translate("Settings", "SpiderSuits") );
  addItem( mSpiderSuitCountItem, QStringLiteral( "SpiderSuitCount" ) );
  mSpiderStackFaceupItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SpiderStackFaceup" ), mSpiderStackFaceup, 0 );
  mSpiderStackFaceupItem->setLabel( QCoreApplication::translate("Settings", "SpiderStackFaceup") );
  addItem( mSpiderStackFaceupItem, QStringLiteral( "SpiderStackFaceup" ) );
  mGolfSolverIterationsLimitItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "GolfSolverIterationsLimit" ), mGolfSolverIterationsLimit, 1000000 );
  mGolfSolverIterationsLimitItem->setLabel( QCoreApplication::translate("Settings", "GolfSolverIterationsLimit") );
  addItem( mGolfSolverIterationsLimitItem, QStringLiteral( "GolfSolverIterationsLimit" ) );
  mFreecellSolverIterationsLimitItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellSolverIterationsLimit" ), mFreecellSolverIterationsLimit, 200000 );
  mFreecellSolverIterationsLimitItem->setLabel( QCoreApplication::translate("Settings", "FreecellSolverIterationsLimit") );
  addItem( mFreecellSolverIterationsLimitItem, QStringLiteral( "FreecellSolverIterationsLimit" ) );
  mFreecellEmptyStackFillItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellEmptyStackFill" ), mFreecellEmptyStackFill, 0 );
  mFreecellEmptyStackFillItem->setLabel( QCoreApplication::translate("Settings", "FreecellEmptyStackFill") );
  addItem( mFreecellEmptyStackFillItem, QStringLiteral( "FreecellEmptyStackFill" ) );
  mFreecellSequenceBuiltByItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellSequenceBuiltBy" ), mFreecellSequenceBuiltBy, 0 );
  mFreecellSequenceBuiltByItem->setLabel( QCoreApplication::translate("Settings", "FreecellSequenceBuiltBy") );
  addItem( mFreecellSequenceBuiltByItem, QStringLiteral( "FreecellSequenceBuiltBy" ) );
  mFreecellReservesItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellReserves" ), mFreecellReserves, 4 );
  mFreecellReservesItem->setLabel( QCoreApplication::translate("Settings", "FreecellReserves") );
  addItem( mFreecellReservesItem, QStringLiteral( "FreecellReserves" ) );
  mFreecellStacksItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellStacks" ), mFreecellStacks, 2 );
  mFreecellStacksItem->setLabel( QCoreApplication::translate("Settings", "FreecellStacks") );
  addItem( mFreecellStacksItem, QStringLiteral( "FreecellStacks" ) );
  mFreecellDecksItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FreecellDecks" ), mFreecellDecks, 0 );
  mFreecellDecksItem->setLabel( QCoreApplication::translate("Settings", "FreecellDecks") );
  addItem( mFreecellDecksItem, QStringLiteral( "FreecellDecks" ) );
  mSimpleSimonSolverIterationsLimitItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SimpleSimonSolverIterationsLimit" ), mSimpleSimonSolverIterationsLimit, 200000 );
  mSimpleSimonSolverIterationsLimitItem->setLabel( QCoreApplication::translate("Settings", "SimpleSimonSolverIterationsLimit") );
  addItem( mSimpleSimonSolverIterationsLimitItem, QStringLiteral( "SimpleSimonSolverIterationsLimit" ) );
  mBakersDozenSolverIterationsLimitItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BakersDozenSolverIterationsLimit" ), mBakersDozenSolverIterationsLimit, 200000 );
  mBakersDozenSolverIterationsLimitItem->setLabel( QCoreApplication::translate("Settings", "BakersDozenSolverIterationsLimit") );
  addItem( mBakersDozenSolverIterationsLimitItem, QStringLiteral( "BakersDozenSolverIterationsLimit" ) );
  mBakersDozenEmptyStackFillItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BakersDozenEmptyStackFill" ), mBakersDozenEmptyStackFill, 2 );
  mBakersDozenEmptyStackFillItem->setLabel( QCoreApplication::translate("Settings", "BakersDozenEmptyStackFill") );
  addItem( mBakersDozenEmptyStackFillItem, QStringLiteral( "BakersDozenEmptyStackFill" ) );
  mBakersDozenStackFacedownItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BakersDozenStackFacedown" ), mBakersDozenStackFacedown, 0 );
  mBakersDozenStackFacedownItem->setLabel( QCoreApplication::translate("Settings", "BakersDozenStackFacedown") );
  addItem( mBakersDozenStackFacedownItem, QStringLiteral( "BakersDozenStackFacedown" ) );
  mBakersDozenSequenceBuiltByItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BakersDozenSequenceBuiltBy" ), mBakersDozenSequenceBuiltBy, 2 );
  mBakersDozenSequenceBuiltByItem->setLabel( QCoreApplication::translate("Settings", "BakersDozenSequenceBuiltBy") );
  addItem( mBakersDozenSequenceBuiltByItem, QStringLiteral( "BakersDozenSequenceBuiltBy" ) );
  mCastleSolverIterationsLimitItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleSolverIterationsLimit" ), mCastleSolverIterationsLimit, 200000 );
  mCastleSolverIterationsLimitItem->setLabel( QCoreApplication::translate("Settings", "CastleSolverIterationsLimit") );
  addItem( mCastleSolverIterationsLimitItem, QStringLiteral( "CastleSolverIterationsLimit" ) );
  mCastleEmptyStackFillItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleEmptyStackFill" ), mCastleEmptyStackFill, 0 );
  mCastleEmptyStackFillItem->setLabel( QCoreApplication::translate("Settings", "CastleEmptyStackFill") );
  addItem( mCastleEmptyStackFillItem, QStringLiteral( "CastleEmptyStackFill" ) );
  mCastleSequenceBuiltByItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleSequenceBuiltBy" ), mCastleSequenceBuiltBy, 2 );
  mCastleSequenceBuiltByItem->setLabel( QCoreApplication::translate("Settings", "CastleSequenceBuiltBy") );
  addItem( mCastleSequenceBuiltByItem, QStringLiteral( "CastleSequenceBuiltBy" ) );
  mCastleReservesItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleReserves" ), mCastleReserves, 0 );
  mCastleReservesItem->setLabel( QCoreApplication::translate("Settings", "CastleReserves") );
  addItem( mCastleReservesItem, QStringLiteral( "CastleReserves" ) );
  mCastleStacksItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleStacks" ), mCastleStacks, 8 );
  mCastleStacksItem->setLabel( QCoreApplication::translate("Settings", "CastleStacks") );
  addItem( mCastleStacksItem, QStringLiteral( "CastleStacks" ) );
  mCastleStackFaceupItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleStackFaceup" ), mCastleStackFaceup, 1 );
  mCastleStackFaceupItem->setLabel( QCoreApplication::translate("Settings", "CastleStackFaceup") );
  addItem( mCastleStackFaceupItem, QStringLiteral( "CastleStackFaceup" ) );
  mCastleFoundationItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleFoundation" ), mCastleFoundation, 1 );
  mCastleFoundationItem->setLabel( QCoreApplication::translate("Settings", "CastleFoundation") );
  addItem( mCastleFoundationItem, QStringLiteral( "CastleFoundation" ) );
  mCastleLayoutItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "CastleLayout" ), mCastleLayout, 0 );
  mCastleLayoutItem->setLabel( QCoreApplication::translate("Settings", "CastleLayout") );
  addItem( mCastleLayoutItem, QStringLiteral( "CastleLayout" ) );
}

QString Settings::defaultCardThemeValue_helper()
{

  return QStringLiteral( "svg-oxygen-air" );
}

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

