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

#include "settingsclass.h"

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

class SettingsClassHelper
{
  public:
    SettingsClassHelper() : q(nullptr) {}
    ~SettingsClassHelper() { delete q; }
    SettingsClass *q;
};
Q_GLOBAL_STATIC(SettingsClassHelper, s_globalSettingsClass)
SettingsClass *SettingsClass::self()
{
  if (!s_globalSettingsClass()->q) {
    new SettingsClass;
    s_globalSettingsClass()->q->read();
  }

  return s_globalSettingsClass()->q;
}

SettingsClass::SettingsClass(  )
  : KConfigSkeleton( QStringLiteral( "kbruchrc" ) )
{
  Q_ASSERT(!s_globalSettingsClass()->q);
  s_globalSettingsClass()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemInt  *itemActiveExercise;
  itemActiveExercise = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "activeExercise" ), mActiveExercise, 0 );
  addItem( itemActiveExercise, QStringLiteral( "activeExercise" ) );

  setCurrentGroup( QStringLiteral( "Task" ) );

  KConfigSkeleton::ItemBool  *itemAddadd;
  itemAddadd = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "addadd" ), mAddadd, true );
  addItem( itemAddadd, QStringLiteral( "addadd" ) );
  KConfigSkeleton::ItemBool  *itemAddsub;
  itemAddsub = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "addsub" ), mAddsub, true );
  addItem( itemAddsub, QStringLiteral( "addsub" ) );
  KConfigSkeleton::ItemBool  *itemAdddiv;
  itemAdddiv = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "adddiv" ), mAdddiv, false );
  addItem( itemAdddiv, QStringLiteral( "adddiv" ) );
  KConfigSkeleton::ItemBool  *itemAddmult;
  itemAddmult = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "addmult" ), mAddmult, false );
  addItem( itemAddmult, QStringLiteral( "addmult" ) );
  KConfigSkeleton::ItemBool  *itemMuldiv;
  itemMuldiv = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "muldiv" ), mMuldiv, false );
  addItem( itemMuldiv, QStringLiteral( "muldiv" ) );
  KConfigSkeleton::ItemUInt  *itemNumber_ratios;
  itemNumber_ratios = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "number_ratios" ), mNumber_ratios, 2 );
  addItem( itemNumber_ratios, QStringLiteral( "number_ratios" ) );
  KConfigSkeleton::ItemUInt  *itemMax_main_denominator;
  itemMax_main_denominator = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "max_main_denominator" ), mMax_main_denominator, 10 );
  addItem( itemMax_main_denominator, QStringLiteral( "max_main_denominator" ) );
  KConfigSkeleton::ItemUInt  *itemReduceForm;
  itemReduceForm = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "reduceForm" ), mReduceForm, false );
  addItem( itemReduceForm, QStringLiteral( "reduceForm" ) );
  KConfigSkeleton::ItemBool  *itemSolutionMixed;
  itemSolutionMixed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "solutionMixed" ), mSolutionMixed, true );
  addItem( itemSolutionMixed, QStringLiteral( "solutionMixed" ) );
  KConfigSkeleton::ItemBool  *itemAnswerMixed;
  itemAnswerMixed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "answerMixed" ), mAnswerMixed, true );
  addItem( itemAnswerMixed, QStringLiteral( "answerMixed" ) );
  KConfigSkeleton::ItemBool  *itemQuestionMixed;
  itemQuestionMixed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "questionMixed" ), mQuestionMixed, true );
  addItem( itemQuestionMixed, QStringLiteral( "questionMixed" ) );

  setCurrentGroup( QStringLiteral( "Statistics" ) );

  KConfigSkeleton::ItemInt  *itemCorrect;
  itemCorrect = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "correct" ), mCorrect, 0 );
  addItem( itemCorrect, QStringLiteral( "correct" ) );
  KConfigSkeleton::ItemInt  *itemCount;
  itemCount = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "count" ), mCount, 0 );
  addItem( itemCount, QStringLiteral( "count" ) );
  KConfigSkeleton::ItemInt  *itemSkipped;
  itemSkipped = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "skipped" ), mSkipped, 0 );
  addItem( itemSkipped, QStringLiteral( "skipped" ) );

  setCurrentGroup( QStringLiteral( "TaskViewer" ) );

  KConfigSkeleton::ItemColor  *itemNumberColor;
  itemNumberColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "numberColor" ), mNumberColor, Qt::black );
  addItem( itemNumberColor, QStringLiteral( "numberColor" ) );
  KConfigSkeleton::ItemColor  *itemOperationColor;
  itemOperationColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "operationColor" ), mOperationColor, Qt::blue );
  addItem( itemOperationColor, QStringLiteral( "operationColor" ) );
  KConfigSkeleton::ItemColor  *itemFractionBarColor;
  itemFractionBarColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "fractionBarColor" ), mFractionBarColor, Qt::black );
  addItem( itemFractionBarColor, QStringLiteral( "fractionBarColor" ) );
  KConfigSkeleton::ItemFont  *itemTaskFont;
  itemTaskFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "taskFont" ), mTaskFont, MainQtWidget::DefaultFont() );
  addItem( itemTaskFont, QStringLiteral( "taskFont" ) );
  KConfigSkeleton::ItemBool  *itemShowSpecialRatioNotation;
  itemShowSpecialRatioNotation = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showSpecialRatioNotation" ), mShowSpecialRatioNotation, true );
  addItem( itemShowSpecialRatioNotation, QStringLiteral( "showSpecialRatioNotation" ) );
}

SettingsClass::~SettingsClass()
{
  s_globalSettingsClass()->q = nullptr;
}

