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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings->q) {
    new Settings;
    s_globalSettings->q->readConfig();
  }

  return s_globalSettings->q;
}

Settings::Settings(  )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "Options" ) );

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

  setCurrentGroup( QLatin1String( "Themes" ) );

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

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

Settings::~Settings()
{
  if (!s_globalSettings.isDestroyed()) {
    s_globalSettings->q = 0;
  }
}

