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

#include "easyeffects_db_pitch.h"

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

  KConfigGroup cgmasterGroup(this->config(), QStringLiteral( "%1" ).arg( mParammasterGroup ));
  KConfigGroup cgPitchinstanceIndex = cgmasterGroup.group(QStringLiteral( "Pitch#%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(cgPitchinstanceIndex);
  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(cgPitchinstanceIndex);
  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(cgPitchinstanceIndex);
  addItem( itemOutputGain, QStringLiteral( "outputGain" ) );
  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(cgPitchinstanceIndex);
  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(cgPitchinstanceIndex);
  addItem( itemWet, QStringLiteral( "wet" ) );
  KConfigCompilerSignallingItem  *itemCents;
  KConfigBaseEE::ItemDouble  *innerItemCents;
  innerItemCents = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "cents" ), mCents, 0.0 );
  itemCents = new KConfigCompilerSignallingItem(innerItemCents, this, notifyFunction, signalCentsChanged);
  innerItemCents->setMinValue(-100.0);
  innerItemCents->setMaxValue(100.0);
  itemCents->setWriteFlags(KConfigBase::Notify);
  itemCents->setGroup(cgPitchinstanceIndex);
  addItem( itemCents, QStringLiteral( "cents" ) );
  KConfigCompilerSignallingItem  *itemSemitones;
  KConfigBaseEE::ItemDouble  *innerItemSemitones;
  innerItemSemitones = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "semitones" ), mSemitones, 0.0 );
  itemSemitones = new KConfigCompilerSignallingItem(innerItemSemitones, this, notifyFunction, signalSemitonesChanged);
  innerItemSemitones->setMinValue(-12.0);
  innerItemSemitones->setMaxValue(12.0);
  itemSemitones->setWriteFlags(KConfigBase::Notify);
  itemSemitones->setGroup(cgPitchinstanceIndex);
  addItem( itemSemitones, QStringLiteral( "semitones" ) );
  KConfigCompilerSignallingItem  *itemOctaves;
  KConfigBaseEE::ItemDouble  *innerItemOctaves;
  innerItemOctaves = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "octaves" ), mOctaves, 0.0 );
  itemOctaves = new KConfigCompilerSignallingItem(innerItemOctaves, this, notifyFunction, signalOctavesChanged);
  innerItemOctaves->setMinValue(-3.0);
  innerItemOctaves->setMaxValue(3.0);
  itemOctaves->setWriteFlags(KConfigBase::Notify);
  itemOctaves->setGroup(cgPitchinstanceIndex);
  addItem( itemOctaves, QStringLiteral( "octaves" ) );
  KConfigCompilerSignallingItem  *itemQuickSeek;
  KConfigBaseEE::ItemBool  *innerItemQuickSeek;
  innerItemQuickSeek = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "quickSeek" ), mQuickSeek, false );
  itemQuickSeek = new KConfigCompilerSignallingItem(innerItemQuickSeek, this, notifyFunction, signalQuickSeekChanged);
  itemQuickSeek->setWriteFlags(KConfigBase::Notify);
  itemQuickSeek->setGroup(cgPitchinstanceIndex);
  addItem( itemQuickSeek, QStringLiteral( "quickSeek" ) );
  KConfigCompilerSignallingItem  *itemAntiAlias;
  KConfigBaseEE::ItemBool  *innerItemAntiAlias;
  innerItemAntiAlias = new KConfigBaseEE::ItemBool( currentGroup(), QStringLiteral( "antiAlias" ), mAntiAlias, false );
  itemAntiAlias = new KConfigCompilerSignallingItem(innerItemAntiAlias, this, notifyFunction, signalAntiAliasChanged);
  itemAntiAlias->setWriteFlags(KConfigBase::Notify);
  itemAntiAlias->setGroup(cgPitchinstanceIndex);
  addItem( itemAntiAlias, QStringLiteral( "antiAlias" ) );
  KConfigCompilerSignallingItem  *itemSequenceLength;
  KConfigBaseEE::ItemInt  *innerItemSequenceLength;
  innerItemSequenceLength = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "sequenceLength" ), mSequenceLength, 40 );
  itemSequenceLength = new KConfigCompilerSignallingItem(innerItemSequenceLength, this, notifyFunction, signalSequenceLengthChanged);
  innerItemSequenceLength->setMinValue(0);
  innerItemSequenceLength->setMaxValue(100);
  itemSequenceLength->setWriteFlags(KConfigBase::Notify);
  itemSequenceLength->setGroup(cgPitchinstanceIndex);
  addItem( itemSequenceLength, QStringLiteral( "sequenceLength" ) );
  KConfigCompilerSignallingItem  *itemSeekWindow;
  KConfigBaseEE::ItemInt  *innerItemSeekWindow;
  innerItemSeekWindow = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "seekWindow" ), mSeekWindow, 15 );
  itemSeekWindow = new KConfigCompilerSignallingItem(innerItemSeekWindow, this, notifyFunction, signalSeekWindowChanged);
  innerItemSeekWindow->setMinValue(0);
  innerItemSeekWindow->setMaxValue(100);
  itemSeekWindow->setWriteFlags(KConfigBase::Notify);
  itemSeekWindow->setGroup(cgPitchinstanceIndex);
  addItem( itemSeekWindow, QStringLiteral( "seekWindow" ) );
  KConfigCompilerSignallingItem  *itemOverlapLength;
  KConfigBaseEE::ItemInt  *innerItemOverlapLength;
  innerItemOverlapLength = new KConfigBaseEE::ItemInt( currentGroup(), QStringLiteral( "overlapLength" ), mOverlapLength, 8 );
  itemOverlapLength = new KConfigCompilerSignallingItem(innerItemOverlapLength, this, notifyFunction, signalOverlapLengthChanged);
  innerItemOverlapLength->setMinValue(0);
  innerItemOverlapLength->setMaxValue(100);
  itemOverlapLength->setWriteFlags(KConfigBase::Notify);
  itemOverlapLength->setGroup(cgPitchinstanceIndex);
  addItem( itemOverlapLength, QStringLiteral( "overlapLength" ) );
  KConfigCompilerSignallingItem  *itemTempoDifference;
  KConfigBaseEE::ItemDouble  *innerItemTempoDifference;
  innerItemTempoDifference = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "tempoDifference" ), mTempoDifference, 0 );
  itemTempoDifference = new KConfigCompilerSignallingItem(innerItemTempoDifference, this, notifyFunction, signalTempoDifferenceChanged);
  innerItemTempoDifference->setMinValue(-50);
  innerItemTempoDifference->setMaxValue(100);
  itemTempoDifference->setWriteFlags(KConfigBase::Notify);
  itemTempoDifference->setGroup(cgPitchinstanceIndex);
  addItem( itemTempoDifference, QStringLiteral( "tempoDifference" ) );
  KConfigCompilerSignallingItem  *itemRateDifference;
  KConfigBaseEE::ItemDouble  *innerItemRateDifference;
  innerItemRateDifference = new KConfigBaseEE::ItemDouble( currentGroup(), QStringLiteral( "rateDifference" ), mRateDifference, 0 );
  itemRateDifference = new KConfigCompilerSignallingItem(innerItemRateDifference, this, notifyFunction, signalRateDifferenceChanged);
  innerItemRateDifference->setMinValue(-50);
  innerItemRateDifference->setMaxValue(100);
  itemRateDifference->setWriteFlags(KConfigBase::Notify);
  itemRateDifference->setGroup(cgPitchinstanceIndex);
  addItem( itemRateDifference, QStringLiteral( "rateDifference" ) );
}

