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

#include "easyeffects_db_convolver.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgConvolverinstanceIndex = cgmasterGroup.group(QStringLiteral( "Convolver#%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(cgConvolverinstanceIndex);
  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(cgConvolverinstanceIndex);
  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(cgConvolverinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  KConfigCompilerSignallingItem  *itemKernelName;
  KConfigBaseEE::ItemString  *innerItemKernelName;
  innerItemKernelName = new KConfigBaseEE::ItemString( currentGroup(), QStringLiteral( "kernelName" ), mKernelName, QStringLiteral( "\"\"" ) );
  itemKernelName = new KConfigCompilerSignallingItem(innerItemKernelName, this, notifyFunction, signalKernelNameChanged);
  itemKernelName->setWriteFlags(KConfigBase::Notify);
  itemKernelName->setGroup(cgConvolverinstanceIndex);
  addItem( itemKernelName, QStringLiteral( "kernelName" ) );
  KConfigCompilerSignallingItem  *itemIrWidth;
  KConfigBaseEE::ItemInt  *innerItemIrWidth;
  innerItemIrWidth = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "irWidth" ), mIrWidth, 100 );
  itemIrWidth = new KConfigCompilerSignallingItem(innerItemIrWidth, this, notifyFunction, signalIrWidthChanged);
  innerItemIrWidth->setMinValue(0);
  innerItemIrWidth->setMaxValue(200);
  itemIrWidth->setWriteFlags(KConfigBase::Notify);
  itemIrWidth->setGroup(cgConvolverinstanceIndex);
  addItem( itemIrWidth, QStringLiteral( "irWidth" ) );
  KConfigCompilerSignallingItem  *itemAutogain;
  KConfigBaseEE::ItemBool  *innerItemAutogain;
  innerItemAutogain = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "autogain" ), mAutogain, true );
  itemAutogain = new KConfigCompilerSignallingItem(innerItemAutogain, this, notifyFunction, signalAutogainChanged);
  itemAutogain->setWriteFlags(KConfigBase::Notify);
  itemAutogain->setGroup(cgConvolverinstanceIndex);
  addItem( itemAutogain, QStringLiteral( "autogain" ) );
  KConfigCompilerSignallingItem  *itemDry;
  KConfigBaseEE::ItemDouble  *innerItemDry;
  innerItemDry = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "dry" ), mDry, -100 );
  itemDry = new KConfigCompilerSignallingItem(innerItemDry, this, notifyFunction, signalDryChanged);
  innerItemDry->setMinValue(-100);
  innerItemDry->setMaxValue(20);
  itemDry->setWriteFlags(KConfigBase::Notify);
  itemDry->setGroup(cgConvolverinstanceIndex);
  addItem( itemDry, QStringLiteral( "dry" ) );
  KConfigCompilerSignallingItem  *itemWet;
  KConfigBaseEE::ItemDouble  *innerItemWet;
  innerItemWet = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "wet" ), mWet, 0 );
  itemWet = new KConfigCompilerSignallingItem(innerItemWet, this, notifyFunction, signalWetChanged);
  innerItemWet->setMinValue(-100);
  innerItemWet->setMaxValue(20);
  itemWet->setWriteFlags(KConfigBase::Notify);
  itemWet->setGroup(cgConvolverinstanceIndex);
  addItem( itemWet, QStringLiteral( "wet" ) );
  KConfigCompilerSignallingItem  *itemTargetSofaAzimuth;
  KConfigBaseEE::ItemDouble  *innerItemTargetSofaAzimuth;
  innerItemTargetSofaAzimuth = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "targetSofaAzimuth" ), mTargetSofaAzimuth, 0 );
  itemTargetSofaAzimuth = new KConfigCompilerSignallingItem(innerItemTargetSofaAzimuth, this, notifyFunction, signalTargetSofaAzimuthChanged);
  itemTargetSofaAzimuth->setWriteFlags(KConfigBase::Notify);
  itemTargetSofaAzimuth->setGroup(cgConvolverinstanceIndex);
  addItem( itemTargetSofaAzimuth, QStringLiteral( "targetSofaAzimuth" ) );
  KConfigCompilerSignallingItem  *itemTargetSofaElevation;
  KConfigBaseEE::ItemDouble  *innerItemTargetSofaElevation;
  innerItemTargetSofaElevation = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "targetSofaElevation" ), mTargetSofaElevation, 0 );
  itemTargetSofaElevation = new KConfigCompilerSignallingItem(innerItemTargetSofaElevation, this, notifyFunction, signalTargetSofaElevationChanged);
  itemTargetSofaElevation->setWriteFlags(KConfigBase::Notify);
  itemTargetSofaElevation->setGroup(cgConvolverinstanceIndex);
  addItem( itemTargetSofaElevation, QStringLiteral( "targetSofaElevation" ) );
  KConfigCompilerSignallingItem  *itemTargetSofaRadius;
  KConfigBaseEE::ItemDouble  *innerItemTargetSofaRadius;
  innerItemTargetSofaRadius = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "targetSofaRadius" ), mTargetSofaRadius, 1.0 );
  itemTargetSofaRadius = new KConfigCompilerSignallingItem(innerItemTargetSofaRadius, this, notifyFunction, signalTargetSofaRadiusChanged);
  itemTargetSofaRadius->setWriteFlags(KConfigBase::Notify);
  itemTargetSofaRadius->setGroup(cgConvolverinstanceIndex);
  addItem( itemTargetSofaRadius, QStringLiteral( "targetSofaRadius" ) );
}

bool DbConvolver::defaultBypassValue_helper() const
{

  return false;
}

double DbConvolver::defaultInputGainValue_helper() const
{

  return 0;
}

double DbConvolver::defaultOutputGainValue_helper() const
{

  return 0;
}

QString DbConvolver::defaultKernelNameValue_helper() const
{

  return QStringLiteral( "\"\"" );
}

int DbConvolver::defaultIrWidthValue_helper() const
{

  return 100;
}

bool DbConvolver::defaultAutogainValue_helper() const
{

  return true;
}

double DbConvolver::defaultDryValue_helper() const
{

  return -100;
}

double DbConvolver::defaultWetValue_helper() const
{

  return 0;
}

double DbConvolver::defaultTargetSofaAzimuthValue_helper() const
{

  return 0;
}

double DbConvolver::defaultTargetSofaElevationValue_helper() const
{

  return 0;
}

double DbConvolver::defaultTargetSofaRadiusValue_helper() const
{

  return 1.0;
}

DbConvolver::~DbConvolver()
{
}


void DbConvolver::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalKernelNameChanged:
    Q_EMIT kernelNameChanged();
    break;
  case signalIrWidthChanged:
    Q_EMIT irWidthChanged();
    break;
  case signalAutogainChanged:
    Q_EMIT autogainChanged();
    break;
  case signalDryChanged:
    Q_EMIT dryChanged();
    break;
  case signalWetChanged:
    Q_EMIT wetChanged();
    break;
  case signalTargetSofaAzimuthChanged:
    Q_EMIT targetSofaAzimuthChanged();
    break;
  case signalTargetSofaElevationChanged:
    Q_EMIT targetSofaElevationChanged();
    break;
  case signalTargetSofaRadiusChanged:
    Q_EMIT targetSofaRadiusChanged();
    break;
  }
}
