@@ -43,6 +43,58 @@ namespace Lemon::base::config {
43
43
}
44
44
}
45
45
46
- void LemonConfigJudge::write (QJsonObject &json) const {}
46
+ void LemonConfigJudge::write (QJsonObject &json) const {
47
+ WRITE_JSON (defaultFullScore)
48
+ WRITE_JSON (defaultTimeLimit)
49
+ WRITE_JSON (defaultMemoryLimit)
50
+ WRITE_JSON (compileTimeLimit)
51
+ WRITE_JSON (specialJudgeTimeLimit)
52
+ WRITE_JSON (fileSizeLimit)
53
+ WRITE_JSON (rejudgeTimes)
54
+
55
+ WRITE_JSON (defaultInputFileExtension)
56
+ WRITE_JSON (defaultOutputFileExtension)
57
+ WRITE_JSON (diffPath)
58
+
59
+ WRITE_JSON_STRLIST (inputFileExtensions)
60
+ WRITE_JSON_STRLIST (outputFileExtensions)
61
+ WRITE_JSON_STRLIST (recentContest)
62
+
63
+ QJsonArray _compilerList;
64
+ for (const auto &compiler : compilerList) {
65
+ QJsonObject compilerObject;
66
+ compiler->write (compilerObject);
67
+ _compilerList.append (compilerObject);
68
+ }
69
+ json[" compilerList" ] = _compilerList;
70
+ }
71
+
72
+ void LemonConfigUI::read (const QJsonObject &json) {
73
+ READ_JSON_STR (language)
74
+ READ_JSON_STR (theme)
75
+ }
76
+
77
+ void LemonConfigUI::write (QJsonObject &json) const {
78
+ WRITE_JSON (language)
79
+ WRITE_JSON (theme)
80
+ }
81
+
82
+ void LemonConfig::read (const QJsonObject &json) {
83
+ READ_JSON_OBJECT (judgeConfig)
84
+ READ_JSON_OBJECT (uiConfig)
85
+
86
+ READ_JSON_INT (splashTime)
87
+ }
88
+
89
+ void LemonConfig::write (QJsonObject &json) const {
90
+ WRITE_JSON_OBJECT (judgeConfig)
91
+ WRITE_JSON_OBJECT (uiConfig)
92
+
93
+ WRITE_JSON (splashTime)
94
+ }
95
+
96
+ auto LemonConfig::loadConfig (SaveFormat saveFormat) -> bool {}
97
+
98
+ auto LemonConfig::saveConfig (SaveFormat saveFormat) const -> bool {}
47
99
48
100
} // namespace Lemon::base::config
0 commit comments