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

#include "prefs.h"

#include <kstaticdeleter.h>

Prefs *Prefs::mSelf = 0;
static KStaticDeleter<Prefs> staticPrefsDeleter;

Prefs *Prefs::self()
{
  if ( !mSelf ) {
    staticPrefsDeleter.setObject( mSelf, new Prefs() );
    mSelf->readConfig();
  }

  return mSelf;
}

Prefs::Prefs(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "keditrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Text Font" ) );

  TDEConfigSkeleton::ItemFont  *itemFont;
  itemFont = new TDEConfigSkeleton::ItemFont( currentGroup(), TQString::fromLatin1( "KEditFont" ), mFont, TDEGlobalSettings::fixedFont() );
  addItem( itemFont, TQString::fromLatin1( "Font" ) );

  setCurrentGroup( TQString::fromLatin1( "General Options" ) );

  TDEConfigSkeleton::ItemBool  *itemCustomColor;
  itemCustomColor = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "CustomColor" ), mCustomColor, false );
  addItem( itemCustomColor, TQString::fromLatin1( "CustomColor" ) );
  TDEConfigSkeleton::ItemColor  *itemTextColor;
  itemTextColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "ForeColor" ), mTextColor, TDEGlobalSettings::textColor() );
  addItem( itemTextColor, TQString::fromLatin1( "TextColor" ) );
  TDEConfigSkeleton::ItemColor  *itemBackgroundColor;
  itemBackgroundColor = new TDEConfigSkeleton::ItemColor( currentGroup(), TQString::fromLatin1( "BackColor" ), mBackgroundColor, TDEGlobalSettings::baseColor() );
  addItem( itemBackgroundColor, TQString::fromLatin1( "BackgroundColor" ) );
  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesWrapMode;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "NoWrap" );
    valuesWrapMode.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "SoftWrap" );
    valuesWrapMode.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "FixedColumnWrap" );
    valuesWrapMode.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemWrapMode;
  itemWrapMode = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "WrapMode" ), mWrapMode, valuesWrapMode, EnumWrapMode::SoftWrap );
  addItem( itemWrapMode, TQString::fromLatin1( "WrapMode" ) );
  TDEConfigSkeleton::ItemInt  *itemWrapColumn;
  itemWrapColumn = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "WrapColumn" ), mWrapColumn, 79 );
  addItem( itemWrapColumn, TQString::fromLatin1( "WrapColumn" ) );
  TDEConfigSkeleton::ItemBool  *itemBackupCopies;
  itemBackupCopies = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "BackupCopies" ), mBackupCopies, true );
  addItem( itemBackupCopies, TQString::fromLatin1( "BackupCopies" ) );
}

Prefs::~Prefs()
{
  if ( mSelf == this )
    staticPrefsDeleter.setObject( mSelf, 0, false );
}

