示例#1
0
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(640, 320)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setObjectName("gridLayout")
        self.groupBox = QtWidgets.QGroupBox(Dialog)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.checkBox = QtWidgets.QCheckBox(self.groupBox)
        self.checkBox.setObjectName("checkBox")
        self.gridLayout_2.addWidget(self.checkBox, 0, 0, 1, 1)
        self.tableWidget = QtWidgets.QTableWidget(self.groupBox)
        self.tableWidget.setEditTriggers(
            QtWidgets.QAbstractItemView.DoubleClicked
            | QtWidgets.QAbstractItemView.EditKeyPressed)
        self.tableWidget.setProperty("showDropIndicator", False)
        self.tableWidget.setDragDropOverwriteMode(False)
        self.tableWidget.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.tableWidget.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.tableWidget.setShowGrid(False)
        self.tableWidget.setCornerButtonEnabled(False)
        self.tableWidget.setColumnCount(2)
        self.tableWidget.setObjectName("tableWidget")
        self.tableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidget.setHorizontalHeaderItem(1, item)
        self.tableWidget.horizontalHeader().setVisible(False)
        self.tableWidget.horizontalHeader().setDefaultSectionSize(250)
        self.tableWidget.horizontalHeader().setStretchLastSection(False)
        self.tableWidget.verticalHeader().setVisible(False)
        self.gridLayout_2.addWidget(self.tableWidget, 1, 0, 1, 1)
        self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(827, 600)
        Dialog.setMinimumSize(QtCore.QSize(700, 600))
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(0, -1, 0, -1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.groupBox = QtWidgets.QGroupBox(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.groupBox.sizePolicy().hasHeightForWidth())
        self.groupBox.setSizePolicy(sizePolicy)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.tableWidgetAvailable = QtWidgets.QTableWidget(self.groupBox)
        self.tableWidgetAvailable.setObjectName("tableWidgetAvailable")
        self.tableWidgetAvailable.setColumnCount(0)
        self.tableWidgetAvailable.setRowCount(0)
        self.tableWidgetAvailable.horizontalHeader().setDefaultSectionSize(150)
        self.tableWidgetAvailable.horizontalHeader().setSortIndicatorShown(
            True)
        self.tableWidgetAvailable.horizontalHeader().setStretchLastSection(
            True)
        self.gridLayout.addWidget(self.tableWidgetAvailable, 0, 1, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setContentsMargins(0, -1, -1, -1)
        self.verticalLayout.setObjectName("verticalLayout")
        spacerItem = QtWidgets.QSpacerItem(20, 20,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.line = QtWidgets.QFrame(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.line.sizePolicy().hasHeightForWidth())
        self.line.setSizePolicy(sizePolicy)
        self.line.setFrameShape(QtWidgets.QFrame.VLine)
        self.line.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line.setObjectName("line")
        self.verticalLayout.addWidget(self.line)
        self.pushButtonAdd = QtWidgets.QPushButton(Dialog)
        self.pushButtonAdd.setText("")
        icon = QtGui.QIcon.fromTheme("go-next")
        self.pushButtonAdd.setIcon(icon)
        self.pushButtonAdd.setObjectName("pushButtonAdd")
        self.verticalLayout.addWidget(self.pushButtonAdd)
        self.pushButtonRemove = QtWidgets.QPushButton(Dialog)
        self.pushButtonRemove.setText("")
        icon = QtGui.QIcon.fromTheme("go-previous")
        self.pushButtonRemove.setIcon(icon)
        self.pushButtonRemove.setObjectName("pushButtonRemove")
        self.verticalLayout.addWidget(self.pushButtonRemove)
        self.line_2 = QtWidgets.QFrame(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.line_2.sizePolicy().hasHeightForWidth())
        self.line_2.setSizePolicy(sizePolicy)
        self.line_2.setFrameShape(QtWidgets.QFrame.VLine)
        self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.line_2.setObjectName("line_2")
        self.verticalLayout.addWidget(self.line_2)
        spacerItem1 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem1)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.groupBox_2 = QtWidgets.QGroupBox(Dialog)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.tableWidgetPreferred = QtWidgets.QTableWidget(self.groupBox_2)
        self.tableWidgetPreferred.setObjectName("tableWidgetPreferred")
        self.tableWidgetPreferred.setColumnCount(0)
        self.tableWidgetPreferred.setRowCount(0)
        self.tableWidgetPreferred.horizontalHeader().setDefaultSectionSize(150)
        self.tableWidgetPreferred.horizontalHeader().setSortIndicatorShown(
            True)
        self.tableWidgetPreferred.horizontalHeader().setStretchLastSection(
            True)
        self.gridLayout_2.addWidget(self.tableWidgetPreferred, 0, 1, 1, 1)
        self.horizontalLayout.addWidget(self.groupBox_2)
        self.verticalLayout_2.addLayout(self.horizontalLayout)
        self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel
                                          | QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout_2.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        self.buttonBox.rejected.connect(Dialog.reject)
        self.buttonBox.accepted.connect(Dialog.accept)
        QtCore.QMetaObject.connectSlotsByName(Dialog)
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(594, 487)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.header = QtWidgets.QLabel(Form)
        self.header.setStyleSheet("border-radius: 3px;\n"
                                  "background-color: rgb(161, 161, 161);\n"
                                  "padding: 10px;")
        self.header.setAlignment(QtCore.Qt.AlignCenter)
        self.header.setObjectName("header")
        self.verticalLayout.addWidget(self.header)
        self.groupBox = QtWidgets.QGroupBox(Form)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.combo_interpreters = QtWidgets.QComboBox(self.groupBox)
        self.combo_interpreters.setObjectName("combo_interpreters")
        self.horizontalLayout.addWidget(self.combo_interpreters)
        self.bt_cfg = QtWidgets.QToolButton(self.groupBox)
        icon = QtGui.QIcon.fromTheme("system-run")
        self.bt_cfg.setIcon(icon)
        self.bt_cfg.setPopupMode(QtWidgets.QToolButton.InstantPopup)
        self.bt_cfg.setArrowType(QtCore.Qt.NoArrow)
        self.bt_cfg.setObjectName("bt_cfg")
        self.horizontalLayout.addWidget(self.bt_cfg)
        self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.groupBox_2 = QtWidgets.QGroupBox(Form)
        self.groupBox_2.setObjectName("groupBox_2")
        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox_2)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.table_packages = QtWidgets.QTableWidget(self.groupBox_2)
        self.table_packages.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table_packages.setAlternatingRowColors(True)
        self.table_packages.setSelectionMode(
            QtWidgets.QAbstractItemView.SingleSelection)
        self.table_packages.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.table_packages.setObjectName("table_packages")
        self.table_packages.setColumnCount(3)
        self.table_packages.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.table_packages.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_packages.setHorizontalHeaderItem(1, item)
        item = QtWidgets.QTableWidgetItem()
        self.table_packages.setHorizontalHeaderItem(2, item)
        self.table_packages.horizontalHeader().setCascadingSectionResizes(
            False)
        self.table_packages.horizontalHeader().setStretchLastSection(True)
        self.table_packages.verticalHeader().setVisible(False)
        self.table_packages.verticalHeader().setCascadingSectionResizes(False)
        self.horizontalLayout_2.addWidget(self.table_packages)
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setContentsMargins(0, -1, -1, -1)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.bt_install_package = QtWidgets.QToolButton(self.groupBox_2)
        self.bt_install_package.setText("")
        icon = QtGui.QIcon.fromTheme("list-add")
        self.bt_install_package.setIcon(icon)
        self.bt_install_package.setObjectName("bt_install_package")
        self.verticalLayout_2.addWidget(self.bt_install_package)
        self.bt_uninstall_package = QtWidgets.QToolButton(self.groupBox_2)
        self.bt_uninstall_package.setText("")
        icon = QtGui.QIcon.fromTheme("list-remove")
        self.bt_uninstall_package.setIcon(icon)
        self.bt_uninstall_package.setObjectName("bt_uninstall_package")
        self.verticalLayout_2.addWidget(self.bt_uninstall_package)
        self.bt_upgrade_package = QtWidgets.QToolButton(self.groupBox_2)
        self.bt_upgrade_package.setText("")
        icon = QtGui.QIcon.fromTheme("up")
        self.bt_upgrade_package.setIcon(icon)
        self.bt_upgrade_package.setObjectName("bt_upgrade_package")
        self.verticalLayout_2.addWidget(self.bt_upgrade_package)
        spacerItem = QtWidgets.QSpacerItem(20, 40,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.horizontalLayout_2.addLayout(self.verticalLayout_2)
        self.verticalLayout_3.addLayout(self.horizontalLayout_2)
        self.widgetInfos = QtWidgets.QWidget(self.groupBox_2)
        self.widgetInfos.setObjectName("widgetInfos")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.widgetInfos)
        self.gridLayout_2.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_2.setSpacing(0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.layout_infos = QtWidgets.QHBoxLayout()
        self.layout_infos.setContentsMargins(-1, 0, -1, -1)
        self.layout_infos.setObjectName("layout_infos")
        self.lblMovie = QtWidgets.QLabel(self.widgetInfos)
        self.lblMovie.setAlignment(QtCore.Qt.AlignCenter)
        self.lblMovie.setObjectName("lblMovie")
        self.layout_infos.addWidget(self.lblMovie)
        self.lblInfos = QtWidgets.QLabel(self.widgetInfos)
        self.lblInfos.setObjectName("lblInfos")
        self.layout_infos.addWidget(self.lblInfos)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.layout_infos.addItem(spacerItem1)
        self.gridLayout_2.addLayout(self.layout_infos, 0, 0, 1, 1)
        self.verticalLayout_3.addWidget(self.widgetInfos)
        self.verticalLayout.addWidget(self.groupBox_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
示例#4
0
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(558, 381)
        self.formLayout = QtWidgets.QFormLayout(Form)
        self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
        self.pickerScript = FilePicker(Form)
        self.pickerScript.setObjectName("pickerScript")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.pickerScript)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.lineEditScriptParams = QtWidgets.QLineEdit(Form)
        self.lineEditScriptParams.setObjectName("lineEditScriptParams")
        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.lineEditScriptParams)
        self.lblInterpreter = QtWidgets.QLabel(Form)
        self.lblInterpreter.setObjectName("lblInterpreter")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.lblInterpreter)
        self.comboBoxInterpreter = QtWidgets.QComboBox(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBoxInterpreter.sizePolicy().hasHeightForWidth())
        self.comboBoxInterpreter.setSizePolicy(sizePolicy)
        self.comboBoxInterpreter.setObjectName("comboBoxInterpreter")
        self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.comboBoxInterpreter)
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setObjectName("label_4")
        self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label_4)
        self.lineEdidInterpreterOpts = QtWidgets.QLineEdit(Form)
        self.lineEdidInterpreterOpts.setObjectName("lineEdidInterpreterOpts")
        self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.lineEdidInterpreterOpts)
        self.label_6 = QtWidgets.QLabel(Form)
        self.label_6.setObjectName("label_6")
        self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_6)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.tableWidgetEnvVars = QtWidgets.QTableWidget(Form)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.tableWidgetEnvVars.sizePolicy().hasHeightForWidth())
        self.tableWidgetEnvVars.setSizePolicy(sizePolicy)
        self.tableWidgetEnvVars.setAlternatingRowColors(False)
        self.tableWidgetEnvVars.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
        self.tableWidgetEnvVars.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.tableWidgetEnvVars.setGridStyle(QtCore.Qt.SolidLine)
        self.tableWidgetEnvVars.setRowCount(0)
        self.tableWidgetEnvVars.setObjectName("tableWidgetEnvVars")
        self.tableWidgetEnvVars.setColumnCount(2)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidgetEnvVars.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.tableWidgetEnvVars.setHorizontalHeaderItem(1, item)
        self.tableWidgetEnvVars.horizontalHeader().setCascadingSectionResizes(False)
        self.tableWidgetEnvVars.horizontalHeader().setStretchLastSection(True)
        self.tableWidgetEnvVars.verticalHeader().setVisible(False)
        self.horizontalLayout.addWidget(self.tableWidgetEnvVars)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setContentsMargins(0, -1, -1, -1)
        self.verticalLayout.setObjectName("verticalLayout")
        self.toolButtonAdd = QtWidgets.QToolButton(Form)
        self.toolButtonAdd.setText("")
        icon = QtGui.QIcon.fromTheme("list-add")
        self.toolButtonAdd.setIcon(icon)
        self.toolButtonAdd.setObjectName("toolButtonAdd")
        self.verticalLayout.addWidget(self.toolButtonAdd)
        self.toolButtonRemove = QtWidgets.QToolButton(Form)
        self.toolButtonRemove.setText("")
        icon = QtGui.QIcon.fromTheme("list-remove")
        self.toolButtonRemove.setIcon(icon)
        self.toolButtonRemove.setObjectName("toolButtonRemove")
        self.verticalLayout.addWidget(self.toolButtonRemove)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.formLayout.setLayout(7, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout)
        self.label_5 = QtWidgets.QLabel(Form)
        self.label_5.setObjectName("label_5")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_5)
        self.pickerWorkingDir = FilePicker(Form)
        self.pickerWorkingDir.setObjectName("pickerWorkingDir")
        self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.pickerWorkingDir)
        self.lblName = QtWidgets.QLabel(Form)
        self.lblName.setObjectName("lblName")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.lblName)
        self.lineEditName = QtWidgets.QLineEdit(Form)
        self.lineEditName.setObjectName("lineEditName")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEditName)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)
        Form.setTabOrder(self.lineEditName, self.lineEditScriptParams)
        Form.setTabOrder(self.lineEditScriptParams, self.comboBoxInterpreter)
        Form.setTabOrder(self.comboBoxInterpreter, self.lineEdidInterpreterOpts)
        Form.setTabOrder(self.lineEdidInterpreterOpts, self.tableWidgetEnvVars)
        Form.setTabOrder(self.tableWidgetEnvVars, self.toolButtonAdd)
        Form.setTabOrder(self.toolButtonAdd, self.toolButtonRemove)