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

#include "kconfig_base_ee.hpp"

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

class QQmlEngine;
class QJSEngine;

class DbSpectrum : public KConfigBaseEE
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:
    class EnumSpectrumShape
    {
      public:
      enum type { bars, lines, dots, area, COUNT };
    };

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

    /**
      Set Show the Spectrum Analyzer.
    */
    static
    void setState( bool v )
    {
      if (v != self()->mState && !self()->isStateImmutable()) {
        self()->mState = v;
        Q_EMIT self()->stateChanged();
      }
    }

    Q_PROPERTY(bool state READ state WRITE setState NOTIFY stateChanged)
    Q_PROPERTY(bool isStateImmutable READ isStateImmutable CONSTANT)
    Q_PROPERTY(bool defaultStateValue READ defaultStateValue CONSTANT)
    /**
      Get Show the Spectrum Analyzer.
    */
    static
    bool state()
    {
      return self()->mState;
    }

    /**
      Is Show the Spectrum Analyzer. Immutable
    */
    static
    bool isStateImmutable()
    {
      return self()->isImmutable( QStringLiteral( "state" ) );
    }

    /**
      Get Show the Spectrum Analyzer. default value
    */
    static
    bool defaultStateValue()
    {
        return defaultStateValue_helper();
    }

    /**
      Set Enable Dynamic Scaling for the Vertical Axis
    */
    static
    void setDynamicYScale( bool v )
    {
      if (v != self()->mDynamicYScale && !self()->isDynamicYScaleImmutable()) {
        self()->mDynamicYScale = v;
        Q_EMIT self()->dynamicYScaleChanged();
      }
    }

    Q_PROPERTY(bool dynamicYScale READ dynamicYScale WRITE setDynamicYScale NOTIFY dynamicYScaleChanged)
    Q_PROPERTY(bool isDynamicYScaleImmutable READ isDynamicYScaleImmutable CONSTANT)
    Q_PROPERTY(bool defaultDynamicYScaleValue READ defaultDynamicYScaleValue CONSTANT)
    /**
      Get Enable Dynamic Scaling for the Vertical Axis
    */
    static
    bool dynamicYScale()
    {
      return self()->mDynamicYScale;
    }

    /**
      Is Enable Dynamic Scaling for the Vertical Axis Immutable
    */
    static
    bool isDynamicYScaleImmutable()
    {
      return self()->isImmutable( QStringLiteral( "dynamicYScale" ) );
    }

    /**
      Get Enable Dynamic Scaling for the Vertical Axis default value
    */
    static
    bool defaultDynamicYScaleValue()
    {
        return defaultDynamicYScaleValue_helper();
    }

    /**
      Set Enable logarithmic scale for the Frequency Axis
    */
    static
    void setLogarithmicHorizontalAxis( bool v )
    {
      if (v != self()->mLogarithmicHorizontalAxis && !self()->isLogarithmicHorizontalAxisImmutable()) {
        self()->mLogarithmicHorizontalAxis = v;
        Q_EMIT self()->logarithmicHorizontalAxisChanged();
      }
    }

    Q_PROPERTY(bool logarithmicHorizontalAxis READ logarithmicHorizontalAxis WRITE setLogarithmicHorizontalAxis NOTIFY logarithmicHorizontalAxisChanged)
    Q_PROPERTY(bool isLogarithmicHorizontalAxisImmutable READ isLogarithmicHorizontalAxisImmutable CONSTANT)
    Q_PROPERTY(bool defaultLogarithmicHorizontalAxisValue READ defaultLogarithmicHorizontalAxisValue CONSTANT)
    /**
      Get Enable logarithmic scale for the Frequency Axis
    */
    static
    bool logarithmicHorizontalAxis()
    {
      return self()->mLogarithmicHorizontalAxis;
    }

    /**
      Is Enable logarithmic scale for the Frequency Axis Immutable
    */
    static
    bool isLogarithmicHorizontalAxisImmutable()
    {
      return self()->isImmutable( QStringLiteral( "logarithmicHorizontalAxis" ) );
    }

    /**
      Get Enable logarithmic scale for the Frequency Axis default value
    */
    static
    bool defaultLogarithmicHorizontalAxisValue()
    {
        return defaultLogarithmicHorizontalAxisValue_helper();
    }

    /**
      Set Spectrum Type
    */
    static
    void setSpectrumShape( int v )
    {
      if (v != self()->mSpectrumShape && !self()->isSpectrumShapeImmutable()) {
        self()->mSpectrumShape = v;
        Q_EMIT self()->spectrumShapeChanged();
      }
    }

    Q_PROPERTY(int spectrumShape READ spectrumShape WRITE setSpectrumShape NOTIFY spectrumShapeChanged)
    Q_PROPERTY(bool isSpectrumShapeImmutable READ isSpectrumShapeImmutable CONSTANT)
    Q_PROPERTY(int defaultSpectrumShapeValue READ defaultSpectrumShapeValue CONSTANT)
    /**
      Get Spectrum Type
    */
    static
    int spectrumShape()
    {
      return self()->mSpectrumShape;
    }

    /**
      Is Spectrum Type Immutable
    */
    static
    bool isSpectrumShapeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "spectrumShape" ) );
    }

    /**
      Get Spectrum Type default value
    */
    static
    int defaultSpectrumShapeValue()
    {
        return defaultSpectrumShapeValue_helper();
    }

    /**
      Set nPoints
    */
    static
    void setNPoints( int v )
    {
      if (v < 2)
      {
        qDebug() << "setNPoints: value " << v << " is less than the minimum value of 2";
        v = 2;
      }

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

      if (v != self()->mNPoints && !self()->isNPointsImmutable()) {
        self()->mNPoints = v;
        Q_EMIT self()->nPointsChanged();
      }
    }

    Q_PROPERTY(int nPoints READ nPoints WRITE setNPoints NOTIFY nPointsChanged)
    Q_PROPERTY(bool isNPointsImmutable READ isNPointsImmutable CONSTANT)
    Q_PROPERTY(int defaultNPointsValue READ defaultNPointsValue CONSTANT)
    /**
      Get nPoints
    */
    static
    int nPoints()
    {
      return self()->mNPoints;
    }

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

    /**
      Get nPoints default value
    */
    static
    int defaultNPointsValue()
    {
        return defaultNPointsValue_helper();
    }

    /**
      Set height
    */
    static
    void setHeight( int v )
    {
      if (v < 100)
      {
        qDebug() << "setHeight: value " << v << " is less than the minimum value of 100";
        v = 100;
      }

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

      if (v != self()->mHeight && !self()->isHeightImmutable()) {
        self()->mHeight = v;
        Q_EMIT self()->heightChanged();
      }
    }

    Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
    Q_PROPERTY(bool isHeightImmutable READ isHeightImmutable CONSTANT)
    Q_PROPERTY(int defaultHeightValue READ defaultHeightValue CONSTANT)
    /**
      Get height
    */
    static
    int height()
    {
      return self()->mHeight;
    }

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

    /**
      Get height default value
    */
    static
    int defaultHeightValue()
    {
        return defaultHeightValue_helper();
    }

    /**
      Set minimumFrequency
    */
    static
    void setMinimumFrequency( int v )
    {
      if (v < 1)
      {
        qDebug() << "setMinimumFrequency: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (v != self()->mMinimumFrequency && !self()->isMinimumFrequencyImmutable()) {
        self()->mMinimumFrequency = v;
        Q_EMIT self()->minimumFrequencyChanged();
      }
    }

    Q_PROPERTY(int minimumFrequency READ minimumFrequency WRITE setMinimumFrequency NOTIFY minimumFrequencyChanged)
    Q_PROPERTY(bool isMinimumFrequencyImmutable READ isMinimumFrequencyImmutable CONSTANT)
    Q_PROPERTY(int defaultMinimumFrequencyValue READ defaultMinimumFrequencyValue CONSTANT)
    /**
      Get minimumFrequency
    */
    static
    int minimumFrequency()
    {
      return self()->mMinimumFrequency;
    }

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

    /**
      Get minimumFrequency default value
    */
    static
    int defaultMinimumFrequencyValue()
    {
        return defaultMinimumFrequencyValue_helper();
    }

    /**
      Set maximumFrequency
    */
    static
    void setMaximumFrequency( int v )
    {
      if (v < 120)
      {
        qDebug() << "setMaximumFrequency: value " << v << " is less than the minimum value of 120";
        v = 120;
      }

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

      if (v != self()->mMaximumFrequency && !self()->isMaximumFrequencyImmutable()) {
        self()->mMaximumFrequency = v;
        Q_EMIT self()->maximumFrequencyChanged();
      }
    }

    Q_PROPERTY(int maximumFrequency READ maximumFrequency WRITE setMaximumFrequency NOTIFY maximumFrequencyChanged)
    Q_PROPERTY(bool isMaximumFrequencyImmutable READ isMaximumFrequencyImmutable CONSTANT)
    Q_PROPERTY(int defaultMaximumFrequencyValue READ defaultMaximumFrequencyValue CONSTANT)
    /**
      Get maximumFrequency
    */
    static
    int maximumFrequency()
    {
      return self()->mMaximumFrequency;
    }

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

    /**
      Get maximumFrequency default value
    */
    static
    int defaultMaximumFrequencyValue()
    {
        return defaultMaximumFrequencyValue_helper();
    }

    /**
      Set Audio and Video Synchronization Delay
    */
    static
    void setAvsyncDelay( int v )
    {
      if (v < 0)
      {
        qDebug() << "setAvsyncDelay: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (v != self()->mAvsyncDelay && !self()->isAvsyncDelayImmutable()) {
        self()->mAvsyncDelay = v;
        Q_EMIT self()->avsyncDelayChanged();
      }
    }

    Q_PROPERTY(int avsyncDelay READ avsyncDelay WRITE setAvsyncDelay NOTIFY avsyncDelayChanged)
    Q_PROPERTY(bool isAvsyncDelayImmutable READ isAvsyncDelayImmutable CONSTANT)
    Q_PROPERTY(int defaultAvsyncDelayValue READ defaultAvsyncDelayValue CONSTANT)
    /**
      Get Audio and Video Synchronization Delay
    */
    static
    int avsyncDelay()
    {
      return self()->mAvsyncDelay;
    }

    /**
      Is Audio and Video Synchronization Delay Immutable
    */
    static
    bool isAvsyncDelayImmutable()
    {
      return self()->isImmutable( QStringLiteral( "avsyncDelay" ) );
    }

    /**
      Get Audio and Video Synchronization Delay default value
    */
    static
    int defaultAvsyncDelayValue()
    {
        return defaultAvsyncDelayValue_helper();
    }

    /**
      Set Maximum spectrum update rate.
    */
    static
    void setSpectrumFpsCap( int v )
    {
      if (v < 1)
      {
        qDebug() << "setSpectrumFpsCap: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (v != self()->mSpectrumFpsCap && !self()->isSpectrumFpsCapImmutable()) {
        self()->mSpectrumFpsCap = v;
        Q_EMIT self()->spectrumFpsCapChanged();
      }
    }

    Q_PROPERTY(int spectrumFpsCap READ spectrumFpsCap WRITE setSpectrumFpsCap NOTIFY spectrumFpsCapChanged)
    Q_PROPERTY(bool isSpectrumFpsCapImmutable READ isSpectrumFpsCapImmutable CONSTANT)
    Q_PROPERTY(int defaultSpectrumFpsCapValue READ defaultSpectrumFpsCapValue CONSTANT)
    /**
      Get Maximum spectrum update rate.
    */
    static
    int spectrumFpsCap()
    {
      return self()->mSpectrumFpsCap;
    }

    /**
      Is Maximum spectrum update rate. Immutable
    */
    static
    bool isSpectrumFpsCapImmutable()
    {
      return self()->isImmutable( QStringLiteral( "spectrumFpsCap" ) );
    }

    /**
      Get Maximum spectrum update rate. default value
    */
    static
    int defaultSpectrumFpsCapValue()
    {
        return defaultSpectrumFpsCapValue_helper();
    }


    enum {
      signalStateChanged = 1,
      signalDynamicYScaleChanged = 2,
      signalLogarithmicHorizontalAxisChanged = 3,
      signalSpectrumShapeChanged = 4,
      signalNPointsChanged = 5,
      signalHeightChanged = 6,
      signalMinimumFrequencyChanged = 7,
      signalMaximumFrequencyChanged = 8,
      signalAvsyncDelayChanged = 9,
      signalSpectrumFpsCapChanged = 10
    };

  Q_SIGNALS:
    void stateChanged();

    void dynamicYScaleChanged();

    void logarithmicHorizontalAxisChanged();

    void spectrumShapeChanged();

    void nPointsChanged();

    void heightChanged();

    void minimumFrequencyChanged();

    void maximumFrequencyChanged();

    void avsyncDelayChanged();

    void spectrumFpsCapChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    DbSpectrum();
    friend class DbSpectrumHelper;


    // Spectrum
    bool mState;
    static bool defaultStateValue_helper();
    bool mDynamicYScale;
    static bool defaultDynamicYScaleValue_helper();
    bool mLogarithmicHorizontalAxis;
    static bool defaultLogarithmicHorizontalAxisValue_helper();
    int mSpectrumShape;
    static int defaultSpectrumShapeValue_helper();
    int mNPoints;
    static int defaultNPointsValue_helper();
    int mHeight;
    static int defaultHeightValue_helper();
    int mMinimumFrequency;
    static int defaultMinimumFrequencyValue_helper();
    int mMaximumFrequency;
    static int defaultMaximumFrequencyValue_helper();
    int mAvsyncDelay;
    static int defaultAvsyncDelayValue_helper();
    int mSpectrumFpsCap;
    static int defaultSpectrumFpsCapValue_helper();
};

#endif

