// This file is generated by tdeconfig_compiler from khelpcenter.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( "khelpcenterrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "Search" ) );

  TDEConfigSkeleton::ItemPath  *itemIndexDirectory;
  itemIndexDirectory = new TDEConfigSkeleton::ItemPath( currentGroup(), TQString::fromLatin1( "IndexDirectory" ), mIndexDirectory, TDEGlobal::dirs()->saveLocation("data", "khelpcenter/index/") );
  addItem( itemIndexDirectory, TQString::fromLatin1( "IndexDirectory" ) );
  TDEConfigSkeleton::ItemInt  *itemMethod;
  itemMethod = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Method" ), mMethod, 0 );
  addItem( itemMethod, TQString::fromLatin1( "Method" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxCount;
  itemMaxCount = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "MaxCount" ), mMaxCount, 0 );
  addItem( itemMaxCount, TQString::fromLatin1( "MaxCount" ) );

  setCurrentGroup( TQString::fromLatin1( "Layout" ) );

  TQValueList<TDEConfigSkeleton::ItemEnum::Choice> valuesCurrentTab;
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Content" );
    valuesCurrentTab.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Search" );
    valuesCurrentTab.append( choice );
  }
  {
    TDEConfigSkeleton::ItemEnum::Choice choice;
    choice.name = TQString::fromLatin1( "Glossary" );
    valuesCurrentTab.append( choice );
  }
  TDEConfigSkeleton::ItemEnum  *itemCurrentTab;
  itemCurrentTab = new TDEConfigSkeleton::ItemEnum( currentGroup(), TQString::fromLatin1( "CurrentTab" ), mCurrentTab, valuesCurrentTab, Content );
  addItem( itemCurrentTab, TQString::fromLatin1( "CurrentTab" ) );
}

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

