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

#include "easyeffects_db_autotune.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgAutotuneinstanceIndex = cgmasterGroup.group(QStringLiteral( "Autotune#%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(cgAutotuneinstanceIndex);
  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(cgAutotuneinstanceIndex);
  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(cgAutotuneinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "Auto" ) );
  defaultmodeLabels.append( QString::fromUtf8( "Manual" ) );

  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(cgAutotuneinstanceIndex);
  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(cgAutotuneinstanceIndex);
  addItem( itemMode, QStringLiteral( "mode" ) );
  KConfigCompilerSignallingItem  *itemChannelFilter;
  KConfigBaseEE::ItemInt  *innerItemChannelFilter;
  innerItemChannelFilter = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "channelFilter" ), mChannelFilter, 0 );
  itemChannelFilter = new KConfigCompilerSignallingItem(innerItemChannelFilter, this, notifyFunction, signalChannelFilterChanged);
  innerItemChannelFilter->setMinValue(0);
  innerItemChannelFilter->setMaxValue(16);
  itemChannelFilter->setWriteFlags(KConfigBase::Notify);
  itemChannelFilter->setGroup(cgAutotuneinstanceIndex);
  addItem( itemChannelFilter, QStringLiteral( "channelFilter" ) );
  KConfigCompilerSignallingItem  *itemTuning;
  KConfigBaseEE::ItemDouble  *innerItemTuning;
  innerItemTuning = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "tuning" ), mTuning, 440.0 );
  itemTuning = new KConfigCompilerSignallingItem(innerItemTuning, this, notifyFunction, signalTuningChanged);
  innerItemTuning->setMinValue(400.0);
  innerItemTuning->setMaxValue(480.0);
  itemTuning->setWriteFlags(KConfigBase::Notify);
  itemTuning->setGroup(cgAutotuneinstanceIndex);
  addItem( itemTuning, QStringLiteral( "tuning" ) );
  KConfigCompilerSignallingItem  *itemBias;
  KConfigBaseEE::ItemDouble  *innerItemBias;
  innerItemBias = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "bias" ), mBias, 0.5 );
  itemBias = new KConfigCompilerSignallingItem(innerItemBias, this, notifyFunction, signalBiasChanged);
  innerItemBias->setMinValue(0.0);
  innerItemBias->setMaxValue(1.0);
  itemBias->setWriteFlags(KConfigBase::Notify);
  itemBias->setGroup(cgAutotuneinstanceIndex);
  addItem( itemBias, QStringLiteral( "bias" ) );
  KConfigCompilerSignallingItem  *itemFilter;
  KConfigBaseEE::ItemDouble  *innerItemFilter;
  innerItemFilter = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "filter" ), mFilter, 0.1 );
  itemFilter = new KConfigCompilerSignallingItem(innerItemFilter, this, notifyFunction, signalFilterChanged);
  innerItemFilter->setMinValue(0.02);
  innerItemFilter->setMaxValue(0.5);
  itemFilter->setWriteFlags(KConfigBase::Notify);
  itemFilter->setGroup(cgAutotuneinstanceIndex);
  addItem( itemFilter, QStringLiteral( "filter" ) );
  KConfigCompilerSignallingItem  *itemCorrection;
  KConfigBaseEE::ItemDouble  *innerItemCorrection;
  innerItemCorrection = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "correction" ), mCorrection, 1.0 );
  itemCorrection = new KConfigCompilerSignallingItem(innerItemCorrection, this, notifyFunction, signalCorrectionChanged);
  innerItemCorrection->setMinValue(0.0);
  innerItemCorrection->setMaxValue(1.0);
  itemCorrection->setWriteFlags(KConfigBase::Notify);
  itemCorrection->setGroup(cgAutotuneinstanceIndex);
  addItem( itemCorrection, QStringLiteral( "correction" ) );
  KConfigCompilerSignallingItem  *itemOffset;
  KConfigBaseEE::ItemDouble  *innerItemOffset;
  innerItemOffset = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "offset" ), mOffset, 0.0 );
  itemOffset = new KConfigCompilerSignallingItem(innerItemOffset, this, notifyFunction, signalOffsetChanged);
  innerItemOffset->setMinValue(-2.0);
  innerItemOffset->setMaxValue(2.0);
  itemOffset->setWriteFlags(KConfigBase::Notify);
  itemOffset->setGroup(cgAutotuneinstanceIndex);
  addItem( itemOffset, QStringLiteral( "offset" ) );
  KConfigCompilerSignallingItem  *itemBendRange;
  KConfigBaseEE::ItemDouble  *innerItemBendRange;
  innerItemBendRange = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "bendRange" ), mBendRange, 2.0 );
  itemBendRange = new KConfigCompilerSignallingItem(innerItemBendRange, this, notifyFunction, signalBendRangeChanged);
  innerItemBendRange->setMinValue(0.0);
  innerItemBendRange->setMaxValue(7.0);
  itemBendRange->setWriteFlags(KConfigBase::Notify);
  itemBendRange->setGroup(cgAutotuneinstanceIndex);
  addItem( itemBendRange, QStringLiteral( "bendRange" ) );
  KConfigCompilerSignallingItem  *itemFastMode;
  KConfigBaseEE::ItemBool  *innerItemFastMode;
  innerItemFastMode = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "fastMode" ), mFastMode, false );
  itemFastMode = new KConfigCompilerSignallingItem(innerItemFastMode, this, notifyFunction, signalFastModeChanged);
  itemFastMode->setWriteFlags(KConfigBase::Notify);
  itemFastMode->setGroup(cgAutotuneinstanceIndex);
  addItem( itemFastMode, QStringLiteral( "fastMode" ) );
  KConfigCompilerSignallingItem  *itemNoteC;
  KConfigBaseEE::ItemBool  *innerItemNoteC;
  innerItemNoteC = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteC" ), mNoteC, true );
  itemNoteC = new KConfigCompilerSignallingItem(innerItemNoteC, this, notifyFunction, signalNoteCChanged);
  itemNoteC->setWriteFlags(KConfigBase::Notify);
  itemNoteC->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteC, QStringLiteral( "noteC" ) );
  KConfigCompilerSignallingItem  *itemNoteCSharp;
  KConfigBaseEE::ItemBool  *innerItemNoteCSharp;
  innerItemNoteCSharp = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteCSharp" ), mNoteCSharp, true );
  itemNoteCSharp = new KConfigCompilerSignallingItem(innerItemNoteCSharp, this, notifyFunction, signalNoteCSharpChanged);
  itemNoteCSharp->setWriteFlags(KConfigBase::Notify);
  itemNoteCSharp->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteCSharp, QStringLiteral( "noteCSharp" ) );
  KConfigCompilerSignallingItem  *itemNoteD;
  KConfigBaseEE::ItemBool  *innerItemNoteD;
  innerItemNoteD = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteD" ), mNoteD, true );
  itemNoteD = new KConfigCompilerSignallingItem(innerItemNoteD, this, notifyFunction, signalNoteDChanged);
  itemNoteD->setWriteFlags(KConfigBase::Notify);
  itemNoteD->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteD, QStringLiteral( "noteD" ) );
  KConfigCompilerSignallingItem  *itemNoteDSharp;
  KConfigBaseEE::ItemBool  *innerItemNoteDSharp;
  innerItemNoteDSharp = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteDSharp" ), mNoteDSharp, true );
  itemNoteDSharp = new KConfigCompilerSignallingItem(innerItemNoteDSharp, this, notifyFunction, signalNoteDSharpChanged);
  itemNoteDSharp->setWriteFlags(KConfigBase::Notify);
  itemNoteDSharp->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteDSharp, QStringLiteral( "noteDSharp" ) );
  KConfigCompilerSignallingItem  *itemNoteE;
  KConfigBaseEE::ItemBool  *innerItemNoteE;
  innerItemNoteE = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteE" ), mNoteE, true );
  itemNoteE = new KConfigCompilerSignallingItem(innerItemNoteE, this, notifyFunction, signalNoteEChanged);
  itemNoteE->setWriteFlags(KConfigBase::Notify);
  itemNoteE->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteE, QStringLiteral( "noteE" ) );
  KConfigCompilerSignallingItem  *itemNoteF;
  KConfigBaseEE::ItemBool  *innerItemNoteF;
  innerItemNoteF = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteF" ), mNoteF, true );
  itemNoteF = new KConfigCompilerSignallingItem(innerItemNoteF, this, notifyFunction, signalNoteFChanged);
  itemNoteF->setWriteFlags(KConfigBase::Notify);
  itemNoteF->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteF, QStringLiteral( "noteF" ) );
  KConfigCompilerSignallingItem  *itemNoteFSharp;
  KConfigBaseEE::ItemBool  *innerItemNoteFSharp;
  innerItemNoteFSharp = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteFSharp" ), mNoteFSharp, true );
  itemNoteFSharp = new KConfigCompilerSignallingItem(innerItemNoteFSharp, this, notifyFunction, signalNoteFSharpChanged);
  itemNoteFSharp->setWriteFlags(KConfigBase::Notify);
  itemNoteFSharp->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteFSharp, QStringLiteral( "noteFSharp" ) );
  KConfigCompilerSignallingItem  *itemNoteG;
  KConfigBaseEE::ItemBool  *innerItemNoteG;
  innerItemNoteG = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteG" ), mNoteG, true );
  itemNoteG = new KConfigCompilerSignallingItem(innerItemNoteG, this, notifyFunction, signalNoteGChanged);
  itemNoteG->setWriteFlags(KConfigBase::Notify);
  itemNoteG->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteG, QStringLiteral( "noteG" ) );
  KConfigCompilerSignallingItem  *itemNoteGSharp;
  KConfigBaseEE::ItemBool  *innerItemNoteGSharp;
  innerItemNoteGSharp = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteGSharp" ), mNoteGSharp, true );
  itemNoteGSharp = new KConfigCompilerSignallingItem(innerItemNoteGSharp, this, notifyFunction, signalNoteGSharpChanged);
  itemNoteGSharp->setWriteFlags(KConfigBase::Notify);
  itemNoteGSharp->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteGSharp, QStringLiteral( "noteGSharp" ) );
  KConfigCompilerSignallingItem  *itemNoteA;
  KConfigBaseEE::ItemBool  *innerItemNoteA;
  innerItemNoteA = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteA" ), mNoteA, true );
  itemNoteA = new KConfigCompilerSignallingItem(innerItemNoteA, this, notifyFunction, signalNoteAChanged);
  itemNoteA->setWriteFlags(KConfigBase::Notify);
  itemNoteA->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteA, QStringLiteral( "noteA" ) );
  KConfigCompilerSignallingItem  *itemNoteASharp;
  KConfigBaseEE::ItemBool  *innerItemNoteASharp;
  innerItemNoteASharp = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteASharp" ), mNoteASharp, true );
  itemNoteASharp = new KConfigCompilerSignallingItem(innerItemNoteASharp, this, notifyFunction, signalNoteASharpChanged);
  itemNoteASharp->setWriteFlags(KConfigBase::Notify);
  itemNoteASharp->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteASharp, QStringLiteral( "noteASharp" ) );
  KConfigCompilerSignallingItem  *itemNoteB;
  KConfigBaseEE::ItemBool  *innerItemNoteB;
  innerItemNoteB = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "noteB" ), mNoteB, true );
  itemNoteB = new KConfigCompilerSignallingItem(innerItemNoteB, this, notifyFunction, signalNoteBChanged);
  itemNoteB->setWriteFlags(KConfigBase::Notify);
  itemNoteB->setGroup(cgAutotuneinstanceIndex);
  addItem( itemNoteB, QStringLiteral( "noteB" ) );
}

