54 lines
2.4 KiB
Python
54 lines
2.4 KiB
Python
# coding: gb2312
|
|
from PyQt5.QtWidgets import *
|
|
|
|
from LSZXPagesLibrary.consensus import *
|
|
from LSZXPagesLibrary.pick_up_page_widget_define import PickUpPageWidgetDefine
|
|
from LSZXPagesLibrary.tag_switch_selector import TagSwitchSelector
|
|
|
|
|
|
class PickUpPageLayoutDefine(PickUpPageWidgetDefine):
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
"""**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义**布局定义"""
|
|
# 设置页面主要布局为垂直布局,
|
|
self.title_layout = QHBoxLayout()
|
|
self.title_layout.addWidget(self.title_label, 81)
|
|
self.title_layout.addWidget(self.back_home_button, 18)
|
|
self.title_layout.addWidget(self.empty_box, 1)
|
|
self.title_layout.setContentsMargins(30, 0, 30, 0)
|
|
# 绘制一条直线
|
|
self.line_layout = QVBoxLayout()
|
|
self.line_layout.addWidget(self.line_widget)
|
|
self.line_layout.setContentsMargins(0, 20, 0, 20)
|
|
# 绘制切换转盘
|
|
self.tags_switch_selector = TagSwitchSelector(
|
|
tag_table=PICK_UP_TYPE_TABLE,
|
|
select_func=PERSON_SELECT_FUNC,
|
|
filter_func_table=PICK_UP_TYPE_FILTER,
|
|
tag_seq=PICK_UP_TYPE_LIST,
|
|
widget_gen_func=GET_PERSON_WIDGET_TEXT
|
|
)
|
|
self.tag_switch_layout = self.tags_switch_selector.get_layout()
|
|
# 绘制提示和图标
|
|
self.tips_and_logo_layout = QHBoxLayout()
|
|
self.tips_and_logo_layout.addWidget(self.tips_label, 74)
|
|
self.tips_and_logo_layout.addWidget(self.logo_label, 26)
|
|
self.tips_and_logo_layout.setContentsMargins(12, 5, 12, 10)
|
|
# 右操作区布局
|
|
self.right_operation_layout = QVBoxLayout()
|
|
self.right_operation_layout.addLayout(self.keyboard_layout, 86)
|
|
self.right_operation_layout.addLayout(self.tips_and_logo_layout, 14)
|
|
# 整个操作区
|
|
self.operation_layout = QHBoxLayout()
|
|
self.operation_layout.addLayout(self.tag_switch_layout, 74)
|
|
self.operation_layout.addLayout(self.right_operation_layout, 26)
|
|
|
|
"""**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义"""
|
|
# 总布局定义
|
|
self.layout = QVBoxLayout()
|
|
self.layout.addLayout(self.title_layout)
|
|
self.layout.addLayout(self.line_layout)
|
|
self.layout.addLayout(self.operation_layout)
|
|
self.setLayout(self.layout)
|