class Ui_Form(object): def __init__(self, k): config = configparser.ConfigParser() config.read('gameSetting.ini') self.URL = config['BROWSER']['URL' + str(k)] self.gain = config.getfloat('BROWSER', 'gain' + str(k)) self.Dialog = QtWidgets.QDialog() self.setupUi(self.Dialog) def setupUi(self, Form): Form.setObjectName("Form") Form.resize(1300, 800) Form.setMinimumSize(QtCore.QSize(1300, 800)) Form.setMaximumSize(QtCore.QSize(1300, 800)) Form.setMouseTracking(True) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("media/cat.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.webEngineView = QWebEngineView(Form) self.webEngineView.setGeometry(QtCore.QRect(0, 0, 1300, 800)) self.webEngineView.setMinimumSize(QtCore.QSize(1300, 800)) self.webEngineView.setMaximumSize(QtCore.QSize(1300, 800)) self.webEngineView.setMouseTracking(False) self.webEngineView.setUrl(QtCore.QUrl(self.URL)) self.webEngineView.setZoomFactor(self.gain) self.webEngineView.setObjectName("webEngineView") self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "黑猫浏览器"))
class Ui_FieldSelector(object): def setupUi(self, FieldSelector): FieldSelector.setObjectName("FieldSelector") FieldSelector.resize(964, 923) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/images/images/selector.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) FieldSelector.setWindowIcon(icon) FieldSelector.setSizeGripEnabled(True) FieldSelector.setModal(True) self.gridLayout_2 = QtWidgets.QGridLayout(FieldSelector) self.gridLayout_2.setObjectName("gridLayout_2") self.webView = QWebView(FieldSelector) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.webView.sizePolicy().hasHeightForWidth()) self.webView.setSizePolicy(sizePolicy) self.webView.setMouseTracking(True) self.webView.setUrl(QtCore.QUrl("about:blank")) self.webView.setObjectName("webView") self.gridLayout_2.addWidget(self.webView, 1, 0, 1, 2) self.textualFrame = QtWidgets.QFrame(FieldSelector) self.textualFrame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.textualFrame.setFrameShadow(QtWidgets.QFrame.Raised) self.textualFrame.setObjectName("textualFrame") self.gridLayout_5 = QtWidgets.QGridLayout(self.textualFrame) self.gridLayout_5.setObjectName("gridLayout_5") self.label_4 = QtWidgets.QLabel(self.textualFrame) self.label_4.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_4.setFrameShadow(QtWidgets.QFrame.Plain) self.label_4.setLineWidth(0) self.label_4.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_4.setObjectName("label_4") self.gridLayout_5.addWidget(self.label_4, 0, 0, 1, 1) self.textualComboBox = QtWidgets.QComboBox(self.textualFrame) self.textualComboBox.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.textualComboBox.sizePolicy().hasHeightForWidth()) self.textualComboBox.setSizePolicy(sizePolicy) self.textualComboBox.setEditable(False) self.textualComboBox.setDuplicatesEnabled(False) self.textualComboBox.setObjectName("textualComboBox") self.gridLayout_5.addWidget(self.textualComboBox, 0, 1, 1, 1) self.label_3 = QtWidgets.QLabel(self.textualFrame) self.label_3.setFrameShape(QtWidgets.QFrame.NoFrame) self.label_3.setFrameShadow(QtWidgets.QFrame.Raised) self.label_3.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_3.setObjectName("label_3") self.gridLayout_5.addWidget(self.label_3, 1, 0, 1, 1) self.textcolComboBox = QtWidgets.QComboBox(self.textualFrame) self.textcolComboBox.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.textcolComboBox.sizePolicy().hasHeightForWidth()) self.textcolComboBox.setSizePolicy(sizePolicy) self.textcolComboBox.setEditable(True) self.textcolComboBox.setObjectName("textcolComboBox") self.gridLayout_5.addWidget(self.textcolComboBox, 1, 1, 1, 1) self.gridLayout_2.addWidget(self.textualFrame, 4, 0, 1, 1) self.url = QtWidgets.QLineEdit(FieldSelector) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.url.sizePolicy().hasHeightForWidth()) self.url.setSizePolicy(sizePolicy) self.url.setReadOnly(True) self.url.setObjectName("url") self.gridLayout_2.addWidget(self.url, 0, 0, 1, 2) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.tagCheckBox = QtWidgets.QCheckBox(FieldSelector) self.tagCheckBox.setEnabled(False) font = QtGui.QFont() font.setPointSize(9) self.tagCheckBox.setFont(font) self.tagCheckBox.setChecked(True) self.tagCheckBox.setObjectName("tagCheckBox") self.gridLayout.addWidget(self.tagCheckBox, 4, 1, 1, 1) self.idCheckBox = QtWidgets.QCheckBox(FieldSelector) self.idCheckBox.setEnabled(False) font = QtGui.QFont() font.setPointSize(9) self.idCheckBox.setFont(font) self.idCheckBox.setChecked(True) self.idCheckBox.setObjectName("idCheckBox") self.gridLayout.addWidget(self.idCheckBox, 4, 2, 1, 1) self.classCheckBox = QtWidgets.QCheckBox(FieldSelector) self.classCheckBox.setEnabled(False) font = QtGui.QFont() font.setPointSize(9) self.classCheckBox.setFont(font) self.classCheckBox.setChecked(True) self.classCheckBox.setObjectName("classCheckBox") self.gridLayout.addWidget(self.classCheckBox, 4, 3, 1, 1) self.numElecomboBox = QtWidgets.QComboBox(FieldSelector) self.numElecomboBox.setEnabled(False) self.numElecomboBox.setObjectName("numElecomboBox") self.numElecomboBox.addItem("") self.gridLayout.addWidget(self.numElecomboBox, 4, 5, 1, 1) self.backButton = QtWidgets.QPushButton(FieldSelector) self.backButton.setMaximumSize(QtCore.QSize(100, 16777215)) self.backButton.setAutoDefault(False) self.backButton.setDefault(False) self.backButton.setObjectName("backButton") self.gridLayout.addWidget(self.backButton, 4, 6, 1, 1) self.nextButton = QtWidgets.QPushButton(FieldSelector) self.nextButton.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.nextButton.sizePolicy().hasHeightForWidth()) self.nextButton.setSizePolicy(sizePolicy) self.nextButton.setMaximumSize(QtCore.QSize(100, 16777215)) self.nextButton.setFocusPolicy(QtCore.Qt.StrongFocus) self.nextButton.setCheckable(False) self.nextButton.setChecked(False) self.nextButton.setAutoDefault(False) self.nextButton.setFlat(False) self.nextButton.setObjectName("nextButton") self.gridLayout.addWidget(self.nextButton, 4, 7, 1, 1) self.additionTagLineEdit = QtWidgets.QLineEdit(FieldSelector) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.additionTagLineEdit.sizePolicy().hasHeightForWidth()) self.additionTagLineEdit.setSizePolicy(sizePolicy) self.additionTagLineEdit.setObjectName("additionTagLineEdit") self.gridLayout.addWidget(self.additionTagLineEdit, 4, 4, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 2, 0, 1, 2) self.sourceText = QtWidgets.QPlainTextEdit(FieldSelector) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.sourceText.sizePolicy().hasHeightForWidth()) self.sourceText.setSizePolicy(sizePolicy) self.sourceText.setObjectName("sourceText") self.gridLayout_2.addWidget(self.sourceText, 3, 0, 1, 2) self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.state = QtWidgets.QLabel(FieldSelector) self.state.setText("") self.state.setObjectName("state") self.gridLayout_3.addWidget(self.state, 0, 0, 1, 1) self.warnLabel = QtWidgets.QLabel(FieldSelector) self.warnLabel.setMinimumSize(QtCore.QSize(0, 20)) self.warnLabel.setText("") self.warnLabel.setObjectName("warnLabel") self.gridLayout_3.addWidget(self.warnLabel, 1, 0, 1, 1) self.progressBar = QtWidgets.QProgressBar(FieldSelector) self.progressBar.setMaximumSize(QtCore.QSize(16777215, 30)) font = QtGui.QFont() font.setPointSize(11) self.progressBar.setFont(font) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName("progressBar") self.gridLayout_3.addWidget(self.progressBar, 2, 0, 1, 1) self.gridLayout_2.addLayout(self.gridLayout_3, 5, 0, 1, 2) self.extractFrame = QtWidgets.QFrame(FieldSelector) self.extractFrame.setEnabled(False) self.extractFrame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.extractFrame.setFrameShadow(QtWidgets.QFrame.Raised) self.extractFrame.setObjectName("extractFrame") self.gridLayout_7 = QtWidgets.QGridLayout(self.extractFrame) self.gridLayout_7.setObjectName("gridLayout_7") self.widget = QtWidgets.QWidget(self.extractFrame) self.widget.setObjectName("widget") self.gridLayout_4 = QtWidgets.QGridLayout(self.widget) self.gridLayout_4.setObjectName("gridLayout_4") self.textExtraction = QtWidgets.QRadioButton(self.widget) self.textExtraction.setEnabled(False) self.textExtraction.setChecked(True) self.textExtraction.setObjectName("textExtraction") self.gridLayout_4.addWidget(self.textExtraction, 0, 0, 1, 1) self.sourceExtraction = QtWidgets.QRadioButton(self.widget) self.sourceExtraction.setObjectName("sourceExtraction") self.gridLayout_4.addWidget(self.sourceExtraction, 1, 0, 1, 1) self.gridLayout_7.addWidget(self.widget, 0, 0, 1, 1) self.widget_2 = QtWidgets.QWidget(self.extractFrame) self.widget_2.setObjectName("widget_2") self.gridLayout_6 = QtWidgets.QGridLayout(self.widget_2) self.gridLayout_6.setObjectName("gridLayout_6") self.selectedExtraction = QtWidgets.QRadioButton(self.widget_2) self.selectedExtraction.setChecked(True) self.selectedExtraction.setObjectName("selectedExtraction") self.gridLayout_6.addWidget(self.selectedExtraction, 0, 0, 1, 1) self.inverseExtraction = QtWidgets.QRadioButton(self.widget_2) self.inverseExtraction.setObjectName("inverseExtraction") self.gridLayout_6.addWidget(self.inverseExtraction, 1, 0, 1, 1) self.gridLayout_7.addWidget(self.widget_2, 0, 1, 1, 1) self.newcolumnButton = QtWidgets.QPushButton(self.extractFrame) self.newcolumnButton.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.newcolumnButton.sizePolicy().hasHeightForWidth()) self.newcolumnButton.setSizePolicy(sizePolicy) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/images/images/newColumn.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.newcolumnButton.setIcon(icon1) self.newcolumnButton.setIconSize(QtCore.QSize(36, 36)) self.newcolumnButton.setAutoDefault(True) self.newcolumnButton.setFlat(False) self.newcolumnButton.setObjectName("newcolumnButton") self.gridLayout_7.addWidget(self.newcolumnButton, 0, 2, 1, 1) self.gridLayout_2.addWidget(self.extractFrame, 4, 1, 1, 1) self.sourceText.raise_() self.textualFrame.raise_() self.url.raise_() self.webView.raise_() self.extractFrame.raise_() self.label_4.setBuddy(self.textualComboBox) self.label_3.setBuddy(self.textcolComboBox) self.retranslateUi(FieldSelector) QtCore.QMetaObject.connectSlotsByName(FieldSelector) def retranslateUi(self, FieldSelector): _translate = QtCore.QCoreApplication.translate FieldSelector.setWindowTitle( _translate("FieldSelector", "Gromoteur - Field Selector")) self.webView.setStatusTip( _translate( "FieldSelector", "click to select desired content, scroll with mouse wheel")) self.label_4.setText( _translate("FieldSelector", "Te&xtualization Name:")) self.label_3.setText(_translate("FieldSelector", "Column &Name:")) self.tagCheckBox.setText(_translate("FieldSelector", "tag")) self.idCheckBox.setText(_translate("FieldSelector", "id")) self.classCheckBox.setText(_translate("FieldSelector", "class")) self.numElecomboBox.setItemText(0, _translate("FieldSelector", "all")) self.backButton.setText(_translate("FieldSelector", "previous")) self.nextButton.setText(_translate("FieldSelector", "next")) self.additionTagLineEdit.setToolTip( _translate("FieldSelector", "additional tag")) self.textExtraction.setText(_translate("FieldSelector", "text")) self.sourceExtraction.setText(_translate("FieldSelector", "source")) self.selectedExtraction.setText( _translate("FieldSelector", "se&lected")) self.inverseExtraction.setText(_translate("FieldSelector", "in&verse")) self.newcolumnButton.setText( _translate("FieldSelector", "extract\n" "into separate column"))