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

#include "latexconfig.h"

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

class LatexConfigHelper
{
  public:
    LatexConfigHelper() : q(nullptr) {}
    ~LatexConfigHelper() { delete q; q = nullptr; }
    LatexConfigHelper(const LatexConfigHelper&) = delete;
    LatexConfigHelper& operator=(const LatexConfigHelper&) = delete;
    LatexConfig *q;
};
Q_GLOBAL_STATIC(LatexConfigHelper, s_globalLatexConfig)
LatexConfig *LatexConfig::self()
{
  if (!s_globalLatexConfig()->q) {
    new LatexConfig;
    s_globalLatexConfig()->q->read();
  }

  return s_globalLatexConfig()->q;
}

LatexConfig::LatexConfig( )
  : KConfigSkeleton( QStringLiteral( "ktp-text-uirc" ) )
{
  Q_ASSERT(!s_globalLatexConfig()->q);
  s_globalLatexConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Filter-Latex" ) );

  KConfigSkeleton::ItemString  *itemLatexCmd;
  itemLatexCmd = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LatexCmd" ), mLatexCmd, QStringLiteral( "latex -interaction=batchmode -halt-on-error" ) );
  addItem( itemLatexCmd, QStringLiteral( "LatexCmd" ) );
  KConfigSkeleton::ItemString  *itemLatexHeader;
  itemLatexHeader = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LatexHeader" ), mLatexHeader, QStringLiteral( "\\documentclass{minimal}\n"
"\\usepackage{color}\n"
"\\pagestyle{empty}\n"
"\\color{black}\n"
"" ) );
  addItem( itemLatexHeader, QStringLiteral( "LatexHeader" ) );
}

LatexConfig::~LatexConfig()
{
  if (s_globalLatexConfig.exists() && !s_globalLatexConfig.isDestroyed()) {
    s_globalLatexConfig()->q = nullptr;
  }
}

