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

#include "settings.h"

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

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

  return s_globalPythonSettings()->q;
}

PythonSettings::PythonSettings( )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalPythonSettings()->q);
  s_globalPythonSettings()->q = this;
  setCurrentGroup( QStringLiteral( "PythonBackend" ) );

  KConfigSkeleton::ItemBool  *itemIntegratePlots;
  itemIntegratePlots = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "integratePlots" ), mIntegratePlots, false );
  addItem( itemIntegratePlots, QStringLiteral( "integratePlots" ) );
  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" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valueschoosenGraphicPackage;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("matplotlib");
    valueschoosenGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("plotly");
    valueschoosenGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("all");
    valueschoosenGraphicPackage.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemChoosenGraphicPackage;
  itemChoosenGraphicPackage = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "choosenGraphicPackage" ), mChoosenGraphicPackage, valueschoosenGraphicPackage, 0 );
  addItem( itemChoosenGraphicPackage, QStringLiteral( "choosenGraphicPackage" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesplotExtenstionGraphicPackage;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("matplotlib");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("pylab");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("plotly");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("gr");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("bokeh");
    valuesplotExtenstionGraphicPackage.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPlotExtenstionGraphicPackage;
  itemPlotExtenstionGraphicPackage = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "plotExtenstionGraphicPackage" ), mPlotExtenstionGraphicPackage, valuesplotExtenstionGraphicPackage, 0 );
  addItem( itemPlotExtenstionGraphicPackage, QStringLiteral( "plotExtenstionGraphicPackage" ) );
}

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

