重构 Autocal 采集页:单一队列与控制器驱动的主按钮
选点、对准、加载与录像分散在两个面板,状态靠隐藏相位判断。现改由不依赖 Qt 的采集控制器驱动,并加入录像选项、汇总平铺副本、保持到时自动结束、会话结束回到空闲,以及无设备时的模拟采集。已运行 Autocal 非 Qt 测试并通过范围内门禁;界面测试待 Windows 复核,未做实机验收。
This commit is contained in:
@@ -34,6 +34,14 @@ FORBIDDEN_BINDINGS = {"PyQt5", "PyQt6", "PySide2"}
|
||||
#: The one binding allowed, and where it may be named.
|
||||
ALLOWED_BINDING = "PySide6"
|
||||
|
||||
#: ``ui/`` modules that deliberately name no binding. ``reveal.py`` hands a path
|
||||
#: to the OS file manager; ``site_export.py`` writes the queue's CSV point sheet.
|
||||
#: Neither builds a widget, so neither has a binding to declare. The rule below
|
||||
#: exists so a UI module cannot *use* a binding it does not name; a module that
|
||||
#: uses none cannot break it, and importing PySide6 only to satisfy the rule would
|
||||
#: be the false declaration the rule is meant to prevent.
|
||||
_BINDING_FREE_UI = {"reveal.py", "site_export.py"}
|
||||
|
||||
#: Scoped enum holders we care about, with the value names actually used.
|
||||
#:
|
||||
#: Hand-maintained, and therefore incomplete by construction: the PySide6 migration
|
||||
@@ -147,6 +155,8 @@ def test_every_ui_module_imports_the_allowed_binding():
|
||||
for path in _python_files(APP_SRC / "orisys_autocal" / "ui"):
|
||||
if path.name == "__init__.py":
|
||||
continue # a re-export barrel, not a widget module
|
||||
if path.name in _BINDING_FREE_UI:
|
||||
continue
|
||||
if ALLOWED_BINDING not in _imported_packages(path):
|
||||
offenders.append(path.name)
|
||||
assert not offenders, f"these UI modules do not import {ALLOWED_BINDING}: {offenders}"
|
||||
|
||||
Reference in New Issue
Block a user