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

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

class QQmlEngine;
class QJSEngine;

class StatePrefs : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set List of documents
    */
    static
    void setDocuments( const QStringList & v )
    {
      if (v != self()->mDocuments && !self()->isDocumentsImmutable()) {
        self()->mDocuments = v;
        Q_EMIT self()->DocumentsChanged();
      }
    }

    Q_PROPERTY(QStringList documents READ documents WRITE setDocuments NOTIFY DocumentsChanged)
    Q_PROPERTY(bool isDocumentsImmutable READ isDocumentsImmutable CONSTANT)
    /**
      Get List of documents
    */
    static
    QStringList documents()
    {
      return self()->mDocuments;
    }

    /**
      Is List of documents Immutable
    */
    static
    bool isDocumentsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Documents" ) );
    }


    enum {
      signalDocumentsChanged = 1
    };

  Q_SIGNALS:
    void DocumentsChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    StatePrefs(QObject *parent = nullptr);
    friend class StatePrefsHelper;


    // General
    QStringList mDocuments;
    static QStringList defaultDocumentsValue_helper();
};

#endif

