// This file is generated by kconfig_compiler_kf6 from easyeffects_db_crusher.kcfg.
// All changes you do to this file will be lost.
#ifndef DBCRUSHER_H
#define DBCRUSHER_H

#include "kconfig_base_ee.hpp"

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>
#include <qqmlintegration.h>

class DbCrusher : public KConfigBaseEE
{
  Q_OBJECT
  QML_ELEMENT
  QML_UNCREATABLE("")
  public:

    DbCrusher( const QString & masterGroup, const QString & instanceIndex );
    ~DbCrusher() override;

    /**
      Set bypass
    */
    void setBypass( bool v )
    {
      if (v != mBypass && !isBypassImmutable()) {
        mBypass = v;
        Q_EMIT bypassChanged();
      }
    }

    Q_PROPERTY(bool bypass READ bypass WRITE setBypass NOTIFY bypassChanged)
    Q_PROPERTY(bool isBypassImmutable READ isBypassImmutable CONSTANT)
    Q_PROPERTY(bool defaultBypassValue READ defaultBypassValue CONSTANT)
    /**
      Get bypass
    */
    bool bypass() const
    {
      return mBypass;
    }

    /**
      Is bypass Immutable
    */
    bool isBypassImmutable() const
    {
      return isImmutable( QStringLiteral( "bypass" ) );
    }

    /**
      Get bypass default value
    */
    bool defaultBypassValue() const
    {
        return defaultBypassValue_helper();
    }

    /**
      Set inputGain
    */
    void setInputGain( double v )
    {
      if (v < -36)
      {
        qDebug() << "setInputGain: value " << v << " is less than the minimum value of -36";
        v = -36;
      }

      if (v > 36)
      {
        qDebug() << "setInputGain: value " << v << " is greater than the maximum value of 36";
        v = 36;
      }

      if (v != mInputGain && !isInputGainImmutable()) {
        mInputGain = v;
        Q_EMIT inputGainChanged();
      }
    }

    Q_PROPERTY(double inputGain READ inputGain WRITE setInputGain NOTIFY inputGainChanged)
    Q_PROPERTY(bool isInputGainImmutable READ isInputGainImmutable CONSTANT)
    Q_PROPERTY(double defaultInputGainValue READ defaultInputGainValue CONSTANT)
    /**
      Get inputGain
    */
    double inputGain() const
    {
      return mInputGain;
    }

    /**
      Is inputGain Immutable
    */
    bool isInputGainImmutable() const
    {
      return isImmutable( QStringLiteral( "inputGain" ) );
    }

    /**
      Get inputGain default value
    */
    double defaultInputGainValue() const
    {
        return defaultInputGainValue_helper();
    }

    /**
      Set outputGain
    */
    void setOutputGain( double v )
    {
      if (v < -36)
      {
        qDebug() << "setOutputGain: value " << v << " is less than the minimum value of -36";
        v = -36;
      }

      if (v > 36)
      {
        qDebug() << "setOutputGain: value " << v << " is greater than the maximum value of 36";
        v = 36;
      }

      if (v != mOutputGain && !isOutputGainImmutable()) {
        mOutputGain = v;
        Q_EMIT outputGainChanged();
      }
    }

    Q_PROPERTY(double outputGain READ outputGain WRITE setOutputGain NOTIFY outputGainChanged)
    Q_PROPERTY(bool isOutputGainImmutable READ isOutputGainImmutable CONSTANT)
    Q_PROPERTY(double defaultOutputGainValue READ defaultOutputGainValue CONSTANT)
    /**
      Get outputGain
    */
    double outputGain() const
    {
      return mOutputGain;
    }

    /**
      Is outputGain Immutable
    */
    bool isOutputGainImmutable() const
    {
      return isImmutable( QStringLiteral( "outputGain" ) );
    }

    /**
      Get outputGain default value
    */
    double defaultOutputGainValue() const
    {
        return defaultOutputGainValue_helper();
    }

    /**
      Set modeLabels
    */
    void setModeLabels( const QStringList & v )
    {
      if (v != mModeLabels && !isModeLabelsImmutable()) {
        mModeLabels = v;
        Q_EMIT modeLabelsChanged();
      }
    }

