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

  TDEConfigSkeleton::ItemInt  *itemPort;
  itemPort = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "port" ), mPort, 7442 );
  addItem( itemPort, TQString::fromLatin1( "port" ) );
  TDEConfigSkeleton::ItemString  *itemGamename;
  itemGamename = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "gamename" ), mGamename );
  addItem( itemGamename, TQString::fromLatin1( "gamename" ) );
  TDEConfigSkeleton::ItemString  *itemHost;
  itemHost = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "host" ), mHost, TQString::fromLatin1( "localhost" ) );
  addItem( itemHost, TQString::fromLatin1( "host" ) );
  TDEConfigSkeleton::ItemInt  *itemLevel;
  itemLevel = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "level" ), mLevel, 3 );
  itemLevel->setMinValue(0);
  itemLevel->setMaxValue(5);
  addItem( itemLevel, TQString::fromLatin1( "level" ) );
  TDEConfigSkeleton::ItemString  *itemName1;
  itemName1 = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Name1" ), mName1, TQString::fromLatin1( "Player 1" ) );
  addItem( itemName1, TQString::fromLatin1( "Name1" ) );
  TDEConfigSkeleton::ItemString  *itemName2;
  itemName2 = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "Name2" ), mName2, TQString::fromLatin1( "Player 2" ) );
  addItem( itemName2, TQString::fromLatin1( "Name2" ) );
  TDEConfigSkeleton::ItemInt  *itemInput1;
  itemInput1 = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Input1" ), mInput1, 0 );
  addItem( itemInput1, TQString::fromLatin1( "Input1" ) );
  TDEConfigSkeleton::ItemInt  *itemInput2;
  itemInput2 = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Input2" ), mInput2, 0 );
  addItem( itemInput2, TQString::fromLatin1( "Input2" ) );
  TDEConfigSkeleton::ItemInt  *itemColour1;
  itemColour1 = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "Colour1" ), mColour1, 0 );
  addItem( itemColour1, TQString::fromLatin1( "Colour1" ) );
}

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

