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

#include "kconfig_base_ee.hpp"

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

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

    DbBassLoudness( const QString & masterGroup, const QString & instanceIndex );
    ~DbBassLoudness() 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 loudness
    */
    void setLoudness( double v )
    {
      if (v < -100)
      {
        qDebug() << "setLoudness: value " << v << " is less than the minimum value of -100";
        v = -100;
      }

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

      if (v != mLoudness && !isLoudnessImmutable()) {
        mLoudness = v;
        Q_EMIT loudnessChanged();
      }
    }

    Q_PROPERTY(double loudness READ loudness WRITE setLoudness NOTIFY loudnessChanged)
    Q_PROPERTY(bool isLoudnessImmutable READ isLoudnessImmutable CONSTANT)
    Q_PROPERTY(double defaultLoudnessValue READ defaultLoudnessValue CONSTANT)
    /**
      Get loudness
    */
    double loudness() const
    {
      return mLoudness;
    }

    /**
      Is loudness Immutable
    */
    bool isLoudnessImmutable() const
    {
      return isImmutable( QStringLiteral( "loudness" ) );
    }

    /**
      Get loudness default value
    */
    double defaultLoudnessValue() const
    {
        return defaultLoudnessValue_helper();
    }

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

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

      if (v != mOutput && !isOutputImmutable()) {
        mOutput = v;
        Q_EMIT outputChanged();
      }
    }

    Q_PROPERTY(double output READ output WRITE setOutput NOTIFY outputChanged)
    Q_PROPERTY(bool isOutputImmutable READ isOutputImmutable CONSTANT)
    Q_PROPERTY(double defaultOutputValue READ defaultOutputValue CONSTANT)
    /**
      Get output
    */
    double output() const
    {
      return mOutput;
    }

    /**
      Is output Immutable
    */
    bool isOutputImmutable() const
    {
      return isImmutable( QStringLiteral( "output" ) );
    }

    /**
      Get output default value
    */
    double defaultOutputValue() const
    {
        return defaultOutputValue_helper();
    }

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

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

      if (v != mLink && !isLinkImmutable()) {
        mLink = v;
        Q_EMIT linkChanged();
      }
    }

    Q_PROPERTY(double link READ link WRITE setLink NOTIFY linkChanged)
    Q_PROPERTY(bool isLinkImmutable READ isLinkImmutable CONSTANT)
    Q_PROPERTY(double defaultLinkValue READ defaultLinkValue CONSTANT)
    /**
      Get link
    */
    double link() const
    {
      return mLink;
    }

    /**
      Is link Immutable
    */
    bool isLinkImmutable() const
    {
      return isImmutable( QStringLiteral( "link" ) );
    }

    /**
      Get link default value
    */
    double defaultLinkValue() const
    {
        return defaultLinkValue_helper();
    }


    enum {
      signalBypassChanged = 1,
      signalInputGainChanged = 2,
      signalOutputGainChanged = 3,
      signalLoudnessChanged = 4,
      signalOutputChanged = 5,
      signalLinkChanged = 6
    };

  Q_SIGNALS:
    void bypassChanged();

    void inputGainChanged();

    void outputGainChanged();

    void loudnessChanged();

    void outputChanged();

    void linkChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // BassLoudness#$(instanceIndex)
    bool mBypass;
    bool defaultBypassValue_helper() const;
    double mInputGain;
    double defaultInputGainValue_helper() const;
    double mOutputGain;
    double defaultOutputGainValue_helper() const;
    double mLoudness;
    double defaultLoudnessValue_helper() const;
    double mOutput;
    double defaultOutputValue_helper() const;
    double mLink;
    double defaultLinkValue_helper() const;
};

#endif

