docs: 添加涉密文件自检工具实施计划

This commit is contained in:
2026-06-08 13:53:24 +08:00
commit 31161d9a5f
1838 changed files with 455407 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
# =========================================
# =============== 主题连接器 ===============
# =========================================
from PySide2.QtCore import QObject, Slot
from umi_log import logger
ThemePath = "themes.json"
class ThemeConnector(QObject):
# 读取主题
@Slot(result=str)
def loadThemeStr(self):
try:
with open(ThemePath, "r", encoding="utf-8") as f:
r = f.read()
return r
except FileNotFoundError:
pass
except Exception:
logger.warning("读取主题文件失败。", exc_info=True)
return ""
# 保存主题
@Slot(str)
def saveThemeStr(self, tstr):
try:
with open(ThemePath, "w", encoding="utf-8") as f:
f.write(tstr)
except Exception:
logger.warning("写入主题文件失败。", exc_info=True)