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

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

class QQmlEngine;
class QJSEngine;

class BlinkenSettings : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set Play sounds
    */
    static
    void setPlaySounds( bool v )
    {
      if (v != self()->mPlaySounds && !self()->isPlaySoundsImmutable()) {
        self()->mPlaySounds = v;
        Q_EMIT self()->playSoundsChanged();
      }
    }

    Q_PROPERTY(bool playSounds READ playSounds WRITE setPlaySounds NOTIFY playSoundsChanged)
    Q_PROPERTY(bool isPlaySoundsImmutable READ isPlaySoundsImmutable CONSTANT)
    /**
      Get Play sounds
    */
    static
    bool playSounds()
    {
      return self()->mPlaySounds;
    }

    /**
      Is Play sounds Immutable
    */
    static
    bool isPlaySoundsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "playSounds" ) );
    }

    /**
      Set Use custom font for status text
    */
    static
    void setCustomFont( bool v )
    {
      if (v != self()->mCustomFont && !self()->isCustomFontImmutable()) {
        self()->mCustomFont = v;
        Q_EMIT self()->customFontChanged();
      }
    }

    Q_PROPERTY(bool customFont READ customFont WRITE setCustomFont NOTIFY customFontChanged)
    Q_PROPERTY(bool isCustomFontImmutable READ isCustomFontImmutable CONSTANT)
    /**
      Get Use custom font for status text
    */
    static
    bool customFont()
    {
      return self()->mCustomFont;
    }

    /**
      Is Use custom font for status text Immutable
    */
    static
    bool isCustomFontImmutable()
    {
      return self()->isImmutable( QStringLiteral( "customFont" ) );
    }


    enum {
      signalPlaySoundsChanged = 1,
      signalCustomFontChanged = 2
    };

  Q_SIGNALS:
    void playSoundsChanged();

    void customFontChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    BlinkenSettings();
    friend class BlinkenSettingsHelper;


    // general
    bool mPlaySounds;
    bool mCustomFont;
};

#endif

