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

#include "prefs.h"

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

class PrefsHelper
{
  public:
    PrefsHelper() noexcept : q(nullptr) {}
    ~PrefsHelper() noexcept { 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::create(QQmlEngine *, QJSEngine *)
{
  QQmlEngine::setObjectOwnership(self(), QQmlEngine::CppOwnership);
  return self();
}

Prefs::Prefs( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kwordquizrc" ) )
{
  setParent(parent);
  Q_ASSERT(!s_globalPrefs()->q);
  s_globalPrefs()->q = this;
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&Prefs::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemFirstRun;
  KConfigSkeleton::ItemBool  *innerItemFirstRun;
  innerItemFirstRun = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "FirstRun" ), mFirstRun, true );
  itemFirstRun = new KConfigCompilerSignallingItem(innerItemFirstRun, this, notifyFunction, signalFirstRunChanged);
  addItem( itemFirstRun, QStringLiteral( "FirstRun" ) );
  KConfigCompilerSignallingItem  *itemShowSearch;
  KConfigSkeleton::ItemBool  *innerItemShowSearch;
  innerItemShowSearch = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowSearch" ), mShowSearch, true );
  itemShowSearch = new KConfigCompilerSignallingItem(innerItemShowSearch, this, notifyFunction, signalShowSearchChanged);
  addItem( itemShowSearch, QStringLiteral( "ShowSearch" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesStartSession;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Editor");
    valuesStartSession.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Flashcard");
    valuesStartSession.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("MultipleChoice");
    valuesStartSession.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("QA");
    valuesStartSession.append( choice );
  }
  KConfigCompilerSignallingItem  *itemStartSession;
  KConfigSkeleton::ItemEnum  *innerItemStartSession;
  innerItemStartSession = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "StartSession" ), mStartSession, valuesStartSession, Editor );
  itemStartSession = new KConfigCompilerSignallingItem(innerItemStartSession, this, notifyFunction, signalStartSessionChanged);
  addItem( itemStartSession, QStringLiteral( "StartSession" ) );

  setCurrentGroup( QStringLiteral( "Editor" ) );

