// This file is generated by kconfig_compiler_kf5 from ksudoku.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()
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Options" ) );

  KConfigSkeleton::ItemBool  *itemPrintMulti;
  itemPrintMulti = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "printMulti" ), mPrintMulti, true );
  addItem( itemPrintMulti, QStringLiteral( "PrintMulti" ) );
  KConfigSkeleton::ItemBool  *itemShowHighlights;
  itemShowHighlights = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showHighlights" ), mShowHighlights, true );
  addItem( itemShowHighlights, QStringLiteral( "ShowHighlights" ) );
  KConfigSkeleton::ItemBool  *itemShowErrors;
  itemShowErrors = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showErrors" ), mShowErrors, true );
  addItem( itemShowErrors, QStringLiteral( "ShowErrors" ) );
  KConfigSkeleton::ItemBool  *itemShowHighlights3D;
  itemShowHighlights3D = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showHighlights3D" ), mShowHighlights3D, true );
  addItem( itemShowHighlights3D, QStringLiteral( "ShowHighlights3D" ) );
  KConfigSkeleton::ItemInt  *itemMathdokuSize;
  itemMathdokuSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "mathdokuSize" ), mMathdokuSize, 6 );
  addItem( itemMathdokuSize, QStringLiteral( "MathdokuSize" ) );
  KConfigSkeleton::ItemInt  *itemOverallSize3D;
  itemOverallSize3D = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "overallSize3D" ), mOverallSize3D, 10 );
  addItem( itemOverallSize3D, QStringLiteral( "OverallSize3D" ) );
  KConfigSkeleton::ItemInt  *itemSelectionSize3D;
  itemSelectionSize3D = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "selectionSize3D" ), mSelectionSize3D, 7 );
  addItem( itemSelectionSize3D, QStringLiteral( "SelectionSize3D" ) );
  KConfigSkeleton::ItemInt  *itemHighlightedSize3D;
  itemHighlightedSize3D = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "highlightedSize3D" ), mHighlightedSize3D, 7 );
  addItem( itemHighlightedSize3D, QStringLiteral( "HighlightedSize3D" ) );
  KConfigSkeleton::ItemInt  *itemOuterCellSize3D;
  itemOuterCellSize3D = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "outerCellSize3D" ), mOuterCellSize3D, 4 );
  addItem( itemOuterCellSize3D, QStringLiteral( "OuterCellSize3D" ) );
  KConfigSkeleton::ItemBool  *itemDarkenOuterCells3D;
  itemDarkenOuterCells3D = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "darkenOuterCells3D" ), mDarkenOuterCells3D, true );
  addItem( itemDarkenOuterCells3D, QStringLiteral( "DarkenOuterCells3D" ) );

  setCurrentGroup( QStringLiteral( "Themes" ) );

  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "theme" ), mTheme );
  addItem( itemTheme, QStringLiteral( "Theme" ) );
  QStringList defaultSymbols;
  defaultSymbols.append( QString::fromUtf8( "digits" ) );
  defaultSymbols.append( QString::fromUtf8( "letters_lower" ) );

  KConfigSkeleton::ItemStringList  *itemSymbols;
  itemSymbols = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "symbols" ), mSymbols, defaultSymbols );
  addItem( itemSymbols, QStringLiteral( "Symbols" ) );
}

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

