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

#include "easyeffects_db_equalizer.h"

DbEqualizer::DbEqualizer( const QString & masterGroup, const QString & instanceIndex )
  : KConfigBaseEE( QStringLiteral( "easyeffects/db/equalizerrc" ) )
  , mParammasterGroup(masterGroup)
  , mParaminstanceIndex(instanceIndex)
{
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&DbEqualizer::itemChanged);

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgEqualizerinstanceIndex = cgmasterGroup.group(QStringLiteral( "Equalizer#%1" ).arg( mParaminstanceIndex ));
  KConfigCompilerSignallingItem  *itemBypass;
  KConfigBaseEE::ItemBool  *innerItemBypass;
  innerItemBypass = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "bypass" ), mBypass, false );
  itemBypass = new KConfigCompilerSignallingItem(innerItemBypass, this, notifyFunction, signalBypassChanged);
  itemBypass->setWriteFlags(KConfigBase::Notify);
  itemBypass->setGroup(cgEqualizerinstanceIndex);
  addItem( itemBypass, QStringLiteral( "bypass" ) );
  KConfigCompilerSignallingItem  *itemInputGain;
  KConfigBaseEE::ItemDouble  *innerItemInputGain;
  innerItemInputGain = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "inputGain" ), mInputGain, 0 );
  itemInputGain = new KConfigCompilerSignallingItem(innerItemInputGain, this, notifyFunction, signalInputGainChanged);
  innerItemInputGain->setMinValue(-36);
  innerItemInputGain->setMaxValue(36);
  itemInputGain->setWriteFlags(KConfigBase::Notify);
  itemInputGain->setGroup(cgEqualizerinstanceIndex);
  addItem( itemInputGain, QStringLiteral( "inputGain" ) );
  KConfigCompilerSignallingItem  *itemOutputGain;
  KConfigBaseEE::ItemDouble  *innerItemOutputGain;
  innerItemOutputGain = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "outputGain" ), mOutputGain, 0 );
  itemOutputGain = new KConfigCompilerSignallingItem(innerItemOutputGain, this, notifyFunction, signalOutputGainChanged);
  innerItemOutputGain->setMinValue(-36);
  innerItemOutputGain->setMaxValue(36);
  itemOutputGain->setWriteFlags(KConfigBase::Notify);
  itemOutputGain->setGroup(cgEqualizerinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemNumBands;
  KConfigBaseEE::ItemInt  *innerItemNumBands;
  innerItemNumBands = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "numBands" ), mNumBands, 32 );
  itemNumBands = new KConfigCompilerSignallingItem(innerItemNumBands, this, notifyFunction, signalNumBandsChanged);
  innerItemNumBands->setMinValue(1);
  innerItemNumBands->setMaxValue(32);
  itemNumBands->setWriteFlags(KConfigBase::Notify);
  itemNumBands->setGroup(cgEqualizerinstanceIndex);
  addItem( itemNumBands, QStringLiteral( "numBands" ) );
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "IIR" ) );
  defaultmodeLabels.append( QString::fromUtf8( "FIR" ) );
  defaultmodeLabels.append( QString::fromUtf8( "FFT" ) );
  defaultmodeLabels.append( QString::fromUtf8( "SPM" ) );

  KConfigCompilerSignallingItem  *itemModeLabels;
  KConfigBaseEE::ItemStringList  *innerItemModeLabels;
  innerItemModeLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "modeLabels" ), mModeLabels, defaultmodeLabels );
  itemModeLabels = new KConfigCompilerSignallingItem(innerItemModeLabels, this, notifyFunction, signalModeLabelsChanged);
  itemModeLabels->setWriteFlags(KConfigBase::Notify);
  itemModeLabels->setGroup(cgEqualizerinstanceIndex);
  addItem( itemModeLabels, QStringLiteral( "modeLabels" ) );
  KConfigCompilerSignallingItem  *itemMode;
  KConfigBaseEE::ItemInt  *innerItemMode;
  innerItemMode = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "mode" ), mMode, 0 );
  itemMode = new KConfigCompilerSignallingItem(innerItemMode, this, notifyFunction, signalModeChanged);
  itemMode->setWriteFlags(KConfigBase::Notify);
  itemMode->setGroup(cgEqualizerinstanceIndex);
  addItem( itemMode, QStringLiteral( "mode" ) );
  KConfigCompilerSignallingItem  *itemSplitChannels;
  KConfigBaseEE::ItemBool  *innerItemSplitChannels;
  innerItemSplitChannels = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "splitChannels" ), mSplitChannels, false );
  itemSplitChannels = new KConfigCompilerSignallingItem(innerItemSplitChannels, this, notifyFunction, signalSplitChannelsChanged);
  itemSplitChannels->setWriteFlags(KConfigBase::Notify);
  itemSplitChannels->setGroup(cgEqualizerinstanceIndex);
  addItem( itemSplitChannels, QStringLiteral( "splitChannels" ) );
  KConfigCompilerSignallingItem  *itemBalance;
  KConfigBaseEE::ItemDouble  *innerItemBalance;
  innerItemBalance = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "balance" ), mBalance, 0 );
  itemBalance = new KConfigCompilerSignallingItem(innerItemBalance, this, notifyFunction, signalBalanceChanged);
  innerItemBalance->setMinValue(-100);
  innerItemBalance->setMaxValue(100);
  itemBalance->setWriteFlags(KConfigBase::Notify);
  itemBalance->setGroup(cgEqualizerinstanceIndex);
  addItem( itemBalance, QStringLiteral( "balance" ) );
  KConfigCompilerSignallingItem  *itemPitchLeft;
  KConfigBaseEE::ItemDouble  *innerItemPitchLeft;
  innerItemPitchLeft = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "pitchLeft" ), mPitchLeft, 0 );
  itemPitchLeft = new KConfigCompilerSignallingItem(innerItemPitchLeft, this, notifyFunction, signalPitchLeftChanged);
  innerItemPitchLeft->setMinValue(-120);
  innerItemPitchLeft->setMaxValue(120);
  itemPitchLeft->setWriteFlags(KConfigBase::Notify);
  itemPitchLeft->setGroup(cgEqualizerinstanceIndex);
  addItem( itemPitchLeft, QStringLiteral( "pitchLeft" ) );
  KConfigCompilerSignallingItem  *itemPitchRight;
  KConfigBaseEE::ItemDouble  *innerItemPitchRight;
  innerItemPitchRight = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "pitchRight" ), mPitchRight, 0 );
  itemPitchRight = new KConfigCompilerSignallingItem(innerItemPitchRight, this, notifyFunction, signalPitchRightChanged);
  innerItemPitchRight->setMinValue(-120);
  innerItemPitchRight->setMaxValue(120);
  itemPitchRight->setWriteFlags(KConfigBase::Notify);
  itemPitchRight->setGroup(cgEqualizerinstanceIndex);
  addItem( itemPitchRight, QStringLiteral( "pitchRight" ) );
  KConfigCompilerSignallingItem  *itemViewLeftChannel;
  KConfigBaseEE::ItemBool  *innerItemViewLeftChannel;
  innerItemViewLeftChannel = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "viewLeftChannel" ), mViewLeftChannel, true );
  itemViewLeftChannel = new KConfigCompilerSignallingItem(innerItemViewLeftChannel, this, notifyFunction, signalViewLeftChannelChanged);
  itemViewLeftChannel->setWriteFlags(KConfigBase::Notify);
  itemViewLeftChannel->setGroup(cgEqualizerinstanceIndex);
  addItem( itemViewLeftChannel, QStringLiteral( "viewLeftChannel" ) );
  QStringList defaultdecrampLabels;
  defaultdecrampLabels.append( QString::fromUtf8( "Off" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x2" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x3" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x4" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x6" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x8" ) );

  KConfigCompilerSignallingItem  *itemDecrampLabels;
  KConfigBaseEE::ItemStringList  *innerItemDecrampLabels;
  innerItemDecrampLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "decrampLabels" ), mDecrampLabels, defaultdecrampLabels );
  itemDecrampLabels = new KConfigCompilerSignallingItem(innerItemDecrampLabels, this, notifyFunction, signalDecrampLabelsChanged);
  itemDecrampLabels->setWriteFlags(KConfigBase::Notify);
  itemDecrampLabels->setGroup(cgEqualizerinstanceIndex);
  addItem( itemDecrampLabels, QStringLiteral( "decrampLabels" ) );
  KConfigCompilerSignallingItem  *itemDecramp;
  KConfigBaseEE::ItemInt  *innerItemDecramp;
  innerItemDecramp = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "decramp" ), mDecramp, 0 );
  itemDecramp = new KConfigCompilerSignallingItem(innerItemDecramp, this, notifyFunction, signalDecrampChanged);
  itemDecramp->setWriteFlags(KConfigBase::Notify);
  itemDecramp->setGroup(cgEqualizerinstanceIndex);
  addItem( itemDecramp, QStringLiteral( "decramp" ) );
}

