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

#include "kollisionconfig.h"

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

class KollisionConfigHelper
{
  public:
    KollisionConfigHelper() noexcept : q(nullptr) {}
    ~KollisionConfigHelper() noexcept { delete q; q = nullptr; }
    KollisionConfigHelper(const KollisionConfigHelper&) = delete;
    KollisionConfigHelper& operator=(const KollisionConfigHelper&) = delete;
    KollisionConfig *q;
};
Q_GLOBAL_STATIC(KollisionConfigHelper, s_globalKollisionConfig)
KollisionConfig *KollisionConfig::self()
{
  if (!s_globalKollisionConfig()->q) {
    new KollisionConfig;
    s_globalKollisionConfig()->q->read();
  }

  return s_globalKollisionConfig()->q;
}

KollisionConfig::KollisionConfig( )
  : KConfigSkeleton( QStringLiteral( "kollisionrc" ) )
{
  Q_ASSERT(!s_globalKollisionConfig()->q);
  s_globalKollisionConfig()->q = this;
  setCurrentGroup( QStringLiteral( "game_options" ) );

  KConfigSkeleton::ItemBool  *itemIncreaseBallSize;
  itemIncreaseBallSize = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "IncreaseBallSize" ), mIncreaseBallSize, false );
  addItem( itemIncreaseBallSize, QStringLiteral( "IncreaseBallSize" ) );

  setCurrentGroup( QStringLiteral( "sounds" ) );

  KConfigSkeleton::ItemBool  *itemEnableSounds;
  itemEnableSounds = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EnableSounds" ), mEnableSounds, false );
  addItem( itemEnableSounds, QStringLiteral( "EnableSounds" ) );
}

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