bool DbAutotune::defaultBypassValue_helper() const
{

  return false;
}

double DbAutotune::defaultInputGainValue_helper() const
{

  return 0;
}

double DbAutotune::defaultOutputGainValue_helper() const
{

  return 0;
}

QStringList DbAutotune::defaultModeLabelsValue_helper() const
{
  QStringList defaultmodeLabels;
  defaultmodeLabels.append( QString::fromUtf8( "Auto" ) );
  defaultmodeLabels.append( QString::fromUtf8( "Manual" ) );

  return defaultmodeLabels;
}

int DbAutotune::defaultModeValue_helper() const
{

  return 0;
}

int DbAutotune::defaultChannelFilterValue_helper() const
{

  return 0;
}

double DbAutotune::defaultTuningValue_helper() const
{

  return 440.0;
}

double DbAutotune::defaultBiasValue_helper() const
{

  return 0.5;
}

double DbAutotune::defaultFilterValue_helper() const
{

  return 0.1;
}

double DbAutotune::defaultCorrectionValue_helper() const
{

  return 1.0;
}

double DbAutotune::defaultOffsetValue_helper() const
{

  return 0.0;
}

double DbAutotune::defaultBendRangeValue_helper() const
{

  return 2.0;
}

bool DbAutotune::defaultFastModeValue_helper() const
{

  return false;
}