    Q_PROPERTY(QStringList modeLabels READ modeLabels WRITE setModeLabels NOTIFY modeLabelsChanged)
    Q_PROPERTY(bool isModeLabelsImmutable READ isModeLabelsImmutable CONSTANT)
    Q_PROPERTY(QStringList defaultModeLabelsValue READ defaultModeLabelsValue CONSTANT)
    /**
      Get modeLabels
    */
    QStringList modeLabels() const
    {
      return mModeLabels;
    }

    /**
      Is modeLabels Immutable
    */
    bool isModeLabelsImmutable() const
    {
      return isImmutable( QStringLiteral( "modeLabels" ) );
    }

    /**
      Get modeLabels default value
    */
    QStringList defaultModeLabelsValue() const
    {
        return defaultModeLabelsValue_helper();
    }

    /**
      Set Mode
    */
    void setMode( int v )
    {
      if (v != mMode && !isModeImmutable()) {
        mMode = v;
        Q_EMIT modeChanged();
      }
    }

    Q_PROPERTY(int mode READ mode WRITE setMode NOTIFY modeChanged)
    Q_PROPERTY(bool isModeImmutable READ isModeImmutable CONSTANT)
    Q_PROPERTY(int defaultModeValue READ defaultModeValue CONSTANT)
    /**
      Get Mode
    */
    int mode() const
    {
      return mMode;
    }

    /**
      Is Mode Immutable
    */
    bool isModeImmutable() const
    {
      return isImmutable( QStringLiteral( "mode" ) );
    }

    /**
      Get Mode default value
    */
    int defaultModeValue() const
    {
        return defaultModeValue_helper();
    }

    /**
      Set bitReduction
    */
    void setBitReduction( double v )
    {
      if (v < 1.0)
      {
        qDebug() << "setBitReduction: value " << v << " is less than the minimum value of 1.0";
        v = 1.0;
      }

      if (v > 16.0)
      {
        qDebug() << "setBitReduction: value " << v << " is greater than the maximum value of 16.0";
        v = 16.0;
      }

      if (v != mBitReduction && !isBitReductionImmutable()) {
        mBitReduction = v;
        Q_EMIT bitReductionChanged();
      }
    }

    Q_PROPERTY(double bitReduction READ bitReduction WRITE setBitReduction NOTIFY bitReductionChanged)
    Q_PROPERTY(bool isBitReductionImmutable READ isBitReductionImmutable CONSTANT)
    Q_PROPERTY(double defaultBitReductionValue READ defaultBitReductionValue CONSTANT)
    /**
      Get bitReduction
    */
    double bitReduction() const
    {
      return mBitReduction;
    }

    /**
      Is bitReduction Immutable
    */
    bool isBitReductionImmutable() const
    {
      return isImmutable( QStringLiteral( "bitReduction" ) );
    }

    /**
      Get bitReduction default value
    */
    double defaultBitReductionValue() const
    {
        return defaultBitReductionValue_helper();
    }

