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

#include <ktcore_export.h>

#include <kconfigskeleton.h>
#include <kdebug.h>

class KTCORE_EXPORT Settings : public KConfigSkeleton
{
  public:

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

    /**
      Set Maximum number of downloads (0 = no limit)
    */
    static
    void setMaxDownloads( int v )
    {
      if (v < 0)
      {
        kDebug() << "setMaxDownloads: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::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)
      {
        kDebug() << "setMaxSeeds: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::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( QString::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)
      {
        kDebug() << "setMaxConnections: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::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)
      {
        kDebug() << "setMaxTotalConnections: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::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 KiB/sec (0 = no limit)
    */
    static
    void setMaxUploadRate( int v )
    {
      if (v < 0)
      {
        kDebug() << "setMaxUploadRate: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::fromLatin1( "maxUploadRate" ) ))
        self()->mMaxUploadRate = v;
    }

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

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

    /**
      Get Maximum download speed in KiB/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)
      {
        kDebug() << "setMaxRatio: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::fromLatin1( "maxRatio" ) ))
        self()->mMaxRatio = v;
    }

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

    /**
      Set greenRatio
    */
    static
    void setGreenRatio( double v )
    {
      if (v < 0)
      {
        kDebug() << "setGreenRatio: value " << v << " is less than the minimum value of 0";
        v = 0;
      }
      if (!self()->isImmutable( QString::fromLatin1( "greenRatio" ) ))
        self()->mGreenRatio = v;
    }

    /**
      Get greenRatio
    */
    static
    double greenRatio()
    {
      return self()->mGreenRatio;
    }

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

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

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

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

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

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

      if (!self()->isImmutable( QString::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( QString::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( QString::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)
      {
        kDebug() << "setDownloadBandwidth: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isImmutable( QString::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)
      {
        kDebug() << "setUploadBandwidth: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isImmutable( QString::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( QString::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( QString::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 KUrl & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "tempDir" ) ))
        self()->mTempDir = v;
    }

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

    /**
      Set Whether to automatically save downloads to saveDir
    */
    static
    void setUseSaveDir( bool v )
    {
      if (!self()->isImmutable( QString::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 KUrl & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "saveDir" ) ))
        self()->mSaveDir = v;
    }

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

    /**
      Set Whether to automatically copy .torrent files to torrentCopyDir
    */
    static
    void setUseTorrentCopyDir( bool v )
    {
      if (!self()->isImmutable( QString::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 KUrl & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "torrentCopyDir" ) ))
        self()->mTorrentCopyDir = v;
    }

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

    /**
      Set Whether to use a custom IP to pass to the tracker
    */
    static
    void setUseCustomIP( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "useCustomIP" ) ))
        self()->mUseCustomIP = v;
    }

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

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

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

    /**
      Set IP to pass to the tracker
    */
    static
    void setCustomIP( const QString & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "customIP" ) ))
        self()->mCustomIP = v;
    }

    /**
      Get IP to pass to the tracker
    */
    static
    QString customIP()
    {
      return self()->mCustomIP;
    }

    /**
      Set GUI update interval
    */
    static
    void setGuiUpdateInterval( int v )
    {
      if (v < 500)
      {
        kDebug() << "setGuiUpdateInterval: value " << v << " is less than the minimum value of 500";
        v = 500;
      }

      if (v > 5000)
      {
        kDebug() << "setGuiUpdateInterval: value " << v << " is greater than the maximum value of 5000";
        v = 5000;
      }

      if (!self()->isImmutable( QString::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( QString::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 < 1)
      {
        kDebug() << "setDhtPort: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

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

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

    /**
      Set pexEnabled
    */
    static
    void setPexEnabled( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "pexEnabled" ) ))
        self()->mPexEnabled = v;
    }

    /**
      Get pexEnabled
    */
    static
    bool pexEnabled()
    {
      return self()->mPexEnabled;
    }

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

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

      if (!self()->isImmutable( QString::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( QString::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( QString::fromLatin1( "allowUnencryptedConnections" ) ))
        self()->mAllowUnencryptedConnections = v;
    }

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

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

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

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

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

    /**
      Set dscp
    */
    static
    void setDscp( int v )
    {
      if (v < 0)
      {
        kDebug() << "setDscp: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isImmutable( QString::fromLatin1( "dscp" ) ))
        self()->mDscp = v;
    }

    /**
      Get dscp
    */
    static
    int dscp()
    {
      return self()->mDscp;
    }

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

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

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

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

    /**
      Set checkWhenFinished
    */
    static
    void setCheckWhenFinished( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "checkWhenFinished" ) ))
        self()->mCheckWhenFinished = v;
    }

    /**
      Get checkWhenFinished
    */
    static
    bool checkWhenFinished()
    {
      return self()->mCheckWhenFinished;
    }

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

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

    /**
      Set useKDEProxySettings
    */
    static
    void setUseKDEProxySettings( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "useKDEProxySettings" ) ))
        self()->mUseKDEProxySettings = v;
    }

    /**
      Get useKDEProxySettings
    */
    static
    bool useKDEProxySettings()
    {
      return self()->mUseKDEProxySettings;
    }

    /**
      Set httpProxy
    */
    static
    void setHttpProxy( const QString & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "httpProxy" ) ))
        self()->mHttpProxy = v;
    }

    /**
      Get httpProxy
    */
    static
    QString httpProxy()
    {
      return self()->mHttpProxy;
    }

    /**
      Set httpProxyPort
    */
    static
    void setHttpProxyPort( int v )
    {
      if (v < 1)
      {
        kDebug() << "setHttpProxyPort: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isImmutable( QString::fromLatin1( "httpProxyPort" ) ))
        self()->mHttpProxyPort = v;
    }

    /**
      Get httpProxyPort
    */
    static
    int httpProxyPort()
    {
      return self()->mHttpProxyPort;
    }

    /**
      Set useProxyForWebSeeds
    */
    static
    void setUseProxyForWebSeeds( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "useProxyForWebSeeds" ) ))
        self()->mUseProxyForWebSeeds = v;
    }

    /**
      Get useProxyForWebSeeds
    */
    static
    bool useProxyForWebSeeds()
    {
      return self()->mUseProxyForWebSeeds;
    }

    /**
      Set useProxyForTracker
    */
    static
    void setUseProxyForTracker( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "useProxyForTracker" ) ))
        self()->mUseProxyForTracker = v;
    }

    /**
      Get useProxyForTracker
    */
    static
    bool useProxyForTracker()
    {
      return self()->mUseProxyForTracker;
    }

    /**
      Set socksEnabled
    */
    static
    void setSocksEnabled( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "socksEnabled" ) ))
        self()->mSocksEnabled = v;
    }

    /**
      Get socksEnabled
    */
    static
    bool socksEnabled()
    {
      return self()->mSocksEnabled;
    }

    /**
      Set socksProxy
    */
    static
    void setSocksProxy( const QString & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "socksProxy" ) ))
        self()->mSocksProxy = v;
    }

    /**
      Get socksProxy
    */
    static
    QString socksProxy()
    {
      return self()->mSocksProxy;
    }

    /**
      Set socksPort
    */
    static
    void setSocksPort( int v )
    {
      if (v < 1)
      {
        kDebug() << "setSocksPort: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isImmutable( QString::fromLatin1( "socksPort" ) ))
        self()->mSocksPort = v;
    }

    /**
      Get socksPort
    */
    static
    int socksPort()
    {
      return self()->mSocksPort;
    }

    /**
      Set socksVersion
    */
    static
    void setSocksVersion( int v )
    {
      if (v < 4)
      {
        kDebug() << "setSocksVersion: value " << v << " is less than the minimum value of 4";
        v = 4;
      }

      if (v > 5)
      {
        kDebug() << "setSocksVersion: value " << v << " is greater than the maximum value of 5";
        v = 5;
      }

      if (!self()->isImmutable( QString::fromLatin1( "socksVersion" ) ))
        self()->mSocksVersion = v;
    }

    /**
      Get socksVersion
    */
    static
    int socksVersion()
    {
      return self()->mSocksVersion;
    }

    /**
      Set socksUsePassword
    */
    static
    void setSocksUsePassword( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "socksUsePassword" ) ))
        self()->mSocksUsePassword = v;
    }

    /**
      Get socksUsePassword
    */
    static
    bool socksUsePassword()
    {
      return self()->mSocksUsePassword;
    }

    /**
      Set socksUsername
    */
    static
    void setSocksUsername( const QString & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "socksUsername" ) ))
        self()->mSocksUsername = v;
    }

    /**
      Get socksUsername
    */
    static
    QString socksUsername()
    {
      return self()->mSocksUsername;
    }

    /**
      Set socksPassword
    */
    static
    void setSocksPassword( const QString & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "socksPassword" ) ))
        self()->mSocksPassword = v;
    }

    /**
      Get socksPassword
    */
    static
    QString socksPassword()
    {
      return self()->mSocksPassword;
    }

    /**
      Set Algorithm to estimate the time when a torrent is finished
    */
    static
    void setEta( int v )
    {
      if (v < 0)
      {
        kDebug() << "setEta: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

      if (v > 4)
      {
        kDebug() << "setEta: value " << v << " is greater than the maximum value of 4";
        v = 4;
      }

      if (!self()->isImmutable( QString::fromLatin1( "eta" ) ))
        self()->mEta = v;
    }

    /**
      Get Algorithm to estimate the time when a torrent is finished
    */
    static
    int eta()
    {
      return self()->mEta;
    }

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

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

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

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

    /**
      Set When there is no space left to complete download, and the available disk space is less than this value, the torrent will be stopped.
    */
    static
    void setMinDiskSpace( int v )
    {
      if (v < 10)
      {
        kDebug() << "setMinDiskSpace: value " << v << " is less than the minimum value of 10";
        v = 10;
      }

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

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

    /**
      Get When there is no space left to complete download, and the available disk space is less than this value, the torrent will be stopped.
    */
    static
    int minDiskSpace()
    {
      return self()->mMinDiskSpace;
    }

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

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

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

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

    /**
      Set Whether to automatically move completed downloads to completedDir
    */
    static
    void setUseCompletedDir( bool v )
    {
      if (!self()->isImmutable( QString::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 KUrl & v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "completedDir" ) ))
        self()->mCompletedDir = v;
    }

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

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

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

    /**
      Set networkInterface
    */
    static
    void setNetworkInterface( int v )
    {
      if (v < 0)
      {
        kDebug() << "setNetworkInterface: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isImmutable( QString::fromLatin1( "networkInterface" ) ))
        self()->mNetworkInterface = v;
    }

    /**
      Get networkInterface
    */
    static
    int networkInterface()
    {
      return self()->mNetworkInterface;
    }

    /**
      Set openMultipleTorrentsSilently
    */
    static
    void setOpenMultipleTorrentsSilently( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "openMultipleTorrentsSilently" ) ))
        self()->mOpenMultipleTorrentsSilently = v;
    }

    /**
      Get openMultipleTorrentsSilently
    */
    static
    bool openMultipleTorrentsSilently()
    {
      return self()->mOpenMultipleTorrentsSilently;
    }

    /**
      Set openAllTorrentsSilently
    */
    static
    void setOpenAllTorrentsSilently( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "openAllTorrentsSilently" ) ))
        self()->mOpenAllTorrentsSilently = v;
    }

    /**
      Get openAllTorrentsSilently
    */
    static
    bool openAllTorrentsSilently()
    {
      return self()->mOpenAllTorrentsSilently;
    }

    /**
      Set decreasePriorityOfStalledTorrents
    */
    static
    void setDecreasePriorityOfStalledTorrents( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "decreasePriorityOfStalledTorrents" ) ))
        self()->mDecreasePriorityOfStalledTorrents = v;
    }

    /**
      Get decreasePriorityOfStalledTorrents
    */
    static
    bool decreasePriorityOfStalledTorrents()
    {
      return self()->mDecreasePriorityOfStalledTorrents;
    }

    /**
      Set stallTimer
    */
    static
    void setStallTimer( int v )
    {
      if (v < 1)
      {
        kDebug() << "setStallTimer: value " << v << " is less than the minimum value of 1";
        v = 1;
      }
      if (!self()->isImmutable( QString::fromLatin1( "stallTimer" ) ))
        self()->mStallTimer = v;
    }

    /**
      Get stallTimer
    */
    static
    int stallTimer()
    {
      return self()->mStallTimer;
    }

    /**
      Set previewSizeAudio
    */
    static
    void setPreviewSizeAudio( int v )
    {
      if (v < 16)
      {
        kDebug() << "setPreviewSizeAudio: value " << v << " is less than the minimum value of 16";
        v = 16;
      }
      if (!self()->isImmutable( QString::fromLatin1( "previewSizeAudio" ) ))
        self()->mPreviewSizeAudio = v;
    }

    /**
      Get previewSizeAudio
    */
    static
    int previewSizeAudio()
    {
      return self()->mPreviewSizeAudio;
    }

    /**
      Set previewSizeVideo
    */
    static
    void setPreviewSizeVideo( int v )
    {
      if (v < 16)
      {
        kDebug() << "setPreviewSizeVideo: value " << v << " is less than the minimum value of 16";
        v = 16;
      }
      if (!self()->isImmutable( QString::fromLatin1( "previewSizeVideo" ) ))
        self()->mPreviewSizeVideo = v;
    }

    /**
      Get previewSizeVideo
    */
    static
    int previewSizeVideo()
    {
      return self()->mPreviewSizeVideo;
    }

    /**
      Set suppressSleep
    */
    static
    void setSuppressSleep( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "suppressSleep" ) ))
        self()->mSuppressSleep = v;
    }

    /**
      Get suppressSleep
    */
    static
    bool suppressSleep()
    {
      return self()->mSuppressSleep;
    }

    /**
      Set oldTorrentsImported
    */
    static
    void setOldTorrentsImported( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "oldTorrentsImported" ) ))
        self()->mOldTorrentsImported = v;
    }

    /**
      Get oldTorrentsImported
    */
    static
    bool oldTorrentsImported()
    {
      return self()->mOldTorrentsImported;
    }

    /**
      Set manuallyControlTorrents
    */
    static
    void setManuallyControlTorrents( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "manuallyControlTorrents" ) ))
        self()->mManuallyControlTorrents = v;
    }

    /**
      Get manuallyControlTorrents
    */
    static
    bool manuallyControlTorrents()
    {
      return self()->mManuallyControlTorrents;
    }

    /**
      Set webseedsEnabled
    */
    static
    void setWebseedsEnabled( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "webseedsEnabled" ) ))
        self()->mWebseedsEnabled = v;
    }

    /**
      Get webseedsEnabled
    */
    static
    bool webseedsEnabled()
    {
      return self()->mWebseedsEnabled;
    }

    /**
      Set useQHttpAnnounce
    */
    static
    void setUseQHttpAnnounce( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "useQHttpAnnounce" ) ))
        self()->mUseQHttpAnnounce = v;
    }

    /**
      Get useQHttpAnnounce
    */
    static
    bool useQHttpAnnounce()
    {
      return self()->mUseQHttpAnnounce;
    }

    /**
      Set lookUpHostnameOfPeers
    */
    static
    void setLookUpHostnameOfPeers( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "lookUpHostnameOfPeers" ) ))
        self()->mLookUpHostnameOfPeers = v;
    }

    /**
      Get lookUpHostnameOfPeers
    */
    static
    bool lookUpHostnameOfPeers()
    {
      return self()->mLookUpHostnameOfPeers;
    }

    /**
      Set utpEnabled
    */
    static
    void setUtpEnabled( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "utpEnabled" ) ))
        self()->mUtpEnabled = v;
    }

    /**
      Get utpEnabled
    */
    static
    bool utpEnabled()
    {
      return self()->mUtpEnabled;
    }

    /**
      Set onlyUseUtp
    */
    static
    void setOnlyUseUtp( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "onlyUseUtp" ) ))
        self()->mOnlyUseUtp = v;
    }

    /**
      Get onlyUseUtp
    */
    static
    bool onlyUseUtp()
    {
      return self()->mOnlyUseUtp;
    }

    /**
      Set primaryTransportProtocol
    */
    static
    void setPrimaryTransportProtocol( int v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "primaryTransportProtocol" ) ))
        self()->mPrimaryTransportProtocol = v;
    }

    /**
      Get primaryTransportProtocol
    */
    static
    int primaryTransportProtocol()
    {
      return self()->mPrimaryTransportProtocol;
    }

    /**
      Set autoRenameSingleFileTorrents
    */
    static
    void setAutoRenameSingleFileTorrents( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "autoRenameSingleFileTorrents" ) ))
        self()->mAutoRenameSingleFileTorrents = v;
    }

    /**
      Get autoRenameSingleFileTorrents
    */
    static
    bool autoRenameSingleFileTorrents()
    {
      return self()->mAutoRenameSingleFileTorrents;
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // downloads
    int mMaxDownloads;
    int mMaxSeeds;
    int mStartDownloadsOnLowDiskSpace;
    int mMaxConnections;
    int mMaxTotalConnections;
    int mMaxUploadRate;
    int mMaxDownloadRate;
    double mMaxRatio;
    double mGreenRatio;
    int mPort;
    int mUdpTrackerPort;
    bool mShowSystemTrayIcon;
    bool mShowSpeedBarInTrayIcon;
    int mDownloadBandwidth;
    int mUploadBandwidth;
    bool mShowPopups;
    bool mKeepSeeding;
    KUrl mTempDir;
    bool mUseSaveDir;
    KUrl mSaveDir;
    bool mUseTorrentCopyDir;
    KUrl mTorrentCopyDir;
    bool mUseCustomIP;
    QString mLastSaveDir;
    QString mCustomIP;
    int mGuiUpdateInterval;
    bool mDhtSupport;
    int mDhtPort;
    bool mPexEnabled;
    int mNumUploadSlots;
    bool mUseEncryption;
    bool mAllowUnencryptedConnections;
    int mTypeOfService;
    int mDscp;
    int mMaxConnectingSockets;
    bool mCheckWhenFinished;
    QList<int> mShownColumns;
    bool mUseKDEProxySettings;
    QString mHttpProxy;
    int mHttpProxyPort;
    bool mUseProxyForWebSeeds;
    bool mUseProxyForTracker;
    bool mSocksEnabled;
    QString mSocksProxy;
    int mSocksPort;
    int mSocksVersion;
    bool mSocksUsePassword;
    QString mSocksUsername;
    QString mSocksPassword;
    int mEta;
    bool mDiskPrealloc;
    bool mFullDiskPrealloc;
    int mMinDiskSpace;
    int mCpuUsage;
    bool mUseCompletedDir;
    KUrl mCompletedDir;
    double mMaxSeedTime;
    int mNetworkInterface;
    bool mOpenMultipleTorrentsSilently;
    bool mOpenAllTorrentsSilently;
    bool mDecreasePriorityOfStalledTorrents;
    int mStallTimer;
    int mPreviewSizeAudio;
    int mPreviewSizeVideo;
    bool mSuppressSleep;
    bool mOldTorrentsImported;
    bool mManuallyControlTorrents;
    bool mWebseedsEnabled;
    bool mUseQHttpAnnounce;
    bool mLookUpHostnameOfPeers;
    bool mUtpEnabled;
    bool mOnlyUseUtp;
    int mPrimaryTransportProtocol;
    bool mAutoRenameSingleFileTorrents;

  private:
};

#endif

