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

#include "settings.h"

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

class JuliaSettingsHelper
{
  public:
    JuliaSettingsHelper() noexcept : q(nullptr) {}
    ~JuliaSettingsHelper() noexcept { delete q; q = nullptr; }
    JuliaSettingsHelper(const JuliaSettingsHelper&) = delete;
    JuliaSettingsHelper& operator=(const JuliaSettingsHelper&) = delete;
    JuliaSettings *q;
};
Q_GLOBAL_STATIC(JuliaSettingsHelper, s_globalJuliaSettings)
JuliaSettings *JuliaSettings::self()
{
  if (!s_globalJuliaSettings()->q) {
    new JuliaSettings;
    s_globalJuliaSettings()->q->read();
  }

  return s_globalJuliaSettings()->q;
}

JuliaSettings::JuliaSettings( )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalJuliaSettings()->q);
  s_globalJuliaSettings()->q = this;
  setCurrentGroup( QStringLiteral( "JuliaBackend" ) );

  KConfigSkeleton::ItemBool  *itemVariableManagement;
  itemVariableManagement = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "variableManagement" ), mVariableManagement, true );
  addItem( itemVariableManagement, QStringLiteral( "variableManagement" ) );
  KConfigSkeleton::ItemStringList  *itemAutorunScripts;
  itemAutorunScripts = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "autorunScripts" ), mAutorunScripts );
  addItem( itemAutorunScripts, QStringLiteral( "autorunScripts" ) );
  KConfigSkeleton::ItemBool  *itemIntegratePlots;
  itemIntegratePlots = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "integratePlots" ), mIntegratePlots, true );
  addItem( itemIntegratePlots, QStringLiteral( "integratePlots" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesinlinePlotFormat;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("pdf");
    valuesinlinePlotFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("svg");
    valuesinlinePlotFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("png");
    valuesinlinePlotFormat.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemInlinePlotFormat;
  itemInlinePlotFormat = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "inlinePlotFormat" ), mInlinePlotFormat, valuesinlinePlotFormat, 0 );
  addItem( itemInlinePlotFormat, QStringLiteral( "inlinePlotFormat" ) );
  KConfigSkeleton::ItemDouble  *itemPlotWidth;
  itemPlotWidth = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "plotWidth" ), mPlotWidth, 12.0 );
  addItem( itemPlotWidth, QStringLiteral( "plotWidth" ) );
  KConfigSkeleton::ItemDouble  *itemPlotHeight;
  itemPlotHeight = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "plotHeight" ), mPlotHeight, 8.0 );
  addItem( itemPlotHeight, QStringLiteral( "plotHeight" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesplotExtenstionGraphicPackage;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("gr");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("plots");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("pyplot");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("gadfly");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPlotExtenstionGraphicPackage;
  itemPlotExtenstionGraphicPackage = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "plotExtenstionGraphicPackage" ), mPlotExtenstionGraphicPackage, valuesplotExtenstionGraphicPackage, 0 );
  addItem( itemPlotExtenstionGraphicPackage, QStringLiteral( "plotExtenstionGraphicPackage" ) );
}

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

