// This file is generated by kconfig_compiler_kf5 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();

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

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

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

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

    /**
      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()->isImmutable( QStringLiteral( "floatDisplayPrecision" ) ))
        self()->mFloatDisplayPrecision = v;
    }

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

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

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

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

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

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

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

  protected:
    Settings();
    friend class SettingsHelper;


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

    // InfoBrowser
    bool mWikiExternal;

    // ItemPalette
    bool mShowButtonText;

  private:
};

#endif

