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

#include "audiocd_vorbis_encoder.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() noexcept : q(nullptr) {}
    ~SettingsHelper() noexcept { delete q; q = nullptr; }
    SettingsHelper(const SettingsHelper&) = delete;
    SettingsHelper& operator=(const SettingsHelper&) = delete;
    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( "kcmaudiocd_encoder_vorbis_rc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Vorbis" ) );

  KConfigSkeleton::ItemInt  *itemVorbis_enc_method;
  itemVorbis_enc_method = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vorbis_enc_method" ), mVorbis_enc_method, 0 );
  addItem( itemVorbis_enc_method, QStringLiteral( "vorbis_enc_method" ) );
  KConfigSkeleton::ItemBool  *itemSet_vorbis_min_br;
  itemSet_vorbis_min_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_vorbis_min_br" ), mSet_vorbis_min_br, false );
  addItem( itemSet_vorbis_min_br, QStringLiteral( "set_vorbis_min_br" ) );
  KConfigSkeleton::ItemBool  *itemSet_vorbis_max_br;
  itemSet_vorbis_max_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_vorbis_max_br" ), mSet_vorbis_max_br, false );
  addItem( itemSet_vorbis_max_br, QStringLiteral( "set_vorbis_max_br" ) );
  KConfigSkeleton::ItemBool  *itemSet_vorbis_nominal_br;
  itemSet_vorbis_nominal_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_vorbis_nominal_br" ), mSet_vorbis_nominal_br, true );
  addItem( itemSet_vorbis_nominal_br, QStringLiteral( "set_vorbis_nominal_br" ) );
  KConfigSkeleton::ItemBool  *itemVorbis_comments;
  itemVorbis_comments = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vorbis_comments" ), mVorbis_comments, true );
  addItem( itemVorbis_comments, QStringLiteral( "vorbis_comments" ) );
  KConfigSkeleton::ItemDouble  *itemVorbis_quality;
  itemVorbis_quality = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "vorbis_quality" ), mVorbis_quality, 3 );
  itemVorbis_quality->setMinValue(0);
  itemVorbis_quality->setMaxValue(10);
  addItem( itemVorbis_quality, QStringLiteral( "vorbis_quality" ) );
  KConfigSkeleton::ItemInt  *itemVorbis_min_br;
  itemVorbis_min_br = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vorbis_min_br" ), mVorbis_min_br, 1 );
  itemVorbis_min_br->setMinValue(0);
  itemVorbis_min_br->setMaxValue(13);
  addItem( itemVorbis_min_br, QStringLiteral( "vorbis_min_br" ) );
  KConfigSkeleton::ItemInt  *itemVorbis_max_br;
  itemVorbis_max_br = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vorbis_max_br" ), mVorbis_max_br, 13 );
  itemVorbis_max_br->setMinValue(0);
  itemVorbis_max_br->setMaxValue(13);
  addItem( itemVorbis_max_br, QStringLiteral( "vorbis_max_br" ) );
  KConfigSkeleton::ItemInt  *itemVorbis_nominal_br;
  itemVorbis_nominal_br = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vorbis_nominal_br" ), mVorbis_nominal_br, 3 );
  itemVorbis_nominal_br->setMinValue(0);
  itemVorbis_nominal_br->setMaxValue(5);
  addItem( itemVorbis_nominal_br, QStringLiteral( "vorbis_nominal_br" ) );
}

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

