// This file is generated by kconfig_compiler_kf5 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() : q(nullptr) {}
    ~JuliaSettingsHelper() { delete q; }
    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::ItemUrl  *itemReplPath;
  itemReplPath = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "replPath" ), mReplPath, 
                QUrl::fromLocalFile(QStandardPaths::findExecutable(QLatin1String("julia")))
             );
  addItem( itemReplPath, QStringLiteral( "replPath" ) );
  KConfigSkeleton::ItemBool  *itemVariableManagement;
  itemVariableManagement = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "variableManagement" ), mVariableManagement, true );
  addItem( itemVariableManagement, QStringLiteral( "variableManagement" ) );
  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("svg");
    valuesinlinePlotFormat.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("eps");
    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, EnumInlinePlotFormat::svg );
  addItem( itemInlinePlotFormat, QStringLiteral( "inlinePlotFormat" ) );
}

JuliaSettings::~JuliaSettings()
{
  s_globalJuliaSettings()->q = nullptr;
}

