示例#1
0
    def setupUi(self, JSIT):
        JSIT.setObjectName("JSIT")
        JSIT.resize(820, 602)
        self.centralwidget = QtGui.QWidget(JSIT)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.line = QtGui.QFrame(self.centralwidget)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout.addWidget(self.line)
        self.addFiles = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.addFiles.sizePolicy().hasHeightForWidth())
        self.addFiles.setSizePolicy(sizePolicy)
        self.addFiles.setMinimumSize(QtCore.QSize(0, 0))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("icons/edit_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.addFiles.setIcon(icon)
        self.addFiles.setIconSize(QtCore.QSize(40, 40))
        self.addFiles.setObjectName("addFiles")
        self.horizontalLayout.addWidget(self.addFiles)
        self.addURL = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.addURL.sizePolicy().hasHeightForWidth())
        self.addURL.setSizePolicy(sizePolicy)
        self.addURL.setMinimumSize(QtCore.QSize(0, 0))
        self.addURL.setIcon(icon)
        self.addURL.setIconSize(QtCore.QSize(40, 40))
        self.addURL.setObjectName("addURL")
        self.horizontalLayout.addWidget(self.addURL)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.watchClipboard = QtGui.QCheckBox(self.centralwidget)
        self.watchClipboard.setObjectName("watchClipboard")
        self.verticalLayout.addWidget(self.watchClipboard)
        self.watchDirectory = QtGui.QCheckBox(self.centralwidget)
        self.watchDirectory.setObjectName("watchDirectory")
        self.verticalLayout.addWidget(self.watchDirectory)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.startB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.startB.sizePolicy().hasHeightForWidth())
        self.startB.setSizePolicy(sizePolicy)
        self.startB.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("icons/forward.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.startB.setIcon(icon1)
        self.startB.setIconSize(QtCore.QSize(40, 40))
        self.startB.setObjectName("startB")
        self.horizontalLayout.addWidget(self.startB)
        self.stopB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stopB.sizePolicy().hasHeightForWidth())
        self.stopB.setSizePolicy(sizePolicy)
        self.stopB.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("icons/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.stopB.setIcon(icon2)
        self.stopB.setIconSize(QtCore.QSize(40, 40))
        self.stopB.setObjectName("stopB")
        self.horizontalLayout.addWidget(self.stopB)
        self.downloadB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.downloadB.sizePolicy().hasHeightForWidth())
        self.downloadB.setSizePolicy(sizePolicy)
        self.downloadB.setText("")
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap("icons/download.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.downloadB.setIcon(icon3)
        self.downloadB.setIconSize(QtCore.QSize(40, 40))
        self.downloadB.setObjectName("downloadB")
        self.horizontalLayout.addWidget(self.downloadB)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.reloadB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.reloadB.sizePolicy().hasHeightForWidth())
        self.reloadB.setSizePolicy(sizePolicy)
        self.reloadB.setText("")
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap("icons/reload.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.reloadB.setIcon(icon4)
        self.reloadB.setIconSize(QtCore.QSize(40, 40))
        self.reloadB.setObjectName("reloadB")
        self.horizontalLayout.addWidget(self.reloadB)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        self.tableView = TorrentTableView(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tableView.sizePolicy().hasHeightForWidth())
        self.tableView.setSizePolicy(sizePolicy)
        self.tableView.setObjectName("tableView")
        self.verticalLayout_2.addWidget(self.tableView)
        JSIT.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(JSIT)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 820, 26))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuOptions = QtGui.QMenu(self.menubar)
        self.menuOptions.setObjectName("menuOptions")
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        JSIT.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(JSIT)
        self.statusbar.setObjectName("statusbar")
        JSIT.setStatusBar(self.statusbar)
        self.actionOptions = QtGui.QAction(JSIT)
        self.actionOptions.setObjectName("actionOptions")
        self.actionAbout = QtGui.QAction(JSIT)
        self.actionAbout.setObjectName("actionAbout")
        self.actionQuit = QtGui.QAction(JSIT)
        self.actionQuit.setObjectName("actionQuit")
        self.actionSave_Preferences = QtGui.QAction(JSIT)
        self.actionSave_Preferences.setObjectName("actionSave_Preferences")
        self.actionEdit_Preferences = QtGui.QAction(JSIT)
        self.actionEdit_Preferences.setObjectName("actionEdit_Preferences")
        self.actionDownload = QtGui.QAction(JSIT)
        self.actionDownload.setObjectName("actionDownload")
        self.menuFile.addAction(self.actionQuit)
        self.menuOptions.addAction(self.actionEdit_Preferences)
        self.menuOptions.addAction(self.actionSave_Preferences)
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuOptions.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(JSIT)
        QtCore.QObject.connect(self.actionQuit, QtCore.SIGNAL("activated()"), JSIT.close)
        QtCore.QMetaObject.connectSlotsByName(JSIT)
