// 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 <QtCore/QFile>

class SettingsHelper
{
  public:
    SettingsHelper() : q(nullptr) {}
    ~SettingsHelper() { delete q; }
    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" ) );
}

QString Settings::defaultCardThemeValue_helper()
{

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

Settings::~Settings()
{
  s_globalSettings()->q = nullptr;
}

