// This file is generated by kconfig_compiler_kf6 from kcalc.kcfg.
// All changes you do to this file will be lost.

#include "kcalc_settings.h"

#include <qglobal.h>
#include <QFile>

class KCalcSettingsHelper
{
  public:
    KCalcSettingsHelper() : q(nullptr) {}
    ~KCalcSettingsHelper() { delete q; q = nullptr; }
    KCalcSettingsHelper(const KCalcSettingsHelper&) = delete;
    KCalcSettingsHelper& operator=(const KCalcSettingsHelper&) = delete;
    KCalcSettings *q;
};
Q_GLOBAL_STATIC(KCalcSettingsHelper, s_globalKCalcSettings)
KCalcSettings *KCalcSettings::self()
{
  if (!s_globalKCalcSettings()->q) {
    new KCalcSettings;
    s_globalKCalcSettings()->q->read();
  }

  return s_globalKCalcSettings()->q;
}

KCalcSettings::KCalcSettings( )
  : KConfigSkeleton( QStringLiteral( "kcalcrc" ) )
{
  Q_ASSERT(!s_globalKCalcSettings()->q);
  s_globalKCalcSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Colors" ) );

  KConfigSkeleton::ItemBool  *itemFollowSystemTheme;
  itemFollowSystemTheme = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "FollowSystemTheme" ), mFollowSystemTheme, true );
  addItem( itemFollowSystemTheme, QStringLiteral( "FollowSystemTheme" ) );
KColorScheme schemeView(QPalette::Active, KColorScheme::View);
            QColor defaultColor = schemeView.foreground().color();
  KConfigSkeleton::ItemColor  *itemForeColor;
  itemForeColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "ForeColor" ), mForeColor, defaultColor );
  addItem( itemForeColor, QStringLiteral( "ForeColor" ) );
defaultColor = schemeView.background().color();
  KConfigSkeleton::ItemColor  *itemBackColor;
  itemBackColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "BackColor" ), mBackColor, defaultColor );
  addItem( itemBackColor, QStringLiteral( "BackColor" ) );
KColorScheme schemeButtons(QPalette::Active, KColorScheme::Button);
            QColor defaultButtonColor = schemeButtons.background().color();
  KConfigSkeleton::ItemColor  *itemNumberButtonsColor;
  itemNumberButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "NumberButtonsColor" ), mNumberButtonsColor, defaultButtonColor );
  addItem( itemNumberButtonsColor, QStringLiteral( "NumberButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemFunctionButtonsColor;
  itemFunctionButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "FunctionButtonsColor" ), mFunctionButtonsColor, defaultButtonColor );
  addItem( itemFunctionButtonsColor, QStringLiteral( "FunctionButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemStatButtonsColor;
  itemStatButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "StatButtonsColor" ), mStatButtonsColor, defaultButtonColor );
  addItem( itemStatButtonsColor, QStringLiteral( "StatButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemHexButtonsColor;
  itemHexButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "HexButtonsColor" ), mHexButtonsColor, defaultButtonColor );
  addItem( itemHexButtonsColor, QStringLiteral( "HexButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemMemoryButtonsColor;
  itemMemoryButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "MemoryButtonsColor" ), mMemoryButtonsColor, defaultButtonColor );
  addItem( itemMemoryButtonsColor, QStringLiteral( "MemoryButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemOperationButtonsColor;
  itemOperationButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "OperationButtonsColor" ), mOperationButtonsColor, defaultButtonColor );
  addItem( itemOperationButtonsColor, QStringLiteral( "OperationButtonsColor" ) );
  KConfigSkeleton::ItemColor  *itemConstantsButtonsColor;
  itemConstantsButtonsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "ConstantsButtonsColor" ), mConstantsButtonsColor, defaultButtonColor );
  addItem( itemConstantsButtonsColor, QStringLiteral( "ConstantsButtonsColor" ) );
