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

#include "kconfig_base_ee.hpp"

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

class QQmlEngine;
class QJSEngine;

class DbTestSignals : public KConfigBaseEE
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:
    class EnumChannels
    {
      public:
      enum type { left, right, both, COUNT };
    };
    class EnumSignalType
    {
      public:
      enum type { sineWave, whiteNoise, pinkNoise, COUNT };
    };

    static DbTestSignals *self();
    static DbTestSignals *create(QQmlEngine *, QJSEngine *);
    ~DbTestSignals() override;

    /**
      Set enable
    */
    static
    void setEnable( bool v )
    {
      if (v != self()->mEnable && !self()->isEnableImmutable()) {
        self()->mEnable = v;
        Q_EMIT self()->enableChanged();
      }
    }

    Q_PROPERTY(bool enable READ enable WRITE setEnable NOTIFY enableChanged)
    Q_PROPERTY(bool isEnableImmutable READ isEnableImmutable CONSTANT)
    Q_PROPERTY(bool defaultEnableValue READ defaultEnableValue CONSTANT)
    /**
      Get enable
    */
    static
    bool enable()
    {
      return self()->mEnable;
    }

    /**
      Is enable Immutable
    */
    static
    bool isEnableImmutable()
    {
      return self()->isImmutable( QStringLiteral( "enable" ) );
    }

    /**
      Get enable default value
    */
    static
    bool defaultEnableValue()
    {
        return defaultEnableValue_helper();
    }

    /**
      Set Sine Wave Frequency
    */
    static
    void setFrequency( double v )
    {
      if (v < 10)
      {
        qDebug() << "setFrequency: value " << v << " is less than the minimum value of 10";
        v = 10;
      }

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

      if (v != self()->mFrequency && !self()->isFrequencyImmutable()) {
        self()->mFrequency = v;
        Q_EMIT self()->frequencyChanged();
      }
    }

    Q_PROPERTY(double frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged)
    Q_PROPERTY(bool isFrequencyImmutable READ isFrequencyImmutable CONSTANT)
    Q_PROPERTY(double defaultFrequencyValue READ defaultFrequencyValue CONSTANT)
    /**
      Get Sine Wave Frequency
    */
    static
    double frequency()
    {
      return self()->mFrequency;
    }

    /**
      Is Sine Wave Frequency Immutable
    */
    static
    bool isFrequencyImmutable()
    {
      return self()->isImmutable( QStringLiteral( "frequency" ) );
    }

    /**
      Get Sine Wave Frequency default value
    */
    static
    double defaultFrequencyValue()
    {
        return defaultFrequencyValue_helper();
    }

    /**
      Set Type
    */
    static
    void setChannels( int v )
    {
      if (v != self()->mChannels && !self()->isChannelsImmutable()) {
        self()->mChannels = v;
        Q_EMIT self()->channelsChanged();
      }
    }

    Q_PROPERTY(int channels READ channels WRITE setChannels NOTIFY channelsChanged)
    Q_PROPERTY(bool isChannelsImmutable READ isChannelsImmutable CONSTANT)
    Q_PROPERTY(int defaultChannelsValue READ defaultChannelsValue CONSTANT)
    /**
      Get Type
    */
    static
    int channels()
    {
      return self()->mChannels;
    }

    /**
      Is Type Immutable
    */
    static
    bool isChannelsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "channels" ) );
    }

    /**
      Get Type default value
    */
    static
    int defaultChannelsValue()
    {
        return defaultChannelsValue_helper();
    }

    /**
      Set Signal Type
    */
    static
    void setSignalType( int v )
    {
      if (v != self()->mSignalType && !self()->isSignalTypeImmutable()) {
        self()->mSignalType = v;
        Q_EMIT self()->signalTypeChanged();
      }
    }

    Q_PROPERTY(int signalType READ signalType WRITE setSignalType NOTIFY signalTypeChanged)
    Q_PROPERTY(bool isSignalTypeImmutable READ isSignalTypeImmutable CONSTANT)
    Q_PROPERTY(int defaultSignalTypeValue READ defaultSignalTypeValue CONSTANT)
    /**
      Get Signal Type
    */
    static
    int signalType()
    {
      return self()->mSignalType;
    }

    /**
      Is Signal Type Immutable
    */
    static
    bool isSignalTypeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "signalType" ) );
    }

    /**
      Get Signal Type default value
    */
    static
    int defaultSignalTypeValue()
    {
        return defaultSignalTypeValue_helper();
    }


    enum {
      signalEnableChanged = 1,
      signalFrequencyChanged = 2,
      signalChannelsChanged = 3,
      signalSignalTypeChanged = 4
    };

  Q_SIGNALS:
    void enableChanged();

    void frequencyChanged();

    void channelsChanged();

    void signalTypeChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    DbTestSignals();
    friend class DbTestSignalsHelper;


    // TestSignals
    bool mEnable;
    static bool defaultEnableValue_helper();
    double mFrequency;
    static double defaultFrequencyValue_helper();
    int mChannels;
    static int defaultChannelsValue_helper();
    int mSignalType;
    static int defaultSignalTypeValue_helper();
};

#endif

