44from app .view .another_window .contributor import contributor_page
55from app .view .another_window .import_student_name import ImportStudentNameWindow
66from app .view .another_window .set_class_name import SetClassNameWindow
7+ from app .view .another_window .name_setting import NameSettingWindow
8+ from app .view .another_window .gender_setting import GenderSettingWindow
9+ from app .view .another_window .group_setting import GroupSettingWindow
710from app .Language .obtain_language import *
811
912# 全局变量,用于保持窗口引用,防止被垃圾回收
@@ -34,6 +37,7 @@ def create_set_class_name_window():
3437 window .show ()
3538 return
3639
40+
3741# ==================================================
3842# 导入学生名单导入窗口
3943# ==================================================
@@ -60,6 +64,85 @@ def create_import_student_name_window():
6064 return
6165
6266
67+ # ==================================================
68+ # 姓名设置窗口
69+ # ==================================================
70+ class name_setting_window_template (PageTemplate ):
71+ """姓名设置窗口类
72+ 使用PageTemplate创建姓名设置页面"""
73+ def __init__ (self , parent = None ):
74+ super ().__init__ (content_widget_class = NameSettingWindow , parent = parent )
75+
76+ def create_name_setting_window ():
77+ """
78+ 创建姓名设置窗口
79+
80+ Returns:
81+ 创建的窗口实例
82+ """
83+ title = get_content_name_async ("name_setting" , "title" )
84+ window = SimpleWindowTemplate (title , width = 800 , height = 600 )
85+ window .add_page_from_template ("name_setting" , name_setting_window_template )
86+ window .switch_to_page ("name_setting" )
87+ _window_instances ["name_setting" ] = window
88+ window .windowClosed .connect (lambda : _window_instances .pop ("name_setting" , None ))
89+ window .show ()
90+ return
91+
92+
93+ # ==================================================
94+ # 性别设置窗口
95+ # ==================================================
96+ class gender_setting_window_template (PageTemplate ):
97+ """性别设置窗口类
98+ 使用PageTemplate创建性别设置页面"""
99+ def __init__ (self , parent = None ):
100+ super ().__init__ (content_widget_class = GenderSettingWindow , parent = parent )
101+
102+ def create_gender_setting_window ():
103+ """
104+ 创建性别设置窗口
105+
106+ Returns:
107+ 创建的窗口实例
108+ """
109+ title = get_content_name_async ("gender_setting" , "title" )
110+ window = SimpleWindowTemplate (title , width = 800 , height = 600 )
111+ window .add_page_from_template ("gender_setting" , gender_setting_window_template )
112+ window .switch_to_page ("gender_setting" )
113+ _window_instances ["gender_setting" ] = window
114+ window .windowClosed .connect (lambda : _window_instances .pop ("gender_setting" , None ))
115+ window .show ()
116+ return
117+
118+
119+ # ==================================================
120+ # 小组设置窗口
121+ # ==================================================
122+ class group_setting_window_template (PageTemplate ):
123+ """小组设置窗口类
124+ 使用PageTemplate创建小组设置页面"""
125+ def __init__ (self , parent = None ):
126+ super ().__init__ (content_widget_class = GroupSettingWindow , parent = parent )
127+
128+ def create_group_setting_window ():
129+ """
130+ 创建小组设置窗口
131+
132+ Returns:
133+ 创建的窗口实例
134+ """
135+ title = get_content_name_async ("group_setting" , "title" )
136+ window = SimpleWindowTemplate (title , width = 800 , height = 600 )
137+ window .add_page_from_template ("group_setting" , group_setting_window_template )
138+ window .switch_to_page ("group_setting" )
139+ _window_instances ["group_setting" ] = window
140+ window .windowClosed .connect (lambda : _window_instances .pop ("group_setting" , None ))
141+ window .show ()
142+ return
143+
144+
145+
63146# ==================================================
64147# 贡献者窗口
65148# ==================================================
0 commit comments