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

#include "settings.h"

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

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

  return s_globalQalculateSettings()->q;
}

QalculateSettings::QalculateSettings( )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalQalculateSettings()->q);
  s_globalQalculateSettings()->q = this;
  setCurrentGroup( QStringLiteral( "QalculateBackend" ) );

  KConfigSkeleton::ItemBool  *itemPostConversion;
  itemPostConversion = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "postConversion" ), mPostConversion, true );
  addItem( itemPostConversion, QStringLiteral( "postConversion" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesangleUnit;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ANGLE_UNIT_NONE");
    valuesangleUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ANGLE_UNIT_RADIANS");
    valuesangleUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ANGLE_UNIT_DEGREES");
    valuesangleUnit.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ANGLE_UNIT_GRADIANS");
    valuesangleUnit.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemAngleUnit;
  itemAngleUnit = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "angleUnit" ), mAngleUnit, valuesangleUnit, 1 );
  addItem( itemAngleUnit, QStringLiteral( "angleUnit" ) );
  KConfigSkeleton::ItemInt  *itemBase;
  itemBase = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "base" ), mBase, 10 );
  addItem( itemBase, QStringLiteral( "base" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesstructuring;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STRUCTURING_NONE");
    valuesstructuring.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STRUCTURING_SIMPLIFY");
    valuesstructuring.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STRUCTURING_FACTORIZE");
    valuesstructuring.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemStructuring;
  itemStructuring = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "structuring" ), mStructuring, valuesstructuring, 0 );
  addItem( itemStructuring, QStringLiteral( "structuring" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesfractionFormat;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FRACTION_DECIMAL");
    valuesfractionFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FRACTION_DECIMAL_EXACT");
    valuesfractionFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FRACTION_FRACTIONAL");
    valuesfractionFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("FRACTION_COMBINED");
    valuesfractionFormat.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemFractionFormat;
  itemFractionFormat = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "fractionFormat" ), mFractionFormat, valuesfractionFormat, 0 );
  addItem( itemFractionFormat, QStringLiteral( "fractionFormat" ) );
  KConfigSkeleton::ItemBool  *itemIndicateInfiniteSeries;
  itemIndicateInfiniteSeries = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "indicateInfiniteSeries" ), mIndicateInfiniteSeries, false );
  addItem( itemIndicateInfiniteSeries, QStringLiteral( "indicateInfiniteSeries" ) );
  KConfigSkeleton::ItemBool  *itemUseAllPrefixes;
  itemUseAllPrefixes = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useAllPrefixes" ), mUseAllPrefixes, false );
  addItem( itemUseAllPrefixes, QStringLiteral( "useAllPrefixes" ) );
  KConfigSkeleton::ItemBool  *itemNegativeExponents;
  itemNegativeExponents = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "negativeExponents" ), mNegativeExponents, false );
  addItem( itemNegativeExponents, QStringLiteral( "negativeExponents" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesminExp;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EXP_NONE");
    valuesminExp.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EXP_PURE");
    valuesminExp.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EXP_SCIENTIFIC");
    valuesminExp.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("EXP_PRECISION");
    valuesminExp.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemMinExp;
  itemMinExp = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "minExp" ), mMinExp, valuesminExp, 3 );
  addItem( itemMinExp, QStringLiteral( "minExp" ) );
  KConfigSkeleton::ItemBool  *itemInlinePlot;
  itemInlinePlot = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "inlinePlot" ), mInlinePlot, true );
  addItem( itemInlinePlot, QStringLiteral( "inlinePlot" ) );
  KConfigSkeleton::ItemBool  *itemColoredPlot;
  itemColoredPlot = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "coloredPlot" ), mColoredPlot, true );
  addItem( itemColoredPlot, QStringLiteral( "coloredPlot" ) );
  KConfigSkeleton::ItemBool  *itemPlotGrid;
  itemPlotGrid = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "plotGrid" ), mPlotGrid, false );
  addItem( itemPlotGrid, QStringLiteral( "plotGrid" ) );
  KConfigSkeleton::ItemBool  *itemPlotBorder;
  itemPlotBorder = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "plotBorder" ), mPlotBorder, false );
  addItem( itemPlotBorder, QStringLiteral( "plotBorder" ) );
  KConfigSkeleton::ItemInt  *itemPlotLineWidth;
  itemPlotLineWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "plotLineWidth" ), mPlotLineWidth, 2 );
  addItem( itemPlotLineWidth, QStringLiteral( "plotLineWidth" ) );
  KConfigSkeleton::ItemInt  *itemPlotSteps;
  itemPlotSteps = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "plotSteps" ), mPlotSteps, 100 );
  addItem( itemPlotSteps, QStringLiteral( "plotSteps" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesplotSmoothing;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SMOOTHING_NONE");
    valuesplotSmoothing.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SMOOTHING_UNIQUE");
    valuesplotSmoothing.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SMOOTHING_CSPLINES");
    valuesplotSmoothing.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SMOOTHING_BEZIER");
    valuesplotSmoothing.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("SMOOTHING_SBEZIER");
    valuesplotSmoothing.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPlotSmoothing;
  itemPlotSmoothing = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "plotSmoothing" ), mPlotSmoothing, valuesplotSmoothing, 0 );
  addItem( itemPlotSmoothing, QStringLiteral( "plotSmoothing" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesplotStyle;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_LINES");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_POINTS");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_LINES_POINTS");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_BOXES");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_HISTOGRAM");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_STEPS");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_CANDLESTICKS");
    valuesplotStyle.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("STYLE_DOTS");
    valuesplotStyle.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPlotStyle;
  itemPlotStyle = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "plotStyle" ), mPlotStyle, valuesplotStyle, 0 );
  addItem( itemPlotStyle, QStringLiteral( "plotStyle" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesplotLegend;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_NONE");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_TOP_LEFT");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_TOP_RIGHT");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_BOTTOM_LEFT");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_BOTTOM_RIGHT");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_BELOW");
    valuesplotLegend.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("LEGEND_OUTSIDE");
    valuesplotLegend.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPlotLegend;
  itemPlotLegend = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "plotLegend" ), mPlotLegend, valuesplotLegend, 2 );
  addItem( itemPlotLegend, QStringLiteral( "plotLegend" ) );
  KConfigSkeleton::ItemStringList  *itemAutorunScripts;
  itemAutorunScripts = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "autorunScripts" ), mAutorunScripts );
  addItem( itemAutorunScripts, QStringLiteral( "autorunScripts" ) );
}

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

