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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(nullptr) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
Q_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings()->q) {
    new Settings;
    s_globalSettings()->q->read();
  }

  return s_globalSettings()->q;
}

Settings::Settings(  )
  : KConfigSkeleton()
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Cantor" ) );

  KConfigSkeleton::ItemString  *itemLatexCommand;
  itemLatexCommand = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "latexCommand" ), mLatexCommand, QStandardPaths::findExecutable( QLatin1String("latex") ) );
  addItem( itemLatexCommand, QStringLiteral( "latexCommand" ) );
  KConfigSkeleton::ItemString  *itemDvipsCommand;
  itemDvipsCommand = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "dvipsCommand" ), mDvipsCommand, QStandardPaths::findExecutable( QLatin1String("dvips") ) );
  addItem( itemDvipsCommand, QStringLiteral( "dvipsCommand" ) );
}

Settings::~Settings()
{
  s_globalSettings()->q = nullptr;
}

