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

#include "kconfig_base_ee.hpp"

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

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

    DbCrosstalkCanceller( const QString & masterGroup, const QString & instanceIndex );
    ~DbCrosstalkCanceller() 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 phantomCenterOnly
    */
    void setPhantomCenterOnly( bool v )
    {
      if (v != mPhantomCenterOnly && !isPhantomCenterOnlyImmutable()) {
        mPhantomCenterOnly = v;
        Q_EMIT phantomCenterOnlyChanged();
      }
    }

    Q_PROPERTY(bool phantomCenterOnly READ phantomCenterOnly WRITE setPhantomCenterOnly NOTIFY phantomCenterOnlyChanged)
    Q_PROPERTY(bool isPhantomCenterOnlyImmutable READ isPhantomCenterOnlyImmutable CONSTANT)
    Q_PROPERTY(bool defaultPhantomCenterOnlyValue READ defaultPhantomCenterOnlyValue CONSTANT)
    /**
      Get phantomCenterOnly
    */
    bool phantomCenterOnly() const
    {
      return mPhantomCenterOnly;
    }

    /**
      Is phantomCenterOnly Immutable
    */
    bool isPhantomCenterOnlyImmutable() const
    {
      return isImmutable( QStringLiteral( "phantomCenterOnly" ) );
    }

    /**
      Get phantomCenterOnly default value
    */
    bool defaultPhantomCenterOnlyValue() const
    {
        return defaultPhantomCenterOnlyValue_helper();
    }

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

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

      if (v != mDelayUs && !isDelayUsImmutable()) {
        mDelayUs = v;
        Q_EMIT delayUsChanged();
      }
    }

    Q_PROPERTY(double delayUs READ delayUs WRITE setDelayUs NOTIFY delayUsChanged)
    Q_PROPERTY(bool isDelayUsImmutable READ isDelayUsImmutable CONSTANT)
    Q_PROPERTY(double defaultDelayUsValue READ defaultDelayUsValue CONSTANT)
    /**
      Get delayUs
    */
    double delayUs() const
    {
      return mDelayUs;
    }

    /**
      Is delayUs Immutable
    */
    bool isDelayUsImmutable() const
    {
      return isImmutable( QStringLiteral( "delayUs" ) );
    }

    /**
      Get delayUs default value
    */
    double defaultDelayUsValue() const
    {
        return defaultDelayUsValue_helper();
    }

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

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

      if (v != mDecayDb && !isDecayDbImmutable()) {
        mDecayDb = v;
        Q_EMIT decayDbChanged();
      }
    }

    Q_PROPERTY(double decayDb READ decayDb WRITE setDecayDb NOTIFY decayDbChanged)
    Q_PROPERTY(bool isDecayDbImmutable READ isDecayDbImmutable CONSTANT)
    Q_PROPERTY(double defaultDecayDbValue READ defaultDecayDbValue CONSTANT)
    /**
      Get decayDb
    */
    double decayDb() const
    {
      return mDecayDb;
    }

    /**
      Is decayDb Immutable
    */
    bool isDecayDbImmutable() const
    {
      return isImmutable( QStringLiteral( "decayDb" ) );
    }

    /**
      Get decayDb default value
    */
    double defaultDecayDbValue() const
    {
        return defaultDecayDbValue_helper();
    }


    enum {
      signalBypassChanged = 1,
      signalInputGainChanged = 2,
      signalOutputGainChanged = 3,
      signalPhantomCenterOnlyChanged = 4,
      signalDelayUsChanged = 5,
      signalDecayDbChanged = 6
    };

  Q_SIGNALS:
    void bypassChanged();

    void inputGainChanged();

    void outputGainChanged();

    void phantomCenterOnlyChanged();

    void delayUsChanged();

    void decayDbChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // CrosstalkCanceller#$(instanceIndex)
    bool mBypass;
    bool defaultBypassValue_helper() const;
    double mInputGain;
    double defaultInputGainValue_helper() const;
    double mOutputGain;
    double defaultOutputGainValue_helper() const;
    bool mPhantomCenterOnly;
    bool defaultPhantomCenterOnlyValue_helper() const;
    double mDelayUs;
    double defaultDelayUsValue_helper() const;
    double mDecayDb;
    double defaultDecayDbValue_helper() const;
};

#endif

