Logo Search packages:      
Sourcecode: qtorrent version File versions

torrentsettings.py

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'pyqtorrent/torrentsettings.ui'
#
# Created: Fri Mar 19 12:03:27 2004
#      by: The PyQt User Interface Compiler (pyuic) snapshot-20040226
#
# WARNING! All changes made in this file will be lost!


from qt import *


class TorrentSettings(QDialog):
    def __init__(self,parent = None,name = None,modal = 0,fl = 0):
        QDialog.__init__(self,parent,name,modal,fl)

        if not name:
            self.setName("TorrentSettings")


        TorrentSettingsLayout = QGridLayout(self,1,1,11,6,"TorrentSettingsLayout")

        layout56 = QHBoxLayout(None,0,6,"layout56")
        spacer20 = QSpacerItem(281,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        layout56.addItem(spacer20)

        self.WOKButton = QPushButton(self,"WOKButton")
        layout56.addWidget(self.WOKButton)

        self.WCancelButton = QPushButton(self,"WCancelButton")
        layout56.addWidget(self.WCancelButton)

        TorrentSettingsLayout.addMultiCellLayout(layout56,3,3,0,1)

        self.listBox1 = QListBox(self,"listBox1")
        self.listBox1.setSizePolicy(QSizePolicy(1,7,0,0,self.listBox1.sizePolicy().hasHeightForWidth()))

        TorrentSettingsLayout.addMultiCellWidget(self.listBox1,0,2,0,0)

        self.widgetStack1 = QWidgetStack(self,"widgetStack1")
        self.widgetStack1.setSizePolicy(QSizePolicy(7,5,0,0,self.widgetStack1.sizePolicy().hasHeightForWidth()))

        self.WStackPage = QWidget(self.widgetStack1,"WStackPage")
        WStackPageLayout = QGridLayout(self.WStackPage,1,1,11,6,"WStackPageLayout")

        self.textLabel2 = QLabel(self.WStackPage,"textLabel2")

        WStackPageLayout.addWidget(self.textLabel2,1,0)

        self.textLabel1 = QLabel(self.WStackPage,"textLabel1")

        WStackPageLayout.addWidget(self.textLabel1,0,0)

        self.WBind = QLineEdit(self.WStackPage,"WBind")
        self.WBind.setSizePolicy(QSizePolicy(5,0,0,0,self.WBind.sizePolicy().hasHeightForWidth()))

        WStackPageLayout.addWidget(self.WBind,0,1)

        self.WIP = QLineEdit(self.WStackPage,"WIP")
        self.WIP.setSizePolicy(QSizePolicy(5,0,0,0,self.WIP.sizePolicy().hasHeightForWidth()))

        WStackPageLayout.addWidget(self.WIP,1,1)

        self.WIPV6toV4 = QCheckBox(self.WStackPage,"WIPV6toV4")

        WStackPageLayout.addWidget(self.WIPV6toV4,5,1)
        spacer5 = QSpacerItem(20,101,QSizePolicy.Minimum,QSizePolicy.Expanding)
        WStackPageLayout.addItem(spacer5,6,1)
        spacer6 = QSpacerItem(131,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        WStackPageLayout.addMultiCell(spacer6,2,3,2,2)

        self.textLabel3 = QLabel(self.WStackPage,"textLabel3")

        WStackPageLayout.addWidget(self.textLabel3,2,0)

        self.textLabel4 = QLabel(self.WStackPage,"textLabel4")

        WStackPageLayout.addWidget(self.textLabel4,3,0)

        self.WMinPort = QSpinBox(self.WStackPage,"WMinPort")
        self.WMinPort.setSizePolicy(QSizePolicy(5,0,0,0,self.WMinPort.sizePolicy().hasHeightForWidth()))
        self.WMinPort.setMaxValue(65535)
        self.WMinPort.setMinValue(1)

        WStackPageLayout.addWidget(self.WMinPort,2,1)

        self.WMaxPort = QSpinBox(self.WStackPage,"WMaxPort")
        self.WMaxPort.setSizePolicy(QSizePolicy(5,0,0,0,self.WMaxPort.sizePolicy().hasHeightForWidth()))
        self.WMaxPort.setMaxValue(65535)
        self.WMaxPort.setMinValue(1)

        WStackPageLayout.addWidget(self.WMaxPort,3,1)

        self.WIPV6 = QCheckBox(self.WStackPage,"WIPV6")

        WStackPageLayout.addWidget(self.WIPV6,4,1)
        self.widgetStack1.addWidget(self.WStackPage,0)

        self.WStackPage_2 = QWidget(self.widgetStack1,"WStackPage_2")
        WStackPageLayout_2 = QGridLayout(self.WStackPage_2,1,1,11,6,"WStackPageLayout_2")
        spacer8 = QSpacerItem(151,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        WStackPageLayout_2.addItem(spacer8,2,2)

        self.textLabel8 = QLabel(self.WStackPage_2,"textLabel8")

        WStackPageLayout_2.addWidget(self.textLabel8,2,0)

        self.WVerify = QComboBox(0,self.WStackPage_2,"WVerify")

        WStackPageLayout_2.addWidget(self.WVerify,2,1)

        self.textLabel11 = QLabel(self.WStackPage_2,"textLabel11")

        WStackPageLayout_2.addWidget(self.textLabel11,1,0)

        self.WAllocRate = QSpinBox(self.WStackPage_2,"WAllocRate")
        self.WAllocRate.setMinValue(1)

        WStackPageLayout_2.addWidget(self.WAllocRate,1,1)

        self.textLabel12 = QLabel(self.WStackPage_2,"textLabel12")

        WStackPageLayout_2.addWidget(self.textLabel12,1,2)

        self.WAllocStrat = QComboBox(0,self.WStackPage_2,"WAllocStrat")

        WStackPageLayout_2.addWidget(self.WAllocStrat,0,1)

        self.textLabel6 = QLabel(self.WStackPage_2,"textLabel6")

        WStackPageLayout_2.addWidget(self.textLabel6,0,0)

        self.WLock = QCheckBox(self.WStackPage_2,"WLock")

        WStackPageLayout_2.addWidget(self.WLock,3,1)
        spacer7 = QSpacerItem(20,20,QSizePolicy.Minimum,QSizePolicy.Expanding)
        WStackPageLayout_2.addItem(spacer7,8,1)

        self.WAutoKick = QCheckBox(self.WStackPage_2,"WAutoKick")

        WStackPageLayout_2.addWidget(self.WAutoKick,7,1)

        self.WSecurity = QCheckBox(self.WStackPage_2,"WSecurity")

        WStackPageLayout_2.addWidget(self.WSecurity,6,1)

        self.WMaxFiles = QSpinBox(self.WStackPage_2,"WMaxFiles")
        self.WMaxFiles.setMaxValue(1024)

        WStackPageLayout_2.addWidget(self.WMaxFiles,5,1)

        self.textLabel9 = QLabel(self.WStackPage_2,"textLabel9")

        WStackPageLayout_2.addWidget(self.textLabel9,5,0)

        self.WReadLock = QCheckBox(self.WStackPage_2,"WReadLock")

        WStackPageLayout_2.addWidget(self.WReadLock,4,1)
        self.widgetStack1.addWidget(self.WStackPage_2,1)

        self.WStackPage_3 = QWidget(self.widgetStack1,"WStackPage_3")
        WStackPageLayout_3 = QGridLayout(self.WStackPage_3,1,1,11,6,"WStackPageLayout_3")

        self.textLabel14 = QLabel(self.WStackPage_3,"textLabel14")

        WStackPageLayout_3.addWidget(self.textLabel14,0,0)

        self.textLabel15 = QLabel(self.WStackPage_3,"textLabel15")

        WStackPageLayout_3.addWidget(self.textLabel15,1,0)

        self.textLabel16 = QLabel(self.WStackPage_3,"textLabel16")

        WStackPageLayout_3.addWidget(self.textLabel16,2,0)

        self.textLabel17 = QLabel(self.WStackPage_3,"textLabel17")

        WStackPageLayout_3.addWidget(self.textLabel17,3,0)

        self.textLabel18 = QLabel(self.WStackPage_3,"textLabel18")

        WStackPageLayout_3.addWidget(self.textLabel18,4,0)
        spacer10 = QSpacerItem(20,101,QSizePolicy.Minimum,QSizePolicy.Expanding)
        WStackPageLayout_3.addItem(spacer10,5,1)

        self.WRateFudge = QSpinBox(self.WStackPage_3,"WRateFudge")
        self.WRateFudge.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WRateFudge,3,1)

        self.WTimeoutCheck = QSpinBox(self.WStackPage_3,"WTimeoutCheck")
        self.WTimeoutCheck.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WTimeoutCheck,1,1)

        self.textLabel20 = QLabel(self.WStackPage_3,"textLabel20")

        WStackPageLayout_3.addWidget(self.textLabel20,2,2)

        self.textLabel13 = QLabel(self.WStackPage_3,"textLabel13")

        WStackPageLayout_3.addWidget(self.textLabel13,0,2)

        self.WRerequest = QSpinBox(self.WStackPage_3,"WRerequest")
        self.WRerequest.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WRerequest,4,1)

        self.WHTTPTimeout = QSpinBox(self.WStackPage_3,"WHTTPTimeout")
        self.WHTTPTimeout.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WHTTPTimeout,1,3)

        self.textLabel21 = QLabel(self.WStackPage_3,"textLabel21")

        WStackPageLayout_3.addWidget(self.textLabel21,3,2)

        self.WRRPeriod = QSpinBox(self.WStackPage_3,"WRRPeriod")
        self.WRRPeriod.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WRRPeriod,3,3)

        self.WMaxRatePeriod = QSpinBox(self.WStackPage_3,"WMaxRatePeriod")
        self.WMaxRatePeriod.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WMaxRatePeriod,2,1)

        self.WTimeout = QSpinBox(self.WStackPage_3,"WTimeout")
        self.WTimeout.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WTimeout,0,1)

        self.WSnubTime = QSpinBox(self.WStackPage_3,"WSnubTime")
        self.WSnubTime.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WSnubTime,2,3)

        self.textLabel19 = QLabel(self.WStackPage_3,"textLabel19")

        WStackPageLayout_3.addWidget(self.textLabel19,1,2)

        self.WKeepAlive = QSpinBox(self.WStackPage_3,"WKeepAlive")
        self.WKeepAlive.setMaxValue(60000)

        WStackPageLayout_3.addWidget(self.WKeepAlive,0,3)
        spacer9 = QSpacerItem(16,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        WStackPageLayout_3.addItem(spacer9,2,4)
        self.widgetStack1.addWidget(self.WStackPage_3,2)

        self.WStackPage_4 = QWidget(self.widgetStack1,"WStackPage_4")
        WStackPageLayout_4 = QGridLayout(self.WStackPage_4,1,1,11,6,"WStackPageLayout_4")

        self.textLabel22 = QLabel(self.WStackPage_4,"textLabel22")

        WStackPageLayout_4.addWidget(self.textLabel22,0,0)

        self.textLabel23 = QLabel(self.WStackPage_4,"textLabel23")

        WStackPageLayout_4.addWidget(self.textLabel23,3,0)

        self.textLabel24 = QLabel(self.WStackPage_4,"textLabel24")

        WStackPageLayout_4.addWidget(self.textLabel24,2,0)

        self.textLabel28 = QLabel(self.WStackPage_4,"textLabel28")

        WStackPageLayout_4.addWidget(self.textLabel28,1,0)

        self.textLabel26 = QLabel(self.WStackPage_4,"textLabel26")

        WStackPageLayout_4.addWidget(self.textLabel26,5,0)

        self.textLabel29 = QLabel(self.WStackPage_4,"textLabel29")

        WStackPageLayout_4.addWidget(self.textLabel29,6,0)

        self.textLabel25 = QLabel(self.WStackPage_4,"textLabel25")

        WStackPageLayout_4.addWidget(self.textLabel25,4,0)

        self.WMinPeers = QSpinBox(self.WStackPage_4,"WMinPeers")
        self.WMinPeers.setMaxValue(1024)
        self.WMinPeers.setMinValue(1)

        WStackPageLayout_4.addWidget(self.WMinPeers,4,1)

        self.WMaxUploadRate = QSpinBox(self.WStackPage_4,"WMaxUploadRate")
        self.WMaxUploadRate.setMaxValue(9999)

        WStackPageLayout_4.addWidget(self.WMaxUploadRate,0,1)

        self.WMaxInitiate = QSpinBox(self.WStackPage_4,"WMaxInitiate")
        self.WMaxInitiate.setMaxValue(1024)

        WStackPageLayout_4.addWidget(self.WMaxInitiate,1,1)

        self.WDownSlice = QSpinBox(self.WStackPage_4,"WDownSlice")
        self.WDownSlice.setMaxValue(999999999)
        self.WDownSlice.setMinValue(1)

        WStackPageLayout_4.addWidget(self.WDownSlice,5,1)

        self.WMinUploads = QSpinBox(self.WStackPage_4,"WMinUploads")
        self.WMinUploads.setMaxValue(1024)
        self.WMinUploads.setMinValue(1)

        WStackPageLayout_4.addWidget(self.WMinUploads,2,1)

        self.WMaxUploads = QSpinBox(self.WStackPage_4,"WMaxUploads")
        self.WMaxUploads.setMaxValue(1024)
        self.WMaxUploads.setMinValue(1)

        WStackPageLayout_4.addWidget(self.WMaxUploads,3,1)

        self.WRequestBacklog = QSpinBox(self.WStackPage_4,"WRequestBacklog")
        self.WRequestBacklog.setMaxValue(1024)

        WStackPageLayout_4.addWidget(self.WRequestBacklog,6,1)

        self.textLabel1_2 = QLabel(self.WStackPage_4,"textLabel1_2")

        WStackPageLayout_4.addWidget(self.textLabel1_2,4,2)

        self.textLabel30 = QLabel(self.WStackPage_4,"textLabel30")

        WStackPageLayout_4.addWidget(self.textLabel30,1,2)

        self.textLabel34 = QLabel(self.WStackPage_4,"textLabel34")

        WStackPageLayout_4.addWidget(self.textLabel34,0,2)

        self.textLabel32 = QLabel(self.WStackPage_4,"textLabel32")

        WStackPageLayout_4.addWidget(self.textLabel32,6,2)

        self.textLabel27 = QLabel(self.WStackPage_4,"textLabel27")

        WStackPageLayout_4.addWidget(self.textLabel27,5,2)

        self.textLabel31 = QLabel(self.WStackPage_4,"textLabel31")

        WStackPageLayout_4.addWidget(self.textLabel31,2,2)
        spacer13 = QSpacerItem(20,16,QSizePolicy.Minimum,QSizePolicy.Expanding)
        WStackPageLayout_4.addItem(spacer13,7,2)

        self.WMaxConns = QSpinBox(self.WStackPage_4,"WMaxConns")
        self.WMaxConns.setMaxValue(1024)

        WStackPageLayout_4.addWidget(self.WMaxConns,0,3)

        self.WRarestPrio = QSpinBox(self.WStackPage_4,"WRarestPrio")

        WStackPageLayout_4.addWidget(self.WRarestPrio,2,3)

        self.WMaxMessage = QSpinBox(self.WStackPage_4,"WMaxMessage")
        self.WMaxMessage.setMaxValue(999999999)

        WStackPageLayout_4.addWidget(self.WMaxMessage,5,3)

        self.WMaxSlice = QSpinBox(self.WStackPage_4,"WMaxSlice")
        self.WMaxSlice.setMaxValue(999999999)

        WStackPageLayout_4.addWidget(self.WMaxSlice,6,3)

        self.WRarest = QSpinBox(self.WStackPage_4,"WRarest")

        WStackPageLayout_4.addWidget(self.WRarest,1,3)

        self.WUploadUnit = QSpinBox(self.WStackPage_4,"WUploadUnit")
        self.WUploadUnit.setMaxValue(999999999)

        WStackPageLayout_4.addWidget(self.WUploadUnit,4,3)
        spacer11 = QSpacerItem(16,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
        WStackPageLayout_4.addItem(spacer11,0,4)
        self.widgetStack1.addWidget(self.WStackPage_4,3)

        TorrentSettingsLayout.addWidget(self.widgetStack1,2,1)

        self.line1 = QFrame(self,"line1")
        self.line1.setFrameShape(QFrame.HLine)
        self.line1.setFrameShadow(QFrame.Sunken)
        self.line1.setFrameShape(QFrame.HLine)

        TorrentSettingsLayout.addWidget(self.line1,1,1)

        self.textLabel33 = QLabel(self,"textLabel33")

        TorrentSettingsLayout.addWidget(self.textLabel33,0,1)

        self.languageChange()

        self.resize(QSize(767,364).expandedTo(self.minimumSizeHint()))
        self.clearWState(Qt.WState_Polished)

        self.connect(self.WOKButton,SIGNAL("clicked()"),self.ok)
        self.connect(self.WCancelButton,SIGNAL("clicked()"),self.cancel)
        self.connect(self.listBox1,SIGNAL("highlighted(int)"),self.widgetStack1,SLOT("raiseWidget(int)"))
        self.connect(self.listBox1,SIGNAL("highlighted(const QString&)"),self.textLabel33,SLOT("setText(const QString&)"))

        self.setTabOrder(self.listBox1,self.WMaxUploadRate)
        self.setTabOrder(self.WMaxUploadRate,self.WMaxInitiate)
        self.setTabOrder(self.WMaxInitiate,self.WMinUploads)
        self.setTabOrder(self.WMinUploads,self.WMaxUploads)
        self.setTabOrder(self.WMaxUploads,self.WMinPeers)
        self.setTabOrder(self.WMinPeers,self.WDownSlice)
        self.setTabOrder(self.WDownSlice,self.WRequestBacklog)
        self.setTabOrder(self.WRequestBacklog,self.WMaxConns)
        self.setTabOrder(self.WMaxConns,self.WRarest)
        self.setTabOrder(self.WRarest,self.WRarestPrio)
        self.setTabOrder(self.WRarestPrio,self.WMaxMessage)
        self.setTabOrder(self.WMaxMessage,self.WMaxSlice)
        self.setTabOrder(self.WMaxSlice,self.WBind)
        self.setTabOrder(self.WBind,self.WIP)
        self.setTabOrder(self.WIP,self.WMinPort)
        self.setTabOrder(self.WMinPort,self.WMaxPort)
        self.setTabOrder(self.WMaxPort,self.WIPV6)
        self.setTabOrder(self.WIPV6,self.WIPV6toV4)
        self.setTabOrder(self.WIPV6toV4,self.WAllocStrat)
        self.setTabOrder(self.WAllocStrat,self.WAllocRate)
        self.setTabOrder(self.WAllocRate,self.WVerify)
        self.setTabOrder(self.WVerify,self.WLock)
        self.setTabOrder(self.WLock,self.WReadLock)
        self.setTabOrder(self.WReadLock,self.WMaxFiles)
        self.setTabOrder(self.WMaxFiles,self.WSecurity)
        self.setTabOrder(self.WSecurity,self.WAutoKick)
        self.setTabOrder(self.WAutoKick,self.WTimeout)
        self.setTabOrder(self.WTimeout,self.WTimeoutCheck)
        self.setTabOrder(self.WTimeoutCheck,self.WMaxRatePeriod)
        self.setTabOrder(self.WMaxRatePeriod,self.WRateFudge)
        self.setTabOrder(self.WRateFudge,self.WRerequest)
        self.setTabOrder(self.WRerequest,self.WKeepAlive)
        self.setTabOrder(self.WKeepAlive,self.WHTTPTimeout)
        self.setTabOrder(self.WHTTPTimeout,self.WSnubTime)
        self.setTabOrder(self.WSnubTime,self.WRRPeriod)
        self.setTabOrder(self.WRRPeriod,self.WOKButton)
        self.setTabOrder(self.WOKButton,self.WCancelButton)


    def languageChange(self):
        self.setCaption(self.__tr("Settings"))
        self.WOKButton.setText(self.__tr("OK"))
        self.WCancelButton.setText(self.__tr("Cancel"))
        self.listBox1.clear()
        self.listBox1.insertItem(self.__tr("Connection"))
        self.listBox1.insertItem(self.__tr("FS / Security"))
        self.listBox1.insertItem(self.__tr("Timeouts"))
        self.listBox1.insertItem(self.__tr("Transfers"))
        self.textLabel2.setText(self.__tr("External IP:"))
        self.textLabel1.setText(self.__tr("Bind to:"))
        self.WIPV6toV4.setText(self.__tr("IPV6 binds to IPV4"))
        self.textLabel3.setText(self.__tr("Min. port:"))
        self.textLabel4.setText(self.__tr("Max. port:"))
        self.WIPV6.setText(self.__tr("IPV6 Enabled"))
        self.textLabel8.setText(self.__tr("Data verification:"))
        self.WVerify.clear()
        self.WVerify.insertItem(self.__tr("disabled"))
        self.WVerify.insertItem(self.__tr("check hashes"))
        self.WVerify.insertItem(self.__tr("double check"))
        self.WVerify.insertItem(self.__tr("triple check"))
        self.textLabel11.setText(self.__tr("Allocation rate:"))
        self.textLabel12.setText(self.__tr("MB/s"))
        self.WAllocStrat.clear()
        self.WAllocStrat.insertItem(self.__tr("normal"))
        self.WAllocStrat.insertItem(self.__tr("background"))
        self.WAllocStrat.insertItem(self.__tr("pre-allocate"))
        self.WAllocStrat.insertItem(self.__tr("sparse"))
        self.textLabel6.setText(self.__tr("Allocation strategy:"))
        self.WLock.setText(self.__tr("Lock files"))
        self.WAutoKick.setText(self.__tr("Auto-kick bad seeds"))
        self.WSecurity.setText(self.__tr("Abuse prevention"))
        self.textLabel9.setText(self.__tr("Max. files open:"))
        self.WReadLock.setText(self.__tr("Lock while reading"))
        self.textLabel14.setText(self.__tr("Connection timeout:"))
        self.textLabel15.setText(self.__tr("Timeout check interval:"))
        self.textLabel16.setText(self.__tr("Max. rate period:"))
        self.textLabel17.setText(self.__tr("Upload rate fudge:"))
        self.textLabel18.setText(self.__tr("Re-request interval:"))
        self.textLabel20.setText(self.__tr("Snub time:"))
        self.textLabel13.setText(self.__tr("Keep-alive interval:"))
        self.textLabel21.setText(self.__tr("Round-robin period:"))
        self.textLabel19.setText(self.__tr("HTTP timeout:"))
        self.textLabel22.setText(self.__tr("Max. upload rate:"))
        self.textLabel23.setText(self.__tr("Max. uploads"))
        self.textLabel24.setText(self.__tr("Min. uploads:"))
        self.textLabel28.setText(self.__tr("Max. initiate:"))
        self.textLabel26.setText(self.__tr("Download slice size:"))
        self.textLabel29.setText(self.__tr("Request backlog:"))
        self.textLabel25.setText(self.__tr("Min. peers:"))
        self.textLabel1_2.setText(self.__tr("Upload unit size:"))
        self.textLabel30.setText(self.__tr("Rarest first cut-off:"))
        self.textLabel34.setText(self.__tr("Max. connections:"))
        self.textLabel32.setText(self.__tr("Max. slice size:"))
        self.textLabel27.setText(self.__tr("Max. message length:"))
        self.textLabel31.setText(self.__tr("Rarest first priority cut-off:"))
        self.textLabel33.setText(self.__tr("Connection"))


    def ok(self):
        print "TorrentSettings.ok(): Not implemented yet"

    def cancel(self):
        print "TorrentSettings.cancel(): Not implemented yet"

    def __tr(self,s,c = None):
        return qApp.translate("TorrentSettings",s,c)

Generated by  Doxygen 1.6.0   Back to index