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

#include "settings.h"

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

class MaximaSettingsHelper
{
  public:
    MaximaSettingsHelper() : q(nullptr) {}
    ~MaximaSettingsHelper() { delete q; }
    MaximaSettings *q;
};
Q_GLOBAL_STATIC(MaximaSettingsHelper, s_globalMaximaSettings)
MaximaSettings *MaximaSettings::self()
{
  if (!s_globalMaximaSettings()->q) {
    new MaximaSettings;
    s_globalMaximaSettings()->q->read();
  }

  return s_globalMaximaSettings()->q;
}

MaximaSettings::MaximaSettings(  )
  : KConfigSkeleton( QStringLiteral( "cantorrc" ) )
{
  Q_ASSERT(!s_globalMaximaSettings()->q);
  s_globalMaximaSettings()->q = this;
  setCurrentGroup( QStringLiteral( "MaximaBackend" ) );

  KConfigSkeleton::ItemUrl  *itemPath;
  itemPath = new KConfigSkeleton::ItemUrl( currentGroup(), QStringLiteral( "Path" ), mPath, QUrl::fromLocalFile(QStandardPaths::findExecutable( QLatin1String("maxima") )) );
  addItem( itemPath, QStringLiteral( "Path" ) );
  KConfigSkeleton::ItemBool  *itemIntegratePlots;
  itemIntegratePlots = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "integratePlots" ), mIntegratePlots, true );
  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" ) );
}

MaximaSettings::~MaximaSettings()
{
  s_globalMaximaSettings()->q = nullptr;
}