bool DbAutotune::defaultNoteCValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteCSharpValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteDValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteDSharpValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteEValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteFValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteFSharpValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteGValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteGSharpValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteAValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteASharpValue_helper() const
{

  return true;
}

bool DbAutotune::defaultNoteBValue_helper() const
{

  return true;
}

DbAutotune::~DbAutotune()
{
}


void DbAutotune::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalModeLabelsChanged:
    Q_EMIT modeLabelsChanged();
    break;
  case signalModeChanged:
    Q_EMIT modeChanged();
    break;
  case signalChannelFilterChanged:
    Q_EMIT channelFilterChanged();
    break;
  case signalTuningChanged:
    Q_EMIT tuningChanged();
    break;
  case signalBiasChanged:
    Q_EMIT biasChanged();
    break;
  case signalFilterChanged:
    Q_EMIT filterChanged();
    break;
  case signalCorrectionChanged:
    Q_EMIT correctionChanged();
    break;
  case signalOffsetChanged:
    Q_EMIT offsetChanged();
    break;
  case signalBendRangeChanged:
    Q_EMIT bendRangeChanged();
    break;
  case signalFastModeChanged:
    Q_EMIT fastModeChanged();
    break;
  case signalNoteCChanged:
    Q_EMIT noteCChanged();
    break;
  case signalNoteCSharpChanged:
    Q_EMIT noteCSharpChanged();
    break;
  case signalNoteDChanged:
    Q_EMIT noteDChanged();
    break;
  case signalNoteDSharpChanged:
    Q_EMIT noteDSharpChanged();
    break;
  case signalNoteEChanged:
    Q_EMIT noteEChanged();
    break;
  case signalNoteFChanged:
    Q_EMIT noteFChanged();
    break;
  case signalNoteFSharpChanged:
    Q_EMIT noteFSharpChanged();
    break;
  case signalNoteGChanged:
    Q_EMIT noteGChanged();
    break;
  case signalNoteGSharpChanged:
    Q_EMIT noteGSharpChanged();
    break;
  case signalNoteAChanged:
    Q_EMIT noteAChanged();
    break;
  case signalNoteASharpChanged:
    Q_EMIT noteASharpChanged();
    break;
  case signalNoteBChanged:
    Q_EMIT noteBChanged();
    break;
  }
}
