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

#include <libktorrent_export.h>

#include <tdeconfigskeleton.h>
#include <kdebug.h>

class LIBKTORRENT_EXPORT Settings : public TDEConfigSkeleton
{
  public:

    static Settings *self();
    ~Settings();

    /**
      Set Maximum number of downloads (0 = no limit)
    */
    static
    void setMaxDownloads( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxDownloads: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxDownloads" ) ))
        self()->mMaxDownloads = v;
    }

    /**
      Get Maximum number of downloads (0 = no limit)
    */
    static
    int maxDownloads()
    {
      return self()->mMaxDownloads;
    }

    /**
      Set Maximum number of seeds (0 = no limit)
    */
    static
    void setMaxSeeds( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxSeeds: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxSeeds" ) ))
        self()->mMaxSeeds = v;
    }

    /**
      Get Maximum number of seeds (0 = no limit)
    */
    static
    int maxSeeds()
    {
      return self()->mMaxSeeds;
    }

    /**
      Set Start downloads on low disk space?
    */
    static
    void setStartDownloadsOnLowDiskSpace( int v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "startDownloadsOnLowDiskSpace" ) ))
        self()->mStartDownloadsOnLowDiskSpace = v;
    }

    /**
      Get Start downloads on low disk space?
    */
    static
    int startDownloadsOnLowDiskSpace()
    {
      return self()->mStartDownloadsOnLowDiskSpace;
    }

    /**
      Set Maximum number of connections per torrent (0 = no limit)
    */
    static
    void setMaxConnections( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxConnections: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxConnections" ) ))
        self()->mMaxConnections = v;
    }

    /**
      Get Maximum number of connections per torrent (0 = no limit)
    */
    static
    int maxConnections()
    {
      return self()->mMaxConnections;
    }

    /**
      Set Maximum number of connections for all torrents (0 = no limit) 
    */
    static
    void setMaxTotalConnections( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxTotalConnections: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxTotalConnections" ) ))
        self()->mMaxTotalConnections = v;
    }

    /**
      Get Maximum number of connections for all torrents (0 = no limit) 
    */
    static
    int maxTotalConnections()
    {
      return self()->mMaxTotalConnections;
    }

    /**
      Set Maximum upload speed in KB/sec (0 = no limit)
    */
    static
    void setMaxUploadRate( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxUploadRate: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxUploadRate" ) ))
        self()->mMaxUploadRate = v;
    }

    /**
      Get Maximum upload speed in KB/sec (0 = no limit)
    */
    static
    int maxUploadRate()
    {
      return self()->mMaxUploadRate;
    }

    /**
      Set Maximum download speed in KB/sec (0 = no limit)
    */
    static
    void setMaxDownloadRate( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxDownloadRate: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxDownloadRate" ) ))
        self()->mMaxDownloadRate = v;
    }

    /**
      Get Maximum download speed in KB/sec (0 = no limit)
    */
    static
    int maxDownloadRate()
    {
      return self()->mMaxDownloadRate;
    }

    /**
      Set Maximum share ratio(0 = no limit)
    */
    static
    void setMaxRatio( double v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxRatio: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxRatio" ) ))
        self()->mMaxRatio = v;
    }

    /**
      Get Maximum share ratio(0 = no limit)
    */
    static
    double maxRatio()
    {
      return self()->mMaxRatio;
    }

    /**
      Set Maximum seed time in hours (0 = no limit)
    */
    static
    void setMaxSeedTime( double v )
    {
      if (v < 0)
      {
        kdDebug() << "setMaxSeedTime: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxSeedTime" ) ))
        self()->mMaxSeedTime = v;
    }

    /**
      Get Maximum seed time in hours (0 = no limit)
    */
    static
    double maxSeedTime()
    {
      return self()->mMaxSeedTime;
    }

    /**
      Set Port
    */
    static
    void setPort( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setPort: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 65535)
      {
        kdDebug() << "setPort: value " << v << " is greater than the maximum value of 65535" << endl;
        v = 65535;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "port" ) ))
        self()->mPort = v;
    }

    /**
      Get Port
    */
    static
    int port()
    {
      return self()->mPort;
    }

    /**
      Set Port
    */
    static
    void setUdpTrackerPort( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setUdpTrackerPort: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 65535)
      {
        kdDebug() << "setUdpTrackerPort: value " << v << " is greater than the maximum value of 65535" << endl;
        v = 65535;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "udpTrackerPort" ) ))
        self()->mUdpTrackerPort = v;
    }

    /**
      Get Port
    */
    static
    int udpTrackerPort()
    {
      return self()->mUdpTrackerPort;
    }

    /**
      Set Show a system tray icon
    */
    static
    void setShowSystemTrayIcon( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "showSystemTrayIcon" ) ))
        self()->mShowSystemTrayIcon = v;
    }

    /**
      Get Show a system tray icon
    */
    static
    bool showSystemTrayIcon()
    {
      return self()->mShowSystemTrayIcon;
    }

    /**
      Set Show speed bar in tray icon
    */
    static
    void setShowSpeedBarInTrayIcon( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "showSpeedBarInTrayIcon" ) ))
        self()->mShowSpeedBarInTrayIcon = v;
    }

    /**
      Get Show speed bar in tray icon
    */
    static
    bool showSpeedBarInTrayIcon()
    {
      return self()->mShowSpeedBarInTrayIcon;
    }

    /**
      Set Download bandwidth (in kb/s):
    */
    static
    void setDownloadBandwidth( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setDownloadBandwidth: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 1000000)
      {
        kdDebug() << "setDownloadBandwidth: value " << v << " is greater than the maximum value of 1000000" << endl;
        v = 1000000;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "downloadBandwidth" ) ))
        self()->mDownloadBandwidth = v;
    }

    /**
      Get Download bandwidth (in kb/s):
    */
    static
    int downloadBandwidth()
    {
      return self()->mDownloadBandwidth;
    }

    /**
      Set Upload bandwidth (in kb/s):
    */
    static
    void setUploadBandwidth( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setUploadBandwidth: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 1000000)
      {
        kdDebug() << "setUploadBandwidth: value " << v << " is greater than the maximum value of 1000000" << endl;
        v = 1000000;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "uploadBandwidth" ) ))
        self()->mUploadBandwidth = v;
    }

    /**
      Get Upload bandwidth (in kb/s):
    */
    static
    int uploadBandwidth()
    {
      return self()->mUploadBandwidth;
    }

    /**
      Set Show popup messages when torrent is finished.
    */
    static
    void setShowPopups( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "showPopups" ) ))
        self()->mShowPopups = v;
    }

    /**
      Get Show popup messages when torrent is finished.
    */
    static
    bool showPopups()
    {
      return self()->mShowPopups;
    }

    /**
      Set Keep seeding after download has finished
    */
    static
    void setKeepSeeding( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "keepSeeding" ) ))
        self()->mKeepSeeding = v;
    }

    /**
      Get Keep seeding after download has finished
    */
    static
    bool keepSeeding()
    {
      return self()->mKeepSeeding;
    }

    /**
      Set Folder to store temporary files
    */
    static
    void setTempDir( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "tempDir" ) ))
        self()->mTempDir = v;
    }

    /**
      Get Folder to store temporary files
    */
    static
    TQString tempDir()
    {
      return self()->mTempDir;
    }

    /**
      Set Whether to automatically save downloads to saveDir
    */
    static
    void setUseSaveDir( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "useSaveDir" ) ))
        self()->mUseSaveDir = v;
    }

    /**
      Get Whether to automatically save downloads to saveDir
    */
    static
    bool useSaveDir()
    {
      return self()->mUseSaveDir;
    }

    /**
      Set Folder to store downloaded files
    */
    static
    void setSaveDir( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "saveDir" ) ))
        self()->mSaveDir = v;
    }

    /**
      Get Folder to store downloaded files
    */
    static
    TQString saveDir()
    {
      return self()->mSaveDir;
    }

    /**
      Set Whether to automatically move completed downloads to completedDir
    */
    static
    void setUseCompletedDir( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "useCompletedDir" ) ))
        self()->mUseCompletedDir = v;
    }

    /**
      Get Whether to automatically move completed downloads to completedDir
    */
    static
    bool useCompletedDir()
    {
      return self()->mUseCompletedDir;
    }

    /**
      Set Folder to move completed downloaded files to
    */
    static
    void setCompletedDir( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "completedDir" ) ))
        self()->mCompletedDir = v;
    }

    /**
      Get Folder to move completed downloaded files to
    */
    static
    TQString completedDir()
    {
      return self()->mCompletedDir;
    }

    /**
      Set Whether to automatically copy .torrent files to torrentCopyDir
    */
    static
    void setUseTorrentCopyDir( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "useTorrentCopyDir" ) ))
        self()->mUseTorrentCopyDir = v;
    }

    /**
      Get Whether to automatically copy .torrent files to torrentCopyDir
    */
    static
    bool useTorrentCopyDir()
    {
      return self()->mUseTorrentCopyDir;
    }

    /**
      Set Folder to copy .torrent files to
    */
    static
    void setTorrentCopyDir( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "torrentCopyDir" ) ))
        self()->mTorrentCopyDir = v;
    }

    /**
      Get Folder to copy .torrent files to
    */
    static
    TQString torrentCopyDir()
    {
      return self()->mTorrentCopyDir;
    }

    /**
      Set Whether to use a custom IP to pass to the tracker
    */
    static
    void setUseExternalIP( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "useExternalIP" ) ))
        self()->mUseExternalIP = v;
    }

    /**
      Get Whether to use a custom IP to pass to the tracker
    */
    static
    bool useExternalIP()
    {
      return self()->mUseExternalIP;
    }

    /**
      Set Directory which was used as the last save directory
    */
    static
    void setLastSaveDir( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "lastSaveDir" ) ))
        self()->mLastSaveDir = v;
    }

    /**
      Get Directory which was used as the last save directory
    */
    static
    TQString lastSaveDir()
    {
      return self()->mLastSaveDir;
    }

    /**
      Set IP to pass to the tracker
    */
    static
    void setExternalIP( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "externalIP" ) ))
        self()->mExternalIP = v;
    }

    /**
      Get IP to pass to the tracker
    */
    static
    TQString externalIP()
    {
      return self()->mExternalIP;
    }

    /**
      Set Memory usage
    */
    static
    void setMemoryUsage( int v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "memoryUsage" ) ))
        self()->mMemoryUsage = v;
    }

    /**
      Get Memory usage
    */
    static
    int memoryUsage()
    {
      return self()->mMemoryUsage;
    }

    /**
      Set GUI update interval
    */
    static
    void setGuiUpdateInterval( int v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "guiUpdateInterval" ) ))
        self()->mGuiUpdateInterval = v;
    }

    /**
      Get GUI update interval
    */
    static
    int guiUpdateInterval()
    {
      return self()->mGuiUpdateInterval;
    }

    /**
      Set Support for DHT
    */
    static
    void setDhtSupport( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "dhtSupport" ) ))
        self()->mDhtSupport = v;
    }

    /**
      Get Support for DHT
    */
    static
    bool dhtSupport()
    {
      return self()->mDhtSupport;
    }

    /**
      Set DHT port
    */
    static
    void setDhtPort( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setDhtPort: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 65535)
      {
        kdDebug() << "setDhtPort: value " << v << " is greater than the maximum value of 65535" << endl;
        v = 65535;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "dhtPort" ) ))
        self()->mDhtPort = v;
    }

    /**
      Get DHT port
    */
    static
    int dhtPort()
    {
      return self()->mDhtPort;
    }

    /**
      Set Number of upload slots
    */
    static
    void setNumUploadSlots( int v )
    {
      if (v < 2)
      {
        kdDebug() << "setNumUploadSlots: value " << v << " is less than the minimum value of 2" << endl;
        v = 2;
      }

      if (v > 100)
      {
        kdDebug() << "setNumUploadSlots: value " << v << " is greater than the maximum value of 100" << endl;
        v = 100;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "numUploadSlots" ) ))
        self()->mNumUploadSlots = v;
    }

    /**
      Get Number of upload slots
    */
    static
    int numUploadSlots()
    {
      return self()->mNumUploadSlots;
    }

    /**
      Set Use protocol encryption
    */
    static
    void setUseEncryption( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "useEncryption" ) ))
        self()->mUseEncryption = v;
    }

    /**
      Get Use protocol encryption
    */
    static
    bool useEncryption()
    {
      return self()->mUseEncryption;
    }

    /**
      Set Allow unencrypted connections
    */
    static
    void setAllowUnencryptedConnections( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "allowUnencryptedConnections" ) ))
        self()->mAllowUnencryptedConnections = v;
    }

    /**
      Get Allow unencrypted connections
    */
    static
    bool allowUnencryptedConnections()
    {
      return self()->mAllowUnencryptedConnections;
    }

    /**
      Set allwaysDoUploadDataCheck
    */
    static
    void setAllwaysDoUploadDataCheck( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "allwaysDoUploadDataCheck" ) ))
        self()->mAllwaysDoUploadDataCheck = v;
    }

    /**
      Get allwaysDoUploadDataCheck
    */
    static
    bool allwaysDoUploadDataCheck()
    {
      return self()->mAllwaysDoUploadDataCheck;
    }

    /**
      Set maxSizeForUploadDataCheck
    */
    static
    void setMaxSizeForUploadDataCheck( int v )
    {
      if (v < 128)
      {
        kdDebug() << "setMaxSizeForUploadDataCheck: value " << v << " is less than the minimum value of 128" << endl;
        v = 128;
      }

      if (v > 8192)
      {
        kdDebug() << "setMaxSizeForUploadDataCheck: value " << v << " is greater than the maximum value of 8192" << endl;
        v = 8192;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "maxSizeForUploadDataCheck" ) ))
        self()->mMaxSizeForUploadDataCheck = v;
    }

    /**
      Get maxSizeForUploadDataCheck
    */
    static
    int maxSizeForUploadDataCheck()
    {
      return self()->mMaxSizeForUploadDataCheck;
    }

    /**
      Set typeOfService
    */
    static
    void setTypeOfService( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setTypeOfService: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 255)
      {
        kdDebug() << "setTypeOfService: value " << v << " is greater than the maximum value of 255" << endl;
        v = 255;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "typeOfService" ) ))
        self()->mTypeOfService = v;
    }

    /**
      Get typeOfService
    */
    static
    int typeOfService()
    {
      return self()->mTypeOfService;
    }

    /**
      Set DSCP
    */
    static
    void setDSCP( int v )
    {
      if (v < 0)
      {
        kdDebug() << "setDSCP: value " << v << " is less than the minimum value of 0" << endl;
        v = 0;
      }

      if (v > 63)
      {
        kdDebug() << "setDSCP: value " << v << " is greater than the maximum value of 63" << endl;
        v = 63;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "DSCP" ) ))
        self()->mDSCP = v;
    }

    /**
      Get DSCP
    */
    static
    int dSCP()
    {
      return self()->mDSCP;
    }

    /**
      Set maxConnectingSockets
    */
    static
    void setMaxConnectingSockets( int v )
    {
      if (v < 10)
      {
        kdDebug() << "setMaxConnectingSockets: value " << v << " is less than the minimum value of 10" << endl;
        v = 10;
      }

      if (v > 500)
      {
        kdDebug() << "setMaxConnectingSockets: value " << v << " is greater than the maximum value of 500" << endl;
        v = 500;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "maxConnectingSockets" ) ))
        self()->mMaxConnectingSockets = v;
    }

    /**
      Get maxConnectingSockets
    */
    static
    int maxConnectingSockets()
    {
      return self()->mMaxConnectingSockets;
    }

    /**
      Set autoRecheck
    */
    static
    void setAutoRecheck( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "autoRecheck" ) ))
        self()->mAutoRecheck = v;
    }

    /**
      Get autoRecheck
    */
    static
    bool autoRecheck()
    {
      return self()->mAutoRecheck;
    }

    /**
      Set maxCorruptedBeforeRecheck
    */
    static
    void setMaxCorruptedBeforeRecheck( int v )
    {
      if (v < 1)
      {
        kdDebug() << "setMaxCorruptedBeforeRecheck: value " << v << " is less than the minimum value of 1" << endl;
        v = 1;
      }
      if (!self()->isImmutable( TQString::fromLatin1( "maxCorruptedBeforeRecheck" ) ))
        self()->mMaxCorruptedBeforeRecheck = v;
    }

    /**
      Get maxCorruptedBeforeRecheck
    */
    static
    int maxCorruptedBeforeRecheck()
    {
      return self()->mMaxCorruptedBeforeRecheck;
    }

    /**
      Set Columns shown in KTorrentView
    */
    static
    void setShownColumns( const TQValueList<int> & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "shownColumns" ) ))
        self()->mShownColumns = v;
    }

    /**
      Get Columns shown in KTorrentView
    */
    static
    TQValueList<int> shownColumns()
    {
      return self()->mShownColumns;
    }

    /**
      Set doNotUseKDEProxy
    */
    static
    void setDoNotUseKDEProxy( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "doNotUseKDEProxy" ) ))
        self()->mDoNotUseKDEProxy = v;
    }

    /**
      Get doNotUseKDEProxy
    */
    static
    bool doNotUseKDEProxy()
    {
      return self()->mDoNotUseKDEProxy;
    }

    /**
      Set httpTrackerProxy
    */
    static
    void setHttpTrackerProxy( const TQString & v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "httpTrackerProxy" ) ))
        self()->mHttpTrackerProxy = v;
    }

    /**
      Get httpTrackerProxy
    */
    static
    TQString httpTrackerProxy()
    {
      return self()->mHttpTrackerProxy;
    }

    /**
      Set ET algorithm
    */
    static
    void setEta( int v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "eta" ) ))
        self()->mEta = v;
    }

    /**
      Get ET algorithm
    */
    static
    int eta()
    {
      return self()->mEta;
    }

    /**
      Set diskPrealloc
    */
    static
    void setDiskPrealloc( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "diskPrealloc" ) ))
        self()->mDiskPrealloc = v;
    }

    /**
      Get diskPrealloc
    */
    static
    bool diskPrealloc()
    {
      return self()->mDiskPrealloc;
    }

    /**
      Set fullDiskPrealloc
    */
    static
    void setFullDiskPrealloc( bool v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "fullDiskPrealloc" ) ))
        self()->mFullDiskPrealloc = v;
    }

    /**
      Get fullDiskPrealloc
    */
    static
    bool fullDiskPrealloc()
    {
      return self()->mFullDiskPrealloc;
    }

    /**
      Set fullDiskPreallocMethod
    */
    static
    void setFullDiskPreallocMethod( int v )
    {
      if (!self()->isImmutable( TQString::fromLatin1( "fullDiskPreallocMethod" ) ))
        self()->mFullDiskPreallocMethod = v;
    }

    /**
      Get fullDiskPreallocMethod
    */
    static
    int fullDiskPreallocMethod()
    {
      return self()->mFullDiskPreallocMethod;
    }

    /**
      Set cpuUsage
    */
    static
    void setCpuUsage( int v )
    {
      if (v < 1)
      {
        kdDebug() << "setCpuUsage: value " << v << " is less than the minimum value of 1" << endl;
        v = 1;
      }

      if (v > 50)
      {
        kdDebug() << "setCpuUsage: value " << v << " is greater than the maximum value of 50" << endl;
        v = 50;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "cpuUsage" ) ))
        self()->mCpuUsage = v;
    }

    /**
      Get cpuUsage
    */
    static
    int cpuUsage()
    {
      return self()->mCpuUsage;
    }

    /**
      Set When there's no space left to complete download and free diskspace is less than minDiskSpace, torrent will be stopped.
    */
    static
    void setMinDiskSpace( int v )
    {
      if (v < 10)
      {
        kdDebug() << "setMinDiskSpace: value " << v << " is less than the minimum value of 10" << endl;
        v = 10;
      }

      if (v > 10000)
      {
        kdDebug() << "setMinDiskSpace: value " << v << " is greater than the maximum value of 10000" << endl;
        v = 10000;
      }

      if (!self()->isImmutable( TQString::fromLatin1( "minDiskSpace" ) ))
        self()->mMinDiskSpace = v;
    }

    /**
      Get When there's no space left to complete download and free diskspace is less than minDiskSpace, torrent will be stopped.
    */
    static
    int minDiskSpace()
    {
      return self()->mMinDiskSpace;
    }

    static
    void writeConfig()
    {
      static_cast<TDEConfigSkeleton*>(self())->writeConfig();
    }
  protected:
    Settings();
    static Settings *mSelf;


    // downloads
    int mMaxDownloads;
    int mMaxSeeds;
    int mStartDownloadsOnLowDiskSpace;
    int mMaxConnections;
    int mMaxTotalConnections;
    int mMaxUploadRate;
    int mMaxDownloadRate;
    double mMaxRatio;
    double mMaxSeedTime;
    int mPort;
    int mUdpTrackerPort;
    bool mShowSystemTrayIcon;
    bool mShowSpeedBarInTrayIcon;
    int mDownloadBandwidth;
    int mUploadBandwidth;
    bool mShowPopups;
    bool mKeepSeeding;
    TQString mTempDir;
    bool mUseSaveDir;
    TQString mSaveDir;
    bool mUseCompletedDir;
    TQString mCompletedDir;
    bool mUseTorrentCopyDir;
    TQString mTorrentCopyDir;
    bool mUseExternalIP;
    TQString mLastSaveDir;
    TQString mExternalIP;
    int mMemoryUsage;
    int mGuiUpdateInterval;
    bool mDhtSupport;
    int mDhtPort;
    int mNumUploadSlots;
    bool mUseEncryption;
    bool mAllowUnencryptedConnections;
    bool mAllwaysDoUploadDataCheck;
    int mMaxSizeForUploadDataCheck;
    int mTypeOfService;
    int mDSCP;
    int mMaxConnectingSockets;
    bool mAutoRecheck;
    int mMaxCorruptedBeforeRecheck;
    TQValueList<int> mShownColumns;
    bool mDoNotUseKDEProxy;
    TQString mHttpTrackerProxy;
    int mEta;
    bool mDiskPrealloc;
    bool mFullDiskPrealloc;
    int mFullDiskPreallocMethod;
    int mCpuUsage;
    int mMinDiskSpace;

  private:
};

#endif