KColorScheme schemeFonts(QPalette::Active, KColorScheme::Button);
            QColor defaultFontColor = schemeFonts.foreground().color();
  KConfigSkeleton::ItemColor  *itemNumberFontsColor;
  itemNumberFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "NumberFontsColor" ), mNumberFontsColor, defaultFontColor );
  addItem( itemNumberFontsColor, QStringLiteral( "NumberFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemFunctionFontsColor;
  itemFunctionFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "FunctionFontsColor" ), mFunctionFontsColor, defaultFontColor );
  addItem( itemFunctionFontsColor, QStringLiteral( "FunctionFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemStatFontsColor;
  itemStatFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "StatFontsColor" ), mStatFontsColor, defaultFontColor );
  addItem( itemStatFontsColor, QStringLiteral( "StatFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemHexFontsColor;
  itemHexFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "HexFontsColor" ), mHexFontsColor, defaultFontColor );
  addItem( itemHexFontsColor, QStringLiteral( "HexFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemMemoryFontsColor;
  itemMemoryFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "MemoryFontsColor" ), mMemoryFontsColor, defaultFontColor );
  addItem( itemMemoryFontsColor, QStringLiteral( "MemoryFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemOperationFontsColor;
  itemOperationFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "OperationFontsColor" ), mOperationFontsColor, defaultFontColor );
  addItem( itemOperationFontsColor, QStringLiteral( "OperationFontsColor" ) );
  KConfigSkeleton::ItemColor  *itemConstantsFontsColor;
  itemConstantsFontsColor = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "ConstantsFontsColor" ), mConstantsFontsColor, defaultFontColor );
  addItem( itemConstantsFontsColor, QStringLiteral( "ConstantsFontsColor" ) );

  setCurrentGroup( QStringLiteral( "Font" ) );

  KConfigSkeleton::ItemFont  *itemButtonFont;
  itemButtonFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ButtonFont" ), mButtonFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemButtonFont, QStringLiteral( "ButtonFont" ) );
