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

#include "easyeffects_db_deepfilternet.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgDeepFilterNetinstanceIndex = cgmasterGroup.group(QStringLiteral( "DeepFilterNet#%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(cgDeepFilterNetinstanceIndex);
  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(cgDeepFilterNetinstanceIndex);
  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(cgDeepFilterNetinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemAttenuationLimit;
  KConfigBaseEE::ItemDouble  *innerItemAttenuationLimit;
  innerItemAttenuationLimit = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "attenuationLimit" ), mAttenuationLimit, 100 );
  itemAttenuationLimit = new KConfigCompilerSignallingItem(innerItemAttenuationLimit, this, notifyFunction, signalAttenuationLimitChanged);
  innerItemAttenuationLimit->setMinValue(0);
  innerItemAttenuationLimit->setMaxValue(100);
  itemAttenuationLimit->setWriteFlags(KConfigBase::Notify);
  itemAttenuationLimit->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemAttenuationLimit, QStringLiteral( "attenuationLimit" ) );
  KConfigCompilerSignallingItem  *itemMinProcessingThreshold;
  KConfigBaseEE::ItemDouble  *innerItemMinProcessingThreshold;
  innerItemMinProcessingThreshold = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "minProcessingThreshold" ), mMinProcessingThreshold, -10 );
  itemMinProcessingThreshold = new KConfigCompilerSignallingItem(innerItemMinProcessingThreshold, this, notifyFunction, signalMinProcessingThresholdChanged);
  innerItemMinProcessingThreshold->setMinValue(-15);
  innerItemMinProcessingThreshold->setMaxValue(35);
  itemMinProcessingThreshold->setWriteFlags(KConfigBase::Notify);
  itemMinProcessingThreshold->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemMinProcessingThreshold, QStringLiteral( "minProcessingThreshold" ) );
  KConfigCompilerSignallingItem  *itemMaxErbProcessingThreshold;
  KConfigBaseEE::ItemDouble  *innerItemMaxErbProcessingThreshold;
  innerItemMaxErbProcessingThreshold = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "maxErbProcessingThreshold" ), mMaxErbProcessingThreshold, 30 );
  itemMaxErbProcessingThreshold = new KConfigCompilerSignallingItem(innerItemMaxErbProcessingThreshold, this, notifyFunction, signalMaxErbProcessingThresholdChanged);
  innerItemMaxErbProcessingThreshold->setMinValue(-15);
  innerItemMaxErbProcessingThreshold->setMaxValue(35);
  itemMaxErbProcessingThreshold->setWriteFlags(KConfigBase::Notify);
  itemMaxErbProcessingThreshold->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemMaxErbProcessingThreshold, QStringLiteral( "maxErbProcessingThreshold" ) );
  KConfigCompilerSignallingItem  *itemMaxDfProcessingThreshold;
  KConfigBaseEE::ItemDouble  *innerItemMaxDfProcessingThreshold;
  innerItemMaxDfProcessingThreshold = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "maxDfProcessingThreshold" ), mMaxDfProcessingThreshold, 20 );
  itemMaxDfProcessingThreshold = new KConfigCompilerSignallingItem(innerItemMaxDfProcessingThreshold, this, notifyFunction, signalMaxDfProcessingThresholdChanged);
  innerItemMaxDfProcessingThreshold->setMinValue(-15);
  innerItemMaxDfProcessingThreshold->setMaxValue(35);
  itemMaxDfProcessingThreshold->setWriteFlags(KConfigBase::Notify);
  itemMaxDfProcessingThreshold->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemMaxDfProcessingThreshold, QStringLiteral( "maxDfProcessingThreshold" ) );
  KConfigCompilerSignallingItem  *itemMinProcessingBuffer;
  KConfigBaseEE::ItemInt  *innerItemMinProcessingBuffer;
  innerItemMinProcessingBuffer = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "minProcessingBuffer" ), mMinProcessingBuffer, 0 );
  itemMinProcessingBuffer = new KConfigCompilerSignallingItem(innerItemMinProcessingBuffer, this, notifyFunction, signalMinProcessingBufferChanged);
  innerItemMinProcessingBuffer->setMinValue(0);
  innerItemMinProcessingBuffer->setMaxValue(10);
  itemMinProcessingBuffer->setWriteFlags(KConfigBase::Notify);
  itemMinProcessingBuffer->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemMinProcessingBuffer, QStringLiteral( "minProcessingBuffer" ) );
  KConfigCompilerSignallingItem  *itemPostFilterBeta;
  KConfigBaseEE::ItemDouble  *innerItemPostFilterBeta;
  innerItemPostFilterBeta = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "postFilterBeta" ), mPostFilterBeta, 0.02 );
  itemPostFilterBeta = new KConfigCompilerSignallingItem(innerItemPostFilterBeta, this, notifyFunction, signalPostFilterBetaChanged);
  innerItemPostFilterBeta->setMinValue(0);
  innerItemPostFilterBeta->setMaxValue(0.05);
  itemPostFilterBeta->setWriteFlags(KConfigBase::Notify);
  itemPostFilterBeta->setGroup(cgDeepFilterNetinstanceIndex);
  addItem( itemPostFilterBeta, QStringLiteral( "postFilterBeta" ) );
}

bool DbDeepFilterNet::defaultBypassValue_helper() const
{

  return false;
}

double DbDeepFilterNet::defaultInputGainValue_helper() const
{

  return 0;
}

double DbDeepFilterNet::defaultOutputGainValue_helper() const
{

  return 0;
}

double DbDeepFilterNet::defaultAttenuationLimitValue_helper() const
{

  return 100;
}

double DbDeepFilterNet::defaultMinProcessingThresholdValue_helper() const
{

  return -10;
}

double DbDeepFilterNet::defaultMaxErbProcessingThresholdValue_helper() const
{

  return 30;
}

double DbDeepFilterNet::defaultMaxDfProcessingThresholdValue_helper() const
{

  return 20;
}

int DbDeepFilterNet::defaultMinProcessingBufferValue_helper() const
{

  return 0;
}

double DbDeepFilterNet::defaultPostFilterBetaValue_helper() const
{

  return 0.02;
}

DbDeepFilterNet::~DbDeepFilterNet()
{
}


void DbDeepFilterNet::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalAttenuationLimitChanged:
    Q_EMIT attenuationLimitChanged();
    break;
  case signalMinProcessingThresholdChanged:
    Q_EMIT minProcessingThresholdChanged();
    break;
  case signalMaxErbProcessingThresholdChanged:
    Q_EMIT maxErbProcessingThresholdChanged();
    break;
  case signalMaxDfProcessingThresholdChanged:
    Q_EMIT maxDfProcessingThresholdChanged();
    break;
  case signalMinProcessingBufferChanged:
    Q_EMIT minProcessingBufferChanged();
    break;
  case signalPostFilterBetaChanged:
    Q_EMIT postFilterBetaChanged();
    break;
  }
}
