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

#include "kconfig_base_ee.hpp"

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

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

    DbLevelMeter( const QString & masterGroup, const QString & instanceIndex );
    ~DbLevelMeter() 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();
    }


    enum {
      signalBypassChanged = 1
    };

  Q_SIGNALS:
    void bypassChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    QString mParammasterGroup;
    QString mParaminstanceIndex;

    // LevelMeter#$(instanceIndex)
    bool mBypass;
    bool defaultBypassValue_helper() const;
};

#endif

