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

#include "prefs_lokalize.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( QStringLiteral( "lokalizerc" ) )
{
  Q_ASSERT(!s_globalSettings()->q);
  s_globalSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Identity" ) );

  mAuthorNameItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "authorName" ), mAuthorName, KEMailSettings().getSetting(KEMailSettings::RealName) );
  mAuthorNameItem->setLabel( QCoreApplication::translate("Settings", "authorName") );
  addItem( mAuthorNameItem, QStringLiteral( "authorName" ) );
  mAuthorLocalizedNameItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "authorLocalizedName" ), mAuthorLocalizedName, KEMailSettings().getSetting(KEMailSettings::RealName) );
  mAuthorLocalizedNameItem->setLabel( QCoreApplication::translate("Settings", "authorLocalizedName") );
  addItem( mAuthorLocalizedNameItem, QStringLiteral( "authorLocalizedName" ) );
  mAuthorEmailItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "authorEmail" ), mAuthorEmail, KEMailSettings().getSetting(KEMailSettings::EmailAddress) );
  mAuthorEmailItem->setLabel( QCoreApplication::translate("Settings", "authorEmail") );
  addItem( mAuthorEmailItem, QStringLiteral( "authorEmail" ) );
  mDefaultLangCodeItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DefaultLangCode" ), mDefaultLangCode, QLocale::system().name() );
  mDefaultLangCodeItem->setLabel( QCoreApplication::translate("Settings", "DefaultLangCode") );
  addItem( mDefaultLangCodeItem, QStringLiteral( "DefaultLangCode" ) );
  mDefaultMailingListItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DefaultMailingList" ), mDefaultMailingList, getMailingList() );
  mDefaultMailingListItem->setLabel( QCoreApplication::translate("Settings", "DefaultMailingList") );
  addItem( mDefaultMailingListItem, QStringLiteral( "DefaultMailingList" ) );

  setCurrentGroup( QStringLiteral( "Appearance" ) );

  mAddColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "AddColor" ), mAddColor, QColor( "#99CCFF" ) );
  mAddColorItem->setLabel( QCoreApplication::translate("Settings", "AddColor") );
  addItem( mAddColorItem, QStringLiteral( "AddColor" ) );
  mDelColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "DelColor" ), mDelColor, QColor( "#FF9999" ) );
  mDelColorItem->setLabel( QCoreApplication::translate("Settings", "DelColor") );
  addItem( mDelColorItem, QStringLiteral( "DelColor" ) );
  mHighlightSpacesItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "HighlightSpaces" ), mHighlightSpaces, true );
  mHighlightSpacesItem->setLabel( QCoreApplication::translate("Settings", "HighlightSpaces") );
  addItem( mHighlightSpacesItem, QStringLiteral( "HighlightSpaces" ) );
  mMsgFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "MsgFont" ), mMsgFont, QFontDatabase::systemFont(QFontDatabase::GeneralFont) );
  mMsgFontItem->setLabel( QCoreApplication::translate("Settings", "MsgFont") );
  addItem( mMsgFontItem, QStringLiteral( "MsgFont" ) );
  mLedsItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Leds" ), mLeds, false );
  mLedsItem->setLabel( QCoreApplication::translate("Settings", "Leds") );
  addItem( mLedsItem, QStringLiteral( "Leds" ) );

  setCurrentGroup( QStringLiteral( "Editor" ) );

  mAutoApproveItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoApprove" ), mAutoApprove, true );
  mAutoApproveItem->setLabel( QCoreApplication::translate("Settings", "AutoApprove") );
  addItem( mAutoApproveItem, QStringLiteral( "AutoApprove" ) );
  mAutoSpellcheckItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoSpellcheck" ), mAutoSpellcheck, true );
  mAutoSpellcheckItem->setLabel( QCoreApplication::translate("Settings", "AutoSpellcheck") );
  addItem( mAutoSpellcheckItem, QStringLiteral( "AutoSpellcheck" ) );
  mMouseWheelGoItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MouseWheelGo" ), mMouseWheelGo, false );
  mMouseWheelGoItem->setLabel( QCoreApplication::translate("Settings", "MouseWheelGo") );
  addItem( mMouseWheelGoItem, QStringLiteral( "MouseWheelGo" ) );
  mWordCompletionLengthItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "WordCompletionLength" ), mWordCompletionLength, 4 );
  mWordCompletionLengthItem->setLabel( QCoreApplication::translate("Settings", "WordCompletionLength") );
  addItem( mWordCompletionLengthItem, QStringLiteral( "WordCompletionLength" ) );
  mAltTransViewEverShownWithDataItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AltTransViewEverShownWithData" ), mAltTransViewEverShownWithData, false );
  mAltTransViewEverShownWithDataItem->setLabel( QCoreApplication::translate("Settings", "AltTransViewEverShownWithData") );
  addItem( mAltTransViewEverShownWithDataItem, QStringLiteral( "AltTransViewEverShownWithData" ) );

  setCurrentGroup( QStringLiteral( "TM" ) );

  mPrefetchTMItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "PrefetchTM" ), mPrefetchTM, false );
  mPrefetchTMItem->setLabel( QCoreApplication::translate("Settings", "PrefetchTM") );
  addItem( mPrefetchTMItem, QStringLiteral( "PrefetchTM" ) );
  mSuggCountItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "SuggCount" ), mSuggCount, 7 );
  mSuggCountItem->setLabel( QCoreApplication::translate("Settings", "SuggCount") );
  addItem( mSuggCountItem, QStringLiteral( "SuggCount" ) );
  mAutoaddTMItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AutoaddTM" ), mAutoaddTM, true );
  mAutoaddTMItem->setLabel( QCoreApplication::translate("Settings", "AutoaddTM") );
  addItem( mAutoaddTMItem, QStringLiteral( "AutoaddTM" ) );
  mScanToTMOnOpenItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ScanToTMOnOpen" ), mScanToTMOnOpen, false );
  mScanToTMOnOpenItem->setLabel( QCoreApplication::translate("Settings", "ScanToTMOnOpen") );
  addItem( mScanToTMOnOpenItem, QStringLiteral( "ScanToTMOnOpen" ) );
}

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

