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

#include "easyeffects_db_deesser.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgDeesserinstanceIndex = cgmasterGroup.group(QStringLiteral( "Deesser#%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(cgDeesserinstanceIndex);
  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(cgDeesserinstanceIndex);
  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(cgDeesserinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  QStringList defaultdetectionLabels;
  defaultdetectionLabels.append( QString::fromUtf8( "RMS" ) );
  defaultdetectionLabels.append( QString::fromUtf8( "Peak" ) );

  KConfigCompilerSignallingItem  *itemDetectionLabels;
  KConfigBaseEE::ItemStringList  *innerItemDetectionLabels;
  innerItemDetectionLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "detectionLabels" ), mDetectionLabels, defaultdetectionLabels );
  itemDetectionLabels = new KConfigCompilerSignallingItem(innerItemDetectionLabels, this, notifyFunction, signalDetectionLabelsChanged);
  itemDetectionLabels->setWriteFlags(KConfigBase::Notify);
  itemDetectionLabels->setGroup(cgDeesserinstanceIndex);
  addItem( itemDetectionLabels, QStringLiteral( "detectionLabels" ) );
  KConfigCompilerSignallingItem  *itemDetection;
  KConfigBaseEE::ItemInt  *innerItemDetection;
  innerItemDetection = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "detection" ), mDetection, 0 );
  itemDetection = new KConfigCompilerSignallingItem(innerItemDetection, this, notifyFunction, signalDetectionChanged);
  itemDetection->setWriteFlags(KConfigBase::Notify);
  itemDetection->setGroup(cgDeesserinstanceIndex);
  addItem( itemDetection, QStringLiteral( "detection" ) );
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "Wide" ) );
  defaultmodeLabels.append( QString::fromUtf8( "Split" ) );

  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(cgDeesserinstanceIndex);
  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(cgDeesserinstanceIndex);
  addItem( itemMode, QStringLiteral( "mode" ) );
  KConfigCompilerSignallingItem  *itemThreshold;
  KConfigBaseEE::ItemDouble  *innerItemThreshold;
  innerItemThreshold = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "threshold" ), mThreshold, -18 );
  itemThreshold = new KConfigCompilerSignallingItem(innerItemThreshold, this, notifyFunction, signalThresholdChanged);
  innerItemThreshold->setMinValue(-60);
  innerItemThreshold->setMaxValue(0);
  itemThreshold->setWriteFlags(KConfigBase::Notify);
  itemThreshold->setGroup(cgDeesserinstanceIndex);
  addItem( itemThreshold, QStringLiteral( "threshold" ) );
  KConfigCompilerSignallingItem  *itemRatio;
  KConfigBaseEE::ItemDouble  *innerItemRatio;
  innerItemRatio = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "ratio" ), mRatio, 3 );
  itemRatio = new KConfigCompilerSignallingItem(innerItemRatio, this, notifyFunction, signalRatioChanged);
  innerItemRatio->setMinValue(1);
  innerItemRatio->setMaxValue(20);
  itemRatio->setWriteFlags(KConfigBase::Notify);
  itemRatio->setGroup(cgDeesserinstanceIndex);
  addItem( itemRatio, QStringLiteral( "ratio" ) );
  KConfigCompilerSignallingItem  *itemLaxity;
  KConfigBaseEE::ItemInt  *innerItemLaxity;
  innerItemLaxity = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "laxity" ), mLaxity, 15 );
  itemLaxity = new KConfigCompilerSignallingItem(innerItemLaxity, this, notifyFunction, signalLaxityChanged);
  innerItemLaxity->setMinValue(1);
  innerItemLaxity->setMaxValue(100);
  itemLaxity->setWriteFlags(KConfigBase::Notify);
  itemLaxity->setGroup(cgDeesserinstanceIndex);
  addItem( itemLaxity, QStringLiteral( "laxity" ) );
  KConfigCompilerSignallingItem  *itemMakeup;
  KConfigBaseEE::ItemDouble  *innerItemMakeup;
  innerItemMakeup = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "makeup" ), mMakeup, 0 );
  itemMakeup = new KConfigCompilerSignallingItem(innerItemMakeup, this, notifyFunction, signalMakeupChanged);
  innerItemMakeup->setMinValue(0);
  innerItemMakeup->setMaxValue(36);
  itemMakeup->setWriteFlags(KConfigBase::Notify);
  itemMakeup->setGroup(cgDeesserinstanceIndex);
  addItem( itemMakeup, QStringLiteral( "makeup" ) );
  KConfigCompilerSignallingItem  *itemF1Freq;
  KConfigBaseEE::ItemDouble  *innerItemF1Freq;
  innerItemF1Freq = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "f1Freq" ), mF1Freq, 6000 );
  itemF1Freq = new KConfigCompilerSignallingItem(innerItemF1Freq, this, notifyFunction, signalF1FreqChanged);
  innerItemF1Freq->setMinValue(10);
  innerItemF1Freq->setMaxValue(18000);
  itemF1Freq->setWriteFlags(KConfigBase::Notify);
  itemF1Freq->setGroup(cgDeesserinstanceIndex);
  addItem( itemF1Freq, QStringLiteral( "f1Freq" ) );
  KConfigCompilerSignallingItem  *itemF2Freq;
  KConfigBaseEE::ItemDouble  *innerItemF2Freq;
  innerItemF2Freq = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "f2Freq" ), mF2Freq, 4500 );
  itemF2Freq = new KConfigCompilerSignallingItem(innerItemF2Freq, this, notifyFunction, signalF2FreqChanged);
  innerItemF2Freq->setMinValue(10);
  innerItemF2Freq->setMaxValue(18000);
  itemF2Freq->setWriteFlags(KConfigBase::Notify);
  itemF2Freq->setGroup(cgDeesserinstanceIndex);
  addItem( itemF2Freq, QStringLiteral( "f2Freq" ) );
  KConfigCompilerSignallingItem  *itemF1Level;
  KConfigBaseEE::ItemDouble  *innerItemF1Level;
  innerItemF1Level = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "f1Level" ), mF1Level, 0 );
  itemF1Level = new KConfigCompilerSignallingItem(innerItemF1Level, this, notifyFunction, signalF1LevelChanged);
  innerItemF1Level->setMinValue(-24);
  innerItemF1Level->setMaxValue(24);
  itemF1Level->setWriteFlags(KConfigBase::Notify);
  itemF1Level->setGroup(cgDeesserinstanceIndex);
  addItem( itemF1Level, QStringLiteral( "f1Level" ) );
  KConfigCompilerSignallingItem  *itemF2Level;
  KConfigBaseEE::ItemDouble  *innerItemF2Level;
  innerItemF2Level = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "f2Level" ), mF2Level, 12 );
  itemF2Level = new KConfigCompilerSignallingItem(innerItemF2Level, this, notifyFunction, signalF2LevelChanged);
  innerItemF2Level->setMinValue(-24);
  innerItemF2Level->setMaxValue(24);
  itemF2Level->setWriteFlags(KConfigBase::Notify);
  itemF2Level->setGroup(cgDeesserinstanceIndex);
  addItem( itemF2Level, QStringLiteral( "f2Level" ) );
  KConfigCompilerSignallingItem  *itemF2Q;
  KConfigBaseEE::ItemDouble  *innerItemF2Q;
  innerItemF2Q = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "f2Q" ), mF2Q, 1 );
  itemF2Q = new KConfigCompilerSignallingItem(innerItemF2Q, this, notifyFunction, signalF2QChanged);
  innerItemF2Q->setMinValue(0.1);
  innerItemF2Q->setMaxValue(100);
  itemF2Q->setWriteFlags(KConfigBase::Notify);
  itemF2Q->setGroup(cgDeesserinstanceIndex);
  addItem( itemF2Q, QStringLiteral( "f2Q" ) );
  KConfigCompilerSignallingItem  *itemScListen;
  KConfigBaseEE::ItemBool  *innerItemScListen;
  innerItemScListen = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "scListen" ), mScListen, false );
  itemScListen = new KConfigCompilerSignallingItem(innerItemScListen, this, notifyFunction, signalScListenChanged);
  itemScListen->setWriteFlags(KConfigBase::Notify);
  itemScListen->setGroup(cgDeesserinstanceIndex);
  addItem( itemScListen, QStringLiteral( "scListen" ) );
}

