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

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

class Settings : public KConfigSkeleton
{
  public:

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

    /**
      Set Show tips when creating items
    */
    static
    void setShowCreationTips( bool v )
    {
      if (!self()->isShowCreationTipsImmutable())
        self()->mShowCreationTips = v;
    }

    /**
      Get Show tips when creating items
    */
    static
    bool showCreationTips()
    {
      return self()->mShowCreationTips;
    }

    /**
      Is Show tips when creating items Immutable
    */
    static
    bool isShowCreationTipsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "showCreationTips" ) );
    }

    /**
      Set Show axes on the scene
    */
    static
    void setShowAxes( bool v )
    {
      if (!self()->isShowAxesImmutable())
        self()->mShowAxes = v;
    }

    /**
      Get Show axes on the scene
    */
    static
    bool showAxes()
    {
      return self()->mShowAxes;
    }

    /**
      Is Show axes on the scene Immutable
    */
    static
    bool isShowAxesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "showAxes" ) );
    }

    /**
      Set Display precision of double numbers
    */
    static
    void setFloatDisplayPrecision( int v )
    {
      if (v < 1)
      {
        qDebug() << "setFloatDisplayPrecision: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isFloatDisplayPrecisionImmutable())
        self()->mFloatDisplayPrecision = v;
    }

    /**
      Get Display precision of double numbers
    */
    static
    int floatDisplayPrecision()
    {
      return self()->mFloatDisplayPrecision;
    }

    /**
      Is Display precision of double numbers Immutable
    */
    static
    bool isFloatDisplayPrecisionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "floatDisplayPrecision" ) );
    }

    /**
      Set Use OpenGL to accelerate drawing whenever possible
    */
    static
    void setEnableOpenGL( bool v )
    {
      if (!self()->isEnableOpenGLImmutable())
        self()->mEnableOpenGL = v;
    }

    /**
      Get Use OpenGL to accelerate drawing whenever possible
    */
    static
    bool enableOpenGL()
    {
      return self()->mEnableOpenGL;
    }

    /**
      Is Use OpenGL to accelerate drawing whenever possible Immutable
    */
    static
    bool isEnableOpenGLImmutable()
    {
      return self()->isImmutable( QStringLiteral( "enableOpenGL" ) );
    }

    /**
      Set Browse wikipedia in external browser
    */
    static
    void setWikiExternal( bool v )
    {
      if (!self()->isWikiExternalImmutable())
        self()->mWikiExternal = v;
    }

    /**
      Get Browse wikipedia in external browser
    */
    static
    bool wikiExternal()
    {
      return self()->mWikiExternal;
    }

    /**
      Is Browse wikipedia in external browser Immutable
    */
    static
    bool isWikiExternalImmutable()
    {
      return self()->isImmutable( QStringLiteral( "wikiExternal" ) );
    }

    /**
      Set Show text beside icon
    */
    static
    void setShowButtonText( bool v )
    {
      if (!self()->isShowButtonTextImmutable())
        self()->mShowButtonText = v;
    }

    /**
      Get Show text beside icon
    */
    static
    bool showButtonText()
    {
      return self()->mShowButtonText;
    }

    /**
      Is Show text beside icon Immutable
    */
    static
    bool isShowButtonTextImmutable()
    {
      return self()->isImmutable( QStringLiteral( "showButtonText" ) );
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // General
    bool mShowCreationTips;
    bool mShowAxes;
    int mFloatDisplayPrecision;
    bool mEnableOpenGL;

    // InfoBrowser
    bool mWikiExternal;

    // ItemPalette
    bool mShowButtonText;
};

#endif

