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

  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Theme" ), mTheme, QStringLiteral( "themes/mummies_crypt.desktop" ) );
  addItem( itemTheme, QStringLiteral( "Theme" ) );
  KConfigSkeleton::ItemBool  *itemSounds;
  itemSounds = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Sounds" ), mSounds, true );
  addItem( itemSounds, QStringLiteral( "Sounds" ) );
}

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

