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

#include "settings.h"

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(nullptr) {}
    ~SettingsHelper() { delete q; q = nullptr; }
    SettingsHelper(const SettingsHelper&) = delete;
    SettingsHelper& operator=(const SettingsHelper&) = delete;
    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  *itemDefaultBackend;
  itemDefaultBackend = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DefaultBackend" ), mDefaultBackend );
  addItem( itemDefaultBackend, QStringLiteral( "DefaultBackend" ) );
  KConfigSkeleton::ItemBool  *itemTypesetDefault;
  itemTypesetDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "TypesetDefault" ), mTypesetDefault, true );
  addItem( itemTypesetDefault, QStringLiteral( "TypesetDefault" ) );
  KConfigSkeleton::ItemBool  *itemHighlightDefault;
  itemHighlightDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HighlightDefault" ), mHighlightDefault, true );
  addItem( itemHighlightDefault, QStringLiteral( "HighlightDefault" ) );
  KConfigSkeleton::ItemBool  *itemCompletionDefault;
  itemCompletionDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CompletionDefault" ), mCompletionDefault, true );
  addItem( itemCompletionDefault, QStringLiteral( "CompletionDefault" ) );
  KConfigSkeleton::ItemBool  *itemExpressionNumberingDefault;
  itemExpressionNumberingDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ExpressionNumberingDefault" ), mExpressionNumberingDefault, false );
  addItem( itemExpressionNumberingDefault, QStringLiteral( "ExpressionNumberingDefault" ) );
  KConfigSkeleton::ItemBool  *itemAnimationDefault;
  itemAnimationDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AnimationDefault" ), mAnimationDefault, true );
  addItem( itemAnimationDefault, QStringLiteral( "AnimationDefault" ) );
  KConfigSkeleton::ItemBool  *itemEmbeddedMathDefault;
  itemEmbeddedMathDefault = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "EmbeddedMathDefault" ), mEmbeddedMathDefault, true );
  addItem( itemEmbeddedMathDefault, QStringLiteral( "EmbeddedMathDefault" ) );
  KConfigSkeleton::ItemBool  *itemAutoEval;
  itemAutoEval = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoEval" ), mAutoEval, false );
  addItem( itemAutoEval, QStringLiteral( "AutoEval" ) );
  KConfigSkeleton::ItemBool  *itemWarnAboutSessionRestart;
  itemWarnAboutSessionRestart = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "WarnAboutSessionRestart" ), mWarnAboutSessionRestart, true );
  addItem( itemWarnAboutSessionRestart, QStringLiteral( "WarnAboutSessionRestart" ) );
  KConfigSkeleton::ItemBool  *itemStoreTextEntryFormatting;
  itemStoreTextEntryFormatting = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "StoreTextEntryFormatting" ), mStoreTextEntryFormatting, true );
  addItem( itemStoreTextEntryFormatting, QStringLiteral( "StoreTextEntryFormatting" ) );
  KConfigSkeleton::ItemBool  *itemUseOldCantorEntriesIndent;
  itemUseOldCantorEntriesIndent = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "UseOldCantorEntriesIndent" ), mUseOldCantorEntriesIndent, false );
  addItem( itemUseOldCantorEntriesIndent, QStringLiteral( "UseOldCantorEntriesIndent" ) );
  KConfigSkeleton::ItemBool  *itemShowMathRenderError;
  itemShowMathRenderError = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ShowMathRenderError" ), mShowMathRenderError, true );
  addItem( itemShowMathRenderError, QStringLiteral( "ShowMathRenderError" ) );
  KConfigSkeleton::ItemInt  *itemVisibleLinesLimit;
  itemVisibleLinesLimit = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "VisibleLinesLimit" ), mVisibleLinesLimit, 0 );
  addItem( itemVisibleLinesLimit, QStringLiteral( "VisibleLinesLimit" ) );
  KConfigSkeleton::ItemFont  *itemChapterFontFamily;
  itemChapterFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ChapterFontFamily" ), mChapterFontFamily, QApplication::font() );
  addItem( itemChapterFontFamily, QStringLiteral( "ChapterFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemChapterFontSize;
  itemChapterFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ChapterFontSize" ), mChapterFontSize, QApplication::font().pointSize() );
  addItem( itemChapterFontSize, QStringLiteral( "ChapterFontSize" ) );
  KConfigSkeleton::ItemBool  *itemChapterFontItalic;
  itemChapterFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ChapterFontItalic" ), mChapterFontItalic, false );
  addItem( itemChapterFontItalic, QStringLiteral( "ChapterFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemChapterFontBold;
  itemChapterFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ChapterFontBold" ), mChapterFontBold, false );
  addItem( itemChapterFontBold, QStringLiteral( "ChapterFontBold" ) );
  KConfigSkeleton::ItemFont  *itemSubchapterFontFamily;
  itemSubchapterFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "SubchapterFontFamily" ), mSubchapterFontFamily, QApplication::font() );
  addItem( itemSubchapterFontFamily, QStringLiteral( "SubchapterFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemSubchapterFontSize;
  itemSubchapterFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SubchapterFontSize" ), mSubchapterFontSize, QApplication::font().pointSize() );
  addItem( itemSubchapterFontSize, QStringLiteral( "SubchapterFontSize" ) );
  KConfigSkeleton::ItemBool  *itemSubchapterFontItalic;
  itemSubchapterFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubchapterFontItalic" ), mSubchapterFontItalic, false );
  addItem( itemSubchapterFontItalic, QStringLiteral( "SubchapterFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemSubchapterFontBold;
  itemSubchapterFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubchapterFontBold" ), mSubchapterFontBold, false );
  addItem( itemSubchapterFontBold, QStringLiteral( "SubchapterFontBold" ) );
  KConfigSkeleton::ItemFont  *itemSectionFontFamily;
  itemSectionFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "SectionFontFamily" ), mSectionFontFamily, QApplication::font() );
  addItem( itemSectionFontFamily, QStringLiteral( "SectionFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemSectionFontSize;
  itemSectionFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SectionFontSize" ), mSectionFontSize, QApplication::font().pointSize() );
  addItem( itemSectionFontSize, QStringLiteral( "SectionFontSize" ) );
  KConfigSkeleton::ItemBool  *itemSectionFontItalic;
  itemSectionFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SectionFontItalic" ), mSectionFontItalic, false );
  addItem( itemSectionFontItalic, QStringLiteral( "SectionFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemSectionFontBold;
  itemSectionFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SectionFontBold" ), mSectionFontBold, false );
  addItem( itemSectionFontBold, QStringLiteral( "SectionFontBold" ) );
  KConfigSkeleton::ItemFont  *itemSubsectionFontFamily;
  itemSubsectionFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "SubsectionFontFamily" ), mSubsectionFontFamily, QApplication::font() );
  addItem( itemSubsectionFontFamily, QStringLiteral( "SubsectionFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemSubsectionFontSize;
  itemSubsectionFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SubsectionFontSize" ), mSubsectionFontSize, QApplication::font().pointSize() );
  addItem( itemSubsectionFontSize, QStringLiteral( "SubsectionFontSize" ) );
  KConfigSkeleton::ItemBool  *itemSubsectionFontItalic;
  itemSubsectionFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubsectionFontItalic" ), mSubsectionFontItalic, false );
  addItem( itemSubsectionFontItalic, QStringLiteral( "SubsectionFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemSubsectionFontBold;
  itemSubsectionFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubsectionFontBold" ), mSubsectionFontBold, false );
  addItem( itemSubsectionFontBold, QStringLiteral( "SubsectionFontBold" ) );
  KConfigSkeleton::ItemFont  *itemParagraphFontFamily;
  itemParagraphFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "ParagraphFontFamily" ), mParagraphFontFamily, QApplication::font() );
  addItem( itemParagraphFontFamily, QStringLiteral( "ParagraphFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemParagraphFontSize;
  itemParagraphFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "ParagraphFontSize" ), mParagraphFontSize, QApplication::font().pointSize() );
  addItem( itemParagraphFontSize, QStringLiteral( "ParagraphFontSize" ) );
  KConfigSkeleton::ItemBool  *itemParagraphFontItalic;
  itemParagraphFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ParagraphFontItalic" ), mParagraphFontItalic, false );
  addItem( itemParagraphFontItalic, QStringLiteral( "ParagraphFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemParagraphFontBold;
  itemParagraphFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ParagraphFontBold" ), mParagraphFontBold, false );
  addItem( itemParagraphFontBold, QStringLiteral( "ParagraphFontBold" ) );
  KConfigSkeleton::ItemFont  *itemSubparagraphFontFamily;
  itemSubparagraphFontFamily = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "SubparagraphFontFamily" ), mSubparagraphFontFamily, QApplication::font() );
  addItem( itemSubparagraphFontFamily, QStringLiteral( "SubparagraphFontFamily" ) );
  KConfigSkeleton::ItemInt  *itemSubparagraphFontSize;
  itemSubparagraphFontSize = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SubparagraphFontSize" ), mSubparagraphFontSize, QApplication::font().pointSize() );
  addItem( itemSubparagraphFontSize, QStringLiteral( "SubparagraphFontSize" ) );
  KConfigSkeleton::ItemBool  *itemSubparagraphFontItalic;
  itemSubparagraphFontItalic = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubparagraphFontItalic" ), mSubparagraphFontItalic, false );
  addItem( itemSubparagraphFontItalic, QStringLiteral( "SubparagraphFontItalic" ) );
  KConfigSkeleton::ItemBool  *itemSubparagraphFontBold;
  itemSubparagraphFontBold = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SubparagraphFontBold" ), mSubparagraphFontBold, false );
  addItem( itemSubparagraphFontBold, QStringLiteral( "SubparagraphFontBold" ) );
}

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

