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

#include "audiocd_lame_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_lame_rc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Lame" ) );

  KConfigSkeleton::ItemBool  *itemBitrate_constant;
  itemBitrate_constant = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "bitrate_constant" ), mBitrate_constant, false );
  addItem( itemBitrate_constant, QStringLiteral( "bitrate_constant" ) );
  KConfigSkeleton::ItemBool  *itemBitrate_variable;
  itemBitrate_variable = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "bitrate_variable" ), mBitrate_variable, true );
  addItem( itemBitrate_variable, QStringLiteral( "bitrate_variable" ) );
  KConfigSkeleton::ItemInt  *itemStereo;
  itemStereo = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "stereo" ), mStereo, 0 );
  addItem( itemStereo, QStringLiteral( "stereo" ) );
  KConfigSkeleton::ItemInt  *itemQuality;
  itemQuality = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "quality" ), mQuality, -2 );
  addItem( itemQuality, QStringLiteral( "quality" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesbyte_swap;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("No");
    valuesbyte_swap.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Yes");
    valuesbyte_swap.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Default");
    valuesbyte_swap.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemByte_swap;
  itemByte_swap = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "byte_swap" ), mByte_swap, valuesbyte_swap, EnumByte_swap::No );
  addItem( itemByte_swap, QStringLiteral( "byte_swap" ) );
  KConfigSkeleton::ItemBool  *itemCopyright;
  itemCopyright = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "copyright" ), mCopyright, false );
  addItem( itemCopyright, QStringLiteral( "copyright" ) );
  KConfigSkeleton::ItemBool  *itemOriginal;
  itemOriginal = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "original" ), mOriginal, true );
  addItem( itemOriginal, QStringLiteral( "original" ) );
  KConfigSkeleton::ItemBool  *itemIso;
  itemIso = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "iso" ), mIso, false );
  addItem( itemIso, QStringLiteral( "iso" ) );
  KConfigSkeleton::ItemBool  *itemCrc;
  itemCrc = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "crc" ), mCrc, false );
  addItem( itemCrc, QStringLiteral( "crc" ) );
  KConfigSkeleton::ItemBool  *itemId3_tag;
  itemId3_tag = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "id3_tag" ), mId3_tag, true );
  addItem( itemId3_tag, QStringLiteral( "id3_tag" ) );
  KConfigSkeleton::ItemInt  *itemCbr_bitrate;
  itemCbr_bitrate = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "cbr_bitrate" ), mCbr_bitrate, 10 );
  itemCbr_bitrate->setMinValue(0);
  itemCbr_bitrate->setMaxValue(13);
  addItem( itemCbr_bitrate, QStringLiteral( "cbr_bitrate" ) );
  KConfigSkeleton::ItemBool  *itemVbr_min_br;
  itemVbr_min_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vbr_min_br" ), mVbr_min_br, false );
  addItem( itemVbr_min_br, QStringLiteral( "vbr_min_br" ) );
  KConfigSkeleton::ItemBool  *itemVbr_min_hard;
  itemVbr_min_hard = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vbr_min_hard" ), mVbr_min_hard, false );
  addItem( itemVbr_min_hard, QStringLiteral( "vbr_min_hard" ) );
  KConfigSkeleton::ItemBool  *itemVbr_max_br;
  itemVbr_max_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vbr_max_br" ), mVbr_max_br, false );
  addItem( itemVbr_max_br, QStringLiteral( "vbr_max_br" ) );
  KConfigSkeleton::ItemBool  *itemVbr_average_br;
  itemVbr_average_br = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vbr_average_br" ), mVbr_average_br, false );
  addItem( itemVbr_average_br, QStringLiteral( "vbr_average_br" ) );
  KConfigSkeleton::ItemBool  *itemVbr_xing_tag;
  itemVbr_xing_tag = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "vbr_xing_tag" ), mVbr_xing_tag, true );
  addItem( itemVbr_xing_tag, QStringLiteral( "vbr_xing_tag" ) );
  KConfigSkeleton::ItemInt  *itemVbr_min_brate;
  itemVbr_min_brate = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vbr_min_brate" ), mVbr_min_brate, 40 );
  itemVbr_min_brate->setMinValue(0);
  itemVbr_min_brate->setMaxValue(13);
  addItem( itemVbr_min_brate, QStringLiteral( "vbr_min_brate" ) );
  KConfigSkeleton::ItemInt  *itemVbr_max_brate;
  itemVbr_max_brate = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vbr_max_brate" ), mVbr_max_brate, 13 );
  itemVbr_max_brate->setMinValue(0);
  itemVbr_max_brate->setMaxValue(13);
  addItem( itemVbr_max_brate, QStringLiteral( "vbr_max_brate" ) );
  KConfigSkeleton::ItemInt  *itemVbr_mean_brate;
  itemVbr_mean_brate = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "vbr_mean_brate" ), mVbr_mean_brate, 10 );
  itemVbr_mean_brate->setMinValue(0);
  itemVbr_mean_brate->setMaxValue(13);
  addItem( itemVbr_mean_brate, QStringLiteral( "vbr_mean_brate" ) );
  KConfigSkeleton::ItemBool  *itemEnable_lowpass;
  itemEnable_lowpass = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enable_lowpass" ), mEnable_lowpass, false );
  addItem( itemEnable_lowpass, QStringLiteral( "enable_lowpass" ) );
  KConfigSkeleton::ItemInt  *itemLowfilterfreq;
  itemLowfilterfreq = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "lowfilterfreq" ), mLowfilterfreq, 18000 );
  addItem( itemLowfilterfreq, QStringLiteral( "lowfilterfreq" ) );
  KConfigSkeleton::ItemBool  *itemEnable_highpass;
  itemEnable_highpass = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enable_highpass" ), mEnable_highpass, false );
  addItem( itemEnable_highpass, QStringLiteral( "enable_highpass" ) );
  KConfigSkeleton::ItemInt  *itemHighfilterfreq;
  itemHighfilterfreq = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "highfilterfreq" ), mHighfilterfreq, 0 );
  addItem( itemHighfilterfreq, QStringLiteral( "highfilterfreq" ) );
  KConfigSkeleton::ItemBool  *itemSet_lpf_width;
  itemSet_lpf_width = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_lpf_width" ), mSet_lpf_width, false );
  addItem( itemSet_lpf_width, QStringLiteral( "set_lpf_width" ) );
  KConfigSkeleton::ItemInt  *itemLowfilterwidth;
  itemLowfilterwidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "lowfilterwidth" ), mLowfilterwidth, 900 );
  addItem( itemLowfilterwidth, QStringLiteral( "lowfilterwidth" ) );
  KConfigSkeleton::ItemBool  *itemSet_hpf_width;
  itemSet_hpf_width = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "set_hpf_width" ), mSet_hpf_width, false );
  addItem( itemSet_hpf_width, QStringLiteral( "set_hpf_width" ) );
  KConfigSkeleton::ItemInt  *itemHighfilterwidth;
  itemHighfilterwidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "highfilterwidth" ), mHighfilterwidth, 0 );
  addItem( itemHighfilterwidth, QStringLiteral( "highfilterwidth" ) );
}

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

