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

#include "settings.h"

#include <kstaticdeleter.h>

Settings *Settings::mSelf = 0;
static KStaticDeleter<Settings> staticSettingsDeleter;

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

  return mSelf;
}

Settings::Settings(  )
  : TDEConfigSkeleton( TQString::fromLatin1( "ktorrentrc" ) )
{
  mSelf = this;
  setCurrentGroup( TQString::fromLatin1( "downloads" ) );

  TDEConfigSkeleton::ItemInt  *itemMaxDownloads;
  itemMaxDownloads = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxDownloads" ), mMaxDownloads, 0 );
  itemMaxDownloads->setMinValue(0);
  addItem( itemMaxDownloads, TQString::fromLatin1( "maxDownloads" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxSeeds;
  itemMaxSeeds = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxSeeds" ), mMaxSeeds, 0 );
  itemMaxSeeds->setMinValue(0);
  addItem( itemMaxSeeds, TQString::fromLatin1( "maxSeeds" ) );
  TDEConfigSkeleton::ItemInt  *itemStartDownloadsOnLowDiskSpace;
  itemStartDownloadsOnLowDiskSpace = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "startDownloadsOnLowDiskSpace" ), mStartDownloadsOnLowDiskSpace, 0 );
  addItem( itemStartDownloadsOnLowDiskSpace, TQString::fromLatin1( "startDownloadsOnLowDiskSpace" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxConnections;
  itemMaxConnections = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxConnections" ), mMaxConnections, 120 );
  itemMaxConnections->setMinValue(0);
  addItem( itemMaxConnections, TQString::fromLatin1( "maxConnections" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxTotalConnections;
  itemMaxTotalConnections = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxTotalConnections" ), mMaxTotalConnections, 800 );
  itemMaxTotalConnections->setMinValue(0);
  addItem( itemMaxTotalConnections, TQString::fromLatin1( "maxTotalConnections" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxUploadRate;
  itemMaxUploadRate = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxUploadRate" ), mMaxUploadRate, 0 );
  itemMaxUploadRate->setMinValue(0);
  addItem( itemMaxUploadRate, TQString::fromLatin1( "maxUploadRate" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxDownloadRate;
  itemMaxDownloadRate = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxDownloadRate" ), mMaxDownloadRate, 0 );
  itemMaxDownloadRate->setMinValue(0);
  addItem( itemMaxDownloadRate, TQString::fromLatin1( "maxDownloadRate" ) );
  TDEConfigSkeleton::ItemDouble  *itemMaxRatio;
  itemMaxRatio = new TDEConfigSkeleton::ItemDouble( currentGroup(), TQString::fromLatin1( "maxRatio" ), mMaxRatio, 0 );
  itemMaxRatio->setMinValue(0);
  addItem( itemMaxRatio, TQString::fromLatin1( "maxRatio" ) );
  TDEConfigSkeleton::ItemDouble  *itemMaxSeedTime;
  itemMaxSeedTime = new TDEConfigSkeleton::ItemDouble( currentGroup(), TQString::fromLatin1( "maxSeedTime" ), mMaxSeedTime, 0 );
  itemMaxSeedTime->setMinValue(0);
  addItem( itemMaxSeedTime, TQString::fromLatin1( "maxSeedTime" ) );
  TDEConfigSkeleton::ItemInt  *itemPort;
  itemPort = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "port" ), mPort, 6881 );
  itemPort->setMinValue(0);
  itemPort->setMaxValue(65535);
  addItem( itemPort, TQString::fromLatin1( "port" ) );
  TDEConfigSkeleton::ItemInt  *itemUdpTrackerPort;
  itemUdpTrackerPort = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "udpTrackerPort" ), mUdpTrackerPort, 4444 );
  itemUdpTrackerPort->setMinValue(0);
  itemUdpTrackerPort->setMaxValue(65535);
  addItem( itemUdpTrackerPort, TQString::fromLatin1( "udpTrackerPort" ) );
  TDEConfigSkeleton::ItemBool  *itemShowSystemTrayIcon;
  itemShowSystemTrayIcon = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "showSystemTrayIcon" ), mShowSystemTrayIcon, true );
  addItem( itemShowSystemTrayIcon, TQString::fromLatin1( "showSystemTrayIcon" ) );
  TDEConfigSkeleton::ItemBool  *itemShowSpeedBarInTrayIcon;
  itemShowSpeedBarInTrayIcon = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "showSpeedBarInTrayIcon" ), mShowSpeedBarInTrayIcon, false );
  addItem( itemShowSpeedBarInTrayIcon, TQString::fromLatin1( "showSpeedBarInTrayIcon" ) );
  TDEConfigSkeleton::ItemInt  *itemDownloadBandwidth;
  itemDownloadBandwidth = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "downloadBandwidth" ), mDownloadBandwidth, 500 );
  itemDownloadBandwidth->setMinValue(0);
  itemDownloadBandwidth->setMaxValue(1000000);
  addItem( itemDownloadBandwidth, TQString::fromLatin1( "downloadBandwidth" ) );
  TDEConfigSkeleton::ItemInt  *itemUploadBandwidth;
  itemUploadBandwidth = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "uploadBandwidth" ), mUploadBandwidth, 500 );
  itemUploadBandwidth->setMinValue(0);
  itemUploadBandwidth->setMaxValue(1000000);
  addItem( itemUploadBandwidth, TQString::fromLatin1( "uploadBandwidth" ) );
  TDEConfigSkeleton::ItemBool  *itemShowPopups;
  itemShowPopups = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "showPopups" ), mShowPopups, true );
  addItem( itemShowPopups, TQString::fromLatin1( "showPopups" ) );
  TDEConfigSkeleton::ItemBool  *itemKeepSeeding;
  itemKeepSeeding = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "keepSeeding" ), mKeepSeeding, true );
  addItem( itemKeepSeeding, TQString::fromLatin1( "keepSeeding" ) );
  TDEConfigSkeleton::ItemString  *itemTempDir;
  itemTempDir = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "tempDir" ), mTempDir, TQString::null );
  addItem( itemTempDir, TQString::fromLatin1( "tempDir" ) );
  TDEConfigSkeleton::ItemBool  *itemUseSaveDir;
  itemUseSaveDir = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "useSaveDir" ), mUseSaveDir, false );
  addItem( itemUseSaveDir, TQString::fromLatin1( "useSaveDir" ) );
  TDEConfigSkeleton::ItemString  *itemSaveDir;
  itemSaveDir = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "saveDir" ), mSaveDir, TQString::null );
  addItem( itemSaveDir, TQString::fromLatin1( "saveDir" ) );
  TDEConfigSkeleton::ItemBool  *itemUseCompletedDir;
  itemUseCompletedDir = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "useCompletedDir" ), mUseCompletedDir, false );
  addItem( itemUseCompletedDir, TQString::fromLatin1( "useCompletedDir" ) );
  TDEConfigSkeleton::ItemString  *itemCompletedDir;
  itemCompletedDir = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "completedDir" ), mCompletedDir, TQString::null );
  addItem( itemCompletedDir, TQString::fromLatin1( "completedDir" ) );
  TDEConfigSkeleton::ItemBool  *itemUseTorrentCopyDir;
  itemUseTorrentCopyDir = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "useTorrentCopyDir" ), mUseTorrentCopyDir, false );
  addItem( itemUseTorrentCopyDir, TQString::fromLatin1( "useTorrentCopyDir" ) );
  TDEConfigSkeleton::ItemString  *itemTorrentCopyDir;
  itemTorrentCopyDir = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "torrentCopyDir" ), mTorrentCopyDir, TQString::null );
  addItem( itemTorrentCopyDir, TQString::fromLatin1( "torrentCopyDir" ) );
  TDEConfigSkeleton::ItemBool  *itemUseExternalIP;
  itemUseExternalIP = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "useExternalIP" ), mUseExternalIP, false );
  addItem( itemUseExternalIP, TQString::fromLatin1( "useExternalIP" ) );
  TDEConfigSkeleton::ItemString  *itemLastSaveDir;
  itemLastSaveDir = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "lastSaveDir" ), mLastSaveDir, TQString::null );
  addItem( itemLastSaveDir, TQString::fromLatin1( "lastSaveDir" ) );
  TDEConfigSkeleton::ItemString  *itemExternalIP;
  itemExternalIP = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "externalIP" ), mExternalIP, TQString::null );
  addItem( itemExternalIP, TQString::fromLatin1( "externalIP" ) );
  TDEConfigSkeleton::ItemInt  *itemMemoryUsage;
  itemMemoryUsage = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "memoryUsage" ), mMemoryUsage, 0 );
  addItem( itemMemoryUsage, TQString::fromLatin1( "memoryUsage" ) );
  TDEConfigSkeleton::ItemInt  *itemGuiUpdateInterval;
  itemGuiUpdateInterval = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "guiUpdateInterval" ), mGuiUpdateInterval, 0 );
  addItem( itemGuiUpdateInterval, TQString::fromLatin1( "guiUpdateInterval" ) );
  TDEConfigSkeleton::ItemBool  *itemDhtSupport;
  itemDhtSupport = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "dhtSupport" ), mDhtSupport, false );
  addItem( itemDhtSupport, TQString::fromLatin1( "dhtSupport" ) );
  TDEConfigSkeleton::ItemInt  *itemDhtPort;
  itemDhtPort = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "dhtPort" ), mDhtPort, 6881 );
  itemDhtPort->setMinValue(0);
  itemDhtPort->setMaxValue(65535);
  addItem( itemDhtPort, TQString::fromLatin1( "dhtPort" ) );
  TDEConfigSkeleton::ItemInt  *itemNumUploadSlots;
  itemNumUploadSlots = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "numUploadSlots" ), mNumUploadSlots, 2 );
  itemNumUploadSlots->setMinValue(2);
  itemNumUploadSlots->setMaxValue(100);
  addItem( itemNumUploadSlots, TQString::fromLatin1( "numUploadSlots" ) );
  TDEConfigSkeleton::ItemBool  *itemUseEncryption;
  itemUseEncryption = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "useEncryption" ), mUseEncryption, false );
  addItem( itemUseEncryption, TQString::fromLatin1( "useEncryption" ) );
  TDEConfigSkeleton::ItemBool  *itemAllowUnencryptedConnections;
  itemAllowUnencryptedConnections = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "allowUnencryptedConnections" ), mAllowUnencryptedConnections, true );
  addItem( itemAllowUnencryptedConnections, TQString::fromLatin1( "allowUnencryptedConnections" ) );
  TDEConfigSkeleton::ItemBool  *itemAllwaysDoUploadDataCheck;
  itemAllwaysDoUploadDataCheck = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "allwaysDoUploadDataCheck" ), mAllwaysDoUploadDataCheck, true );
  addItem( itemAllwaysDoUploadDataCheck, TQString::fromLatin1( "allwaysDoUploadDataCheck" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxSizeForUploadDataCheck;
  itemMaxSizeForUploadDataCheck = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxSizeForUploadDataCheck" ), mMaxSizeForUploadDataCheck, 512 );
  itemMaxSizeForUploadDataCheck->setMinValue(128);
  itemMaxSizeForUploadDataCheck->setMaxValue(8192);
  addItem( itemMaxSizeForUploadDataCheck, TQString::fromLatin1( "maxSizeForUploadDataCheck" ) );
  TDEConfigSkeleton::ItemInt  *itemTypeOfService;
  itemTypeOfService = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "typeOfService" ), mTypeOfService, 8 );
  itemTypeOfService->setMinValue(0);
  itemTypeOfService->setMaxValue(255);
  addItem( itemTypeOfService, TQString::fromLatin1( "typeOfService" ) );
  TDEConfigSkeleton::ItemInt  *itemDSCP;
  itemDSCP = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "DSCP" ), mDSCP, 0 );
  itemDSCP->setMinValue(0);
  itemDSCP->setMaxValue(63);
  addItem( itemDSCP, TQString::fromLatin1( "DSCP" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxConnectingSockets;
  itemMaxConnectingSockets = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxConnectingSockets" ), mMaxConnectingSockets, 50 );
  itemMaxConnectingSockets->setMinValue(10);
  itemMaxConnectingSockets->setMaxValue(500);
  addItem( itemMaxConnectingSockets, TQString::fromLatin1( "maxConnectingSockets" ) );
  TDEConfigSkeleton::ItemBool  *itemAutoRecheck;
  itemAutoRecheck = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "autoRecheck" ), mAutoRecheck, true );
  addItem( itemAutoRecheck, TQString::fromLatin1( "autoRecheck" ) );
  TDEConfigSkeleton::ItemInt  *itemMaxCorruptedBeforeRecheck;
  itemMaxCorruptedBeforeRecheck = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "maxCorruptedBeforeRecheck" ), mMaxCorruptedBeforeRecheck, 3 );
  itemMaxCorruptedBeforeRecheck->setMinValue(1);
  addItem( itemMaxCorruptedBeforeRecheck, TQString::fromLatin1( "maxCorruptedBeforeRecheck" ) );
  TQValueList<int> defaultshownColumns;

  TDEConfigSkeleton::ItemIntList  *itemShownColumns;
  itemShownColumns = new TDEConfigSkeleton::ItemIntList( currentGroup(), TQString::fromLatin1( "shownColumns" ), mShownColumns, defaultshownColumns );
  addItem( itemShownColumns, TQString::fromLatin1( "shownColumns" ) );
  TDEConfigSkeleton::ItemBool  *itemDoNotUseKDEProxy;
  itemDoNotUseKDEProxy = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "doNotUseKDEProxy" ), mDoNotUseKDEProxy, false );
  addItem( itemDoNotUseKDEProxy, TQString::fromLatin1( "doNotUseKDEProxy" ) );
  TDEConfigSkeleton::ItemString  *itemHttpTrackerProxy;
  itemHttpTrackerProxy = new TDEConfigSkeleton::ItemString( currentGroup(), TQString::fromLatin1( "httpTrackerProxy" ), mHttpTrackerProxy, TQString::null );
  addItem( itemHttpTrackerProxy, TQString::fromLatin1( "httpTrackerProxy" ) );
  TDEConfigSkeleton::ItemInt  *itemEta;
  itemEta = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "eta" ), mEta, 0 );
  addItem( itemEta, TQString::fromLatin1( "eta" ) );
  TDEConfigSkeleton::ItemBool  *itemDiskPrealloc;
  itemDiskPrealloc = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "diskPrealloc" ), mDiskPrealloc, true );
  addItem( itemDiskPrealloc, TQString::fromLatin1( "diskPrealloc" ) );
  TDEConfigSkeleton::ItemBool  *itemFullDiskPrealloc;
  itemFullDiskPrealloc = new TDEConfigSkeleton::ItemBool( currentGroup(), TQString::fromLatin1( "fullDiskPrealloc" ), mFullDiskPrealloc, false );
  addItem( itemFullDiskPrealloc, TQString::fromLatin1( "fullDiskPrealloc" ) );
  TDEConfigSkeleton::ItemInt  *itemFullDiskPreallocMethod;
  itemFullDiskPreallocMethod = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "fullDiskPreallocMethod" ), mFullDiskPreallocMethod, 0 );
  addItem( itemFullDiskPreallocMethod, TQString::fromLatin1( "fullDiskPreallocMethod" ) );
  TDEConfigSkeleton::ItemInt  *itemCpuUsage;
  itemCpuUsage = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "cpuUsage" ), mCpuUsage, 25 );
  itemCpuUsage->setMinValue(1);
  itemCpuUsage->setMaxValue(50);
  addItem( itemCpuUsage, TQString::fromLatin1( "cpuUsage" ) );
  TDEConfigSkeleton::ItemInt  *itemMinDiskSpace;
  itemMinDiskSpace = new TDEConfigSkeleton::ItemInt( currentGroup(), TQString::fromLatin1( "minDiskSpace" ), mMinDiskSpace, 100 );
  itemMinDiskSpace->setMinValue(10);
  itemMinDiskSpace->setMaxValue(10000);
  addItem( itemMinDiskSpace, TQString::fromLatin1( "minDiskSpace" ) );
}

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

