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

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

class QQmlEngine;
class QJSEngine;

class State : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set Zoom level for images
    */
    static
    void setZoom( double v )
    {
      if (v != self()->mZoom && !self()->isZoomImmutable()) {
        self()->mZoom = v;
        Q_EMIT self()->ZoomChanged();
      }
    }

    Q_PROPERTY(double zoom READ zoom WRITE setZoom NOTIFY ZoomChanged)
    Q_PROPERTY(bool isZoomImmutable READ isZoomImmutable CONSTANT)
    Q_PROPERTY(double defaultZoomValue READ defaultZoomValue CONSTANT)
    /**
      Get Zoom level for images
    */
    static
    double zoom()
    {
      return self()->mZoom;
    }

    /**
      Is Zoom level for images Immutable
    */
    static
    bool isZoomImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Zoom" ) );
    }

    /**
      Get Zoom level for images default value
    */
    static
    double defaultZoomValue()
    {
        return defaultZoomValue_helper();
    }


    enum {
      signalZoomChanged = 1
    };

  Q_SIGNALS:
    void ZoomChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    State();
    friend class StateHelper;


    // General
    double mZoom;
    static double defaultZoomValue_helper();
};

#endif