    /**
      Set morph
    */
    void setMorph( double v )
    {
      if (v < 0)
      {
        qDebug() << "setMorph: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

      if (v > 1)
      {
        qDebug() << "setMorph: value " << v << " is greater than the maximum value of 1";
        v = 1;
      }

      if (v != mMorph && !isMorphImmutable()) {
        mMorph = v;
        Q_EMIT morphChanged();
      }
    }

    Q_PROPERTY(double morph READ morph WRITE setMorph NOTIFY morphChanged)
    Q_PROPERTY(bool isMorphImmutable READ isMorphImmutable CONSTANT)
    Q_PROPERTY(double defaultMorphValue READ defaultMorphValue CONSTANT)
    /**
      Get morph
    */
    double morph() const
    {
      return mMorph;
    }

    /**
      Is morph Immutable
    */
    bool isMorphImmutable() const
    {
      return isImmutable( QStringLiteral( "morph" ) );
    }

    /**
      Get morph default value
    */
    double defaultMorphValue() const
    {
        return defaultMorphValue_helper();
    }

    /**
      Set dc
    */
    void setDc( double v )
    {
      if (v < -12.041)
      {
        qDebug() << "setDc: value " << v << " is less than the minimum value of -12.041";
        v = -12.041;
      }

      if (v > 12.041)
      {
        qDebug() << "setDc: value " << v << " is greater than the maximum value of 12.041";
        v = 12.041;
      }

      if (v != mDc && !isDcImmutable()) {
        mDc = v;
        Q_EMIT dcChanged();
      }
    }

    Q_PROPERTY(double dc READ dc WRITE setDc NOTIFY dcChanged)
    Q_PROPERTY(bool isDcImmutable READ isDcImmutable CONSTANT)
    Q_PROPERTY(double defaultDcValue READ defaultDcValue CONSTANT)
    /**
      Get dc
    */
    double dc() const
    {
      return mDc;
    }

    /**
      Is dc Immutable
    */
    bool isDcImmutable() const
    {
      return isImmutable( QStringLiteral( "dc" ) );
    }

    /**
      Get dc default value
    */
    double defaultDcValue() const
    {
        return defaultDcValue_helper();
    }

    /**
      Set antiAliasing
    */
    void setAntiAliasing( double v )
    {
      if (v < 0)
      {
        qDebug() << "setAntiAliasing: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

      if (v > 1)
      {
        qDebug() << "setAntiAliasing: value " << v << " is greater than the maximum value of 1";
        v = 1;
      }

      if (v != mAntiAliasing && !isAntiAliasingImmutable()) {
        mAntiAliasing = v;
        Q_EMIT antiAliasingChanged();
      }
    }

    Q_PROPERTY(double antiAliasing READ antiAliasing WRITE setAntiAliasing NOTIFY antiAliasingChanged)
    Q_PROPERTY(bool isAntiAliasingImmutable READ isAntiAliasingImmutable CONSTANT)
    Q_PROPERTY(double defaultAntiAliasingValue READ defaultAntiAliasingValue CONSTANT)
    /**
      Get antiAliasing
    */
    double antiAliasing() const
    {
      return mAntiAliasing;
    }

    /**
      Is antiAliasing Immutable
    */
    bool isAntiAliasingImmutable() const
    {
      return isImmutable( QStringLiteral( "antiAliasing" ) );
    }

    /**
      Get antiAliasing default value
    */
    double defaultAntiAliasingValue() const
    {
        return defaultAntiAliasingValue_helper();
    }

    /**
      Set sampleReduction
    */
    void setSampleReduction( int v )
    {
      if (v < 1)
      {
        qDebug() << "setSampleReduction: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 250)
      {
        qDebug() << "setSampleReduction: value " << v << " is greater than the maximum value of 250";
        v = 250;
      }

      if (v != mSampleReduction && !isSampleReductionImmutable()) {
        mSampleReduction = v;
        Q_EMIT sampleReductionChanged();
      }
    }

    Q_PROPERTY(int sampleReduction READ sampleReduction WRITE setSampleReduction NOTIFY sampleReductionChanged)
    Q_PROPERTY(bool isSampleReductionImmutable READ isSampleReductionImmutable CONSTANT)
    Q_PROPERTY(int defaultSampleReductionValue READ defaultSampleReductionValue CONSTANT)
    /**
      Get sampleReduction
    */
    int sampleReduction() const
    {
      return mSampleReduction;
    }

    /**
      Is sampleReduction Immutable
    */
    bool isSampleReductionImmutable() const
    {
      return isImmutable( QStringLiteral( "sampleReduction" ) );
    }

    /**
      Get sampleReduction default value
    */
    int defaultSampleReductionValue() const
    {
        return defaultSampleReductionValue_helper();
    }

    /**
      Set lfoActive
    */
    void setLfoActive( bool v )
    {
      if (v != mLfoActive && !isLfoActiveImmutable()) {
        mLfoActive = v;
        Q_EMIT lfoActiveChanged();
      }
    }

    Q_PROPERTY(bool lfoActive READ lfoActive WRITE setLfoActive NOTIFY lfoActiveChanged)
    Q_PROPERTY(bool isLfoActiveImmutable READ isLfoActiveImmutable CONSTANT)
    Q_PROPERTY(bool defaultLfoActiveValue READ defaultLfoActiveValue CONSTANT)
    /**
      Get lfoActive
    */
    bool lfoActive() const
    {
      return mLfoActive;
    }

    /**
      Is lfoActive Immutable
    */
    bool isLfoActiveImmutable() const
    {
      return isImmutable( QStringLiteral( "lfoActive" ) );
    }

    /**
      Get lfoActive default value
    */
    bool defaultLfoActiveValue() const
    {
        return defaultLfoActiveValue_helper();
    }

    /**
      Set lfoRange
    */
    void setLfoRange( int v )
    {
      if (v < 1)
      {
        qDebug() << "setLfoRange: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 250)
      {
        qDebug() << "setLfoRange: value " << v << " is greater than the maximum value of 250";
        v = 250;
      }

      if (v != mLfoRange && !isLfoRangeImmutable()) {
        mLfoRange = v;
        Q_EMIT lfoRangeChanged();
      }
    }

    Q_PROPERTY(int lfoRange READ lfoRange WRITE setLfoRange NOTIFY lfoRangeChanged)
    Q_PROPERTY(bool isLfoRangeImmutable READ isLfoRangeImmutable CONSTANT)
    Q_PROPERTY(int defaultLfoRangeValue READ defaultLfoRangeValue CONSTANT)
    /**
      Get lfoRange
    */
    int lfoRange() const
    {
      return mLfoRange;
    }

    /**
      Is lfoRange Immutable
    */
    bool isLfoRangeImmutable() const
    {
      return isImmutable( QStringLiteral( "lfoRange" ) );
    }

    /**
      Get lfoRange default value
    */
    int defaultLfoRangeValue() const
    {
        return defaultLfoRangeValue_helper();
    }

    /**
      Set lfoRate
    */
    void setLfoRate( double v )
    {
      if (v < 0.01)
      {
        qDebug() << "setLfoRate: value " << v << " is less than the minimum value of 0.01";
        v = 0.01;
      }

      if (v > 200)
      {
        qDebug() << "setLfoRate: value " << v << " is greater than the maximum value of 200";
        v = 200;
      }

      if (v != mLfoRate && !isLfoRateImmutable()) {
        mLfoRate = v;
        Q_EMIT lfoRateChanged();
      }
    }

    Q_PROPERTY(double lfoRate READ lfoRate WRITE setLfoRate NOTIFY lfoRateChanged)
    Q_PROPERTY(bool isLfoRateImmutable READ isLfoRateImmutable CONSTANT)
    Q_PROPERTY(double defaultLfoRateValue READ defaultLfoRateValue CONSTANT)
    /**
      Get lfoRate
    */
    double lfoRate() const
    {
      return mLfoRate;
    }

    /**
      Is lfoRate Immutable
    */
    bool isLfoRateImmutable() const
    {
      return isImmutable( QStringLiteral( "lfoRate" ) );
    }

    /**
      Get lfoRate default value
    */
    double defaultLfoRateValue() const
    {
        return defaultLfoRateValue_helper();
    }


    enum {
      signalBypassChanged = 1,
      signalInputGainChanged = 2,
      signalOutputGainChanged = 3,
      signalModeLabelsChanged = 4,
      signalModeChanged = 5,
      signalBitReductionChanged = 6,
      signalMorphChanged = 7,
      signalDcChanged = 8,
      signalAntiAliasingChanged = 9,
      signalSampleReductionChanged = 10,
      signalLfoActiveChanged = 11,
      signalLfoRangeChanged = 12,
      signalLfoRateChanged = 13
    };

  Q_SIGNALS:
    void bypassChanged();

    void inputGainChanged();

    void outputGainChanged();

    void modeLabelsChanged();

    void modeChanged();

    void bitReductionChanged();

    void morphChanged();

    void dcChanged();

    void antiAliasingChanged();

    void sampleReductionChanged();

    void lfoActiveChanged();

    void lfoRangeChanged();

    void lfoRateChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // Crusher#$(instanceIndex)
    bool mBypass;
    bool defaultBypassValue_helper() const;
    double mInputGain;
    double defaultInputGainValue_helper() const;
    double mOutputGain;
    double defaultOutputGainValue_helper() const;
    QStringList mModeLabels;
    QStringList defaultModeLabelsValue_helper() const;
    int mMode;
    int defaultModeValue_helper() const;
    double mBitReduction;
    double defaultBitReductionValue_helper() const;
    double mMorph;
    double defaultMorphValue_helper() const;
    double mDc;
    double defaultDcValue_helper() const;
    double mAntiAliasing;
    double defaultAntiAliasingValue_helper() const;
    int mSampleReduction;
    int defaultSampleReductionValue_helper() const;
    bool mLfoActive;
    bool defaultLfoActiveValue_helper() const;
    int mLfoRange;
    int defaultLfoRangeValue_helper() const;
    double mLfoRate;
    double defaultLfoRateValue_helper() const;
};

#endif

