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

#include "easyeffects_db_echo_canceller.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgEchoCancellerinstanceIndex = cgmasterGroup.group(QStringLiteral( "EchoCanceller#%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(cgEchoCancellerinstanceIndex);
  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(cgEchoCancellerinstanceIndex);
  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(cgEchoCancellerinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemEnableEchoCanceller;
  KConfigBaseEE::ItemBool  *innerItemEnableEchoCanceller;
  innerItemEnableEchoCanceller = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableEchoCanceller" ), mEnableEchoCanceller, true );
  itemEnableEchoCanceller = new KConfigCompilerSignallingItem(innerItemEnableEchoCanceller, this, notifyFunction, signalEnableEchoCancellerChanged);
  itemEnableEchoCanceller->setWriteFlags(KConfigBase::Notify);
  itemEnableEchoCanceller->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEnableEchoCanceller, QStringLiteral( "enableEchoCanceller" ) );
  KConfigCompilerSignallingItem  *itemEchoCancellerMobileMode;
  KConfigBaseEE::ItemBool  *innerItemEchoCancellerMobileMode;
  innerItemEchoCancellerMobileMode = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "echoCancellerMobileMode" ), mEchoCancellerMobileMode, false );
  itemEchoCancellerMobileMode = new KConfigCompilerSignallingItem(innerItemEchoCancellerMobileMode, this, notifyFunction, signalEchoCancellerMobileModeChanged);
  itemEchoCancellerMobileMode->setWriteFlags(KConfigBase::Notify);
  itemEchoCancellerMobileMode->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEchoCancellerMobileMode, QStringLiteral( "echoCancellerMobileMode" ) );
  KConfigCompilerSignallingItem  *itemEchoCancellerEnforceHighPass;
  KConfigBaseEE::ItemBool  *innerItemEchoCancellerEnforceHighPass;
  innerItemEchoCancellerEnforceHighPass = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "echoCancellerEnforceHighPass" ), mEchoCancellerEnforceHighPass, true );
  itemEchoCancellerEnforceHighPass = new KConfigCompilerSignallingItem(innerItemEchoCancellerEnforceHighPass, this, notifyFunction, signalEchoCancellerEnforceHighPassChanged);
  itemEchoCancellerEnforceHighPass->setWriteFlags(KConfigBase::Notify);
  itemEchoCancellerEnforceHighPass->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEchoCancellerEnforceHighPass, QStringLiteral( "echoCancellerEnforceHighPass" ) );
  KConfigCompilerSignallingItem  *itemEnableNoiseSuppression;
  KConfigBaseEE::ItemBool  *innerItemEnableNoiseSuppression;
  innerItemEnableNoiseSuppression = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableNoiseSuppression" ), mEnableNoiseSuppression, true );
  itemEnableNoiseSuppression = new KConfigCompilerSignallingItem(innerItemEnableNoiseSuppression, this, notifyFunction, signalEnableNoiseSuppressionChanged);
  itemEnableNoiseSuppression->setWriteFlags(KConfigBase::Notify);
  itemEnableNoiseSuppression->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEnableNoiseSuppression, QStringLiteral( "enableNoiseSuppression" ) );
  QStringList defaultnoiseSuppressionLevelLabels;
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "Low" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "Moderate" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "High" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "VeryHigh" ) );

  KConfigCompilerSignallingItem  *itemNoiseSuppressionLevelLabels;
  KConfigBaseEE::ItemStringList  *innerItemNoiseSuppressionLevelLabels;
  innerItemNoiseSuppressionLevelLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "noiseSuppressionLevelLabels" ), mNoiseSuppressionLevelLabels, defaultnoiseSuppressionLevelLabels );
  itemNoiseSuppressionLevelLabels = new KConfigCompilerSignallingItem(innerItemNoiseSuppressionLevelLabels, this, notifyFunction, signalNoiseSuppressionLevelLabelsChanged);
  itemNoiseSuppressionLevelLabels->setWriteFlags(KConfigBase::Notify);
  itemNoiseSuppressionLevelLabels->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemNoiseSuppressionLevelLabels, QStringLiteral( "noiseSuppressionLevelLabels" ) );
  KConfigCompilerSignallingItem  *itemNoiseSuppressionLevel;
  KConfigBaseEE::ItemInt  *innerItemNoiseSuppressionLevel;
  innerItemNoiseSuppressionLevel = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "noiseSuppressionLevel" ), mNoiseSuppressionLevel, 1 );
  itemNoiseSuppressionLevel = new KConfigCompilerSignallingItem(innerItemNoiseSuppressionLevel, this, notifyFunction, signalNoiseSuppressionLevelChanged);
  itemNoiseSuppressionLevel->setWriteFlags(KConfigBase::Notify);
  itemNoiseSuppressionLevel->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemNoiseSuppressionLevel, QStringLiteral( "noiseSuppressionLevel" ) );
  KConfigCompilerSignallingItem  *itemEnableHighPassFilter;
  KConfigBaseEE::ItemBool  *innerItemEnableHighPassFilter;
  innerItemEnableHighPassFilter = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableHighPassFilter" ), mEnableHighPassFilter, true );
  itemEnableHighPassFilter = new KConfigCompilerSignallingItem(innerItemEnableHighPassFilter, this, notifyFunction, signalEnableHighPassFilterChanged);
  itemEnableHighPassFilter->setWriteFlags(KConfigBase::Notify);
  itemEnableHighPassFilter->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEnableHighPassFilter, QStringLiteral( "enableHighPassFilter" ) );
  KConfigCompilerSignallingItem  *itemHighPassFilterFullBand;
  KConfigBaseEE::ItemBool  *innerItemHighPassFilterFullBand;
  innerItemHighPassFilterFullBand = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "highPassFilterFullBand" ), mHighPassFilterFullBand, true );
  itemHighPassFilterFullBand = new KConfigCompilerSignallingItem(innerItemHighPassFilterFullBand, this, notifyFunction, signalHighPassFilterFullBandChanged);
  itemHighPassFilterFullBand->setWriteFlags(KConfigBase::Notify);
  itemHighPassFilterFullBand->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemHighPassFilterFullBand, QStringLiteral( "highPassFilterFullBand" ) );
  KConfigCompilerSignallingItem  *itemEnableAGC;
  KConfigBaseEE::ItemBool  *innerItemEnableAGC;
  innerItemEnableAGC = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "enableAGC" ), mEnableAGC, true );
  itemEnableAGC = new KConfigCompilerSignallingItem(innerItemEnableAGC, this, notifyFunction, signalEnableAGCChanged);
  itemEnableAGC->setWriteFlags(KConfigBase::Notify);
  itemEnableAGC->setGroup(cgEchoCancellerinstanceIndex);
  addItem( itemEnableAGC, QStringLiteral( "enableAGC" ) );
}