QFont defaultDisplayFont = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
            defaultDisplayFont.setWeight(QFont::Bold);
            defaultDisplayFont.setPointSizeF(defaultDisplayFont.pointSizeF() * 1.4);
  KConfigSkeleton::ItemFont  *itemDisplayFont;
  itemDisplayFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "DisplayFont" ), mDisplayFont, defaultDisplayFont );
  addItem( itemDisplayFont, QStringLiteral( "DisplayFont" ) );
  KConfigSkeleton::ItemFont  *itemHistoryFont;
  itemHistoryFont = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "HistoryFont" ), mHistoryFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  addItem( itemHistoryFont, QStringLiteral( "HistoryFont" ) );

  setCurrentGroup( QStringLiteral( "Precision" ) );

  KConfigSkeleton::ItemUInt  *itemPrecision;
  itemPrecision = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "precision" ), mPrecision, 12 );
  itemPrecision->setMinValue(8);
  itemPrecision->setMaxValue(200);
  addItem( itemPrecision, QStringLiteral( "Precision" ) );
  KConfigSkeleton::ItemUInt  *itemFixedPrecision;
  itemFixedPrecision = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "fixedprecision" ), mFixedPrecision, 2 );
  addItem( itemFixedPrecision, QStringLiteral( "FixedPrecision" ) );
  KConfigSkeleton::ItemBool  *itemFixed;
  itemFixed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "fixed" ), mFixed, false );
  addItem( itemFixed, QStringLiteral( "Fixed" ) );

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigSkeleton::ItemBool  *itemBeep;
  itemBeep = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "beep" ), mBeep, true );
  addItem( itemBeep, QStringLiteral( "Beep" ) );
  KConfigSkeleton::ItemBool  *itemCaptionResult;
  itemCaptionResult = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "captionresult" ), mCaptionResult, false );
  addItem( itemCaptionResult, QStringLiteral( "CaptionResult" ) );
  KConfigSkeleton::ItemBool  *itemGroupDigits;
  itemGroupDigits = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "groupdigits" ), mGroupDigits, true );
  addItem( itemGroupDigits, QStringLiteral( "GroupDigits" ) );
  KConfigSkeleton::ItemBool  *itemTwosComplement;
  itemTwosComplement = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "twoscomplement" ), mTwosComplement, true );
  addItem( itemTwosComplement, QStringLiteral( "TwosComplement" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesCalculatorMode;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("simple");
    valuesCalculatorMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("science");
    valuesCalculatorMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("statistics");
    valuesCalculatorMode.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("numeral");
    valuesCalculatorMode.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemCalculatorMode;
  itemCalculatorMode = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "CalculatorMode" ), mCalculatorMode, valuesCalculatorMode );
  addItem( itemCalculatorMode, QStringLiteral( "CalculatorMode" ) );
  KConfigSkeleton::ItemBool  *itemShowBitset;
  itemShowBitset = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowBitset" ), mShowBitset, false );
  addItem( itemShowBitset, QStringLiteral( "ShowBitset" ) );
  KConfigSkeleton::ItemBool  *itemShowConstants;
  itemShowConstants = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowConstants" ), mShowConstants, false );
  addItem( itemShowConstants, QStringLiteral( "ShowConstants" ) );
  KConfigSkeleton::ItemBool  *itemShowHistory;
  itemShowHistory = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowHistory" ), mShowHistory, false );
  addItem( itemShowHistory, QStringLiteral( "ShowHistory" ) );
  KConfigSkeleton::ItemUInt  *itemAngleMode;
  itemAngleMode = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "AngleMode" ), mAngleMode, 0 );
  addItem( itemAngleMode, QStringLiteral( "AngleMode" ) );
  KConfigSkeleton::ItemUInt  *itemBaseMode;
  itemBaseMode = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "BaseMode" ), mBaseMode, 10 );
  addItem( itemBaseMode, QStringLiteral( "BaseMode" ) );

  setCurrentGroup( QStringLiteral( "Grouping" ) );

  KConfigSkeleton::ItemUInt  *itemBinaryGrouping;
  itemBinaryGrouping = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "binaryGrouping" ), mBinaryGrouping, 4 );
  addItem( itemBinaryGrouping, QStringLiteral( "BinaryGrouping" ) );
  KConfigSkeleton::ItemUInt  *itemOctalGrouping;
  itemOctalGrouping = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "octalGrouping" ), mOctalGrouping, 4 );
  addItem( itemOctalGrouping, QStringLiteral( "OctalGrouping" ) );
  KConfigSkeleton::ItemUInt  *itemHexadecimalGrouping;
  itemHexadecimalGrouping = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "hexadecimalGrouping" ), mHexadecimalGrouping, 2 );
  addItem( itemHexadecimalGrouping, QStringLiteral( "HexadecimalGrouping" ) );

  setCurrentGroup( QStringLiteral( "UserConstants" ) );


		QString nameConstant0 = i18nc("Name of the user programmable constant", "C1");
		QString nameConstant1 = i18nc("Name of the user programmable constant", "C2");
		QString nameConstant2 = i18nc("Name of the user programmable constant", "C3");
		QString nameConstant3 = i18nc("Name of the user programmable constant", "C4");
		QString nameConstant4 = i18nc("Name of the user programmable constant", "C5");
		QString nameConstant5 = i18nc("Name of the user programmable constant", "C6");
	
  KConfigSkeleton::ItemString  *itemNameConstant[6];
  itemNameConstant[0] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant0" ), mNameConstant[0], nameConstant0 );
  addItem( itemNameConstant[0], QStringLiteral( "nameConstant0" ) );
  itemNameConstant[1] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant1" ), mNameConstant[1], nameConstant1 );
  addItem( itemNameConstant[1], QStringLiteral( "nameConstant1" ) );
  itemNameConstant[2] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant2" ), mNameConstant[2], nameConstant2 );
  addItem( itemNameConstant[2], QStringLiteral( "nameConstant2" ) );
  itemNameConstant[3] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant3" ), mNameConstant[3], nameConstant3 );
  addItem( itemNameConstant[3], QStringLiteral( "nameConstant3" ) );
  itemNameConstant[4] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant4" ), mNameConstant[4], nameConstant4 );
  addItem( itemNameConstant[4], QStringLiteral( "nameConstant4" ) );
  itemNameConstant[5] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "nameConstant5" ), mNameConstant[5], nameConstant5 );
  addItem( itemNameConstant[5], QStringLiteral( "nameConstant5" ) );
  KConfigSkeleton::ItemString  *itemValueConstant[6];
  itemValueConstant[0] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant0" ), mValueConstant[0], QStringLiteral( "0" ) );
  addItem( itemValueConstant[0], QStringLiteral( "valueConstant0" ) );
  itemValueConstant[1] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant1" ), mValueConstant[1], QStringLiteral( "0" ) );
  addItem( itemValueConstant[1], QStringLiteral( "valueConstant1" ) );
  itemValueConstant[2] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant2" ), mValueConstant[2], QStringLiteral( "0" ) );
  addItem( itemValueConstant[2], QStringLiteral( "valueConstant2" ) );
  itemValueConstant[3] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant3" ), mValueConstant[3], QStringLiteral( "0" ) );
  addItem( itemValueConstant[3], QStringLiteral( "valueConstant3" ) );
  itemValueConstant[4] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant4" ), mValueConstant[4], QStringLiteral( "0" ) );
  addItem( itemValueConstant[4], QStringLiteral( "valueConstant4" ) );
  itemValueConstant[5] = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "valueConstant5" ), mValueConstant[5], QStringLiteral( "0" ) );
  addItem( itemValueConstant[5], QStringLiteral( "valueConstant5" ) );
}

KCalcSettings::~KCalcSettings()
{
  if (s_globalKCalcSettings.exists() && !s_globalKCalcSettings.isDestroyed()) {
    s_globalKCalcSettings()->q = nullptr;
  }
}

