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

#include <qdebug.h>

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

#include <QFontDatabase>

class Prefs : public KConfigSkeleton
{
  public:
    class EnumTheme
    {
      public:
      enum type { kid, desert, savannah, COUNT };
    };
    class EnumMode
    {
      public:
      enum type { kid, grownup, COUNT };
    };

    static Prefs *self();
    ~Prefs() override;

    /**
      Set Language
    */
    static
    void setLanguage( const QString & v )
    {
      if (!self()->isLanguageImmutable())
        self()->mLanguage = v;
    }

    /**
      Get Language
    */
    static
    QString language()
    {
      return self()->mLanguage;
    }

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

    /**
      Set Theme
    */
    static
    void setTheme( int v )
    {
      if (!self()->isThemeImmutable())
        self()->mTheme = v;
    }

    /**
      Get Theme
    */
    static
    int theme()
    {
      return self()->mTheme;
    }

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

    /**
      Set Whether the menubar is shown or hidden
    */
    static
    void setMenuBarBool( bool v )
    {
      if (!self()->isMenuBarBoolImmutable())
        self()->mMenuBarBool = v;
    }

    /**
      Get Whether the menubar is shown or hidden
    */
    static
    bool menuBarBool()
    {
      return self()->mMenuBarBool;
    }

    /**
      Is Whether the menubar is shown or hidden Immutable
    */
    static
    bool isMenuBarBoolImmutable()
    {
      return self()->isImmutable( QStringLiteral( "MenuBarBool" ) );
    }

    /**
      Set Mode
    */
    static
    void setMode( int v )
    {
      if (!self()->isModeImmutable())
        self()->mMode = v;
    }

    /**
      Get Mode
    */
    static
    int mode()
    {
      return self()->mMode;
    }

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

    /**
      Set Difficulty level.
    */
    static
    void setLevel( int v )
    {
      if (v < 1)
      {
        qDebug() << "setLevel: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isLevelImmutable())
        self()->mLevel = v;
    }

    /**
      Get Difficulty level.
    */
    static
    int level()
    {
      return self()->mLevel;
    }

    /**
      Is Difficulty level. Immutable
    */
    static
    bool isLevelImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Level" ) );
    }

    /**
      Set Kid Timer
    */
    static
    void setKidTimer( int v )
    {
      if (!self()->isKidTimerImmutable())
        self()->mKidTimer = v;
    }

    /**
      Get Kid Timer
    */
    static
    int kidTimer()
    {
      return self()->mKidTimer;
    }

    /**
      Is Kid Timer Immutable
    */
    static
    bool isKidTimerImmutable()
    {
      return self()->isImmutable( QStringLiteral( "KidTimer" ) );
    }

    /**
      Set Grown-up Timer
    */
    static
    void setGrownTimer( int v )
    {
      if (!self()->isGrownTimerImmutable())
        self()->mGrownTimer = v;
    }

    /**
      Get Grown-up Timer
    */
    static
    int grownTimer()
    {
      return self()->mGrownTimer;
    }

    /**
      Is Grown-up Timer Immutable
    */
    static
    bool isGrownTimerImmutable()
    {
      return self()->isImmutable( QStringLiteral( "GrownTimer" ) );
    }

    /**
      Set Font
    */
    static
    void setFont( const QFont & v )
    {
      if (!self()->isFontImmutable())
        self()->mFont = v;
    }

    /**
      Get Font
    */
    static
    QFont font()
    {
      return self()->mFont;
    }

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

  protected:
    Prefs();
    friend class PrefsHelper;


    // General
    QString mLanguage;
    int mTheme;
    bool mMenuBarBool;
    int mMode;
    int mLevel;
    int mKidTimer;
    int mGrownTimer;

    // mFont
    QFont mFont;
};

#endif

