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

#include "kanagramsettings.h"

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

class KanagramSettingsHelper
{
  public:
    KanagramSettingsHelper() : q(0) {}
    ~KanagramSettingsHelper() { delete q; }
    KanagramSettings *q;
};
Q_GLOBAL_STATIC(KanagramSettingsHelper, s_globalKanagramSettings)
KanagramSettings *KanagramSettings::self()
{
  if (!s_globalKanagramSettings()->q) {
    new KanagramSettings;
    s_globalKanagramSettings()->q->read();
  }

  return s_globalKanagramSettings()->q;
}

KanagramSettings::KanagramSettings(  )
  : KCoreConfigSkeleton( QLatin1String( "kanagramrc" ) )
{
  Q_ASSERT(!s_globalKanagramSettings()->q);
  s_globalKanagramSettings()->q = this;
  setCurrentGroup( QLatin1String( "kanagram" ) );

  KCoreConfigSkeleton::ItemInt  *itemCurrentVocabulary;
  itemCurrentVocabulary = new KCoreConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "currentVocabulary" ), mCurrentVocabulary, -1 );
  addItem( itemCurrentVocabulary, QLatin1String( "currentVocabulary" ) );
  KCoreConfigSkeleton::ItemBool  *itemSinglePlayerMode;
  itemSinglePlayerMode = new KCoreConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "singlePlayerMode" ), mSinglePlayerMode, true );
  addItem( itemSinglePlayerMode, QLatin1String( "singlePlayerMode" ) );
  KCoreConfigSkeleton::ItemString  *itemHintHideTime;
  itemHintHideTime = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "hintHideTime" ), mHintHideTime, QLatin1String( "1" ) );
  addItem( itemHintHideTime, QLatin1String( "hintHideTime" ) );
  KCoreConfigSkeleton::ItemString  *itemResolveTime;
  itemResolveTime = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "resolveTime" ), mResolveTime, QLatin1String( "0" ) );
  addItem( itemResolveTime, QLatin1String( "resolveTime" ) );
  KCoreConfigSkeleton::ItemString  *itemScoreTime;
  itemScoreTime = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "scoreTime" ), mScoreTime, QLatin1String( "2" ) );
  addItem( itemScoreTime, QLatin1String( "scoreTime" ) );
  KCoreConfigSkeleton::ItemString  *itemCorrectAnswerScore;
  itemCorrectAnswerScore = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "correctAnswerScore" ), mCorrectAnswerScore, QLatin1String( "0" ) );
  addItem( itemCorrectAnswerScore, QLatin1String( "correctAnswerScore" ) );
  KCoreConfigSkeleton::ItemString  *itemIncorrectAnswerScore;
  itemIncorrectAnswerScore = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "incorrectAnswerScore" ), mIncorrectAnswerScore, QLatin1String( "0" ) );
  addItem( itemIncorrectAnswerScore, QLatin1String( "incorrectAnswerScore" ) );
  KCoreConfigSkeleton::ItemString  *itemRevealAnswerScore;
  itemRevealAnswerScore = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "revealAnswerScore" ), mRevealAnswerScore, QLatin1String( "0" ) );
  addItem( itemRevealAnswerScore, QLatin1String( "revealAnswerScore" ) );
  KCoreConfigSkeleton::ItemString  *itemSkippedWordScore;
  itemSkippedWordScore = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "skippedWordScore" ), mSkippedWordScore, QLatin1String( "0" ) );
  addItem( itemSkippedWordScore, QLatin1String( "skippedWordScore" ) );
  KCoreConfigSkeleton::ItemBool  *itemUseSounds;
  itemUseSounds = new KCoreConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "useSounds" ), mUseSounds, true );
  addItem( itemUseSounds, QLatin1String( "useSounds" ) );
  KCoreConfigSkeleton::ItemBool  *itemUppercaseOnly;
  itemUppercaseOnly = new KCoreConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "uppercaseOnly" ), mUppercaseOnly, false );
  addItem( itemUppercaseOnly, QLatin1String( "uppercaseOnly" ) );
  KCoreConfigSkeleton::ItemBool  *itemEnablePronunciation;
  itemEnablePronunciation = new KCoreConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "enablePronunciation" ), mEnablePronunciation, true );
  addItem( itemEnablePronunciation, QLatin1String( "enablePronunciation" ) );
  KCoreConfigSkeleton::ItemString  *itemDataLanguage;
  itemDataLanguage = new KCoreConfigSkeleton::ItemString( currentGroup(), QLatin1String( "dataLanguage" ), mDataLanguage );
  addItem( itemDataLanguage, QLatin1String( "dataLanguage" ) );
}

KanagramSettings::~KanagramSettings()
{
  s_globalKanagramSettings()->q = 0;
}

