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

    /**
      Set FollowSystemTheme
    */
    static
    void setFollowSystemTheme( bool v )
    {
      if (!self()->isFollowSystemThemeImmutable())
        self()->mFollowSystemTheme = v;
    }

    /**
      Get FollowSystemTheme
    */
    static
    bool followSystemTheme()
    {
      return self()->mFollowSystemTheme;
    }

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

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

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

    /**
      Is The foreground color of the display. Immutable
    */
    static
    bool isForeColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ForeColor" ) );
    }

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

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

    /**
      Is The background color of the display. Immutable
    */
    static
    bool isBackColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BackColor" ) );
    }

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

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

    /**
      Is The color of number buttons. Immutable
    */
    static
    bool isNumberButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "NumberButtonsColor" ) );
    }

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

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

    /**
      Is The color of function buttons. Immutable
    */
    static
    bool isFunctionButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FunctionButtonsColor" ) );
    }

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

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

    /**
      Is The color of statistical buttons. Immutable
    */
    static
    bool isStatButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "StatButtonsColor" ) );
    }

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

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

    /**
      Is The color of hex buttons. Immutable
    */
    static
    bool isHexButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "HexButtonsColor" ) );
    }

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

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

    /**
      Is The color of memory buttons. Immutable
    */
    static
    bool isMemoryButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "MemoryButtonsColor" ) );
    }

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

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

    /**
      Is The color of operation buttons. Immutable
    */
    static
    bool isOperationButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "OperationButtonsColor" ) );
    }

    /**
      Set The color of constants buttons.
    */
    static
    void setConstantsButtonsColor( const QColor & v )
    {
      if (!self()->isConstantsButtonsColorImmutable())
        self()->mConstantsButtonsColor = v;
    }

    /**
      Get The color of constants buttons.
    */
    static
    QColor constantsButtonsColor()
    {
      return self()->mConstantsButtonsColor;
    }

    /**
      Is The color of constants buttons. Immutable
    */
    static
    bool isConstantsButtonsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ConstantsButtonsColor" ) );
    }

    /**
      Set The color of number fonts.
    */
    static
    void setNumberFontsColor( const QColor & v )
    {
      if (!self()->isNumberFontsColorImmutable())
        self()->mNumberFontsColor = v;
    }

    /**
      Get The color of number fonts.
    */
    static
    QColor numberFontsColor()
    {
      return self()->mNumberFontsColor;
    }

    /**
      Is The color of number fonts. Immutable
    */
    static
    bool isNumberFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "NumberFontsColor" ) );
    }

    /**
      Set The color of function fonts.
    */
    static
    void setFunctionFontsColor( const QColor & v )
    {
      if (!self()->isFunctionFontsColorImmutable())
        self()->mFunctionFontsColor = v;
    }

    /**
      Get The color of function fonts.
    */
    static
    QColor functionFontsColor()
    {
      return self()->mFunctionFontsColor;
    }

    /**
      Is The color of function fonts. Immutable
    */
    static
    bool isFunctionFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FunctionFontsColor" ) );
    }

    /**
      Set The color of statistical fonts.
    */
    static
    void setStatFontsColor( const QColor & v )
    {
      if (!self()->isStatFontsColorImmutable())
        self()->mStatFontsColor = v;
    }

    /**
      Get The color of statistical fonts.
    */
    static
    QColor statFontsColor()
    {
      return self()->mStatFontsColor;
    }

    /**
      Is The color of statistical fonts. Immutable
    */
    static
    bool isStatFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "StatFontsColor" ) );
    }

    /**
      Set The color of hex fonts.
    */
    static
    void setHexFontsColor( const QColor & v )
    {
      if (!self()->isHexFontsColorImmutable())
        self()->mHexFontsColor = v;
    }

    /**
      Get The color of hex fonts.
    */
    static
    QColor hexFontsColor()
    {
      return self()->mHexFontsColor;
    }

    /**
      Is The color of hex fonts. Immutable
    */
    static
    bool isHexFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "HexFontsColor" ) );
    }

    /**
      Set The color of memory fonts.
    */
    static
    void setMemoryFontsColor( const QColor & v )
    {
      if (!self()->isMemoryFontsColorImmutable())
        self()->mMemoryFontsColor = v;
    }

    /**
      Get The color of memory fonts.
    */
    static
    QColor memoryFontsColor()
    {
      return self()->mMemoryFontsColor;
    }

    /**
      Is The color of memory fonts. Immutable
    */
    static
    bool isMemoryFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "MemoryFontsColor" ) );
    }

    /**
      Set The color of operation font.
    */
    static
    void setOperationFontsColor( const QColor & v )
    {
      if (!self()->isOperationFontsColorImmutable())
        self()->mOperationFontsColor = v;
    }

    /**
      Get The color of operation font.
    */
    static
    QColor operationFontsColor()
    {
      return self()->mOperationFontsColor;
    }

    /**
      Is The color of operation font. Immutable
    */
    static
    bool isOperationFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "OperationFontsColor" ) );
    }

    /**
      Set The color of constants fonts.
    */
    static
    void setConstantsFontsColor( const QColor & v )
    {
      if (!self()->isConstantsFontsColorImmutable())
        self()->mConstantsFontsColor = v;
    }

    /**
      Get The color of constants fonts.
    */
    static
    QColor constantsFontsColor()
    {
      return self()->mConstantsFontsColor;
    }

    /**
      Is The color of constants fonts. Immutable
    */
    static
    bool isConstantsFontsColorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ConstantsFontsColor" ) );
    }

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

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

    /**
      Is The font to use for the buttons. Immutable
    */
    static
    bool isButtonFontImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ButtonFont" ) );
    }

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

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

    /**
      Is The font to use in the display. Immutable
    */
    static
    bool isDisplayFontImmutable()
    {
      return self()->isImmutable( QStringLiteral( "DisplayFont" ) );
    }

    /**
      Set The font to use in the history.
    */
    static
    void setHistoryFont( const QFont & v )
    {
      if (!self()->isHistoryFontImmutable())
        self()->mHistoryFont = v;
    }

    /**
      Get The font to use in the history.
    */
    static
    QFont historyFont()
    {
      return self()->mHistoryFont;
    }

    /**
      Is The font to use in the history. Immutable
    */
    static
    bool isHistoryFontImmutable()
    {
      return self()->isImmutable( QStringLiteral( "HistoryFont" ) );
    }

    /**
      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()->isPrecisionImmutable())
        self()->mPrecision = v;
    }

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

    /**
      Is Maximum number of digits displayed. Immutable
    */
    static
    bool isPrecisionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Precision" ) );
    }

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

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

    /**
      Is Number of fixed decimal digits. Immutable
    */
    static
    bool isFixedPrecisionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FixedPrecision" ) );
    }

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

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

    /**
      Is Whether to use fixed decimal places. Immutable
    */
    static
    bool isFixedImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Fixed" ) );
    }

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

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

    /**
      Is Whether to beep on error. Immutable
    */
    static
    bool isBeepImmutable()
    {
      return self()->isImmutable( QStringLiteral( "Beep" ) );
    }

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

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

    /**
      Is Whether to show the result in the window title. Immutable
    */
    static
    bool isCaptionResultImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CaptionResult" ) );
    }

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

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

    /**
      Is Whether to group digits. Immutable
    */
    static
    bool isGroupDigitsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "GroupDigits" ) );
    }

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

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

    /**
      Is Whether to use Two's Complement for non-decimal numbers. Immutable
    */
    static
    bool isTwosComplementImmutable()
    {
      return self()->isImmutable( QStringLiteral( "TwosComplement" ) );
    }

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

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

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

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

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

    /**
      Is Whether to show the bit edit widget. Immutable
    */
    static
    bool isShowBitsetImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShowBitset" ) );
    }

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

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

    /**
      Is Whether to show constant buttons. Immutable
    */
    static
    bool isShowConstantsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShowConstants" ) );
    }

    /**
      Set Whether to show the history window.
    */
    static
    void setShowHistory( bool v )
    {
      if (!self()->isShowHistoryImmutable())
        self()->mShowHistory = v;
    }

    /**
      Get Whether to show the history window.
    */
    static
    bool showHistory()
    {
      return self()->mShowHistory;
    }

    /**
      Is Whether to show the history window. Immutable
    */
    static
    bool isShowHistoryImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShowHistory" ) );
    }

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

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

    /**
      Is Degrees, radians or grads Immutable
    */
    static
    bool isAngleModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "AngleMode" ) );
    }

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

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

    /**
      Is Numeric base Immutable
    */
    static
    bool isBaseModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BaseMode" ) );
    }

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

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

    /**
      Is Binary figures will be separated by a whitespace after every Xth digit. Immutable
    */
    static
    bool isBinaryGroupingImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BinaryGrouping" ) );
    }

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

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

    /**
      Is Octal figures will be separated by a whitespace after every Xth digit. Immutable
    */
    static
    bool isOctalGroupingImmutable()
    {
      return self()->isImmutable( QStringLiteral( "OctalGrouping" ) );
    }

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

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

    /**
      Is Hexadecimal figures will be separated by a whitespace after every Xth digit. Immutable
    */
    static
    bool isHexadecimalGroupingImmutable()
    {
      return self()->isImmutable( QStringLiteral( "HexadecimalGrouping" ) );
    }

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

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

    /**
      Is Name of the user programmable constants. Immutable
    */
    static
    bool isNameConstantImmutable( int i )
    {
      return self()->isImmutable( QStringLiteral( "nameConstant%1" ).arg( i ) );
    }

    /**
      Set List of user programmable constants
    */
    static
    void setValueConstant( int i, const QString & v )
    {
      if (!self()->isValueConstantImmutable( i ))
        self()->mValueConstant[i] = v;
    }

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

    /**
      Is List of user programmable constants Immutable
    */
    static
    bool isValueConstantImmutable( int i )
    {
      return self()->isImmutable( QStringLiteral( "valueConstant%1" ).arg( i ) );
    }

  protected:
    KCalcSettings();
    friend class KCalcSettingsHelper;


    // Colors
    bool mFollowSystemTheme;
    QColor mForeColor;
    QColor mBackColor;
    QColor mNumberButtonsColor;
    QColor mFunctionButtonsColor;
    QColor mStatButtonsColor;
    QColor mHexButtonsColor;
    QColor mMemoryButtonsColor;
    QColor mOperationButtonsColor;
    QColor mConstantsButtonsColor;
    QColor mNumberFontsColor;
    QColor mFunctionFontsColor;
    QColor mStatFontsColor;
    QColor mHexFontsColor;
    QColor mMemoryFontsColor;
    QColor mOperationFontsColor;
    QColor mConstantsFontsColor;

    // Font
    QFont mButtonFont;
    QFont mDisplayFont;
    QFont mHistoryFont;

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

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

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

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

#endif

