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

#include "kconfig_base_ee.hpp"

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

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

    DbCrossfeed( const QString & masterGroup, const QString & instanceIndex );
    ~DbCrossfeed() 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 fcut
    */
    void setFcut( int v )
    {
      if (v < 300)
      {
        qDebug() << "setFcut: value " << v << " is less than the minimum value of 300";
        v = 300;
      }

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

      if (v != mFcut && !isFcutImmutable()) {
        mFcut = v;
        Q_EMIT fcutChanged();
      }
    }

    Q_PROPERTY(int fcut READ fcut WRITE setFcut NOTIFY fcutChanged)
    Q_PROPERTY(bool isFcutImmutable READ isFcutImmutable CONSTANT)
    Q_PROPERTY(int defaultFcutValue READ defaultFcutValue CONSTANT)
    /**
      Get fcut
    */
    int fcut() const
    {
      return mFcut;
    }

    /**
      Is fcut Immutable
    */
    bool isFcutImmutable() const
    {
      return isImmutable( QStringLiteral( "fcut" ) );
    }

    /**
      Get fcut default value
    */
    int defaultFcutValue() const
    {
        return defaultFcutValue_helper();
    }

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

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

      if (v != mFeed && !isFeedImmutable()) {
        mFeed = v;
        Q_EMIT feedChanged();
      }
    }

    Q_PROPERTY(double feed READ feed WRITE setFeed NOTIFY feedChanged)
    Q_PROPERTY(bool isFeedImmutable READ isFeedImmutable CONSTANT)
    Q_PROPERTY(double defaultFeedValue READ defaultFeedValue CONSTANT)
    /**
      Get feed
    */
    double feed() const
    {
      return mFeed;
    }

    /**
      Is feed Immutable
    */
    bool isFeedImmutable() const
    {
      return isImmutable( QStringLiteral( "feed" ) );
    }

    /**
      Get feed default value
    */
    double defaultFeedValue() const
    {
        return defaultFeedValue_helper();
    }


    enum {
      signalBypassChanged = 1,
      signalInputGainChanged = 2,
      signalOutputGainChanged = 3,
      signalFcutChanged = 4,
      signalFeedChanged = 5
    };

  Q_SIGNALS:
    void bypassChanged();

    void inputGainChanged();

    void outputGainChanged();

    void fcutChanged();

    void feedChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // Crossfeed#$(instanceIndex)
    bool mBypass;
    bool defaultBypassValue_helper() const;
    double mInputGain;
    double defaultInputGainValue_helper() const;
    double mOutputGain;
    double defaultOutputGainValue_helper() const;
    int mFcut;
    int defaultFcutValue_helper() const;
    double mFeed;
    double defaultFeedValue_helper() const;
};

#endif