示例#2
0
class Ui_JSIT(object):
    def setupUi(self, JSIT):
        JSIT.setObjectName("JSIT")
        JSIT.resize(820, 602)
        self.centralwidget = QtGui.QWidget(JSIT)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
        self.centralwidget.setSizePolicy(sizePolicy)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.line = QtGui.QFrame(self.centralwidget)
        self.line.setFrameShape(QtGui.QFrame.HLine)
        self.line.setFrameShadow(QtGui.QFrame.Sunken)
        self.line.setObjectName("line")
        self.horizontalLayout.addWidget(self.line)
        self.addFiles = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.addFiles.sizePolicy().hasHeightForWidth())
        self.addFiles.setSizePolicy(sizePolicy)
        self.addFiles.setMinimumSize(QtCore.QSize(0, 0))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("icons/edit_add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.addFiles.setIcon(icon)
        self.addFiles.setIconSize(QtCore.QSize(40, 40))
        self.addFiles.setObjectName("addFiles")
        self.horizontalLayout.addWidget(self.addFiles)
        self.addURL = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.addURL.sizePolicy().hasHeightForWidth())
        self.addURL.setSizePolicy(sizePolicy)
        self.addURL.setMinimumSize(QtCore.QSize(0, 0))
        self.addURL.setIcon(icon)
        self.addURL.setIconSize(QtCore.QSize(40, 40))
        self.addURL.setObjectName("addURL")
        self.horizontalLayout.addWidget(self.addURL)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.watchClipboard = QtGui.QCheckBox(self.centralwidget)
        self.watchClipboard.setObjectName("watchClipboard")
        self.verticalLayout.addWidget(self.watchClipboard)
        self.watchDirectory = QtGui.QCheckBox(self.centralwidget)
        self.watchDirectory.setObjectName("watchDirectory")
        self.verticalLayout.addWidget(self.watchDirectory)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.startB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.startB.sizePolicy().hasHeightForWidth())
        self.startB.setSizePolicy(sizePolicy)
        self.startB.setText("")
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap("icons/forward.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.startB.setIcon(icon1)
        self.startB.setIconSize(QtCore.QSize(40, 40))
        self.startB.setObjectName("startB")
        self.horizontalLayout.addWidget(self.startB)
        self.stopB = QtGui.QPushButton(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stopB.sizePolicy().hasHeightForWidth())
        self.stopB.setSizePolicy(sizePolicy)
        self.stopB.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap("icons/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.stopB.setIcon(icon2)
        self.stopB.setIconSize(QtCore.QSize(40, 40))
        self.stopB.setObjectName("stopB")
        self.horizontalLayout.addWidget(self.stopB)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        self.tableView = TorrentTableView(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tableView.sizePolicy().hasHeightForWidth())
        self.tableView.setSizePolicy(sizePolicy)
        self.tableView.setObjectName("tableView")
        self.verticalLayout_2.addWidget(self.tableView)
        JSIT.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(JSIT)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 820, 23))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtGui.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuOptions = QtGui.QMenu(self.menubar)
        self.menuOptions.setObjectName("menuOptions")
        self.menuHelp = QtGui.QMenu(self.menubar)
        self.menuHelp.setObjectName("menuHelp")
        JSIT.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(JSIT)
        self.statusbar.setObjectName("statusbar")
        JSIT.setStatusBar(self.statusbar)
        self.actionOptions = QtGui.QAction(JSIT)
        self.actionOptions.setObjectName("actionOptions")
        self.actionAbout = QtGui.QAction(JSIT)
        self.actionAbout.setObjectName("actionAbout")
        self.actionQuit = QtGui.QAction(JSIT)
        self.actionQuit.setObjectName("actionQuit")
        self.actionSave_Preferences = QtGui.QAction(JSIT)
        self.actionSave_Preferences.setObjectName("actionSave_Preferences")
        self.actionEdit_Preferences = QtGui.QAction(JSIT)
        self.actionEdit_Preferences.setObjectName("actionEdit_Preferences")
        self.menuFile.addAction(self.actionQuit)
        self.menuOptions.addAction(self.actionEdit_Preferences)
        self.menuOptions.addAction(self.actionSave_Preferences)
        self.menuHelp.addAction(self.actionAbout)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuOptions.menuAction())
        self.menubar.addAction(self.menuHelp.menuAction())

        self.retranslateUi(JSIT)
        QtCore.QObject.connect(self.actionQuit, QtCore.SIGNAL("activated()"), JSIT.close)
        QtCore.QMetaObject.connectSlotsByName(JSIT)

    def retranslateUi(self, JSIT):
        JSIT.setWindowTitle(QtGui.QApplication.translate("JSIT", "Justseed.it Client", None, QtGui.QApplication.UnicodeUTF8))
        self.addFiles.setToolTip(QtGui.QApplication.translate("JSIT", "Add torrent(s) from files", None, QtGui.QApplication.UnicodeUTF8))
        self.addFiles.setText(QtGui.QApplication.translate("JSIT", "Files", None, QtGui.QApplication.UnicodeUTF8))
        self.addURL.setToolTip(QtGui.QApplication.translate("JSIT", "Add torrent from http:// or magnet: URL", None, QtGui.QApplication.UnicodeUTF8))
        self.addURL.setText(QtGui.QApplication.translate("JSIT", "URL", None, QtGui.QApplication.UnicodeUTF8))
        self.watchClipboard.setText(QtGui.QApplication.translate("JSIT", "Watch Clipboard", None, QtGui.QApplication.UnicodeUTF8))
        self.watchDirectory.setText(QtGui.QApplication.translate("JSIT", "Watch Directory", None, QtGui.QApplication.UnicodeUTF8))
        self.startB.setToolTip(QtGui.QApplication.translate("JSIT", "Start all torrents", None, QtGui.QApplication.UnicodeUTF8))
        self.stopB.setToolTip(QtGui.QApplication.translate("JSIT", "Stop all torrents", None, QtGui.QApplication.UnicodeUTF8))
        self.menuFile.setTitle(QtGui.QApplication.translate("JSIT", "File", None, QtGui.QApplication.UnicodeUTF8))
        self.menuOptions.setTitle(QtGui.QApplication.translate("JSIT", "Options", None, QtGui.QApplication.UnicodeUTF8))
        self.menuHelp.setTitle(QtGui.QApplication.translate("JSIT", "Help", None, QtGui.QApplication.UnicodeUTF8))
        self.actionOptions.setText(QtGui.QApplication.translate("JSIT", "Options", None, QtGui.QApplication.UnicodeUTF8))
        self.actionAbout.setText(QtGui.QApplication.translate("JSIT", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.actionQuit.setText(QtGui.QApplication.translate("JSIT", "Quit", None, QtGui.QApplication.UnicodeUTF8))
        self.actionSave_Preferences.setText(QtGui.QApplication.translate("JSIT", "Save Preferences", None, QtGui.QApplication.UnicodeUTF8))
        self.actionEdit_Preferences.setText(QtGui.QApplication.translate("JSIT", "Edit Preferences", None, QtGui.QApplication.UnicodeUTF8))