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

#include "settings.h"

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

class ScilabSettingsHelper
{
  public:
    ScilabSettingsHelper() : q(nullptr) {}
    ~ScilabSettingsHelper() { delete q; }
    ScilabSettings *q;
};
Q_GLOBAL_STATIC(ScilabSettingsHelper, s_globalScilabSettings)
ScilabSettings *ScilabSettings::self()
{
  if (!s_globalScilabSettings()->q) {
    new ScilabSettings;
    s_globalScilabSettings()->q->read();
  }

  return s_globalScilabSettings()->q;
}

ScilabSettings::ScilabSettings(  )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalScilabSettings()->q);
  s_globalScilabSettings()->q = this;
  setCurrentGroup( QStringLiteral( "ScilabBackend" ) );

  KConfigSkeleton::ItemUrl  *itemPath;
  itemPath = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "Path" ), mPath, QUrl::fromLocalFile(QStandardPaths::findExecutable( QLatin1String("scilab-adv-cli") )) );
  addItem( itemPath, QStringLiteral( "Path" ) );
  KConfigSkeleton::ItemBool  *itemIntegratePlots;
  itemIntegratePlots = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "integratePlots" ), mIntegratePlots, false );
  addItem( itemIntegratePlots, QStringLiteral( "integratePlots" ) );
  KConfigSkeleton::ItemStringList  *itemAutorunScripts;
  itemAutorunScripts = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "autorunScripts" ), mAutorunScripts );
  addItem( itemAutorunScripts, QStringLiteral( "autorunScripts" ) );
}

ScilabSettings::~ScilabSettings()
{
  s_globalScilabSettings()->q = nullptr;
}