  KConfigCompilerSignallingItem  *itemEnableBlanks;
  KConfigSkeleton::ItemBool  *innerItemEnableBlanks;
  innerItemEnableBlanks = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnableBlanks" ), mEnableBlanks, false );
  itemEnableBlanks = new KConfigCompilerSignallingItem(innerItemEnableBlanks, this, notifyFunction, signalEnableBlanksChanged);
  addItem( itemEnableBlanks, QStringLiteral( "EnableBlanks" ) );
  KConfigCompilerSignallingItem  *itemEnterMove;
  KConfigSkeleton::ItemInt  *innerItemEnterMove;
  innerItemEnterMove = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "EnterMove" ), mEnterMove, 1 );
  itemEnterMove = new KConfigCompilerSignallingItem(innerItemEnterMove, this, notifyFunction, signalEnterMoveChanged);
  addItem( itemEnterMove, QStringLiteral( "EnterMove" ) );
  KConfigCompilerSignallingItem  *itemSpecialCharacters;
  KConfigSkeleton::ItemString  *innerItemSpecialCharacters;
  innerItemSpecialCharacters = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "SpecialCharacters" ), mSpecialCharacters, QStringLiteral( "abcdefghi" ) );
  itemSpecialCharacters = new KConfigCompilerSignallingItem(innerItemSpecialCharacters, this, notifyFunction, signalSpecialCharactersChanged);
  addItem( itemSpecialCharacters, QStringLiteral( "SpecialCharacters" ) );
  KConfigCompilerSignallingItem  *itemClearAll;
  KConfigSkeleton::ItemBool  *innerItemClearAll;
  innerItemClearAll = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ClearAll" ), mClearAll, false );
  itemClearAll = new KConfigCompilerSignallingItem(innerItemClearAll, this, notifyFunction, signalClearAllChanged);
  addItem( itemClearAll, QStringLiteral( "ClearAll" ) );
  KConfigCompilerSignallingItem  *itemClearText;
  KConfigSkeleton::ItemBool  *innerItemClearText;
  innerItemClearText = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ClearText" ), mClearText, true );
  itemClearText = new KConfigCompilerSignallingItem(innerItemClearText, this, notifyFunction, signalClearTextChanged);
  addItem( itemClearText, QStringLiteral( "ClearText" ) );
  KConfigCompilerSignallingItem  *itemClearImageLink;
  KConfigSkeleton::ItemBool  *innerItemClearImageLink;
  innerItemClearImageLink = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ClearImageLink" ), mClearImageLink, false );
  itemClearImageLink = new KConfigCompilerSignallingItem(innerItemClearImageLink, this, notifyFunction, signalClearImageLinkChanged);
  addItem( itemClearImageLink, QStringLiteral( "ClearImageLink" ) );
  KConfigCompilerSignallingItem  *itemClearSoundLink;
  KConfigSkeleton::ItemBool  *innerItemClearSoundLink;
  innerItemClearSoundLink = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ClearSoundLink" ), mClearSoundLink, false );
  itemClearSoundLink = new KConfigCompilerSignallingItem(innerItemClearSoundLink, this, notifyFunction, signalClearSoundLinkChanged);
  addItem( itemClearSoundLink, QStringLiteral( "ClearSoundLink" ) );

  setCurrentGroup( QStringLiteral( "Quiz" ) );

  KConfigCompilerSignallingItem  *itemAutoCheck;
  KConfigSkeleton::ItemBool  *innerItemAutoCheck;
  innerItemAutoCheck = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoCheck" ), mAutoCheck, false );
  itemAutoCheck = new KConfigCompilerSignallingItem(innerItemAutoCheck, this, notifyFunction, signalAutoCheckChanged);
  addItem( itemAutoCheck, QStringLiteral( "AutoCheck" ) );
  KConfigCompilerSignallingItem  *itemAutoFlip;
  KConfigSkeleton::ItemBool  *innerItemAutoFlip;
  innerItemAutoFlip = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoFlip" ), mAutoFlip, false );
  itemAutoFlip = new KConfigCompilerSignallingItem(innerItemAutoFlip, this, notifyFunction, signalAutoFlipChanged);
  addItem( itemAutoFlip, QStringLiteral( "AutoFlip" ) );
  KConfigCompilerSignallingItem  *itemFlipDelay;
  KConfigSkeleton::ItemInt  *innerItemFlipDelay;
  innerItemFlipDelay = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FlipDelay" ), mFlipDelay, 3 );
  itemFlipDelay = new KConfigCompilerSignallingItem(innerItemFlipDelay, this, notifyFunction, signalFlipDelayChanged);
  addItem( itemFlipDelay, QStringLiteral( "FlipDelay" ) );
  KConfigCompilerSignallingItem  *itemHintError;
  KConfigSkeleton::ItemBool  *innerItemHintError;
  innerItemHintError = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HintError" ), mHintError, false );
  itemHintError = new KConfigCompilerSignallingItem(innerItemHintError, this, notifyFunction, signalHintErrorChanged);
  addItem( itemHintError, QStringLiteral( "HintError" ) );
  KConfigCompilerSignallingItem  *itemCaseSensitiveAnswers;
  KConfigSkeleton::ItemBool  *innerItemCaseSensitiveAnswers;
  innerItemCaseSensitiveAnswers = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CaseSensitiveAnswers" ), mCaseSensitiveAnswers, true );
  itemCaseSensitiveAnswers = new KConfigCompilerSignallingItem(innerItemCaseSensitiveAnswers, this, notifyFunction, signalCaseSensitiveAnswersChanged);
  addItem( itemCaseSensitiveAnswers, QStringLiteral( "CaseSensitiveAnswers" ) );
  KConfigCompilerSignallingItem  *itemKeepDiscard;
  KConfigSkeleton::ItemInt  *innerItemKeepDiscard;
  innerItemKeepDiscard = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "KeepDiscard" ), mKeepDiscard, 1 );
  itemKeepDiscard = new KConfigCompilerSignallingItem(innerItemKeepDiscard, this, notifyFunction, signalKeepDiscardChanged);
  addItem( itemKeepDiscard, QStringLiteral( "KeepDiscard" ) );
  KConfigCompilerSignallingItem  *itemQuestionInLeftColumn;
  KConfigSkeleton::ItemBool  *innerItemQuestionInLeftColumn;
  innerItemQuestionInLeftColumn = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "QuestionInLeftColumn" ), mQuestionInLeftColumn, true );
  itemQuestionInLeftColumn = new KConfigCompilerSignallingItem(innerItemQuestionInLeftColumn, this, notifyFunction, signalQuestionInLeftColumnChanged);
  addItem( itemQuestionInLeftColumn, QStringLiteral( "QuestionInLeftColumn" ) );
  KConfigCompilerSignallingItem  *itemQuestionInRightColumn;
  KConfigSkeleton::ItemBool  *innerItemQuestionInRightColumn;
  innerItemQuestionInRightColumn = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "QuestionInRightColumn" ), mQuestionInRightColumn, false );
  itemQuestionInRightColumn = new KConfigCompilerSignallingItem(innerItemQuestionInRightColumn, this, notifyFunction, signalQuestionInRightColumnChanged);
  addItem( itemQuestionInRightColumn, QStringLiteral( "QuestionInRightColumn" ) );
  KConfigCompilerSignallingItem  *itemRandomize;
  KConfigSkeleton::ItemBool  *innerItemRandomize;
  innerItemRandomize = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Randomize" ), mRandomize, true );
  itemRandomize = new KConfigCompilerSignallingItem(innerItemRandomize, this, notifyFunction, signalRandomizeChanged);
  addItem( itemRandomize, QStringLiteral( "Randomize" ) );
  KConfigCompilerSignallingItem  *itemPercent;
  KConfigSkeleton::ItemBool  *innerItemPercent;
  innerItemPercent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Percent" ), mPercent, false );
  itemPercent = new KConfigCompilerSignallingItem(innerItemPercent, this, notifyFunction, signalPercentChanged);
  addItem( itemPercent, QStringLiteral( "Percent" ) );

  setCurrentGroup( QStringLiteral( "FlashCard" ) );

  KConfigCompilerSignallingItem  *itemFrontFont;
  KConfigSkeleton::ItemFont  *innerItemFrontFont;
  innerItemFrontFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "FrontFont" ), mFrontFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  itemFrontFont = new KConfigCompilerSignallingItem(innerItemFrontFont, this, notifyFunction, signalFrontFontChanged);
  addItem( itemFrontFont, QStringLiteral( "FrontFont" ) );
  KConfigCompilerSignallingItem  *itemFrontTextColor;
  KConfigSkeleton::ItemColor  *innerItemFrontTextColor;
  innerItemFrontTextColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "FrontTextColor" ), mFrontTextColor, Qt::black );
  itemFrontTextColor = new KConfigCompilerSignallingItem(innerItemFrontTextColor, this, notifyFunction, signalFrontTextColorChanged);
  addItem( itemFrontTextColor, QStringLiteral( "FrontTextColor" ) );
  KConfigCompilerSignallingItem  *itemFrontCardColor;
  KConfigSkeleton::ItemColor  *innerItemFrontCardColor;
  innerItemFrontCardColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "FrontCardColor" ), mFrontCardColor, Qt::white );
  itemFrontCardColor = new KConfigCompilerSignallingItem(innerItemFrontCardColor, this, notifyFunction, signalFrontCardColorChanged);
  addItem( itemFrontCardColor, QStringLiteral( "FrontCardColor" ) );
  KConfigCompilerSignallingItem  *itemFrontFrameColor;
  KConfigSkeleton::ItemColor  *innerItemFrontFrameColor;
  innerItemFrontFrameColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "FrontFrameColor" ), mFrontFrameColor, Qt::red );
  itemFrontFrameColor = new KConfigCompilerSignallingItem(innerItemFrontFrameColor, this, notifyFunction, signalFrontFrameColorChanged);
  addItem( itemFrontFrameColor, QStringLiteral( "FrontFrameColor" ) );
  KConfigCompilerSignallingItem  *itemBackFont;
  KConfigSkeleton::ItemFont  *innerItemBackFont;
  innerItemBackFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "BackFont" ), mBackFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  itemBackFont = new KConfigCompilerSignallingItem(innerItemBackFont, this, notifyFunction, signalBackFontChanged);
  addItem( itemBackFont, QStringLiteral( "BackFont" ) );
  KConfigCompilerSignallingItem  *itemBackTextColor;
  KConfigSkeleton::ItemColor  *innerItemBackTextColor;
  innerItemBackTextColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "BackTextColor" ), mBackTextColor, Qt::black );
  itemBackTextColor = new KConfigCompilerSignallingItem(innerItemBackTextColor, this, notifyFunction, signalBackTextColorChanged);
  addItem( itemBackTextColor, QStringLiteral( "BackTextColor" ) );
  KConfigCompilerSignallingItem  *itemBackCardColor;
  KConfigSkeleton::ItemColor  *innerItemBackCardColor;
  innerItemBackCardColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "BackCardColor" ), mBackCardColor, Qt::white );
  itemBackCardColor = new KConfigCompilerSignallingItem(innerItemBackCardColor, this, notifyFunction, signalBackCardColorChanged);
  addItem( itemBackCardColor, QStringLiteral( "BackCardColor" ) );
  KConfigCompilerSignallingItem  *itemBackFrameColor;
  KConfigSkeleton::ItemColor  *innerItemBackFrameColor;
  innerItemBackFrameColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "BackFrameColor" ), mBackFrameColor, Qt::blue );
  itemBackFrameColor = new KConfigCompilerSignallingItem(innerItemBackFrameColor, this, notifyFunction, signalBackFrameColorChanged);
  addItem( itemBackFrameColor, QStringLiteral( "BackFrameColor" ) );

  setCurrentGroup( QStringLiteral( "KNewStuff" ) );

  KConfigCompilerSignallingItem  *itemProvidersUrl;
  KConfigSkeleton::ItemPath  *innerItemProvidersUrl;
  innerItemProvidersUrl = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "ProvidersUrl" ), mProvidersUrl, QStringLiteral( "https://edu.kde.org/contrib/kvtml/providers.xml" ) );
  itemProvidersUrl = new KConfigCompilerSignallingItem(innerItemProvidersUrl, this, notifyFunction, signalProvidersUrlChanged);
  addItem( itemProvidersUrl, QStringLiteral( "ProvidersUrl" ) );
  KConfigCompilerSignallingItem  *itemInstallationCommand;
  KConfigSkeleton::ItemString  *innerItemInstallationCommand;
  innerItemInstallationCommand = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "InstallationCommand" ), mInstallationCommand, QStringLiteral( "kwordquiz %f" ) );
  itemInstallationCommand = new KConfigCompilerSignallingItem(innerItemInstallationCommand, this, notifyFunction, signalInstallationCommandChanged);
  addItem( itemInstallationCommand, QStringLiteral( "InstallationCommand" ) );
  KConfigCompilerSignallingItem  *itemInstallPath;
  KConfigSkeleton::ItemPath  *innerItemInstallPath;
  innerItemInstallPath = new KConfigSkeleton::ItemPath( currentGroup(), QStringLiteral( "InstallPath" ), mInstallPath, QStringLiteral( "Vocabularies" ) );
  itemInstallPath = new KConfigCompilerSignallingItem(innerItemInstallPath, this, notifyFunction, signalInstallPathChanged);
  addItem( itemInstallPath, QStringLiteral( "InstallPath" ) );

  setCurrentGroup( QStringLiteral( "Tutor" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesTutorTiming;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FixedInterval");
    valuesTutorTiming.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("RandomInterval");
    valuesTutorTiming.append( choice );
  }
  KConfigCompilerSignallingItem  *itemTutorTiming;
  KConfigSkeleton::ItemEnum  *innerItemTutorTiming;
  innerItemTutorTiming = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "TutorTiming" ), mTutorTiming, valuesTutorTiming, FixedInterval );
  itemTutorTiming = new KConfigCompilerSignallingItem(innerItemTutorTiming, this, notifyFunction, signalTutorTimingChanged);
  addItem( itemTutorTiming, QStringLiteral( "TutorTiming" ) );
  KConfigCompilerSignallingItem  *itemTutorEvery;
  KConfigSkeleton::ItemInt  *innerItemTutorEvery;
  innerItemTutorEvery = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TutorEvery" ), mTutorEvery, 10 );
  itemTutorEvery = new KConfigCompilerSignallingItem(innerItemTutorEvery, this, notifyFunction, signalTutorEveryChanged);
  addItem( itemTutorEvery, QStringLiteral( "TutorEvery" ) );
  KConfigCompilerSignallingItem  *itemTutorMin;
  KConfigSkeleton::ItemInt  *innerItemTutorMin;
  innerItemTutorMin = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TutorMin" ), mTutorMin, 20 );
  itemTutorMin = new KConfigCompilerSignallingItem(innerItemTutorMin, this, notifyFunction, signalTutorMinChanged);
  addItem( itemTutorMin, QStringLiteral( "TutorMin" ) );
  KConfigCompilerSignallingItem  *itemTutorMax;
  KConfigSkeleton::ItemInt  *innerItemTutorMax;
  innerItemTutorMax = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "TutorMax" ), mTutorMax, 40 );
  itemTutorMax = new KConfigCompilerSignallingItem(innerItemTutorMax, this, notifyFunction, signalTutorMaxChanged);
  addItem( itemTutorMax, QStringLiteral( "TutorMax" ) );
  KConfigCompilerSignallingItem  *itemTutorFlashCardGeometry;
  KConfigSkeleton::ItemRect  *innerItemTutorFlashCardGeometry;
  innerItemTutorFlashCardGeometry = new KConfigSkeleton::ItemRect( currentGroup(), QStringLiteral( "TutorFlashCardGeometry" ), mTutorFlashCardGeometry, QRect(2,2,200,80) );
  itemTutorFlashCardGeometry = new KConfigCompilerSignallingItem(innerItemTutorFlashCardGeometry, this, notifyFunction, signalTutorFlashCardGeometryChanged);
  addItem( itemTutorFlashCardGeometry, QStringLiteral( "TutorFlashCardGeometry" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesTutorCardAppearance;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Native");
    valuesTutorCardAppearance.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Minimalistic");
    valuesTutorCardAppearance.append( choice );
  }
  KConfigCompilerSignallingItem  *itemTutorCardAppearance;
  KConfigSkeleton::ItemEnum  *innerItemTutorCardAppearance;
  innerItemTutorCardAppearance = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "TutorCardAppearance" ), mTutorCardAppearance, valuesTutorCardAppearance, Native );
  itemTutorCardAppearance = new KConfigCompilerSignallingItem(innerItemTutorCardAppearance, this, notifyFunction, signalTutorCardAppearanceChanged);
  addItem( itemTutorCardAppearance, QStringLiteral( "TutorCardAppearance" ) );
  KConfigCompilerSignallingItem  *itemLastVocabFile;
  KConfigSkeleton::ItemString  *innerItemLastVocabFile;
  innerItemLastVocabFile = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LastVocabFile" ), mLastVocabFile );
  itemLastVocabFile = new KConfigCompilerSignallingItem(innerItemLastVocabFile, this, notifyFunction, signalLastVocabFileChanged);
  addItem( itemLastVocabFile, QStringLiteral( "LastVocabFile" ) );
  KConfigCompilerSignallingItem  *itemStartExerciseAsSoonAsFileIsLoaded;
  KConfigSkeleton::ItemBool  *innerItemStartExerciseAsSoonAsFileIsLoaded;
  innerItemStartExerciseAsSoonAsFileIsLoaded = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "StartExerciseAsSoonAsFileIsLoaded" ), mStartExerciseAsSoonAsFileIsLoaded, true );
  itemStartExerciseAsSoonAsFileIsLoaded = new KConfigCompilerSignallingItem(innerItemStartExerciseAsSoonAsFileIsLoaded, this, notifyFunction, signalStartExerciseAsSoonAsFileIsLoadedChanged);
  addItem( itemStartExerciseAsSoonAsFileIsLoaded, QStringLiteral( "StartExerciseAsSoonAsFileIsLoaded" ) );
}

