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

#include "kconfig_base_ee.hpp"

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

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

    DbLoudness( const QString & masterGroup, const QString & instanceIndex );
    ~DbLoudness() 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 fftLabels
    */
    void setFftLabels( const QStringList & v )
    {
      if (v != mFftLabels && !isFftLabelsImmutable()) {
        mFftLabels = v;
        Q_EMIT fftLabelsChanged();
      }
    }

    Q_PROPERTY(QStringList fftLabels READ fftLabels WRITE setFftLabels NOTIFY fftLabelsChanged)
    Q_PROPERTY(bool isFftLabelsImmutable READ isFftLabelsImmutable CONSTANT)
    Q_PROPERTY(QStringList defaultFftLabelsValue READ defaultFftLabelsValue CONSTANT)
    /**
      Get fftLabels
    */
    QStringList fftLabels() const
    {
      return mFftLabels;
    }

    /**
      Is fftLabels Immutable
    */
    bool isFftLabelsImmutable() const
    {
      return isImmutable( QStringLiteral( "fftLabels" ) );
    }

    /**
      Get fftLabels default value
    */
    QStringList defaultFftLabelsValue() const
    {
        return defaultFftLabelsValue_helper();
    }

    /**
      Set fft
    */
    void setFft( int v )
    {
      if (v != mFft && !isFftImmutable()) {
        mFft = v;
        Q_EMIT fftChanged();
      }
    }

    Q_PROPERTY(int fft READ fft WRITE setFft NOTIFY fftChanged)
    Q_PROPERTY(bool isFftImmutable READ isFftImmutable CONSTANT)
    Q_PROPERTY(int defaultFftValue READ defaultFftValue CONSTANT)
    /**
      Get fft
    */
    int fft() const
    {
      return mFft;
    }

    /**
      Is fft Immutable
    */
    bool isFftImmutable() const
    {
      return isImmutable( QStringLiteral( "fft" ) );
    }

    /**
      Get fft default value
    */
    int defaultFftValue() const
    {
        return defaultFftValue_helper();
    }

    /**
      Set stdLabels
    */
    void setStdLabels( const QStringList & v )
    {
      if (v != mStdLabels && !isStdLabelsImmutable()) {
        mStdLabels = v;
        Q_EMIT stdLabelsChanged();
      }
    }

    Q_PROPERTY(QStringList stdLabels READ stdLabels WRITE setStdLabels NOTIFY stdLabelsChanged)
    Q_PROPERTY(bool isStdLabelsImmutable READ isStdLabelsImmutable CONSTANT)
    Q_PROPERTY(QStringList defaultStdLabelsValue READ defaultStdLabelsValue CONSTANT)
    /**
      Get stdLabels
    */
    QStringList stdLabels() const
    {
      return mStdLabels;
    }

    /**
      Is stdLabels Immutable
    */
    bool isStdLabelsImmutable() const
    {
      return isImmutable( QStringLiteral( "stdLabels" ) );
    }

    /**
      Get stdLabels default value
    */
    QStringList defaultStdLabelsValue() const
    {
        return defaultStdLabelsValue_helper();
    }

    /**
      Set std
    */
    void setStd( int v )
    {
      if (v != mStd && !isStdImmutable()) {
        mStd = v;
        Q_EMIT stdChanged();
      }
    }

    Q_PROPERTY(int std READ std WRITE setStd NOTIFY stdChanged)
    Q_PROPERTY(bool isStdImmutable READ isStdImmutable CONSTANT)
    Q_PROPERTY(int defaultStdValue READ defaultStdValue CONSTANT)
    /**
      Get std
    */
    int std() const
    {
      return mStd;
    }

    /**
      Is std Immutable
    */
    bool isStdImmutable() const
    {
      return isImmutable( QStringLiteral( "std" ) );
    }

    /**
      Get std default value
    */
    int defaultStdValue() const
    {
        return defaultStdValue_helper();
    }

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

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

      if (v != mVolume && !isVolumeImmutable()) {
        mVolume = v;
        Q_EMIT volumeChanged();
      }
    }

    Q_PROPERTY(double volume READ volume WRITE setVolume NOTIFY volumeChanged)
    Q_PROPERTY(bool isVolumeImmutable READ isVolumeImmutable CONSTANT)
    Q_PROPERTY(double defaultVolumeValue READ defaultVolumeValue CONSTANT)
    /**
      Get volume
    */
    double volume() const
    {
      return mVolume;
    }

    /**
      Is volume Immutable
    */
    bool isVolumeImmutable() const
    {
      return isImmutable( QStringLiteral( "volume" ) );
    }

    /**
      Get volume default value
    */
    double defaultVolumeValue() const
    {
        return defaultVolumeValue_helper();
    }

    /**
      Set clipping
    */
    void setClipping( bool v )
    {
      if (v != mClipping && !isClippingImmutable()) {
        mClipping = v;
        Q_EMIT clippingChanged();
      }
    }

    Q_PROPERTY(bool clipping READ clipping WRITE setClipping NOTIFY clippingChanged)
    Q_PROPERTY(bool isClippingImmutable READ isClippingImmutable CONSTANT)
    Q_PROPERTY(bool defaultClippingValue READ defaultClippingValue CONSTANT)
    /**
      Get clipping
    */
    bool clipping() const
    {
      return mClipping;
    }

    /**
      Is clipping Immutable
    */
    bool isClippingImmutable() const
    {
      return isImmutable( QStringLiteral( "clipping" ) );
    }

    /**
      Get clipping default value
    */
    bool defaultClippingValue() const
    {
        return defaultClippingValue_helper();
    }

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

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

      if (v != mClippingRange && !isClippingRangeImmutable()) {
        mClippingRange = v;
        Q_EMIT clippingRangeChanged();
      }
    }

    Q_PROPERTY(double clippingRange READ clippingRange WRITE setClippingRange NOTIFY clippingRangeChanged)
    Q_PROPERTY(bool isClippingRangeImmutable READ isClippingRangeImmutable CONSTANT)
    Q_PROPERTY(double defaultClippingRangeValue READ defaultClippingRangeValue CONSTANT)
    /**
      Get clippingRange
    */
    double clippingRange() const
    {
      return mClippingRange;
    }

    /**
      Is clippingRange Immutable
    */
    bool isClippingRangeImmutable() const
    {
      return isImmutable( QStringLiteral( "clippingRange" ) );
    }

    /**
      Get clippingRange default value
    */
    double defaultClippingRangeValue() const
    {
        return defaultClippingRangeValue_helper();
    }

    /**
      Set iirApproximationLabels
    */
    void setIirApproximationLabels( const QStringList & v )
    {
      if (v != mIirApproximationLabels && !isIirApproximationLabelsImmutable()) {
        mIirApproximationLabels = v;
        Q_EMIT iirApproximationLabelsChanged();
      }
    }

    Q_PROPERTY(QStringList iirApproximationLabels READ iirApproximationLabels WRITE setIirApproximationLabels NOTIFY iirApproximationLabelsChanged)
    Q_PROPERTY(bool isIirApproximationLabelsImmutable READ isIirApproximationLabelsImmutable CONSTANT)
    Q_PROPERTY(QStringList defaultIirApproximationLabelsValue READ defaultIirApproximationLabelsValue CONSTANT)
    /**
      Get iirApproximationLabels
    */
    QStringList iirApproximationLabels() const
    {
      return mIirApproximationLabels;
    }

    /**
      Is iirApproximationLabels Immutable
    */
    bool isIirApproximationLabelsImmutable() const
    {
      return isImmutable( QStringLiteral( "iirApproximationLabels" ) );
    }

    /**
      Get iirApproximationLabels default value
    */
    QStringList defaultIirApproximationLabelsValue() const
    {
        return defaultIirApproximationLabelsValue_helper();
    }

    /**
      Set iirApproximation
    */
    void setIirApproximation( int v )
    {
      if (v != mIirApproximation && !isIirApproximationImmutable()) {
        mIirApproximation = v;
        Q_EMIT iirApproximationChanged();
      }
    }

    Q_PROPERTY(int iirApproximation READ iirApproximation WRITE setIirApproximation NOTIFY iirApproximationChanged)
    Q_PROPERTY(bool isIirApproximationImmutable READ isIirApproximationImmutable CONSTANT)
    Q_PROPERTY(int defaultIirApproximationValue READ defaultIirApproximationValue CONSTANT)
    /**
      Get iirApproximation
    */
    int iirApproximation() const
    {
      return mIirApproximation;
    }

    /**
      Is iirApproximation Immutable
    */
    bool isIirApproximationImmutable() const
    {
      return isImmutable( QStringLiteral( "iirApproximation" ) );
    }

    /**
      Get iirApproximation default value
    */
    int defaultIirApproximationValue() const
    {
        return defaultIirApproximationValue_helper();
    }


    enum {
      signalBypassChanged = 1,
      signalInputGainChanged = 2,
      signalOutputGainChanged = 3,
      signalModeLabelsChanged = 4,
      signalModeChanged = 5,
      signalFftLabelsChanged = 6,
      signalFftChanged = 7,
      signalStdLabelsChanged = 8,
      signalStdChanged = 9,
      signalVolumeChanged = 10,
      signalClippingChanged = 11,
      signalClippingRangeChanged = 12,
      signalIirApproximationLabelsChanged = 13,
      signalIirApproximationChanged = 14
    };

  Q_SIGNALS:
    void bypassChanged();

    void inputGainChanged();

    void outputGainChanged();

    void modeLabelsChanged();

    void modeChanged();

    void fftLabelsChanged();

    void fftChanged();

    void stdLabelsChanged();

    void stdChanged();

    void volumeChanged();

    void clippingChanged();

    void clippingRangeChanged();

    void iirApproximationLabelsChanged();

    void iirApproximationChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // Loudness#$(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;
    QStringList mFftLabels;
    QStringList defaultFftLabelsValue_helper() const;
    int mFft;
    int defaultFftValue_helper() const;
    QStringList mStdLabels;
    QStringList defaultStdLabelsValue_helper() const;
    int mStd;
    int defaultStdValue_helper() const;
    double mVolume;
    double defaultVolumeValue_helper() const;
    bool mClipping;
    bool defaultClippingValue_helper() const;
    double mClippingRange;
    double defaultClippingRangeValue_helper() const;
    QStringList mIirApproximationLabels;
    QStringList defaultIirApproximationLabelsValue_helper() const;
    int mIirApproximation;
    int defaultIirApproximationValue_helper() const;
};

#endif

