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

#include "easyeffects_db_exciter.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgExciterinstanceIndex = cgmasterGroup.group(QStringLiteral( "Exciter#%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(cgExciterinstanceIndex);
  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(cgExciterinstanceIndex);
  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(cgExciterinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemAmount;
  KConfigBaseEE::ItemDouble  *innerItemAmount;
  innerItemAmount = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "amount" ), mAmount, 0 );
  itemAmount = new KConfigCompilerSignallingItem(innerItemAmount, this, notifyFunction, signalAmountChanged);
  innerItemAmount->setMinValue(-100);
  innerItemAmount->setMaxValue(36);
  itemAmount->setWriteFlags(KConfigBase::Notify);
  itemAmount->setGroup(cgExciterinstanceIndex);
  addItem( itemAmount, QStringLiteral( "amount" ) );
  KConfigCompilerSignallingItem  *itemHarmonics;
  KConfigBaseEE::ItemDouble  *innerItemHarmonics;
  innerItemHarmonics = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "harmonics" ), mHarmonics, 8.5 );
  itemHarmonics = new KConfigCompilerSignallingItem(innerItemHarmonics, this, notifyFunction, signalHarmonicsChanged);
  innerItemHarmonics->setMinValue(0.1);
  innerItemHarmonics->setMaxValue(10);
  itemHarmonics->setWriteFlags(KConfigBase::Notify);
  itemHarmonics->setGroup(cgExciterinstanceIndex);
  addItem( itemHarmonics, QStringLiteral( "harmonics" ) );
  KConfigCompilerSignallingItem  *itemScope;
  KConfigBaseEE::ItemDouble  *innerItemScope;
  innerItemScope = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "scope" ), mScope, 7500 );
  itemScope = new KConfigCompilerSignallingItem(innerItemScope, this, notifyFunction, signalScopeChanged);
  innerItemScope->setMinValue(2000);
  innerItemScope->setMaxValue(12000);
  itemScope->setWriteFlags(KConfigBase::Notify);
  itemScope->setGroup(cgExciterinstanceIndex);
  addItem( itemScope, QStringLiteral( "scope" ) );
  KConfigCompilerSignallingItem  *itemCeil;
  KConfigBaseEE::ItemDouble  *innerItemCeil;
  innerItemCeil = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "ceil" ), mCeil, 16000 );
  itemCeil = new KConfigCompilerSignallingItem(innerItemCeil, this, notifyFunction, signalCeilChanged);
  innerItemCeil->setMinValue(10000);
  innerItemCeil->setMaxValue(20000);
  itemCeil->setWriteFlags(KConfigBase::Notify);
  itemCeil->setGroup(cgExciterinstanceIndex);
  addItem( itemCeil, QStringLiteral( "ceil" ) );
  KConfigCompilerSignallingItem  *itemBlend;
  KConfigBaseEE::ItemDouble  *innerItemBlend;
  innerItemBlend = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "blend" ), mBlend, 0 );
  itemBlend = new KConfigCompilerSignallingItem(innerItemBlend, this, notifyFunction, signalBlendChanged);
  innerItemBlend->setMinValue(-10);
  innerItemBlend->setMaxValue(10);
  itemBlend->setWriteFlags(KConfigBase::Notify);
  itemBlend->setGroup(cgExciterinstanceIndex);
  addItem( itemBlend, QStringLiteral( "blend" ) );
  KConfigCompilerSignallingItem  *itemCeilActive;
  KConfigBaseEE::ItemBool  *innerItemCeilActive;
  innerItemCeilActive = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "ceilActive" ), mCeilActive, false );
  itemCeilActive = new KConfigCompilerSignallingItem(innerItemCeilActive, this, notifyFunction, signalCeilActiveChanged);
  itemCeilActive->setWriteFlags(KConfigBase::Notify);
  itemCeilActive->setGroup(cgExciterinstanceIndex);
  addItem( itemCeilActive, QStringLiteral( "ceilActive" ) );
  KConfigCompilerSignallingItem  *itemListen;
  KConfigBaseEE::ItemBool  *innerItemListen;
  innerItemListen = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "listen" ), mListen, false );
  itemListen = new KConfigCompilerSignallingItem(innerItemListen, this, notifyFunction, signalListenChanged);
  itemListen->setWriteFlags(KConfigBase::Notify);
  itemListen->setGroup(cgExciterinstanceIndex);
  addItem( itemListen, QStringLiteral( "listen" ) );
}

bool DbExciter::defaultBypassValue_helper() const
{

  return false;
}

double DbExciter::defaultInputGainValue_helper() const
{

  return 0;
}

double DbExciter::defaultOutputGainValue_helper() const
{

  return 0;
}

double DbExciter::defaultAmountValue_helper() const
{

  return 0;
}

double DbExciter::defaultHarmonicsValue_helper() const
{

  return 8.5;
}

double DbExciter::defaultScopeValue_helper() const
{

  return 7500;
}

double DbExciter::defaultCeilValue_helper() const
{

  return 16000;
}

double DbExciter::defaultBlendValue_helper() const
{

  return 0;
}

bool DbExciter::defaultCeilActiveValue_helper() const
{

  return false;
}

bool DbExciter::defaultListenValue_helper() const
{

  return false;
}

DbExciter::~DbExciter()
{
}


void DbExciter::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalAmountChanged:
    Q_EMIT amountChanged();
    break;
  case signalHarmonicsChanged:
    Q_EMIT harmonicsChanged();
    break;
  case signalScopeChanged:
    Q_EMIT scopeChanged();
    break;
  case signalCeilChanged:
    Q_EMIT ceilChanged();
    break;
  case signalBlendChanged:
    Q_EMIT blendChanged();
    break;
  case signalCeilActiveChanged:
    Q_EMIT ceilActiveChanged();
    break;
  case signalListenChanged:
    Q_EMIT listenChanged();
    break;
  }
}