bool Prefs::defaultFirstRunValue_helper()
{

  return true;
}

bool Prefs::defaultShowSearchValue_helper()
{

  return true;
}

int Prefs::defaultStartSessionValue_helper()
{

  return Editor;
}

bool Prefs::defaultEnableBlanksValue_helper()
{

  return false;
}

int Prefs::defaultEnterMoveValue_helper()
{

  return 1;
}

QString Prefs::defaultSpecialCharactersValue_helper()
{

  return QStringLiteral( "abcdefghi" );
}

bool Prefs::defaultClearAllValue_helper()
{

  return false;
}

bool Prefs::defaultClearTextValue_helper()
{

  return true;
}

bool Prefs::defaultClearImageLinkValue_helper()
{

  return false;
}

bool Prefs::defaultClearSoundLinkValue_helper()
{

  return false;
}

bool Prefs::defaultAutoCheckValue_helper()
{

  return false;
}

bool Prefs::defaultAutoFlipValue_helper()
{

  return false;
}

int Prefs::defaultFlipDelayValue_helper()
{

  return 3;
}

bool Prefs::defaultHintErrorValue_helper()
{

  return false;
}

bool Prefs::defaultCaseSensitiveAnswersValue_helper()
{

  return true;
}

int Prefs::defaultKeepDiscardValue_helper()
{

  return 1;
}

