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

#include "settings.h"

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

using namespace gui;

namespace gui {

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( "bovorc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "bovo" ) );

  KConfigSkeleton::ItemString  *itemTheme;
  itemTheme = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "theme" ), mTheme, QStringLiteral( "scribble" ) );
  addItem( itemTheme, QStringLiteral( "theme" ) );
  KConfigSkeleton::ItemInt  *itemPlaybackSpeed;
  itemPlaybackSpeed = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "playbackSpeed" ), mPlaybackSpeed, 400 );
  itemPlaybackSpeed->setMinValue(150);
  itemPlaybackSpeed->setMaxValue(2000);
  addItem( itemPlaybackSpeed, QStringLiteral( "playbackSpeed" ) );
  KConfigSkeleton::ItemBool  *itemAnimation;
  itemAnimation = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "animation" ), mAnimation, true );
  addItem( itemAnimation, QStringLiteral( "animation" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesai;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Gabor");
    valuesai.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Aron");
    valuesai.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemAi;
  itemAi = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "ai" ), mAi, valuesai, EnumAi::Gabor );
  addItem( itemAi, QStringLiteral( "ai" ) );
}

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

