关键字筛选题号面板上增加一个复选框, 选择编译详细信息还是仅编译题目及答案

This commit is contained in:
wangweiye7840 2024-02-29 13:48:45 +08:00
parent 82dbc9bb69
commit a0890e5adf
4 changed files with 43 additions and 5 deletions

View File

@ -98,8 +98,11 @@ class Ui_Form(object):
self.lcdNumber_resCount.setProperty("value", 0.000000000000000)
self.pushButton_savebuild = QPushButton(Form)
self.pushButton_savebuild.setObjectName(u"pushButton_savebuild")
self.pushButton_savebuild.setGeometry(QRect(300, 440, 81, 71))
self.pushButton_savebuild.setGeometry(QRect(300, 460, 81, 51))
self.pushButton_savebuild.setFont(font)
self.checkBox_Detailed = QCheckBox(Form)
self.checkBox_Detailed.setObjectName(u"checkBox_Detailed")
self.checkBox_Detailed.setGeometry(QRect(310, 440, 79, 20))
self.retranslateUi(Form)
@ -128,5 +131,6 @@ class Ui_Form(object):
self.label_2.setText(QCoreApplication.translate("Form", u"\u8f93\u5165\u6761\u4ef6, \u7528\",\"\u5206\u9694\u8868\u793a\"\u6216\"", None))
self.label_3.setText(QCoreApplication.translate("Form", u"\u7b5b\u9009\u7ed3\u679c\u6570\u76ee:", None))
self.pushButton_savebuild.setText(QCoreApplication.translate("Form", u"\u4fdd\u5b58\u548c\u7f16\u8bd1", None))
self.checkBox_Detailed.setText(QCoreApplication.translate("Form", u"\u8be6\u7ec6\u4fe1\u606f", None))
# retranslateUi

View File

@ -60,7 +60,7 @@ class MyWindow(QWidget,Ui_Form):
prodictpath = "../题库0.3/problems.json"
objdictpath = "../题库0.3/lessonobj.json"
raw_pro_dict = load_dict(prodictpath)
configjson = {
configjson_detailed = {
"pdf标题": "筛选题目编译",
"教师版": True,
"字段显示设置": {
@ -76,6 +76,27 @@ class MyWindow(QWidget,Ui_Form):
"届别": []
}
}
configjson_simple = {
"pdf标题": "筛选题目编译",
"教师版": False,
"字段显示设置": {
"题后空间": True,
"课时目标": True,
"题目标签": True,
"答案": True,
"解答与提示": True,
"使用记录": [3,-1],
"使用记录说明": "[a,b]表示显示最好的a个和最差b个, 有-2表示不显示, 无-2但有-1表示全部显示",
"来源": True,
"备注": True,
"届别": []
}
}
if self.checkBox_Detailed.isChecked():
configjson = configjson_detailed
else:
configjson = configjson_simple
grades = configjson["字段显示设置"]["届别"]
pro_dict = select_grade_from_pro_dict(raw_pro_dict,grades)

View File

@ -1,5 +1,5 @@
#修改起始id,出处,文件名
starting_id = 1 #起始id设置, 从这一个题号后的第一个空闲题号开始添加 20040124修改
starting_id = 30001 #起始id设置, 从这一个题号后的第一个空闲题号开始添加 20040124修改
raworigin = "自拟题目" #题目来源的前缀(中缀在.tex文件中)
filename = r"临时文件\新题比对.tex" #题目的来源.tex文件
editor = "毛培菁" #编辑者姓名

View File

@ -307,9 +307,9 @@
<property name="geometry">
<rect>
<x>300</x>
<y>440</y>
<y>460</y>
<width>81</width>
<height>71</height>
<height>51</height>
</rect>
</property>
<property name="font">
@ -321,6 +321,19 @@
<string>保存和编译</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_Detailed">
<property name="geometry">
<rect>
<x>310</x>
<y>440</y>
<width>79</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>详细信息</string>
</property>
</widget>
</widget>
<resources/>
<connections/>