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

#include "kbbprefs.h"

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

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

  return s_globalKBBPrefs()->q;
}

KBBPrefs::KBBPrefs( )
  : KConfigSkeleton( QStringLiteral( "kblackboxrc" ) )
{
  Q_ASSERT(!s_globalKBBPrefs()->q);
  s_globalKBBPrefs()->q = this;
  setCurrentGroup( QStringLiteral( "KBlackBox Setup" ) );

  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "theme" ), mTheme );
  itemTheme->setLabel( QCoreApplication::translate("KBBPrefs", "File of the current theme of the graphic elements. (SVGZ file with path and file extension)") );
  addItem( itemTheme, QStringLiteral( "theme" ) );
  KConfigSkeleton::ItemInt  *itemBalls;
  itemBalls = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "balls" ), mBalls, 4 );
  itemBalls->setLabel( QCoreApplication::translate("KBBPrefs", "Number of balls for custom difficulty level") );
  addItem( itemBalls, QStringLiteral( "balls" ) );
  KConfigSkeleton::ItemInt  *itemColumns;
  itemColumns = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "columns" ), mColumns, 8 );
  itemColumns->setLabel( QCoreApplication::translate("KBBPrefs", "Number of columns of the board for custom difficulty level") );
  addItem( itemColumns, QStringLiteral( "columns" ) );
  KConfigSkeleton::ItemInt  *itemRows;
  itemRows = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "rows" ), mRows, 8 );
  itemRows->setLabel( QCoreApplication::translate("KBBPrefs", "Number of rows of the board for custom difficuty level") );
  addItem( itemRows, QStringLiteral( "rows" ) );
}

KBBPrefs::~KBBPrefs()
{
  s_globalKBBPrefs()->q = nullptr;
}

