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

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

class QQmlEngine;
class QJSEngine;

class StateConfig : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set LastOpenedPage
    */
    static
    void setLastOpenedPage( const QString & v )
    {
      if (v != self()->mLastOpenedPage && !self()->isLastOpenedPageImmutable()) {
        self()->mLastOpenedPage = v;
        Q_EMIT self()->LastOpenedPageChanged();
      }
    }

    Q_PROPERTY(QString lastOpenedPage READ lastOpenedPage WRITE setLastOpenedPage NOTIFY LastOpenedPageChanged)
    Q_PROPERTY(bool isLastOpenedPageImmutable READ isLastOpenedPageImmutable CONSTANT)
    /**
      Get LastOpenedPage
    */
    static
    QString lastOpenedPage()
    {
      return self()->mLastOpenedPage;
    }

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


    enum {
      signalLastOpenedPageChanged = 1
    };

  Q_SIGNALS:
    void LastOpenedPageChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    StateConfig(QObject *parent = nullptr);
    friend class StateConfigHelper;


    // General
    QString mLastOpenedPage;
    static QString defaultLastOpenedPageValue_helper();
};

#endif

