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

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

class QQmlEngine;
class QJSEngine;

class PlasmaKeyboardSettings : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set soundEnabled
    */
    static
    void setSoundEnabled( bool v )
    {
      if (v != self()->mSoundEnabled && !self()->isSoundEnabledImmutable()) {
        self()->mSoundEnabled = v;
        Q_EMIT self()->soundEnabledChanged();
      }
    }

    Q_PROPERTY(bool soundEnabled READ soundEnabled WRITE setSoundEnabled NOTIFY soundEnabledChanged)
    Q_PROPERTY(bool isSoundEnabledImmutable READ isSoundEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultSoundEnabledValue READ defaultSoundEnabledValue CONSTANT)
    /**
      Get soundEnabled
    */
    static
    bool soundEnabled()
    {
      return self()->mSoundEnabled;
    }

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

    /**
      Get soundEnabled default value
    */
    static
    bool defaultSoundEnabledValue()
    {
        return defaultSoundEnabledValue_helper();
    }

    /**
      Set vibrationEnabled
    */
    static
    void setVibrationEnabled( bool v )
    {
      if (v != self()->mVibrationEnabled && !self()->isVibrationEnabledImmutable()) {
        self()->mVibrationEnabled = v;
        Q_EMIT self()->vibrationEnabledChanged();
      }
    }

    Q_PROPERTY(bool vibrationEnabled READ vibrationEnabled WRITE setVibrationEnabled NOTIFY vibrationEnabledChanged)
    Q_PROPERTY(bool isVibrationEnabledImmutable READ isVibrationEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultVibrationEnabledValue READ defaultVibrationEnabledValue CONSTANT)
    /**
      Get vibrationEnabled
    */
    static
    bool vibrationEnabled()
    {
      return self()->mVibrationEnabled;
    }

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

    /**
      Get vibrationEnabled default value
    */
    static
    bool defaultVibrationEnabledValue()
    {
        return defaultVibrationEnabledValue_helper();
    }

    /**
      Set vibrationMs
    */
    static
    void setVibrationMs( int v )
    {
      if (v != self()->mVibrationMs && !self()->isVibrationMsImmutable()) {
        self()->mVibrationMs = v;
        Q_EMIT self()->vibrationMsChanged();
      }
    }

    Q_PROPERTY(int vibrationMs READ vibrationMs WRITE setVibrationMs NOTIFY vibrationMsChanged)
    Q_PROPERTY(bool isVibrationMsImmutable READ isVibrationMsImmutable CONSTANT)
    Q_PROPERTY(int defaultVibrationMsValue READ defaultVibrationMsValue CONSTANT)
    /**
      Get vibrationMs
    */
    static
    int vibrationMs()
    {
      return self()->mVibrationMs;
    }

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

    /**
      Get vibrationMs default value
    */
    static
    int defaultVibrationMsValue()
    {
        return defaultVibrationMsValue_helper();
    }

    /**
      Set enabledLocales
    */
    static
    void setEnabledLocales( const QStringList & v )
    {
      if (v != self()->mEnabledLocales && !self()->isEnabledLocalesImmutable()) {
        self()->mEnabledLocales = v;
        Q_EMIT self()->enabledLocalesChanged();
      }
    }

    Q_PROPERTY(QStringList enabledLocales READ enabledLocales WRITE setEnabledLocales NOTIFY enabledLocalesChanged)
    Q_PROPERTY(bool isEnabledLocalesImmutable READ isEnabledLocalesImmutable CONSTANT)
    /**
      Get enabledLocales
    */
    static
    QStringList enabledLocales()
    {
      return self()->mEnabledLocales;
    }

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

    /**
      Set keyboardNavigationEnabled
    */
    static
    void setKeyboardNavigationEnabled( bool v )
    {
      if (v != self()->mKeyboardNavigationEnabled && !self()->isKeyboardNavigationEnabledImmutable()) {
        self()->mKeyboardNavigationEnabled = v;
        Q_EMIT self()->keyboardNavigationEnabledChanged();
      }
    }

    Q_PROPERTY(bool keyboardNavigationEnabled READ keyboardNavigationEnabled WRITE setKeyboardNavigationEnabled NOTIFY keyboardNavigationEnabledChanged)
    Q_PROPERTY(bool isKeyboardNavigationEnabledImmutable READ isKeyboardNavigationEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultKeyboardNavigationEnabledValue READ defaultKeyboardNavigationEnabledValue CONSTANT)
    /**
      Get keyboardNavigationEnabled
    */
    static
    bool keyboardNavigationEnabled()
    {
      return self()->mKeyboardNavigationEnabled;
    }

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

    /**
      Get keyboardNavigationEnabled default value
    */
    static
    bool defaultKeyboardNavigationEnabledValue()
    {
        return defaultKeyboardNavigationEnabledValue_helper();
    }

    /**
      Set Whether auto capitalization is enabled.
    */
    static
    void setAutoCapitalizationEnabled( bool v )
    {
      if (v != self()->mAutoCapitalizationEnabled && !self()->isAutoCapitalizationEnabledImmutable()) {
        self()->mAutoCapitalizationEnabled = v;
        Q_EMIT self()->autoCapitalizationEnabledChanged();
      }
    }

    Q_PROPERTY(bool autoCapitalizationEnabled READ autoCapitalizationEnabled WRITE setAutoCapitalizationEnabled NOTIFY autoCapitalizationEnabledChanged)
    Q_PROPERTY(bool isAutoCapitalizationEnabledImmutable READ isAutoCapitalizationEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultAutoCapitalizationEnabledValue READ defaultAutoCapitalizationEnabledValue CONSTANT)
    /**
      Get Whether auto capitalization is enabled.
    */
    static
    bool autoCapitalizationEnabled()
    {
      return self()->mAutoCapitalizationEnabled;
    }

    /**
      Is Whether auto capitalization is enabled. Immutable
    */
    static
    bool isAutoCapitalizationEnabledImmutable()
    {
      return self()->isImmutable( QStringLiteral( "autoCapitalizationEnabled" ) );
    }

    /**
      Get Whether auto capitalization is enabled. default value
    */
    static
    bool defaultAutoCapitalizationEnabledValue()
    {
        return defaultAutoCapitalizationEnabledValue_helper();
    }

    /**
      Set Whether the keyboard panel fills the screen width.
    */
    static
    void setPanelFillScreenWidth( bool v )
    {
      if (v != self()->mPanelFillScreenWidth && !self()->isPanelFillScreenWidthImmutable()) {
        self()->mPanelFillScreenWidth = v;
        Q_EMIT self()->panelFillScreenWidthChanged();
      }
    }

    Q_PROPERTY(bool panelFillScreenWidth READ panelFillScreenWidth WRITE setPanelFillScreenWidth NOTIFY panelFillScreenWidthChanged)
    Q_PROPERTY(bool isPanelFillScreenWidthImmutable READ isPanelFillScreenWidthImmutable CONSTANT)
    Q_PROPERTY(bool defaultPanelFillScreenWidthValue READ defaultPanelFillScreenWidthValue CONSTANT)
    /**
      Get Whether the keyboard panel fills the screen width.
    */
    static
    bool panelFillScreenWidth()
    {
      return self()->mPanelFillScreenWidth;
    }

    /**
      Is Whether the keyboard panel fills the screen width. Immutable
    */
    static
    bool isPanelFillScreenWidthImmutable()
    {
      return self()->isImmutable( QStringLiteral( "panelFillScreenWidth" ) );
    }

    /**
      Get Whether the keyboard panel fills the screen width. default value
    */
    static
    bool defaultPanelFillScreenWidthValue()
    {
        return defaultPanelFillScreenWidthValue_helper();
    }

    /**
      Set Whether holding a physical key shows diacritic options.
    */
    static
    void setDiacriticsPopupEnabled( bool v )
    {
      if (v != self()->mDiacriticsPopupEnabled && !self()->isDiacriticsPopupEnabledImmutable()) {
        self()->mDiacriticsPopupEnabled = v;
        Q_EMIT self()->diacriticsPopupEnabledChanged();
      }
    }

    Q_PROPERTY(bool diacriticsPopupEnabled READ diacriticsPopupEnabled WRITE setDiacriticsPopupEnabled NOTIFY diacriticsPopupEnabledChanged)
    Q_PROPERTY(bool isDiacriticsPopupEnabledImmutable READ isDiacriticsPopupEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultDiacriticsPopupEnabledValue READ defaultDiacriticsPopupEnabledValue CONSTANT)
    /**
      Get Whether holding a physical key shows diacritic options.
    */
    static
    bool diacriticsPopupEnabled()
    {
      return self()->mDiacriticsPopupEnabled;
    }

    /**
      Is Whether holding a physical key shows diacritic options. Immutable
    */
    static
    bool isDiacriticsPopupEnabledImmutable()
    {
      return self()->isImmutable( QStringLiteral( "diacriticsPopupEnabled" ) );
    }

    /**
      Get Whether holding a physical key shows diacritic options. default value
    */
    static
    bool defaultDiacriticsPopupEnabledValue()
    {
        return defaultDiacriticsPopupEnabledValue_helper();
    }

    /**
      Set Delay (ms) before showing diacritics when holding a physical key.
    */
    static
    void setDiacriticsHoldThresholdMs( int v )
    {
      if (v < 100)
      {
        qDebug() << "setDiacriticsHoldThresholdMs: value " << v << " is less than the minimum value of 100";
        v = 100;
      }

      if (v > 1500)
      {
        qDebug() << "setDiacriticsHoldThresholdMs: value " << v << " is greater than the maximum value of 1500";
        v = 1500;
      }

      if (v != self()->mDiacriticsHoldThresholdMs && !self()->isDiacriticsHoldThresholdMsImmutable()) {
        self()->mDiacriticsHoldThresholdMs = v;
        Q_EMIT self()->diacriticsHoldThresholdMsChanged();
      }
    }

    Q_PROPERTY(int diacriticsHoldThresholdMs READ diacriticsHoldThresholdMs WRITE setDiacriticsHoldThresholdMs NOTIFY diacriticsHoldThresholdMsChanged)
    Q_PROPERTY(bool isDiacriticsHoldThresholdMsImmutable READ isDiacriticsHoldThresholdMsImmutable CONSTANT)
    Q_PROPERTY(int defaultDiacriticsHoldThresholdMsValue READ defaultDiacriticsHoldThresholdMsValue CONSTANT)
    /**
      Get Delay (ms) before showing diacritics when holding a physical key.
    */
    static
    int diacriticsHoldThresholdMs()
    {
      return self()->mDiacriticsHoldThresholdMs;
    }

    /**
      Is Delay (ms) before showing diacritics when holding a physical key. Immutable
    */
    static
    bool isDiacriticsHoldThresholdMsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "diacriticsHoldThresholdMs" ) );
    }

    /**
      Get Delay (ms) before showing diacritics when holding a physical key. default value
    */
    static
    int defaultDiacriticsHoldThresholdMsValue()
    {
        return defaultDiacriticsHoldThresholdMsValue_helper();
    }


    enum {
      signalSoundEnabledChanged = 1,
      signalVibrationEnabledChanged = 2,
      signalVibrationMsChanged = 3,
      signalEnabledLocalesChanged = 4,
      signalKeyboardNavigationEnabledChanged = 5,
      signalAutoCapitalizationEnabledChanged = 6,
      signalPanelFillScreenWidthChanged = 7,
      signalDiacriticsPopupEnabledChanged = 8,
      signalDiacriticsHoldThresholdMsChanged = 9
    };

  Q_SIGNALS:
    void soundEnabledChanged();

    void vibrationEnabledChanged();

    void vibrationMsChanged();

    void enabledLocalesChanged();

    void keyboardNavigationEnabledChanged();

    void autoCapitalizationEnabledChanged();

    void panelFillScreenWidthChanged();

    void diacriticsPopupEnabledChanged();

    void diacriticsHoldThresholdMsChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    PlasmaKeyboardSettings();
    friend class PlasmaKeyboardSettingsHelper;


    // General
    bool mSoundEnabled;
    static bool defaultSoundEnabledValue_helper();
    bool mVibrationEnabled;
    static bool defaultVibrationEnabledValue_helper();
    int mVibrationMs;
    static int defaultVibrationMsValue_helper();
    QStringList mEnabledLocales;
    static QStringList defaultEnabledLocalesValue_helper();
    bool mKeyboardNavigationEnabled;
    static bool defaultKeyboardNavigationEnabledValue_helper();
    bool mAutoCapitalizationEnabled;
    static bool defaultAutoCapitalizationEnabledValue_helper();
    bool mPanelFillScreenWidth;
    static bool defaultPanelFillScreenWidthValue_helper();
    bool mDiacriticsPopupEnabled;
    static bool defaultDiacriticsPopupEnabledValue_helper();
    int mDiacriticsHoldThresholdMs;
    static int defaultDiacriticsHoldThresholdMsValue_helper();
};

#endif

