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

#include "easyeffects_db_reverb.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgReverbinstanceIndex = cgmasterGroup.group(QStringLiteral( "Reverb#%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(cgReverbinstanceIndex);
  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(cgReverbinstanceIndex);
  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(cgReverbinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  QStringList defaultroomSizeLabels;
  defaultroomSizeLabels.append( QString::fromUtf8( "Small" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Medium" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Large" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Tunnel-like" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Large/smooth" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Experimental" ) );

  KConfigCompilerSignallingItem  *itemRoomSizeLabels;
  KConfigBaseEE::ItemStringList  *innerItemRoomSizeLabels;
  innerItemRoomSizeLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "roomSizeLabels" ), mRoomSizeLabels, defaultroomSizeLabels );
  itemRoomSizeLabels = new KConfigCompilerSignallingItem(innerItemRoomSizeLabels, this, notifyFunction, signalRoomSizeLabelsChanged);
  itemRoomSizeLabels->setWriteFlags(KConfigBase::Notify);
  itemRoomSizeLabels->setGroup(cgReverbinstanceIndex);
  addItem( itemRoomSizeLabels, QStringLiteral( "roomSizeLabels" ) );
  KConfigCompilerSignallingItem  *itemRoomSize;
  KConfigBaseEE::ItemInt  *innerItemRoomSize;
  innerItemRoomSize = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "roomSize" ), mRoomSize, 2 );
  itemRoomSize = new KConfigCompilerSignallingItem(innerItemRoomSize, this, notifyFunction, signalRoomSizeChanged);
  itemRoomSize->setWriteFlags(KConfigBase::Notify);
  itemRoomSize->setGroup(cgReverbinstanceIndex);
  addItem( itemRoomSize, QStringLiteral( "roomSize" ) );
  KConfigCompilerSignallingItem  *itemDecayTime;
  KConfigBaseEE::ItemDouble  *innerItemDecayTime;
  innerItemDecayTime = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "decayTime" ), mDecayTime, 1.5 );
  itemDecayTime = new KConfigCompilerSignallingItem(innerItemDecayTime, this, notifyFunction, signalDecayTimeChanged);
  innerItemDecayTime->setMinValue(0.4);
  innerItemDecayTime->setMaxValue(15);
  itemDecayTime->setWriteFlags(KConfigBase::Notify);
  itemDecayTime->setGroup(cgReverbinstanceIndex);
  addItem( itemDecayTime, QStringLiteral( "decayTime" ) );
  KConfigCompilerSignallingItem  *itemHfDamp;
  KConfigBaseEE::ItemDouble  *innerItemHfDamp;
  innerItemHfDamp = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "hfDamp" ), mHfDamp, 5000 );
  itemHfDamp = new KConfigCompilerSignallingItem(innerItemHfDamp, this, notifyFunction, signalHfDampChanged);
  innerItemHfDamp->setMinValue(2000);
  innerItemHfDamp->setMaxValue(20000);
  itemHfDamp->setWriteFlags(KConfigBase::Notify);
  itemHfDamp->setGroup(cgReverbinstanceIndex);
  addItem( itemHfDamp, QStringLiteral( "hfDamp" ) );
  KConfigCompilerSignallingItem  *itemDiffusion;
  KConfigBaseEE::ItemDouble  *innerItemDiffusion;
  innerItemDiffusion = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "diffusion" ), mDiffusion, 0.5 );
  itemDiffusion = new KConfigCompilerSignallingItem(innerItemDiffusion, this, notifyFunction, signalDiffusionChanged);
  innerItemDiffusion->setMinValue(0);
  innerItemDiffusion->setMaxValue(1);
  itemDiffusion->setWriteFlags(KConfigBase::Notify);
  itemDiffusion->setGroup(cgReverbinstanceIndex);
  addItem( itemDiffusion, QStringLiteral( "diffusion" ) );
  KConfigCompilerSignallingItem  *itemAmount;
  KConfigBaseEE::ItemDouble  *innerItemAmount;
  innerItemAmount = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "amount" ), mAmount, -12 );
  itemAmount = new KConfigCompilerSignallingItem(innerItemAmount, this, notifyFunction, signalAmountChanged);
  innerItemAmount->setMinValue(-100);
  innerItemAmount->setMaxValue(6);
  itemAmount->setWriteFlags(KConfigBase::Notify);
  itemAmount->setGroup(cgReverbinstanceIndex);
  addItem( itemAmount, QStringLiteral( "amount" ) );
  KConfigCompilerSignallingItem  *itemDry;
  KConfigBaseEE::ItemDouble  *innerItemDry;
  innerItemDry = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "dry" ), mDry, 0 );
  itemDry = new KConfigCompilerSignallingItem(innerItemDry, this, notifyFunction, signalDryChanged);
  innerItemDry->setMinValue(-100);
  innerItemDry->setMaxValue(6);
  itemDry->setWriteFlags(KConfigBase::Notify);
  itemDry->setGroup(cgReverbinstanceIndex);
  addItem( itemDry, QStringLiteral( "dry" ) );
  KConfigCompilerSignallingItem  *itemPredelay;
  KConfigBaseEE::ItemDouble  *innerItemPredelay;
  innerItemPredelay = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "predelay" ), mPredelay, 0 );
  itemPredelay = new KConfigCompilerSignallingItem(innerItemPredelay, this, notifyFunction, signalPredelayChanged);
  innerItemPredelay->setMinValue(0);
  innerItemPredelay->setMaxValue(500);
  itemPredelay->setWriteFlags(KConfigBase::Notify);
  itemPredelay->setGroup(cgReverbinstanceIndex);
  addItem( itemPredelay, QStringLiteral( "predelay" ) );
  KConfigCompilerSignallingItem  *itemBassCut;
  KConfigBaseEE::ItemDouble  *innerItemBassCut;
  innerItemBassCut = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "bassCut" ), mBassCut, 300 );
  itemBassCut = new KConfigCompilerSignallingItem(innerItemBassCut, this, notifyFunction, signalBassCutChanged);
  innerItemBassCut->setMinValue(20);
  innerItemBassCut->setMaxValue(20000);
  itemBassCut->setWriteFlags(KConfigBase::Notify);
  itemBassCut->setGroup(cgReverbinstanceIndex);
  addItem( itemBassCut, QStringLiteral( "bassCut" ) );
  KConfigCompilerSignallingItem  *itemTrebleCut;
  KConfigBaseEE::ItemDouble  *innerItemTrebleCut;
  innerItemTrebleCut = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "trebleCut" ), mTrebleCut, 5000 );
  itemTrebleCut = new KConfigCompilerSignallingItem(innerItemTrebleCut, this, notifyFunction, signalTrebleCutChanged);
  innerItemTrebleCut->setMinValue(20);
  innerItemTrebleCut->setMaxValue(20000);
  itemTrebleCut->setWriteFlags(KConfigBase::Notify);
  itemTrebleCut->setGroup(cgReverbinstanceIndex);
  addItem( itemTrebleCut, QStringLiteral( "trebleCut" ) );
}

