156 lines
5.1 KiB
Python
156 lines
5.1 KiB
Python
# coding: gb2312
|
||
from PyQt5.QtCore import Qt
|
||
from PyQt5.QtWidgets import *
|
||
from BaseFrontend.based_widget import BasedWidget
|
||
|
||
|
||
class StandardPageWidgetDefine(BasedWidget):
|
||
|
||
def __init__(self):
|
||
super().__init__()
|
||
# 定义控件(按Ctrl+点击快速跳转编辑)
|
||
"""**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区**布局对象初始化区"""
|
||
# 动作标准标题
|
||
self.action_standard_title = self._init_action_standard_title_widget()
|
||
# 动作标准下拉框
|
||
self.action_standard_combobox = self._init_action_standard_combobox()
|
||
# 动作难度标题
|
||
self.action_difficulty_title = self._init_action_difficulty_title_widget()
|
||
# 动作难度下拉框
|
||
self.action_difficulty_combobox = self._init_action_difficulty_combobox()
|
||
# 当前考核批次标题
|
||
self.cur_batch_title = self._init_cur_batch_title_widget()
|
||
# 当前考核批次
|
||
self.cur_batch_value = self._init_cur_batch_value_widget()
|
||
# 获取当前考核批次按钮
|
||
self.cur_batch_button = self._init_cur_batch_button()
|
||
# 确定按钮
|
||
self.commit_button = self._init_commit_button()
|
||
# self.wifi_component = WifiComponent()
|
||
|
||
# 初始化空白控件
|
||
@staticmethod
|
||
def init_empty_widget():
|
||
empty_widget = QFrame()
|
||
# empty_widget.setStyleSheet("border: 1px solid red")
|
||
return empty_widget
|
||
|
||
@staticmethod
|
||
def _init_action_standard_title_widget():
|
||
action_standard_title = QLabel("● 动作标准:")
|
||
action_standard_title.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||
action_standard_title.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"margin-right: 20px;"
|
||
)
|
||
return action_standard_title
|
||
|
||
@staticmethod
|
||
def _init_action_standard_combobox():
|
||
action_standard = QComboBox()
|
||
action_standard.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"border: 1px solid #a3a3a3;"
|
||
"border-radius: 4px;"
|
||
"padding-top: 20px;"
|
||
"padding-bottom: 20px;"
|
||
"padding-left: 20px;"
|
||
)
|
||
return action_standard
|
||
|
||
@staticmethod
|
||
def _init_action_difficulty_title_widget():
|
||
action_difficulty_title = QLabel("● 动作难度:")
|
||
action_difficulty_title.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||
action_difficulty_title.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"margin-right: 20px;"
|
||
)
|
||
return action_difficulty_title
|
||
|
||
@staticmethod
|
||
def _init_action_difficulty_combobox():
|
||
action_difficulty = QComboBox()
|
||
action_difficulty.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"border: 1px solid #a3a3a3;"
|
||
"border-radius: 4px;"
|
||
"padding-top: 20px;"
|
||
"padding-bottom: 20px;"
|
||
"padding-left: 20px;"
|
||
)
|
||
return action_difficulty
|
||
|
||
@staticmethod
|
||
def _init_cur_batch_title_widget():
|
||
cur_batch_title = QLabel("● 当前考核批次:")
|
||
cur_batch_title.setAlignment(Qt.AlignRight | Qt.AlignVCenter)
|
||
cur_batch_title.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"margin-right: 20px;"
|
||
)
|
||
return cur_batch_title
|
||
|
||
@staticmethod
|
||
def _init_cur_batch_value_widget():
|
||
cur_batch_title = QLabel("2024年08月25日")
|
||
cur_batch_title.setStyleSheet(
|
||
"font: 600 34px \"Microsoft YaHei UI\";"
|
||
"color: #222222;"
|
||
"letter-spacing: 4px;"
|
||
"margin-right: 20px;"
|
||
"padding-left: 10px;"
|
||
"text-decoration: underline;"
|
||
)
|
||
return cur_batch_title
|
||
|
||
@staticmethod
|
||
def _init_cur_batch_button():
|
||
cur_batch_title = QPushButton("生成最新考核批次")
|
||
cur_batch_title.setStyleSheet(
|
||
"font: 30px \"Microsoft YaHei UI\";"
|
||
"color: #409eff;"
|
||
"letter-spacing: 4px;"
|
||
"border: 1px solid #409eff;"
|
||
"border-radius: 4px;"
|
||
"background-color: #ecf5ff;"
|
||
"margin-right: 20px;"
|
||
"padding-top: 30px;"
|
||
"padding-bottom: 30px;"
|
||
)
|
||
return cur_batch_title
|
||
|
||
@staticmethod
|
||
def _init_commit_button():
|
||
commit_button = QPushButton("确定")
|
||
commit_button.setStyleSheet(
|
||
"font: 600 36px \"Microsoft YaHei UI\";"
|
||
"color: #ffffff;"
|
||
"letter-spacing: 4px;"
|
||
"border-radius: 4px;"
|
||
"background-color: qlineargradient("
|
||
"spread: pad,"
|
||
"x1: 0,"
|
||
"y1: 0,"
|
||
"x2: 1,"
|
||
"y2: 1,"
|
||
"stop: 0 rgba(63, 183, 252), "
|
||
"stop: 1 rgba(56, 179, 249),"
|
||
"stop: 2 rgba(52, 177, 247));"
|
||
"padding-top: 30px;"
|
||
"padding-bottom: 30px;"
|
||
)
|
||
return commit_button
|
||
|
||
|