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

#include "easyeffects_db_filter.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgFilterinstanceIndex = cgmasterGroup.group(QStringLiteral( "Filter#%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(cgFilterinstanceIndex);
  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(cgFilterinstanceIndex);
  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(cgFilterinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  QStringList defaulttypeLabels;
  defaulttypeLabels.append( QString::fromUtf8( "Low-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "High-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Low-shelf" ) );
  defaulttypeLabels.append( QString::fromUtf8( "High-shelf" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Bell" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Band-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Notch" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Resonance" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Ladder-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Ladder-rejection" ) );
  defaulttypeLabels.append( QString::fromUtf8( "All-pass" ) );

  KConfigCompilerSignallingItem  *itemTypeLabels;
  KConfigBaseEE::ItemStringList  *innerItemTypeLabels;
  innerItemTypeLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "typeLabels" ), mTypeLabels, defaulttypeLabels );
  itemTypeLabels = new KConfigCompilerSignallingItem(innerItemTypeLabels, this, notifyFunction, signalTypeLabelsChanged);
  itemTypeLabels->setWriteFlags(KConfigBase::Notify);
  itemTypeLabels->setGroup(cgFilterinstanceIndex);
  addItem( itemTypeLabels, QStringLiteral( "typeLabels" ) );
  KConfigCompilerSignallingItem  *itemType;
  KConfigBaseEE::ItemInt  *innerItemType;
  innerItemType = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "type" ), mType, 0 );
  itemType = new KConfigCompilerSignallingItem(innerItemType, this, notifyFunction, signalTypeChanged);
  itemType->setWriteFlags(KConfigBase::Notify);
  itemType->setGroup(cgFilterinstanceIndex);
  addItem( itemType, QStringLiteral( "type" ) );
  QStringList defaultequalModeLabels;
  defaultequalModeLabels.append( QString::fromUtf8( "IIR" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "FIR" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "FFT" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "SPM" ) );

  KConfigCompilerSignallingItem  *itemEqualModeLabels;
  KConfigBaseEE::ItemStringList  *innerItemEqualModeLabels;
  innerItemEqualModeLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "equalModeLabels" ), mEqualModeLabels, defaultequalModeLabels );
  itemEqualModeLabels = new KConfigCompilerSignallingItem(innerItemEqualModeLabels, this, notifyFunction, signalEqualModeLabelsChanged);
  itemEqualModeLabels->setWriteFlags(KConfigBase::Notify);
  itemEqualModeLabels->setGroup(cgFilterinstanceIndex);
  addItem( itemEqualModeLabels, QStringLiteral( "equalModeLabels" ) );
  KConfigCompilerSignallingItem  *itemEqualMode;
  KConfigBaseEE::ItemInt  *innerItemEqualMode;
  innerItemEqualMode = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "equalMode" ), mEqualMode, 0 );
  itemEqualMode = new KConfigCompilerSignallingItem(innerItemEqualMode, this, notifyFunction, signalEqualModeChanged);
  itemEqualMode->setWriteFlags(KConfigBase::Notify);
  itemEqualMode->setGroup(cgFilterinstanceIndex);
  addItem( itemEqualMode, QStringLiteral( "equalMode" ) );
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "RLC (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "RLC (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "BWC (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "BWC (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "LRX (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "LRX (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "APO (DR)" ) );

  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(cgFilterinstanceIndex);
  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(cgFilterinstanceIndex);
  addItem( itemMode, QStringLiteral( "mode" ) );
  QStringList defaultslopeLabels;
  defaultslopeLabels.append( QString::fromUtf8( "x1" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x2" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x3" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x4" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x6" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x8" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x12" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x16" ) );

  KConfigCompilerSignallingItem  *itemSlopeLabels;
  KConfigBaseEE::ItemStringList  *innerItemSlopeLabels;
  innerItemSlopeLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "slopeLabels" ), mSlopeLabels, defaultslopeLabels );
  itemSlopeLabels = new KConfigCompilerSignallingItem(innerItemSlopeLabels, this, notifyFunction, signalSlopeLabelsChanged);
  itemSlopeLabels->setWriteFlags(KConfigBase::Notify);
  itemSlopeLabels->setGroup(cgFilterinstanceIndex);
  addItem( itemSlopeLabels, QStringLiteral( "slopeLabels" ) );
  KConfigCompilerSignallingItem  *itemSlope;
  KConfigBaseEE::ItemInt  *innerItemSlope;
  innerItemSlope = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "slope" ), mSlope, 0 );
  itemSlope = new KConfigCompilerSignallingItem(innerItemSlope, this, notifyFunction, signalSlopeChanged);
  itemSlope->setWriteFlags(KConfigBase::Notify);
  itemSlope->setGroup(cgFilterinstanceIndex);
  addItem( itemSlope, QStringLiteral( "slope" ) );
  KConfigCompilerSignallingItem  *itemFrequency;
  KConfigBaseEE::ItemDouble  *innerItemFrequency;
  innerItemFrequency = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "frequency" ), mFrequency, 2000 );
  itemFrequency = new KConfigCompilerSignallingItem(innerItemFrequency, this, notifyFunction, signalFrequencyChanged);
  innerItemFrequency->setMinValue(10);
  innerItemFrequency->setMaxValue(24000);
  itemFrequency->setWriteFlags(KConfigBase::Notify);
  itemFrequency->setGroup(cgFilterinstanceIndex);
  addItem( itemFrequency, QStringLiteral( "frequency" ) );
  KConfigCompilerSignallingItem  *itemWidth;
  KConfigBaseEE::ItemDouble  *innerItemWidth;
  innerItemWidth = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "width" ), mWidth, 4.0 );
  itemWidth = new KConfigCompilerSignallingItem(innerItemWidth, this, notifyFunction, signalWidthChanged);
  innerItemWidth->setMinValue(0.0);
  innerItemWidth->setMaxValue(12.0);
  itemWidth->setWriteFlags(KConfigBase::Notify);
  itemWidth->setGroup(cgFilterinstanceIndex);
  addItem( itemWidth, QStringLiteral( "width" ) );
  KConfigCompilerSignallingItem  *itemQuality;
  KConfigBaseEE::ItemDouble  *innerItemQuality;
  innerItemQuality = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "quality" ), mQuality, 0.0 );
  itemQuality = new KConfigCompilerSignallingItem(innerItemQuality, this, notifyFunction, signalQualityChanged);
  innerItemQuality->setMinValue(0.0);
  innerItemQuality->setMaxValue(100.0);
  itemQuality->setWriteFlags(KConfigBase::Notify);
  itemQuality->setGroup(cgFilterinstanceIndex);
  addItem( itemQuality, QStringLiteral( "quality" ) );
  KConfigCompilerSignallingItem  *itemGain;
  KConfigBaseEE::ItemDouble  *innerItemGain;
  innerItemGain = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "gain" ), mGain, 0 );
  itemGain = new KConfigCompilerSignallingItem(innerItemGain, this, notifyFunction, signalGainChanged);
  innerItemGain->setMinValue(-36);
  innerItemGain->setMaxValue(36);
  itemGain->setWriteFlags(KConfigBase::Notify);
  itemGain->setGroup(cgFilterinstanceIndex);
  addItem( itemGain, QStringLiteral( "gain" ) );
  KConfigCompilerSignallingItem  *itemBalance;
  KConfigBaseEE::ItemDouble  *innerItemBalance;
  innerItemBalance = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "balance" ), mBalance, 0 );
  itemBalance = new KConfigCompilerSignallingItem(innerItemBalance, this, notifyFunction, signalBalanceChanged);
  innerItemBalance->setMinValue(-100);
  innerItemBalance->setMaxValue(100);
  itemBalance->setWriteFlags(KConfigBase::Notify);
  itemBalance->setGroup(cgFilterinstanceIndex);
  addItem( itemBalance, QStringLiteral( "balance" ) );
  QStringList defaultdecrampLabels;
  defaultdecrampLabels.append( QString::fromUtf8( "Off" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x2" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x3" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x4" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x6" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x8" ) );

  KConfigCompilerSignallingItem  *itemDecrampLabels;
  KConfigBaseEE::ItemStringList  *innerItemDecrampLabels;
  innerItemDecrampLabels = new KConfigBaseEE::ItemStringList( currentGroup(), QStringLiteral( "decrampLabels" ), mDecrampLabels, defaultdecrampLabels );
  itemDecrampLabels = new KConfigCompilerSignallingItem(innerItemDecrampLabels, this, notifyFunction, signalDecrampLabelsChanged);
  itemDecrampLabels->setWriteFlags(KConfigBase::Notify);
  itemDecrampLabels->setGroup(cgFilterinstanceIndex);
  addItem( itemDecrampLabels, QStringLiteral( "decrampLabels" ) );
  KConfigCompilerSignallingItem  *itemDecramp;
  KConfigBaseEE::ItemInt  *innerItemDecramp;
  innerItemDecramp = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "decramp" ), mDecramp, 0 );
  itemDecramp = new KConfigCompilerSignallingItem(innerItemDecramp, this, notifyFunction, signalDecrampChanged);
  itemDecramp->setWriteFlags(KConfigBase::Notify);
  itemDecramp->setGroup(cgFilterinstanceIndex);
  addItem( itemDecramp, QStringLiteral( "decramp" ) );
}