bool DbPitch::defaultBypassValue_helper() const
{

  return false;
}

double DbPitch::defaultInputGainValue_helper() const
{

  return 0;
}

double DbPitch::defaultOutputGainValue_helper() const
{

  return 0;
}

double DbPitch::defaultDryValue_helper() const
{

  return -100;
}

double DbPitch::defaultWetValue_helper() const
{

  return 0;
}

double DbPitch::defaultCentsValue_helper() const
{

  return 0.0;
}

double DbPitch::defaultSemitonesValue_helper() const
{

  return 0.0;
}

double DbPitch::defaultOctavesValue_helper() const
{

  return 0.0;
}

bool DbPitch::defaultQuickSeekValue_helper() const
{

  return false;
}

bool DbPitch::defaultAntiAliasValue_helper() const
{

  return false;
}

int DbPitch::defaultSequenceLengthValue_helper() const
{

  return 40;
}

int DbPitch::defaultSeekWindowValue_helper() const
{

  return 15;
}

int DbPitch::defaultOverlapLengthValue_helper() const
{

  return 8;
}

double DbPitch::defaultTempoDifferenceValue_helper() const
{

  return 0;
}

double DbPitch::defaultRateDifferenceValue_helper() const
{

  return 0;
}

DbPitch::~DbPitch()
{
}


void DbPitch::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalBypassChanged:
    Q_EMIT bypassChanged();
    break;
  case signalInputGainChanged:
    Q_EMIT inputGainChanged();
    break;
  case signalOutputGainChanged:
    Q_EMIT outputGainChanged();
    break;
  case signalDryChanged:
    Q_EMIT dryChanged();
    break;
  case signalWetChanged:
    Q_EMIT wetChanged();
    break;
  case signalCentsChanged:
    Q_EMIT centsChanged();
    break;
  case signalSemitonesChanged:
    Q_EMIT semitonesChanged();
    break;
  case signalOctavesChanged:
    Q_EMIT octavesChanged();
    break;
  case signalQuickSeekChanged:
    Q_EMIT quickSeekChanged();
    break;
  case signalAntiAliasChanged:
    Q_EMIT antiAliasChanged();
    break;
  case signalSequenceLengthChanged:
    Q_EMIT sequenceLengthChanged();
    break;
  case signalSeekWindowChanged:
    Q_EMIT seekWindowChanged();
    break;
  case signalOverlapLengthChanged:
    Q_EMIT overlapLengthChanged();
    break;
  case signalTempoDifferenceChanged:
    Q_EMIT tempoDifferenceChanged();
    break;
  case signalRateDifferenceChanged:
    Q_EMIT rateDifferenceChanged();
    break;
  }
}
