// This file is generated by kconfig_compiler_kf5 from kcalc.kcfg.
// All changes you do to this file will be lost.
#ifndef KCALCSETTINGS_H
#define KCALCSETTINGS_H

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

#include <QFontDatabase>
#include <KColorScheme>
#include <KLocalizedString>
class KCalcSettings : public KConfigSkeleton
{
  public:
    class EnumCalculatorMode
    {
      public:
      enum type { simple, science, statistics, numeral, COUNT };
    };

    static KCalcSettings *self();
    ~KCalcSettings();

    /**
      Set The foreground color of the display.
    */
    static
    void setForeColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "ForeColor" ) ))
        self()->mForeColor = v;
    }

    /**
      Get The foreground color of the display.
    */
    static
    QColor foreColor()
    {
      return self()->mForeColor;
    }

    /**
      Set The background color of the display.
    */
    static
    void setBackColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "BackColor" ) ))
        self()->mBackColor = v;
    }

    /**
      Get The background color of the display.
    */
    static
    QColor backColor()
    {
      return self()->mBackColor;
    }

    /**
      Set The color of number buttons.
    */
    static
    void setNumberButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "NumberButtonsColor" ) ))
        self()->mNumberButtonsColor = v;
    }

    /**
      Get The color of number buttons.
    */
    static
    QColor numberButtonsColor()
    {
      return self()->mNumberButtonsColor;
    }

    /**
      Set The color of function buttons.
    */
    static
    void setFunctionButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "FunctionButtonsColor" ) ))
        self()->mFunctionButtonsColor = v;
    }

    /**
      Get The color of function buttons.
    */
    static
    QColor functionButtonsColor()
    {
      return self()->mFunctionButtonsColor;
    }

    /**
      Set The color of statistical buttons.
    */
    static
    void setStatButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "StatButtonsColor" ) ))
        self()->mStatButtonsColor = v;
    }

    /**
      Get The color of statistical buttons.
    */
    static
    QColor statButtonsColor()
    {
      return self()->mStatButtonsColor;
    }

    /**
      Set The color of hex buttons.
    */
    static
    void setHexButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "HexButtonsColor" ) ))
        self()->mHexButtonsColor = v;
    }

    /**
      Get The color of hex buttons.
    */
    static
    QColor hexButtonsColor()
    {
      return self()->mHexButtonsColor;
    }

    /**
      Set The color of memory buttons.
    */
    static
    void setMemoryButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "MemoryButtonsColor" ) ))
        self()->mMemoryButtonsColor = v;
    }

    /**
      Get The color of memory buttons.
    */
    static
    QColor memoryButtonsColor()
    {
      return self()->mMemoryButtonsColor;
    }

    /**
      Set The color of operation buttons.
    */
    static
    void setOperationButtonsColor( const QColor & v )
    {
      if (!self()->isImmutable( QStringLiteral( "OperationButtonsColor" ) ))
        self()->mOperationButtonsColor = v;
    }

    /**
      Get The color of operation buttons.
    */
    static
    QColor operationButtonsColor()
    {
      return self()->mOperationButtonsColor;
    }

    /**
      Set The font to use for the buttons.
    */
    static
    void setButtonFont( const QFont & v )
    {
      if (!self()->isImmutable( QStringLiteral( "ButtonFont" ) ))
        self()->mButtonFont = v;
    }

    /**
      Get The font to use for the buttons.
    */
    static
    QFont buttonFont()
    {
      return self()->mButtonFont;
    }

    /**
      Set The font to use in the display.
    */
    static
    void setDisplayFont( const QFont & v )
    {
      if (!self()->isImmutable( QStringLiteral( "DisplayFont" ) ))
        self()->mDisplayFont = v;
    }

    /**
      Get The font to use in the display.
    */
    static
    QFont displayFont()
    {
      return self()->mDisplayFont;
    }

    /**
      Set Maximum number of digits displayed.
    */
    static
    void setPrecision( uint v )
    {
      if (v < 8)
      {
        qDebug() << "setPrecision: value " << v << " is less than the minimum value of 8";
        v = 8;
      }

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

      if (!self()->isImmutable( QStringLiteral( "Precision" ) ))
        self()->mPrecision = v;
    }

    /**
      Get Maximum number of digits displayed.
    */
    static
    uint precision()
    {
      return self()->mPrecision;
    }

    /**
      Set Number of fixed decimal digits.
    */
    static
    void setFixedPrecision( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "FixedPrecision" ) ))
        self()->mFixedPrecision = v;
    }

    /**
      Get Number of fixed decimal digits.
    */
    static
    uint fixedPrecision()
    {
      return self()->mFixedPrecision;
    }

    /**
      Set Whether to use fixed decimal places.
    */
    static
    void setFixed( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Fixed" ) ))
        self()->mFixed = v;
    }

    /**
      Get Whether to use fixed decimal places.
    */
    static
    bool fixed()
    {
      return self()->mFixed;
    }

    /**
      Set Whether to beep on error.
    */
    static
    void setBeep( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "Beep" ) ))
        self()->mBeep = v;
    }

    /**
      Get Whether to beep on error.
    */
    static
    bool beep()
    {
      return self()->mBeep;
    }

    /**
      Set Whether to show the result in the window title.
    */
    static
    void setCaptionResult( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "CaptionResult" ) ))
        self()->mCaptionResult = v;
    }

    /**
      Get Whether to show the result in the window title.
    */
    static
    bool captionResult()
    {
      return self()->mCaptionResult;
    }

    /**
      Set Whether to group digits.
    */
    static
    void setGroupDigits( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "GroupDigits" ) ))
        self()->mGroupDigits = v;
    }

    /**
      Get Whether to group digits.
    */
    static
    bool groupDigits()
    {
      return self()->mGroupDigits;
    }

    /**
      Set Whether to use Two's Complement for non-decimal numbers.
    */
    static
    void setTwosComplement( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "TwosComplement" ) ))
        self()->mTwosComplement = v;
    }

    /**
      Get Whether to use Two's Complement for non-decimal numbers.
    */
    static
    bool twosComplement()
    {
      return self()->mTwosComplement;
    }

    /**
      Set CalculatorMode
    */
    static
    void setCalculatorMode( EnumCalculatorMode::type v )
    {
      if (!self()->isImmutable( QStringLiteral( "CalculatorMode" ) ))
        self()->mCalculatorMode = v;
    }

    /**
      Get CalculatorMode
    */
    static
    EnumCalculatorMode::type calculatorMode()
    {
      return static_cast<EnumCalculatorMode::type>(self()->mCalculatorMode);
    }

    /**
      Set Whether to show the bit edit widget.
    */
    static
    void setShowBitset( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowBitset" ) ))
        self()->mShowBitset = v;
    }

    /**
      Get Whether to show the bit edit widget.
    */
    static
    bool showBitset()
    {
      return self()->mShowBitset;
    }

    /**
      Set Whether to show constant buttons.
    */
    static
    void setShowConstants( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowConstants" ) ))
        self()->mShowConstants = v;
    }

    /**
      Get Whether to show constant buttons.
    */
    static
    bool showConstants()
    {
      return self()->mShowConstants;
    }

    /**
      Set Degrees, radians or grads
    */
    static
    void setAngleMode( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "AngleMode" ) ))
        self()->mAngleMode = v;
    }

    /**
      Get Degrees, radians or grads
    */
    static
    uint angleMode()
    {
      return self()->mAngleMode;
    }

    /**
      Set Numeric base
    */
    static
    void setBaseMode( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "BaseMode" ) ))
        self()->mBaseMode = v;
    }

    /**
      Get Numeric base
    */
    static
    uint baseMode()
    {
      return self()->mBaseMode;
    }

    /**
      Set Binary figures will be separated by a whitespace after every Xth digit.
    */
    static
    void setBinaryGrouping( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "BinaryGrouping" ) ))
        self()->mBinaryGrouping = v;
    }

    /**
      Get Binary figures will be separated by a whitespace after every Xth digit.
    */
    static
    uint binaryGrouping()
    {
      return self()->mBinaryGrouping;
    }

    /**
      Set Octal figures will be separated by a whitespace after every Xth digit.
    */
    static
    void setOctalGrouping( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "OctalGrouping" ) ))
        self()->mOctalGrouping = v;
    }

    /**
      Get Octal figures will be separated by a whitespace after every Xth digit.
    */
    static
    uint octalGrouping()
    {
      return self()->mOctalGrouping;
    }

    /**
      Set Hexadecimal figures will be separated by a whitespace after every Xth digit.
    */
    static
    void setHexadecimalGrouping( uint v )
    {
      if (!self()->isImmutable( QStringLiteral( "HexadecimalGrouping" ) ))
        self()->mHexadecimalGrouping = v;
    }

    /**
      Get Hexadecimal figures will be separated by a whitespace after every Xth digit.
    */
    static
    uint hexadecimalGrouping()
    {
      return self()->mHexadecimalGrouping;
    }

    /**
      Set Name of the user programmable constants.
    */
    static
    void setNameConstant( int i, const QString & v )
    {
      if (!self()->isImmutable( QStringLiteral( "nameConstant%1" ).arg( i ) ))
        self()->mNameConstant[i] = v;
    }

    /**
      Get Name of the user programmable constants.
    */
    static
    QString nameConstant( int i )
    {
      return self()->mNameConstant[i];
    }

    /**
      Set List of user programmable constants
    */
    static
    void setValueConstant( int i, const QString & v )
    {
      if (!self()->isImmutable( QStringLiteral( "valueConstant%1" ).arg( i ) ))
        self()->mValueConstant[i] = v;
    }

    /**
      Get List of user programmable constants
    */
    static
    QString valueConstant( int i )
    {
      return self()->mValueConstant[i];
    }

  protected:
    KCalcSettings();
    friend class KCalcSettingsHelper;


    // Colors
    QColor mForeColor;
    QColor mBackColor;
    QColor mNumberButtonsColor;
    QColor mFunctionButtonsColor;
    QColor mStatButtonsColor;
    QColor mHexButtonsColor;
    QColor mMemoryButtonsColor;
    QColor mOperationButtonsColor;

    // Font
    QFont mButtonFont;
    QFont mDisplayFont;

    // Precision
    uint mPrecision;
    uint mFixedPrecision;
    bool mFixed;

    // General
    bool mBeep;
    bool mCaptionResult;
    bool mGroupDigits;
    bool mTwosComplement;
    int mCalculatorMode;
    bool mShowBitset;
    bool mShowConstants;
    uint mAngleMode;
    uint mBaseMode;

    // Grouping
    uint mBinaryGrouping;
    uint mOctalGrouping;
    uint mHexadecimalGrouping;

    // UserConstants
    QString mNameConstant[6];
    QString mValueConstant[6];

  private:
};

#endif

