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

  KConfigSkeleton::ItemBool  *itemShowCreationTips;
  itemShowCreationTips = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showCreationTips" ), mShowCreationTips, true );
  addItem( itemShowCreationTips, QStringLiteral( "showCreationTips" ) );
  KConfigSkeleton::ItemBool  *itemShowAxes;
  itemShowAxes = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showAxes" ), mShowAxes, true );
  addItem( itemShowAxes, QStringLiteral( "showAxes" ) );
  KConfigSkeleton::ItemInt  *itemFloatDisplayPrecision;
  itemFloatDisplayPrecision = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "floatDisplayPrecision" ), mFloatDisplayPrecision, 4 );
  itemFloatDisplayPrecision->setMinValue(1);
  itemFloatDisplayPrecision->setMaxValue(15);
  addItem( itemFloatDisplayPrecision, QStringLiteral( "floatDisplayPrecision" ) );
  KConfigSkeleton::ItemBool  *itemEnableOpenGL;
  itemEnableOpenGL = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enableOpenGL" ), mEnableOpenGL, false );
  addItem( itemEnableOpenGL, QStringLiteral( "enableOpenGL" ) );

  setCurrentGroup( QStringLiteral( "InfoBrowser" ) );

  KConfigSkeleton::ItemBool  *itemWikiExternal;
  itemWikiExternal = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "wikiExternal" ), mWikiExternal, false );
  addItem( itemWikiExternal, QStringLiteral( "wikiExternal" ) );

  setCurrentGroup( QStringLiteral( "ItemPalette" ) );

  KConfigSkeleton::ItemBool  *itemShowButtonText;
  itemShowButtonText = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showButtonText" ), mShowButtonText, true );
  addItem( itemShowButtonText, QStringLiteral( "showButtonText" ) );
}

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

