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

#include "settings.h"

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

class blinkenSettingsHelper
{
  public:
    blinkenSettingsHelper() : q(nullptr) {}
    ~blinkenSettingsHelper() { delete q; q = nullptr; }
    blinkenSettingsHelper(const blinkenSettingsHelper&) = delete;
    blinkenSettingsHelper& operator=(const blinkenSettingsHelper&) = delete;
    blinkenSettings *q;
};
Q_GLOBAL_STATIC(blinkenSettingsHelper, s_globalblinkenSettings)
blinkenSettings *blinkenSettings::self()
{
  if (!s_globalblinkenSettings()->q) {
    new blinkenSettings;
    s_globalblinkenSettings()->q->read();
  }

  return s_globalblinkenSettings()->q;
}

blinkenSettings::blinkenSettings( )
  : KConfigSkeleton( QStringLiteral( "blinkenrc" ) )
{
  Q_ASSERT(!s_globalblinkenSettings()->q);
  s_globalblinkenSettings()->q = this;
  setCurrentGroup( QStringLiteral( "general" ) );

  KConfigSkeleton::ItemBool  *itemPlaySounds;
  itemPlaySounds = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "playSounds" ), mPlaySounds, true );
  addItem( itemPlaySounds, QStringLiteral( "playSounds" ) );
  KConfigSkeleton::ItemBool  *itemCustomFont;
  itemCustomFont = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "customFont" ), mCustomFont, true );
  addItem( itemCustomFont, QStringLiteral( "customFont" ) );
}

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