bool Prefs::defaultQuestionInLeftColumnValue_helper()
{

  return true;
}

bool Prefs::defaultQuestionInRightColumnValue_helper()
{

  return false;
}

bool Prefs::defaultRandomizeValue_helper()
{

  return true;
}

bool Prefs::defaultPercentValue_helper()
{

  return false;
}

QFont Prefs::defaultFrontFontValue_helper()
{

  return QFontDatabase::systemFont(QFontDatabase::GeneralFont);
}

QColor Prefs::defaultFrontTextColorValue_helper()
{

  return Qt::black;
}

QColor Prefs::defaultFrontCardColorValue_helper()
{

  return Qt::white;
}

QColor Prefs::defaultFrontFrameColorValue_helper()
{

  return Qt::red;
}

QFont Prefs::defaultBackFontValue_helper()
{

  return QFontDatabase::systemFont(QFontDatabase::GeneralFont);
}

QColor Prefs::defaultBackTextColorValue_helper()
{

  return Qt::black;
}

QColor Prefs::defaultBackCardColorValue_helper()
{

  return Qt::white;
}

QColor Prefs::defaultBackFrameColorValue_helper()
{

  return Qt::blue;
}

QString Prefs::defaultProvidersUrlValue_helper()
{

  return QStringLiteral( "https://edu.kde.org/contrib/kvtml/providers.xml" );
}

