// This file is generated by kconfig_compiler from palapeli.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( QLatin1String( "palapelirc" ) )
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "Puzzling" ) );

  KConfigSkeleton::ItemInt  *itemSnappingPrecision;
  itemSnappingPrecision = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "SnappingPrecision" ), mSnappingPrecision, 20 );
  addItem( itemSnappingPrecision, QLatin1String( "SnappingPrecision" ) );

  setCurrentGroup( QLatin1String( "Appearance" ) );

  KConfigSkeleton::ItemString  *itemViewBackground;
  itemViewBackground = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "ViewBackground" ), mViewBackground, QLatin1String( "background.svg" ) );
  addItem( itemViewBackground, QLatin1String( "ViewBackground" ) );
  KConfigSkeleton::ItemColor  *itemViewBackgroundColor;
  itemViewBackgroundColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "ViewBackgroundColor" ), mViewBackgroundColor, QColor( "#fff7eb" ) );
  addItem( itemViewBackgroundColor, QLatin1String( "ViewBackgroundColor" ) );
  KConfigSkeleton::ItemColor  *itemViewHighlightColor;
  itemViewHighlightColor = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "ViewHighlightColor" ), mViewHighlightColor, QColor( "#6effff" ) );
  addItem( itemViewHighlightColor, QLatin1String( "ViewHighlightColor" ) );
  KConfigSkeleton::ItemInt  *itemSolutionArea;
  itemSolutionArea = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "SolutionArea" ), mSolutionArea, 0 );
  addItem( itemSolutionArea, QLatin1String( "SolutionArea" ) );
  KConfigSkeleton::ItemInt  *itemPieceSpacing;
  itemPieceSpacing = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "PieceSpacing" ), mPieceSpacing, 6 );
  addItem( itemPieceSpacing, QLatin1String( "PieceSpacing" ) );
  KConfigSkeleton::ItemBool  *itemShowStatusBar;
  itemShowStatusBar = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowStatusBar" ), mShowStatusBar, true );
  addItem( itemShowStatusBar, QLatin1String( "ShowStatusBar" ) );
  KConfigSkeleton::ItemBool  *itemPieceShadowsEnabled;
  itemPieceShadowsEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PieceShadowsEnabled" ), mPieceShadowsEnabled, false );
  addItem( itemPieceShadowsEnabled, QLatin1String( "PieceShadowsEnabled" ) );
  KConfigSkeleton::ItemBool  *itemPieceBevelsEnabled;
  itemPieceBevelsEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PieceBevelsEnabled" ), mPieceBevelsEnabled, false );
  addItem( itemPieceBevelsEnabled, QLatin1String( "PieceBevelsEnabled" ) );

  setCurrentGroup( QLatin1String( "PuzzlePreview" ) );

  KConfigSkeleton::ItemBool  *itemPuzzlePreviewVisible;
  itemPuzzlePreviewVisible = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "PuzzlePreviewVisible" ), mPuzzlePreviewVisible, true );
  addItem( itemPuzzlePreviewVisible, QLatin1String( "PuzzlePreviewVisible" ) );
  KConfigSkeleton::ItemRect  *itemPuzzlePreviewGeometry;
  itemPuzzlePreviewGeometry = new KConfigSkeleton::ItemRect( currentGroup(), QLatin1String( "PuzzlePreviewGeometry" ), mPuzzlePreviewGeometry, QRect(-1, -1, 320, 240) );
  addItem( itemPuzzlePreviewGeometry, QLatin1String( "PuzzlePreviewGeometry" ) );
}

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