bool DbDeesser::defaultBypassValue_helper() const
{

  return false;
}

double DbDeesser::defaultInputGainValue_helper() const
{

  return 0;
}

double DbDeesser::defaultOutputGainValue_helper() const
{

  return 0;
}

QStringList DbDeesser::defaultDetectionLabelsValue_helper() const
{
  QStringList defaultdetectionLabels;
  defaultdetectionLabels.append( QString::fromUtf8( "RMS" ) );
  defaultdetectionLabels.append( QString::fromUtf8( "Peak" ) );

  return defaultdetectionLabels;
}

int DbDeesser::defaultDetectionValue_helper() const
{

  return 0;
}

QStringList DbDeesser::defaultModeLabelsValue_helper() const
{
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "Wide" ) );
  defaultmodeLabels.append( QString::fromUtf8( "Split" ) );

  return defaultmodeLabels;
}

int DbDeesser::defaultModeValue_helper() const
{

  return 0;
}

double DbDeesser::defaultThresholdValue_helper() const
{

  return -18;
}

double DbDeesser::defaultRatioValue_helper() const
{

  return 3;
}

int DbDeesser::defaultLaxityValue_helper() const
{

  return 15;
}

double DbDeesser::defaultMakeupValue_helper() const
{

  return 0;
}

double DbDeesser::defaultF1FreqValue_helper() const
{

  return 6000;
}

double DbDeesser::defaultF2FreqValue_helper() const
{

  return 4500;
}

double DbDeesser::defaultF1LevelValue_helper() const
{

  return 0;
}

double DbDeesser::defaultF2LevelValue_helper() const
{

  return 12;
}

double DbDeesser::defaultF2QValue_helper() const
{

  return 1;
}

bool DbDeesser::defaultScListenValue_helper() const
{

  return false;
}

DbDeesser::~DbDeesser()
{
}


void DbDeesser::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalDetectionLabelsChanged:
    Q_EMIT detectionLabelsChanged();
    break;
  case signalDetectionChanged:
    Q_EMIT detectionChanged();
    break;
  case signalModeLabelsChanged:
    Q_EMIT modeLabelsChanged();
    break;
  case signalModeChanged:
    Q_EMIT modeChanged();
    break;
  case signalThresholdChanged:
    Q_EMIT thresholdChanged();
    break;
  case signalRatioChanged:
    Q_EMIT ratioChanged();
    break;
  case signalLaxityChanged:
    Q_EMIT laxityChanged();
    break;
  case signalMakeupChanged:
    Q_EMIT makeupChanged();
    break;
  case signalF1FreqChanged:
    Q_EMIT f1FreqChanged();
    break;
  case signalF2FreqChanged:
    Q_EMIT f2FreqChanged();
    break;
  case signalF1LevelChanged:
    Q_EMIT f1LevelChanged();
    break;
  case signalF2LevelChanged:
    Q_EMIT f2LevelChanged();
    break;
  case signalF2QChanged:
    Q_EMIT f2QChanged();
    break;
  case signalScListenChanged:
    Q_EMIT scListenChanged();
    break;
  }
}