QString Prefs::defaultInstallationCommandValue_helper()
{

  return QStringLiteral( "kwordquiz %f" );
}

QString Prefs::defaultInstallPathValue_helper()
{

  return QStringLiteral( "Vocabularies" );
}

int Prefs::defaultTutorTimingValue_helper()
{

  return FixedInterval;
}

int Prefs::defaultTutorEveryValue_helper()
{

  return 10;
}

int Prefs::defaultTutorMinValue_helper()
{

  return 20;
}

int Prefs::defaultTutorMaxValue_helper()
{

  return 40;
}

QRect Prefs::defaultTutorFlashCardGeometryValue_helper()
{

  return QRect(2,2,200,80);
}

int Prefs::defaultTutorCardAppearanceValue_helper()
{

  return Native;
}

bool Prefs::defaultStartExerciseAsSoonAsFileIsLoadedValue_helper()
{

  return true;
}

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


void Prefs::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalFirstRunChanged:
    Q_EMIT FirstRunChanged();
    break;
  case signalShowSearchChanged:
    Q_EMIT ShowSearchChanged();
    break;
  case signalStartSessionChanged:
    Q_EMIT StartSessionChanged();
    break;
  case signalEnableBlanksChanged:
    Q_EMIT EnableBlanksChanged();
    break;
  case signalEnterMoveChanged:
    Q_EMIT EnterMoveChanged();
    break;
  case signalSpecialCharactersChanged:
    Q_EMIT SpecialCharactersChanged();
    break;
  case signalClearAllChanged:
    Q_EMIT ClearAllChanged();
    break;
  case signalClearTextChanged:
    Q_EMIT ClearTextChanged();
    break;
  case signalClearImageLinkChanged:
    Q_EMIT ClearImageLinkChanged();
    break;
  case signalClearSoundLinkChanged:
    Q_EMIT ClearSoundLinkChanged();
    break;
  case signalAutoCheckChanged:
    Q_EMIT AutoCheckChanged();
    break;
  case signalAutoFlipChanged:
    Q_EMIT AutoFlipChanged();
    break;
  case signalFlipDelayChanged:
    Q_EMIT FlipDelayChanged();
    break;
  case signalHintErrorChanged:
    Q_EMIT HintErrorChanged();
    break;
  case signalCaseSensitiveAnswersChanged:
    Q_EMIT CaseSensitiveAnswersChanged();
    break;
  case signalKeepDiscardChanged:
    Q_EMIT KeepDiscardChanged();
    break;
  case signalQuestionInLeftColumnChanged:
    Q_EMIT QuestionInLeftColumnChanged();
    break;
  case signalQuestionInRightColumnChanged:
    Q_EMIT QuestionInRightColumnChanged();
    break;
  case signalRandomizeChanged:
    Q_EMIT RandomizeChanged();
    break;
  case signalPercentChanged:
    Q_EMIT PercentChanged();
    break;
  case signalFrontFontChanged:
    Q_EMIT FrontFontChanged();
    break;
  case signalFrontTextColorChanged:
    Q_EMIT FrontTextColorChanged();
    break;
  case signalFrontCardColorChanged:
    Q_EMIT FrontCardColorChanged();
    break;
  case signalFrontFrameColorChanged:
    Q_EMIT FrontFrameColorChanged();
    break;
  case signalBackFontChanged:
    Q_EMIT BackFontChanged();
    break;
  case signalBackTextColorChanged:
    Q_EMIT BackTextColorChanged();
    break;
  case signalBackCardColorChanged:
    Q_EMIT BackCardColorChanged();
    break;
  case signalBackFrameColorChanged:
    Q_EMIT BackFrameColorChanged();
    break;
  case signalProvidersUrlChanged:
    Q_EMIT ProvidersUrlChanged();
    break;
  case signalInstallationCommandChanged:
    Q_EMIT InstallationCommandChanged();
    break;
  case signalInstallPathChanged:
    Q_EMIT InstallPathChanged();
    break;
  case signalTutorTimingChanged:
    Q_EMIT TutorTimingChanged();
    break;
  case signalTutorEveryChanged:
    Q_EMIT TutorEveryChanged();
    break;
  case signalTutorMinChanged:
    Q_EMIT TutorMinChanged();
    break;
  case signalTutorMaxChanged:
    Q_EMIT TutorMaxChanged();
    break;
  case signalTutorFlashCardGeometryChanged:
    Q_EMIT TutorFlashCardGeometryChanged();
    break;
  case signalTutorCardAppearanceChanged:
    Q_EMIT TutorCardAppearanceChanged();
    break;
  case signalLastVocabFileChanged:
    Q_EMIT LastVocabFileChanged();
    break;
  case signalStartExerciseAsSoonAsFileIsLoadedChanged:
    Q_EMIT StartExerciseAsSoonAsFileIsLoadedChanged();
    break;
  }
}
