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

#include "prefs_lokalize.h"

#include <klocale.h>

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

class SettingsHelper
{
  public:
    SettingsHelper() : q(0) {}
    ~SettingsHelper() { delete q; }
    Settings *q;
};
K_GLOBAL_STATIC(SettingsHelper, s_globalSettings)
Settings *Settings::self()
{
  if (!s_globalSettings->q) {
    new Settings;
    s_globalSettings->q->readConfig();
  }

  return s_globalSettings->q;
}

Settings::Settings(  )
  : KConfigSkeleton( QLatin1String( "lokalizerc" ) )
{
  Q_ASSERT(!s_globalSettings->q);
  s_globalSettings->q = this;
  setCurrentGroup( QLatin1String( "Identity" ) );

  mAuthorNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorName" ), mAuthorName, KEMailSettings().getSetting(KEMailSettings::RealName) );
  mAuthorNameItem->setLabel( i18n("authorName") );
  addItem( mAuthorNameItem, QLatin1String( "authorName" ) );
  mAuthorLocalizedNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorLocalizedName" ), mAuthorLocalizedName, KEMailSettings().getSetting(KEMailSettings::RealName) );
  mAuthorLocalizedNameItem->setLabel( i18n("authorLocalizedName") );
  addItem( mAuthorLocalizedNameItem, QLatin1String( "authorLocalizedName" ) );
  mAuthorEmailItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "authorEmail" ), mAuthorEmail, KEMailSettings().getSetting(KEMailSettings::EmailAddress) );
  mAuthorEmailItem->setLabel( i18n("authorEmail") );
  addItem( mAuthorEmailItem, QLatin1String( "authorEmail" ) );
  mDefaultLangCodeItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DefaultLangCode" ), mDefaultLangCode, KGlobal::locale()->language() );
  mDefaultLangCodeItem->setLabel( i18n("DefaultLangCode") );
  addItem( mDefaultLangCodeItem, QLatin1String( "DefaultLangCode" ) );
  mDefaultMailingListItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "DefaultMailingList" ), mDefaultMailingList, getMailingList() );
  mDefaultMailingListItem->setLabel( i18n("DefaultMailingList") );
  addItem( mDefaultMailingListItem, QLatin1String( "DefaultMailingList" ) );

  setCurrentGroup( QLatin1String( "Appearance" ) );

  mAddColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "AddColor" ), mAddColor, QColor( "#99CCFF" ) );
  mAddColorItem->setLabel( i18n("AddColor") );
  addItem( mAddColorItem, QLatin1String( "AddColor" ) );
  mDelColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QLatin1String( "DelColor" ), mDelColor, QColor( "#FF9999" ) );
  mDelColorItem->setLabel( i18n("DelColor") );
  addItem( mDelColorItem, QLatin1String( "DelColor" ) );
  mHighlightSpacesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "HighlightSpaces" ), mHighlightSpaces, true );
  mHighlightSpacesItem->setLabel( i18n("HighlightSpaces") );
  addItem( mHighlightSpacesItem, QLatin1String( "HighlightSpaces" ) );
  mMsgFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QLatin1String( "MsgFont" ), mMsgFont, KGlobalSettings::generalFont() );
  mMsgFontItem->setLabel( i18n("MsgFont") );
  addItem( mMsgFontItem, QLatin1String( "MsgFont" ) );
  mLedsItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "Leds" ), mLeds, false );
  mLedsItem->setLabel( i18n("Leds") );
  addItem( mLedsItem, QLatin1String( "Leds" ) );

  setCurrentGroup( QLatin1String( "Editor" ) );

  mAutoApproveItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoApprove" ), mAutoApprove, true );
  mAutoApproveItem->setLabel( i18n("AutoApprove") );
  addItem( mAutoApproveItem, QLatin1String( "AutoApprove" ) );
  mAutoSpellcheckItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "AutoSpellcheck" ), mAutoSpellcheck, true );
  mAutoSpellcheckItem->setLabel( i18n("AutoSpellcheck") );
  addItem( mAutoSpellcheckItem, QLatin1String( "AutoSpellcheck" ) );
  mMouseWheelGoItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "MouseWheelGo" ), mMouseWheelGo, false );
  mMouseWheelGoItem->setLabel( i18n("MouseWheelGo") );
  addItem( mMouseWheelGoItem, QLatin1String( "MouseWheelGo" ) );
  mWordCompletionLengthItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "WordCompletionLength" ), mWordCompletionLength, 4 );
  mWordCompletionLengthItem->setLabel( i18n("WordCompletionLength") );
  addItem( mWordCompletionLengthItem, QLatin1String( "WordCompletionLength" ) );

  setCurrentGroup( QLatin1String( "TM" ) );

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

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