bool DbReverb::defaultBypassValue_helper() const
{

  return false;
}

double DbReverb::defaultInputGainValue_helper() const
{

  return 0;
}

double DbReverb::defaultOutputGainValue_helper() const
{

  return 0;
}

QStringList DbReverb::defaultRoomSizeLabelsValue_helper() const
{
  QStringList defaultroomSizeLabels;
  defaultroomSizeLabels.append( QString::fromUtf8( "Small" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Medium" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Large" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Tunnel-like" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Large/smooth" ) );
  defaultroomSizeLabels.append( QString::fromUtf8( "Experimental" ) );

  return defaultroomSizeLabels;
}

int DbReverb::defaultRoomSizeValue_helper() const
{

  return 2;
}

double DbReverb::defaultDecayTimeValue_helper() const
{

  return 1.5;
}

double DbReverb::defaultHfDampValue_helper() const
{

  return 5000;
}

double DbReverb::defaultDiffusionValue_helper() const
{

  return 0.5;
}

double DbReverb::defaultAmountValue_helper() const
{

  return -12;
}

double DbReverb::defaultDryValue_helper() const
{

  return 0;
}

double DbReverb::defaultPredelayValue_helper() const
{

  return 0;
}

double DbReverb::defaultBassCutValue_helper() const
{

  return 300;
}

double DbReverb::defaultTrebleCutValue_helper() const
{

  return 5000;
}

DbReverb::~DbReverb()
{
}


void DbReverb::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalRoomSizeLabelsChanged:
    Q_EMIT roomSizeLabelsChanged();
    break;
  case signalRoomSizeChanged:
    Q_EMIT roomSizeChanged();
    break;
  case signalDecayTimeChanged:
    Q_EMIT decayTimeChanged();
    break;
  case signalHfDampChanged:
    Q_EMIT hfDampChanged();
    break;
  case signalDiffusionChanged:
    Q_EMIT diffusionChanged();
    break;
  case signalAmountChanged:
    Q_EMIT amountChanged();
    break;
  case signalDryChanged:
    Q_EMIT dryChanged();
    break;
  case signalPredelayChanged:
    Q_EMIT predelayChanged();
    break;
  case signalBassCutChanged:
    Q_EMIT bassCutChanged();
    break;
  case signalTrebleCutChanged:
    Q_EMIT trebleCutChanged();
    break;
  }
}
