1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(955, 515) Form.setStyleSheet("background: rgb(0, 0, 0);\n" "color: #fff;") self.btnInputVideo = QtWidgets.QPushButton(Form) self.btnInputVideo.setGeometry(QtCore.QRect(840, 200, 51, 31)) self.btnInputVideo.setStyleSheet("color:#fff;background: #222;") self.btnInputVideo.setObjectName("btnInputVideo") self.editVideoInput = QtWidgets.QLineEdit(Form) self.editVideoInput.setGeometry(QtCore.QRect(570, 200, 261, 31)) self.editVideoInput.setStyleSheet("color:#fff;") self.editVideoInput.setInputMask("") self.editVideoInput.setText("") self.editVideoInput.setMaxLength(32767) self.editVideoInput.setFrame(True) self.editVideoInput.setCursorPosition(0) self.editVideoInput.setObjectName("editVideoInput") self.imgLabel = QtWidgets.QLabel(Form) self.imgLabel.setGeometry(QtCore.QRect(20, 50, 512, 256)) self.imgLabel.setStyleSheet("color:#aaa;background: #111;") self.imgLabel.setOpenExternalLinks(False) self.imgLabel.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse) self.imgLabel.setObjectName("imgLabel") self.btnExit = QtWidgets.QPushButton(Form) self.btnExit.setGeometry(QtCore.QRect(690, 450, 91, 51)) self.btnExit.setObjectName("btnExit") self.btnPause = QtWidgets.QPushButton(Form) self.btnPause.setGeometry(QtCore.QRect(270, 340, 81, 41)) self.btnPause.setStyleSheet("color:#fff;background: #333;") self.btnPause.setObjectName("btnPause") self.btnResume = QtWidgets.QPushButton(Form) self.btnResume.setGeometry(QtCore.QRect(180, 340, 81, 41)) self.btnResume.setStyleSheet("color:#fff;background: #333;") self.btnResume.setObjectName("btnResume") self.btnConfirm = QtWidgets.QPushButton(Form) self.btnConfirm.setGeometry(QtCore.QRect(900, 200, 51, 31)) self.btnConfirm.setStyleSheet("color:#fff;background: #222;") self.btnConfirm.setObjectName("btnConfirm") self.btnTcpBegin = QtWidgets.QPushButton(Form) self.btnTcpBegin.setGeometry(QtCore.QRect(590, 100, 91, 31)) self.btnTcpBegin.setStyleSheet("color:#fff;background: #333;") self.btnTcpBegin.setObjectName("btnTcpBegin") self.textLog = QtWidgets.QTextBrowser(Form) self.textLog.setGeometry(QtCore.QRect(570, 270, 371, 171)) self.textLog.setStyleSheet("color:#fff;background: #333;") self.textLog.setLineWidth(1) self.textLog.setObjectName("textLog") self.progressBar = QtWidgets.QProgressBar(Form) self.progressBar.setGeometry(QtCore.QRect(40, 350, 118, 23)) self.progressBar.setStyleSheet("color:#fff;background: #666;") self.progressBar.setProperty("value", 11) self.progressBar.setTextVisible(True) self.progressBar.setObjectName("progressBar") self.label = QtWidgets.QLabel(Form) self.label.setGeometry(QtCore.QRect(560, 40, 81, 31)) self.label.setStyleSheet("color:#fff;") self.label.setFrameShadow(QtWidgets.QFrame.Plain) self.label.setTextFormat(QtCore.Qt.RichText) self.label.setObjectName("label") self.lineEditW = QtWidgets.QLineEdit(Form) self.lineEditW.setGeometry(QtCore.QRect(690, 70, 41, 21)) self.lineEditW.setStyleSheet("color:#fff;background: #333;") self.lineEditW.setObjectName("lineEditW") self.label_2 = QtWidgets.QLabel(Form) self.label_2.setGeometry(QtCore.QRect(590, 70, 91, 21)) self.label_2.setStyleSheet("color:#fff;") self.label_2.setObjectName("label_2") self.label_3 = QtWidgets.QLabel(Form) self.label_3.setGeometry(QtCore.QRect(750, 70, 21, 21)) self.label_3.setStyleSheet("color:#fff;") self.label_3.setObjectName("label_3") self.lineEditH = QtWidgets.QLineEdit(Form) self.lineEditH.setGeometry(QtCore.QRect(770, 70, 41, 21)) self.lineEditH.setStyleSheet("color:#fff;background: #333;") self.lineEditH.setObjectName("lineEditH") self.label_4 = QtWidgets.QLabel(Form) self.label_4.setGeometry(QtCore.QRect(820, 70, 71, 21)) self.label_4.setStyleSheet("color:#fff;") self.label_4.setObjectName("label_4") self.lineEditScale = QtWidgets.QLineEdit(Form) self.lineEditScale.setGeometry(QtCore.QRect(890, 70, 41, 21)) self.lineEditScale.setStyleSheet("color:#fff;background: #333;") self.lineEditScale.setObjectName("lineEditScale") self.label_5 = QtWidgets.QLabel(Form) self.label_5.setGeometry(QtCore.QRect(560, 250, 41, 16)) self.label_5.setStyleSheet("color:#fff;") self.label_5.setObjectName("label_5") self.sliderThresh = QtWidgets.QSlider(Form) self.sliderThresh.setEnabled(True) self.sliderThresh.setGeometry(QtCore.QRect(690, 150, 160, 22)) self.sliderThresh.setToolTip("") self.sliderThresh.setStyleSheet("color:#f00;background: #222;") self.sliderThresh.setMaximum(255) self.sliderThresh.setProperty("value", 119) self.sliderThresh.setSliderPosition(119) self.sliderThresh.setTracking(True) self.sliderThresh.setOrientation(QtCore.Qt.Horizontal) self.sliderThresh.setTickPosition(QtWidgets.QSlider.NoTicks) self.sliderThresh.setTickInterval(10) self.sliderThresh.setObjectName("sliderThresh") self.label_6 = QtWidgets.QLabel(Form) self.label_6.setGeometry(QtCore.QRect(560, 150, 121, 16)) self.label_6.setStyleSheet("color:#fff;") self.label_6.setObjectName("label_6") self.labelThresh = QtWidgets.QLabel(Form) self.labelThresh.setGeometry(QtCore.QRect(860, 150, 31, 21)) self.labelThresh.setStyleSheet("background: #222;\n" "") self.labelThresh.setObjectName("labelThresh")
self.retranslateUi(Form) self.btnExit.clicked.connect(Form.btnExitClick) self.btnResume.clicked.connect(Form.btnResumeClick) self.btnPause.clicked.connect(Form.btnPauseClick) self.btnTcpBegin.clicked.connect(Form.btnTcpBeginClick) self.btnInputVideo.clicked.connect(Form.btnInputVideoClick) self.btnConfirm.clicked.connect(Form.btnConfirmClick) QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "视频传输")) self.btnInputVideo.setText(_translate("Form", "浏览")) self.editVideoInput.setPlaceholderText(_translate("Form", "输入gif图片或视频地址")) self.imgLabel.setText(_translate("Form", "imgLabel")) self.btnExit.setStyleSheet(_translate("Form", "color:#fff;background: #333;")) self.btnExit.setText(_translate("Form", "退出")) self.btnPause.setText(_translate("Form", "暂停")) self.btnResume.setText(_translate("Form", "继续")) self.btnConfirm.setText(_translate("Form", "确认")) self.btnTcpBegin.setText(_translate("Form", "启动服务器")) self.label.setText(_translate("Form", "基本配置")) self.lineEditW.setText(_translate("Form", "128")) self.label_2.setText(_translate("Form", "OLED屏幕 宽")) self.label_3.setText(_translate("Form", "高")) self.lineEditH.setText(_translate("Form", "64")) self.label_4.setText(_translate("Form", "缩放系数")) self.lineEditScale.setText(_translate("Form", "1")) self.label_5.setText(_translate("Form", "日志")) self.label_6.setText(_translate("Form", "图片对比度调节")) self.labelThresh.setText(_translate("Form", "0"))
|