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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(nullptr) {}
    ~SettingsHelper() { 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( "granatierrc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemInt  *itemFirstRun;
  itemFirstRun = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "FirstRun" ), mFirstRun, 1 );
  addItem( itemFirstRun, QStringLiteral( "FirstRun" ) );
  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Theme" ), mTheme, QStringLiteral( "themes/granatier.desktop" ) );
  addItem( itemTheme, QStringLiteral( "Theme" ) );
  KConfigSkeleton::ItemString  *itemArena;
  itemArena = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Arena" ), mArena, QStringLiteral( "arenas/granatier.desktop" ) );
  addItem( itemArena, QStringLiteral( "Arena" ) );
  KConfigSkeleton::ItemBool  *itemRandomArenaMode;
  itemRandomArenaMode = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "RandomArenaMode" ), mRandomArenaMode, false );
  addItem( itemRandomArenaMode, QStringLiteral( "RandomArenaMode" ) );
  KConfigSkeleton::ItemStringList  *itemRandomArenaModeArenaList;
  itemRandomArenaModeArenaList = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "RandomArenaModeArenaList" ), mRandomArenaModeArenaList );
  addItem( itemRandomArenaModeArenaList, QStringLiteral( "RandomArenaModeArenaList" ) );
  KConfigSkeleton::ItemInt  *itemPointsToWin;
  itemPointsToWin = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "PointsToWin" ), mPointsToWin, 5 );
  addItem( itemPointsToWin, QStringLiteral( "PointsToWin" ) );
  KConfigSkeleton::ItemInt  *itemRoundTime;
  itemRoundTime = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "RoundTime" ), mRoundTime, 180 );
  addItem( itemRoundTime, QStringLiteral( "RoundTime" ) );
  KConfigSkeleton::ItemInt  *itemInitialSpeed;
  itemInitialSpeed = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "InitialSpeed" ), mInitialSpeed, 2 );
  addItem( itemInitialSpeed, QStringLiteral( "InitialSpeed" ) );
  KConfigSkeleton::ItemInt  *itemInitialBombPower;
  itemInitialBombPower = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "InitialBombPower" ), mInitialBombPower, 1 );
  addItem( itemInitialBombPower, QStringLiteral( "InitialBombPower" ) );
  KConfigSkeleton::ItemInt  *itemInitialBombArmory;
  itemInitialBombArmory = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "InitialBombArmory" ), mInitialBombArmory, 1 );
  addItem( itemInitialBombArmory, QStringLiteral( "InitialBombArmory" ) );
  KConfigSkeleton::ItemBool  *itemSounds;
  itemSounds = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Sounds" ), mSounds, true );
  addItem( itemSounds, QStringLiteral( "Sounds" ) );
  KConfigSkeleton::ItemBool  *itemUseWilhelmScream;
  itemUseWilhelmScream = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseWilhelmScream" ), mUseWilhelmScream, false );
  addItem( itemUseWilhelmScream, QStringLiteral( "UseWilhelmScream" ) );
  KConfigSkeleton::ItemInt  *itemDummy;
  itemDummy = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Dummy" ), mDummy, 0 );
  addItem( itemDummy, QStringLiteral( "Dummy" ) );
  KConfigSkeleton::ItemInt  *itemShowAllTiles;
  itemShowAllTiles = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ShowAllTiles" ), mShowAllTiles, 0 );
  addItem( itemShowAllTiles, QStringLiteral( "ShowAllTiles" ) );
  KConfigSkeleton::ItemInt  *itemBlastTime1;
  itemBlastTime1 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BlastTime1" ), mBlastTime1, 30 );
  addItem( itemBlastTime1, QStringLiteral( "BlastTime1" ) );
  KConfigSkeleton::ItemInt  *itemBlastTime2;
  itemBlastTime2 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BlastTime2" ), mBlastTime2, 70 );
  addItem( itemBlastTime2, QStringLiteral( "BlastTime2" ) );
  KConfigSkeleton::ItemInt  *itemBlastTime3;
  itemBlastTime3 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BlastTime3" ), mBlastTime3, 200 );
  addItem( itemBlastTime3, QStringLiteral( "BlastTime3" ) );
  KConfigSkeleton::ItemInt  *itemBlastTime4;
  itemBlastTime4 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BlastTime4" ), mBlastTime4, 100 );
  addItem( itemBlastTime4, QStringLiteral( "BlastTime4" ) );
  KConfigSkeleton::ItemInt  *itemBlastTime5;
  itemBlastTime5 = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "BlastTime5" ), mBlastTime5, 100 );
  addItem( itemBlastTime5, QStringLiteral( "BlastTime5" ) );
}

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

