LISHUZUOXUN_yangjiang/LSZXPagesLibrary/running_page_layout_define.py

56 lines
2.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# coding: gb2312
from PyQt5.QtWidgets import *
from LSZXPagesLibrary.consensus import *
from LSZXPagesLibrary.running_page_widget_define import RunningPageWidgetDefine
from LSZXPagesLibrary.tag_switch_selector import TagSwitchSelector
class RunningPageLayoutDefine(RunningPageWidgetDefine):
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,
column_num=7,
selectable=False
)
self.tag_switch_layout = self.tags_switch_selector.get_layout()
# 底部水平布局按钮和logo
self.bottom_layout = QHBoxLayout()
self.bottom_layout.addWidget(self.empty_box, 18)
self.bottom_layout.addWidget(self.next_page_button, 56)
self.bottom_layout.addWidget(self.empty_box, 18)
self.bottom_layout.addWidget(self.logo_label, 7)
self.bottom_layout.addWidget(self.empty_box, 1)
# 整个操作区
self.operation_layout = QVBoxLayout()
self.operation_layout.addLayout(self.tag_switch_layout, 90)
self.operation_layout.addLayout(self.bottom_layout, 10)
"""**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义**总布局定义"""
# 总布局定义
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)