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

#include "settings.h"

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

class RServerSettingsHelper
{
  public:
    RServerSettingsHelper() : q(nullptr) {}
    ~RServerSettingsHelper() { delete q; }
    RServerSettings *q;
};
Q_GLOBAL_STATIC(RServerSettingsHelper, s_globalRServerSettings)
RServerSettings *RServerSettings::self()
{
  if (!s_globalRServerSettings()->q) {
    new RServerSettings;
    s_globalRServerSettings()->q->read();
  }

  return s_globalRServerSettings()->q;
}

RServerSettings::RServerSettings(  )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalRServerSettings()->q);
  s_globalRServerSettings()->q = this;
  setCurrentGroup( QStringLiteral( "RBackend" ) );

  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" ) );
}

RServerSettings::~RServerSettings()
{
  s_globalRServerSettings()->q = nullptr;
}