bool DbFilter::defaultBypassValue_helper() const
{

  return false;
}

double DbFilter::defaultInputGainValue_helper() const
{

  return 0;
}

double DbFilter::defaultOutputGainValue_helper() const
{

  return 0;
}

QStringList DbFilter::defaultTypeLabelsValue_helper() const
{
  QStringList defaulttypeLabels;
  defaulttypeLabels.append( QString::fromUtf8( "Low-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "High-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Low-shelf" ) );
  defaulttypeLabels.append( QString::fromUtf8( "High-shelf" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Bell" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Band-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Notch" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Resonance" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Ladder-pass" ) );
  defaulttypeLabels.append( QString::fromUtf8( "Ladder-rejection" ) );
  defaulttypeLabels.append( QString::fromUtf8( "All-pass" ) );

  return defaulttypeLabels;
}

int DbFilter::defaultTypeValue_helper() const
{

  return 0;
}

QStringList DbFilter::defaultEqualModeLabelsValue_helper() const
{
  QStringList defaultequalModeLabels;
  defaultequalModeLabels.append( QString::fromUtf8( "IIR" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "FIR" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "FFT" ) );
  defaultequalModeLabels.append( QString::fromUtf8( "SPM" ) );

  return defaultequalModeLabels;
}

int DbFilter::defaultEqualModeValue_helper() const
{

  return 0;
}

QStringList DbFilter::defaultModeLabelsValue_helper() const
{
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "RLC (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "RLC (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "BWC (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "BWC (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "LRX (BT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "LRX (MT)" ) );
  defaultmodeLabels.append( QString::fromUtf8( "APO (DR)" ) );

  return defaultmodeLabels;
}

int DbFilter::defaultModeValue_helper() const
{

  return 0;
}

QStringList DbFilter::defaultSlopeLabelsValue_helper() const
{
  QStringList defaultslopeLabels;
  defaultslopeLabels.append( QString::fromUtf8( "x1" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x2" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x3" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x4" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x6" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x8" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x12" ) );
  defaultslopeLabels.append( QString::fromUtf8( "x16" ) );

  return defaultslopeLabels;
}

int DbFilter::defaultSlopeValue_helper() const
{

  return 0;
}

double DbFilter::defaultFrequencyValue_helper() const
{

  return 2000;
}

double DbFilter::defaultWidthValue_helper() const
{

  return 4.0;
}

double DbFilter::defaultQualityValue_helper() const
{

  return 0.0;
}

double DbFilter::defaultGainValue_helper() const
{

  return 0;
}

double DbFilter::defaultBalanceValue_helper() const
{

  return 0;
}

QStringList DbFilter::defaultDecrampLabelsValue_helper() const
{
  QStringList defaultdecrampLabels;
  defaultdecrampLabels.append( QString::fromUtf8( "Off" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x2" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x3" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x4" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x6" ) );
  defaultdecrampLabels.append( QString::fromUtf8( "x8" ) );

  return defaultdecrampLabels;
}

int DbFilter::defaultDecrampValue_helper() const
{

  return 0;
}

DbFilter::~DbFilter()
{
}


void DbFilter::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalTypeLabelsChanged:
    Q_EMIT typeLabelsChanged();
    break;
  case signalTypeChanged:
    Q_EMIT typeChanged();
    break;
  case signalEqualModeLabelsChanged:
    Q_EMIT equalModeLabelsChanged();
    break;
  case signalEqualModeChanged:
    Q_EMIT equalModeChanged();
    break;
  case signalModeLabelsChanged:
    Q_EMIT modeLabelsChanged();
    break;
  case signalModeChanged:
    Q_EMIT modeChanged();
    break;
  case signalSlopeLabelsChanged:
    Q_EMIT slopeLabelsChanged();
    break;
  case signalSlopeChanged:
    Q_EMIT slopeChanged();
    break;
  case signalFrequencyChanged:
    Q_EMIT frequencyChanged();
    break;
  case signalWidthChanged:
    Q_EMIT widthChanged();
    break;
  case signalQualityChanged:
    Q_EMIT qualityChanged();
    break;
  case signalGainChanged:
    Q_EMIT gainChanged();
    break;
  case signalBalanceChanged:
    Q_EMIT balanceChanged();
    break;
  case signalDecrampLabelsChanged:
    Q_EMIT decrampLabelsChanged();
    break;
  case signalDecrampChanged:
    Q_EMIT decrampChanged();
    break;
  }
}
