Série: ocpp
python
109 lignes
· Mis à jour 2026-02-03
step5.py
ocpp/homework/ui_hori/step5.py
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'step5.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(1024, 600)
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(0, 0, 1024, 600))
self.label.setText("")
self.label.setPixmap(QtGui.QPixmap("image/bg_step5.png"))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setGeometry(QtCore.QRect(177, 56, 670, 46))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
self.label_2.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(24)
self.label_2.setFont(font)
self.label_2.setStyleSheet("QLabel {\n"
" color: white; /* 文字顏色 */\n"
" font-size:24pt; /* 字體大小 */\n"
" font-family: \"Arial\";\n"
" }\n"
" ")
self.label_2.setTextFormat(QtCore.Qt.AutoText)
self.label_2.setScaledContents(False)
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
self.label_2.setObjectName("label_2")
self.pushButton_previous = QtWidgets.QPushButton(Form)
self.pushButton_previous.setGeometry(QtCore.QRect(270, 485, 196, 70))
font = QtGui.QFont()
font.setPointSize(20)
self.pushButton_previous.setFont(font)
self.pushButton_previous.setStyleSheet("QPushButton {\n"
" border-image: url(\"image/btn_gr_196x70_def.png\") 0 0 0 0 stretch stretch;\n"
" color: #E9E9E9; /* 文字顏色 */\n"
" font-size: 20pt; /* 字體大小 */\n"
" }\n"
" QPushButton:pressed {\n"
" border-image: url(\"image/btn_gr_196x70_act.png\") 0 0 0 0 stretch stretch;\n"
"color: #FFFF00; /* 文字顏色 */\n"
" font-size: 20pt; /* 字體大小 */\n"
" }")
self.pushButton_previous.setIconSize(QtCore.QSize(196, 70))
self.pushButton_previous.setFlat(True)
self.pushButton_previous.setObjectName("pushButton_previous")
self.pushButton_exit = QtWidgets.QPushButton(Form)
self.pushButton_exit.setGeometry(QtCore.QRect(558, 485, 196, 70))
font = QtGui.QFont()
font.setPointSize(20)
self.pushButton_exit.setFont(font)
self.pushButton_exit.setStyleSheet("QPushButton {\n"
" border-image: url(\"image/btn_196x70_def.png\") 0 0 0 0 stretch stretch;\n"
" color: #FFFFFF; /* 文字顏色 */\n"
" font-size: 20pt; /* 字體大小 */\n"
" }\n"
" QPushButton:pressed {\n"
" border-image: url(\"image/btn_196x70_act.png\") 0 0 0 0 stretch stretch;\n"
"color: #FFFF00; /* 文字顏色 */\n"
" font-size: 20pt; /* 字體大小 */\n"
" }")
self.pushButton_exit.setIconSize(QtCore.QSize(196, 70))
self.pushButton_exit.setFlat(True)
self.pushButton_exit.setObjectName("pushButton_exit")
self.label_4 = QtWidgets.QLabel(Form)
self.label_4.setGeometry(QtCore.QRect(396, 150, 241, 251))
self.label_4.setText("")
self.label_4.setPixmap(QtGui.QPixmap("image/board_qrcode.png"))
self.label_4.setObjectName("label_4")
self.label_3 = QtWidgets.QLabel(Form)
self.label_3.setGeometry(QtCore.QRect(420, 179, 190, 190))
self.label_3.setText("")
self.label_3.setPixmap(QtGui.QPixmap("image/qrcode.png"))
self.label_3.setObjectName("label_3")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.label_2.setText(_translate("Form", "Use App to Scan the QR Code"))
self.pushButton_previous.setText(_translate("Form", "Previous"))
self.pushButton_exit.setText(_translate("Form", "Exit"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Form = QtWidgets.QWidget()
ui = Ui_Form()
ui.setupUi(Form)
Form.show()
sys.exit(app.exec_())
Articles liés
ocpp
python
Mis à jour 2026-02-03
central_system.py
central_system.py — python source code from the ocpp learning materials (ocpp/homework/central_system.py).
Lire l'article →
ocpp
python
Mis à jour 2026-02-03
charge_point.py
charge_point.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/charge_point.py).
Lire l'article →
ocpp
python
Mis à jour 2026-02-03
exceptions.py
exceptions.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/exceptions.py).
Lire l'article →
ocpp
python
Mis à jour 2026-02-03
messages.py
messages.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/messages.py).
Lire l'article →
ocpp
python
Mis à jour 2026-02-03
routing.py
routing.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/routing.py).
Lire l'article →
ocpp
python
Mis à jour 2026-02-03
__init__.py
__init__.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/v16/__init__.py).
Lire l'article →