99 lines
3.1 KiB
Python
99 lines
3.1 KiB
Python
|
# coding: gb2312
|
|||
|
from PyQt5.QtCore import Qt, QSize
|
|||
|
from PyQt5.QtGui import QIcon
|
|||
|
from PyQt5.QtWidgets import *
|
|||
|
|
|||
|
from BaseFrontend.based_widget import BasedWidget
|
|||
|
from LSZXPagesLibrary.circular_running_table import CircularRunningTable
|
|||
|
|
|||
|
|
|||
|
class RunningTestPageWidgetDefine(BasedWidget):
|
|||
|
|
|||
|
def __init__(self):
|
|||
|
super().__init__()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD>Ctrl+<2B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>༭<EFBFBD><E0BCAD>
|
|||
|
"""**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>**<2A><><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>"""
|
|||
|
# <20>հؼ<D7BF>
|
|||
|
self.empty_box = self._init_empty_widget()
|
|||
|
# <20><><EFBFBD><EFBFBD>
|
|||
|
self.title_label = self._init_title_label()
|
|||
|
# <20>ؼҰ<D8BC>ť
|
|||
|
self.back_home_button = self._init_back_button_widget()
|
|||
|
# һ<><D2BB>ֱ<EFBFBD><D6B1>
|
|||
|
self.line_widget = self._init_line_widget()
|
|||
|
# ʵʱ<CAB5><CAB1>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
self.realtime_widget = CircularRunningTable()
|
|||
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
self.stop_button = self._init_stop_button()
|
|||
|
# ͼ<><CDBC>
|
|||
|
self.logo_label = self._init_logo_label()
|
|||
|
|
|||
|
# <20><>ʼ<EFBFBD><CABC><EFBFBD>հؼ<D7BF>
|
|||
|
@staticmethod
|
|||
|
def _init_empty_widget():
|
|||
|
empty_widget = QFrame()
|
|||
|
empty_widget.setFrameShape(QFrame.Box)
|
|||
|
empty_widget.setLineWidth(0)
|
|||
|
return empty_widget
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_title_label():
|
|||
|
title_label = QLabel("<ѵ<><D1B5><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>>")
|
|||
|
title_label.setAlignment(Qt.AlignCenter)
|
|||
|
title_label.setStyleSheet("font: 30px \"Microsoft YaHei UI\";letter-spacing: 4px")
|
|||
|
return title_label
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_back_button_widget():
|
|||
|
back_home_button = QPushButton("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ")
|
|||
|
icon = QIcon("assets/home.png")
|
|||
|
back_home_button.setIconSize(QSize(32, 32))
|
|||
|
back_home_button.setIcon(icon)
|
|||
|
back_home_button.setStyleSheet(
|
|||
|
"font: 24px \"Microsoft YaHei UI\";"
|
|||
|
"border:none;"
|
|||
|
"color:#222222;"
|
|||
|
"letter-spacing: 10px;"
|
|||
|
"border-radius:4px;"
|
|||
|
"border:1px solid #222222"
|
|||
|
";height: 60%;"
|
|||
|
)
|
|||
|
return back_home_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_line_widget():
|
|||
|
line = QFrame()
|
|||
|
line.setFixedHeight(1) # <20><><EFBFBD>ø߶<C3B8>Ϊ 2 <20><><EFBFBD><EFBFBD>
|
|||
|
line.setStyleSheet("border:1px solid #000000")
|
|||
|
line.setFrameShape(QFrame.HLine) # <20><><EFBFBD><EFBFBD>Ϊˮƽ<CBAE><C6BD>
|
|||
|
return line
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_stop_button():
|
|||
|
stop_button = QPushButton("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|||
|
stop_button.setStyleSheet(
|
|||
|
"font:600 28px \"Microsoft YaHei UI\";"
|
|||
|
"border:none;"
|
|||
|
"color:#ffffff;"
|
|||
|
"letter-spacing: 10px;"
|
|||
|
"border-radius:4px;"
|
|||
|
"height: 80%;"
|
|||
|
"background-color: #f56c6c;"
|
|||
|
)
|
|||
|
return stop_button
|
|||
|
|
|||
|
@staticmethod
|
|||
|
def _init_logo_label():
|
|||
|
logo_img = QLabel()
|
|||
|
logo_img.setFrameShape(QFrame.Box)
|
|||
|
logo_img.setLineWidth(0)
|
|||
|
logo_img.setStyleSheet(
|
|||
|
"border-image: url(assets/logo.png);"
|
|||
|
"background-size: contain;"
|
|||
|
"background-repeat: no-repeat;"
|
|||
|
"background-position: center;"
|
|||
|
)
|
|||
|
logo_img.setAlignment(Qt.AlignCenter)
|
|||
|
logo_img.setScaledContents(True)
|
|||
|
return logo_img
|