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

#include "settings.h"

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

class OctaveSettingsHelper
{
  public:
    OctaveSettingsHelper() : q(nullptr) {}
    ~OctaveSettingsHelper() { delete q; }
    OctaveSettings *q;
};
Q_GLOBAL_STATIC(OctaveSettingsHelper, s_globalOctaveSettings)
OctaveSettings *OctaveSettings::self()
{
  if (!s_globalOctaveSettings()->q) {
    new OctaveSettings;
    s_globalOctaveSettings()->q->read();
  }

  return s_globalOctaveSettings()->q;
}

OctaveSettings::OctaveSettings(  )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalOctaveSettings()->q);
  s_globalOctaveSettings()->q = this;
  setCurrentGroup( QStringLiteral( "OctaveBackend" ) );

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

OctaveSettings::~OctaveSettings()
{
  s_globalOctaveSettings()->q = nullptr;
}

