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

#include "audiocd_opus_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_opus_rc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Vorbis" ) );

  KConfigSkeleton::ItemBool  *itemOpus_enc_complexity;
  itemOpus_enc_complexity = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "opus_enc_complexity" ), mOpus_enc_complexity, true );
  addItem( itemOpus_enc_complexity, QStringLiteral( "opus_enc_complexity" ) );
  KConfigSkeleton::ItemBool  *itemSet_opus_cbr;
  itemSet_opus_cbr = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_opus_cbr" ), mSet_opus_cbr, false );
  addItem( itemSet_opus_cbr, QStringLiteral( "set_opus_cbr" ) );
  KConfigSkeleton::ItemBool  *itemSet_opus_cvbr;
  itemSet_opus_cvbr = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_opus_cvbr" ), mSet_opus_cvbr, false );
  addItem( itemSet_opus_cvbr, QStringLiteral( "set_opus_cvbr" ) );
  KConfigSkeleton::ItemBool  *itemSet_opus_vbr;
  itemSet_opus_vbr = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_opus_vbr" ), mSet_opus_vbr, true );
  addItem( itemSet_opus_vbr, QStringLiteral( "set_opus_vbr" ) );
  KConfigSkeleton::ItemBool  *itemOpus_comments;
  itemOpus_comments = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "opus_comments" ), mOpus_comments, true );
  addItem( itemOpus_comments, QStringLiteral( "opus_comments" ) );
  KConfigSkeleton::ItemInt  *itemOpus_complexity;
  itemOpus_complexity = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "opus_complexity" ), mOpus_complexity, 10 );
  itemOpus_complexity->setMinValue(0);
  itemOpus_complexity->setMaxValue(10);
  addItem( itemOpus_complexity, QStringLiteral( "opus_complexity" ) );
  KConfigSkeleton::ItemInt  *itemOpus_cbr;
  itemOpus_cbr = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "opus_cbr" ), mOpus_cbr, 6 );
  itemOpus_cbr->setMinValue(0);
  itemOpus_cbr->setMaxValue(10);
  addItem( itemOpus_cbr, QStringLiteral( "opus_cbr" ) );
  KConfigSkeleton::ItemInt  *itemOpus_cvbr;
  itemOpus_cvbr = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "opus_cvbr" ), mOpus_cvbr, 6 );
  itemOpus_cvbr->setMinValue(0);
  itemOpus_cvbr->setMaxValue(10);
  addItem( itemOpus_cvbr, QStringLiteral( "opus_cvbr" ) );
  KConfigSkeleton::ItemInt  *itemOpus_vbr;
  itemOpus_vbr = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "opus_vbr" ), mOpus_vbr, 6 );
  itemOpus_vbr->setMinValue(0);
  itemOpus_vbr->setMaxValue(10);
  addItem( itemOpus_vbr, QStringLiteral( "opus_vbr" ) );
}

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

