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

#include "prefs.h"

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

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

  return s_globalPrefs()->q;
}

Prefs::Prefs( )
  : KConfigSkeleton( QStringLiteral( "klinesrc" ) )
{
  Q_ASSERT(!s_globalPrefs()->q);
  s_globalPrefs()->q = this;
  setCurrentGroup( QStringLiteral( "Game" ) );

  KConfigSkeleton::ItemBool  *itemShowNext;
  itemShowNext = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowNext" ), mShowNext, true );
  addItem( itemShowNext, QStringLiteral( "ShowNext" ) );
  KConfigSkeleton::ItemInt  *itemSavedBackgroundWidth;
  itemSavedBackgroundWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SavedBackgroundWidth" ), mSavedBackgroundWidth, -1 );
  addItem( itemSavedBackgroundWidth, QStringLiteral( "SavedBackgroundWidth" ) );
  KConfigSkeleton::ItemInt  *itemSavedBackgroundHeight;
  itemSavedBackgroundHeight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SavedBackgroundHeight" ), mSavedBackgroundHeight, -1 );
  addItem( itemSavedBackgroundHeight, QStringLiteral( "SavedBackgroundHeight" ) );
}

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

