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

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

class ShakeCursorSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:

    ShakeCursorSettings( QObject *parent = nullptr );
    ~ShakeCursorSettings() override;

    /**
      Set Whether Shake Pointer is enabled
    */
    void setShakeCursor( bool v )
    {
      if (v != mShakeCursor && !isShakeCursorImmutable()) {
        mShakeCursor = v;
        Q_EMIT ShakeCursorChanged();
      }
    }

    Q_PROPERTY(bool shakeCursor READ shakeCursor WRITE setShakeCursor NOTIFY ShakeCursorChanged)
    Q_PROPERTY(bool isShakeCursorImmutable READ isShakeCursorImmutable CONSTANT)
    Q_PROPERTY(bool defaultShakeCursorValue READ defaultShakeCursorValue CONSTANT)
    /**
      Get Whether Shake Pointer is enabled
    */
    bool shakeCursor() const
    {
      return mShakeCursor;
    }

    /**
      Is Whether Shake Pointer is enabled Immutable
    */
    bool isShakeCursorImmutable() const
    {
      return isImmutable( QStringLiteral( "ShakeCursor" ) );
    }

    /**
      Get Whether Shake Pointer is enabled default value
    */
    bool defaultShakeCursorValue() const
    {
        return defaultShakeCursorValue_helper();
    }

    /**
      Set Magnification
    */
    void setShakeCursorMagnification( double v )
    {
      if (v < 1)
      {
        qDebug() << "setShakeCursorMagnification: value " << v << " is less than the minimum value of 1";
        v = 1;
      }
      if (v != mShakeCursorMagnification && !isShakeCursorMagnificationImmutable()) {
        mShakeCursorMagnification = v;
        Q_EMIT ShakeCursorMagnificationChanged();
      }
    }

    Q_PROPERTY(double shakeCursorMagnification READ shakeCursorMagnification WRITE setShakeCursorMagnification NOTIFY ShakeCursorMagnificationChanged)
    Q_PROPERTY(bool isShakeCursorMagnificationImmutable READ isShakeCursorMagnificationImmutable CONSTANT)
    Q_PROPERTY(double defaultShakeCursorMagnificationValue READ defaultShakeCursorMagnificationValue CONSTANT)
    /**
      Get Magnification
    */
    double shakeCursorMagnification() const
    {
      return mShakeCursorMagnification;
    }

    /**
      Is Magnification Immutable
    */
    bool isShakeCursorMagnificationImmutable() const
    {
      return isImmutable( QStringLiteral( "ShakeCursorMagnification" ) );
    }

    /**
      Get Magnification default value
    */
    double defaultShakeCursorMagnificationValue() const
    {
        return defaultShakeCursorMagnificationValue_helper();
    }


    enum {
      signalShakeCursorChanged = 1,
      signalShakeCursorMagnificationChanged = 2
    };

  Q_SIGNALS:
    void ShakeCursorChanged();

    void ShakeCursorMagnificationChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // Plugins
    bool mShakeCursor;
    bool defaultShakeCursorValue_helper() const;

    // Effect-shakecursor
    double mShakeCursorMagnification;
    double defaultShakeCursorMagnificationValue_helper() const;
};

#endif

