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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() noexcept : q(nullptr) {}
    ~SettingsHelper() noexcept { delete q; q = nullptr; }
    SettingsHelper(const SettingsHelper&) = delete;
    SettingsHelper& operator=(const SettingsHelper&) = delete;
    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( "rocsrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "ItemPalette" ) );

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

  setCurrentGroup( QStringLiteral( "RocsConfigVersion" ) );

  KConfigSkeleton::ItemString  *itemVersion;
  itemVersion = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "version" ), mVersion, QStringLiteral( "0.0.0" ) );
  addItem( itemVersion, QStringLiteral( "version" ) );

  setCurrentGroup( QStringLiteral( "GraphicsView" ) );

  KConfigSkeleton::ItemBool  *itemFastGraphics;
  itemFastGraphics = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "fastGraphics" ), mFastGraphics, false );
  addItem( itemFastGraphics, QStringLiteral( "fastGraphics" ) );

  setCurrentGroup( QStringLiteral( "MainWindow" ) );

  KConfigSkeleton::ItemInt  *itemVSplitterSizeTop;
  itemVSplitterSizeTop = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vSplitterSizeTop" ), mVSplitterSizeTop, 200 );
  addItem( itemVSplitterSizeTop, QStringLiteral( "vSplitterSizeTop" ) );
  KConfigSkeleton::ItemInt  *itemVSplitterSizeBottom;
  itemVSplitterSizeBottom = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vSplitterSizeBottom" ), mVSplitterSizeBottom, 200 );
  addItem( itemVSplitterSizeBottom, QStringLiteral( "vSplitterSizeBottom" ) );
  KConfigSkeleton::ItemInt  *itemHSplitterSizeLeft;
  itemHSplitterSizeLeft = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "hSplitterSizeLeft" ), mHSplitterSizeLeft,  500  );
  addItem( itemHSplitterSizeLeft, QStringLiteral( "hSplitterSizeLeft" ) );
  KConfigSkeleton::ItemInt  *itemHSplitterSizeRight;
  itemHSplitterSizeRight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "hSplitterSizeRight" ), mHSplitterSizeRight,  500  );
  addItem( itemHSplitterSizeRight, QStringLiteral( "hSplitterSizeRight" ) );
  KConfigSkeleton::ItemInt  *itemHScriptSplitterSizeLeft;
  itemHScriptSplitterSizeLeft = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "hScriptSplitterSizeLeft" ), mHScriptSplitterSizeLeft,  500  );
  addItem( itemHScriptSplitterSizeLeft, QStringLiteral( "hScriptSplitterSizeLeft" ) );
  KConfigSkeleton::ItemInt  *itemHScriptSplitterSizeRight;
  itemHScriptSplitterSizeRight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "hScriptSplitterSizeRight" ), mHScriptSplitterSizeRight,  500  );
  addItem( itemHScriptSplitterSizeRight, QStringLiteral( "hScriptSplitterSizeRight" ) );
  KConfigSkeleton::ItemString  *itemLastOpenedDirectory;
  itemLastOpenedDirectory = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "lastOpenedDirectory" ), mLastOpenedDirectory );
  addItem( itemLastOpenedDirectory, QStringLiteral( "lastOpenedDirectory" ) );

  setCurrentGroup( QStringLiteral( "IncludeManager" ) );

  KConfigSkeleton::ItemStringList  *itemIncludePath;
  itemIncludePath = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "includePath" ), mIncludePath );
  addItem( itemIncludePath, QStringLiteral( "includePath" ) );
}

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