bool DbEqualizer::defaultBypassValue_helper() const
{

  return false;
}

double DbEqualizer::defaultInputGainValue_helper() const
{

  return 0;
}

double DbEqualizer::defaultOutputGainValue_helper() const
{

  return 0;
}

int DbEqualizer::defaultNumBandsValue_helper() const
{

  return 32;
}

QStringList DbEqualizer::defaultModeLabelsValue_helper() const
{
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "IIR" ) );
  defaultmodeLabels.append( QString::fromUtf8( "FIR" ) );
  defaultmodeLabels.append( QString::fromUtf8( "FFT" ) );
  defaultmodeLabels.append( QString::fromUtf8( "SPM" ) );

  return defaultmodeLabels;
}

int DbEqualizer::defaultModeValue_helper() const
{

  return 0;
}

bool DbEqualizer::defaultSplitChannelsValue_helper() const
{

  return false;
}

double DbEqualizer::defaultBalanceValue_helper() const
{

  return 0;
}

double DbEqualizer::defaultPitchLeftValue_helper() const
{

  return 0;
}

double DbEqualizer::defaultPitchRightValue_helper() const
{

  return 0;
}

bool DbEqualizer::defaultViewLeftChannelValue_helper() const
{

  return true;
}

QStringList DbEqualizer::defaultDecrampLabelsValue_helper() const
{
  QStringList defaultdecrampLabels;
  defaultdecrampLabels.append( QString::fromUtf8( "Off" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x2" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x3" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x4" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x6" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x8" ) );

  return defaultdecrampLabels;
}

int DbEqualizer::defaultDecrampValue_helper() const
{

  return 0;
}

DbEqualizer::~DbEqualizer()
{
}


void DbEqualizer::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalNumBandsChanged:
    Q_EMIT numBandsChanged();
    break;
  case signalModeLabelsChanged:
    Q_EMIT modeLabelsChanged();
    break;
  case signalModeChanged:
    Q_EMIT modeChanged();
    break;
  case signalSplitChannelsChanged:
    Q_EMIT splitChannelsChanged();
    break;
  case signalBalanceChanged:
    Q_EMIT balanceChanged();
    break;
  case signalPitchLeftChanged:
    Q_EMIT pitchLeftChanged();
    break;
  case signalPitchRightChanged:
    Q_EMIT pitchRightChanged();
    break;
  case signalViewLeftChannelChanged:
    Q_EMIT viewLeftChannelChanged();
    break;
  case signalDecrampLabelsChanged:
    Q_EMIT decrampLabelsChanged();
    break;
  case signalDecrampChanged:
    Q_EMIT decrampChanged();
    break;
  }
}