bool DbEchoCanceller::defaultBypassValue_helper() const
{

  return false;
}

double DbEchoCanceller::defaultInputGainValue_helper() const
{

  return 0;
}

double DbEchoCanceller::defaultOutputGainValue_helper() const
{

  return 0;
}

bool DbEchoCanceller::defaultEnableEchoCancellerValue_helper() const
{

  return true;
}

bool DbEchoCanceller::defaultEchoCancellerMobileModeValue_helper() const
{

  return false;
}

bool DbEchoCanceller::defaultEchoCancellerEnforceHighPassValue_helper() const
{

  return true;
}

bool DbEchoCanceller::defaultEnableNoiseSuppressionValue_helper() const
{

  return true;
}

QStringList DbEchoCanceller::defaultNoiseSuppressionLevelLabelsValue_helper() const
{
  QStringList defaultnoiseSuppressionLevelLabels;
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "Low" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "Moderate" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "High" ) );
  defaultnoiseSuppressionLevelLabels.append( QString::fromUtf8( "VeryHigh" ) );

  return defaultnoiseSuppressionLevelLabels;
}

int DbEchoCanceller::defaultNoiseSuppressionLevelValue_helper() const
{

  return 1;
}

bool DbEchoCanceller::defaultEnableHighPassFilterValue_helper() const
{

  return true;
}

bool DbEchoCanceller::defaultHighPassFilterFullBandValue_helper() const
{

  return true;
}

bool DbEchoCanceller::defaultEnableAGCValue_helper() const
{

  return true;
}

DbEchoCanceller::~DbEchoCanceller()
{
}


void DbEchoCanceller::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalEnableEchoCancellerChanged:
    Q_EMIT enableEchoCancellerChanged();
    break;
  case signalEchoCancellerMobileModeChanged:
    Q_EMIT echoCancellerMobileModeChanged();
    break;
  case signalEchoCancellerEnforceHighPassChanged:
    Q_EMIT echoCancellerEnforceHighPassChanged();
    break;
  case signalEnableNoiseSuppressionChanged:
    Q_EMIT enableNoiseSuppressionChanged();
    break;
  case signalNoiseSuppressionLevelLabelsChanged:
    Q_EMIT noiseSuppressionLevelLabelsChanged();
    break;
  case signalNoiseSuppressionLevelChanged:
    Q_EMIT noiseSuppressionLevelChanged();
    break;
  case signalEnableHighPassFilterChanged:
    Q_EMIT enableHighPassFilterChanged();
    break;
  case signalHighPassFilterFullBandChanged:
    Q_EMIT highPassFilterFullBandChanged();
    break;
  case signalEnableAGCChanged:
    Q_EMIT enableAGCChanged();
    break;
  }
}
