Série: ocpp
python
107 linhas
· Atualizado 2026-02-03
step9_new.py
ocpp/homework/ui_hori/step9_new.py
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'step9_new.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)
Form.setStyleSheet("QWidget {\n"
" background-image: url(image/bg_step9.png);\n"
" background-repeat: no-repeat;\n"
" background-position: center;\n"
"}")
self.label_timer = QtWidgets.QLabel(Form)
self.label_timer.setGeometry(QtCore.QRect(175, 50, 400, 160))
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(80)
font.setBold(True)
font.setWeight(75)
self.label_timer.setFont(font)
self.label_timer.setStyleSheet("QLabel {\n"
" color: #FF0000;\n"
" font-size: 80pt;\n"
" font-family: \"Arial\";\n"
" font-weight: bold;\n"
" border: 3px solid #FF0000;\n"
" border-radius: 10px;\n"
" background-color: transparent;\n"
" padding: 10px;\n"
"}")
self.label_timer.setAlignment(QtCore.Qt.AlignCenter)
self.label_timer.setObjectName("label_timer")
self.label_instruction = QtWidgets.QLabel(Form)
self.label_instruction.setGeometry(QtCore.QRect(100, 250, 500, 200))
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(32)
self.label_instruction.setFont(font)
self.label_instruction.setStyleSheet("QLabel {\n"
" color: white;\n"
" font-size: 32pt;\n"
" font-family: \"Arial\";\n"
"}")
self.label_instruction.setWordWrap(True)
self.label_instruction.setObjectName("label_instruction")
self.label_charging_station = QtWidgets.QLabel(Form)
self.label_charging_station.setGeometry(QtCore.QRect(650, 50, 300, 400))
self.label_charging_station.setStyleSheet("QLabel {\n"
" background-color: transparent;\n"
" border: none;\n"
"}")
self.label_charging_station.setText("")
self.label_charging_station.setPixmap(QtGui.QPixmap("image/charge_station.png"))
self.label_charging_station.setScaledContents(True)
self.label_charging_station.setObjectName("label_charging_station")
self.pushButton_next = QtWidgets.QPushButton(Form)
self.pushButton_next.setGeometry(QtCore.QRect(412, 480, 200, 80))
font = QtGui.QFont()
font.setPointSize(16)
self.pushButton_next.setFont(font)
self.pushButton_next.setStyleSheet("QPushButton {\n"
" background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #4A90E2, stop:1 #2E5BBA);\n"
" color: white;\n"
" font-size: 16pt;\n"
" font-family: \"Arial\";\n"
" border: none;\n"
" border-radius: 8px;\n"
" padding: 10px;\n"
"}\n"
"QPushButton:hover {\n"
" background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #5BA0F2, stop:1 #3E6BCA);\n"
"}\n"
"QPushButton:pressed {\n"
" background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #3A80D2, stop:1 #1E4BAA);\n"
"}")
self.pushButton_next.setFlat(True)
self.pushButton_next.setObjectName("pushButton_next")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.label_timer.setText(_translate("Form", "01:59"))
self.label_instruction.setText(_translate("Form", "Remove the charging gun and return it to the designated position on the charging station"))
self.pushButton_next.setText(_translate("Form", "Next"))
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_())
Artigos relacionados
ocpp
python
Atualizado 2026-02-03
central_system.py
central_system.py — python source code from the ocpp learning materials (ocpp/homework/central_system.py).
Ler artigo →
ocpp
python
Atualizado 2026-02-03
charge_point.py
charge_point.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/charge_point.py).
Ler artigo →
ocpp
python
Atualizado 2026-02-03
exceptions.py
exceptions.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/exceptions.py).
Ler artigo →
ocpp
python
Atualizado 2026-02-03
messages.py
messages.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/messages.py).
Ler artigo →
ocpp
python
Atualizado 2026-02-03
routing.py
routing.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/routing.py).
Ler artigo →
ocpp
python
Atualizado 2026-02-03
__init__.py
__init__.py — python source code from the ocpp learning materials (ocpp/homework/ocpp/v16/__init__.py).
Ler artigo →