feat(qml): task #15a 款式设计 tab 主体(8 字段 + Prompt 预览 + 生成)
qml_poc/qml/StyleDesignerTab.qml (新):
- 左侧 360px 卡片:8 字段 ComboBox 表单(jewelry.categories Repeater)
每个字段头插 "(不选)" 让用户能清空
onActivated → updateField(category, value) → 触发 reassemble
- 右侧上半 Prompt 预览:实时调 jewelry.previewPrompt(formData)
Text 只读展示 + 字数统计
- 右侧操作行:生成图片 PrimaryButton (调 imageGen.submitTask
默认 1:1 / 2K / 慢速模式 Pro 模型) + 重置字段 + 状态指示器
- 右侧下半预览:lastResultPath Image,双击系统查看器打开
- 监听 imageGen 4 个信号但只对 currentTaskId 匹配的做反应(taskId
唯一可区分图片生成 tab vs 款式设计 tab,互不冲突)
- 监听 jewelry.libraryChanged → optionsRepeater.reloadAll
(task #15b 词库管理对话框触发时刷新 ComboBox model)
MainWindow.qml: 款式设计占位 Item → StyleDesignerTab {}
未做(task #15b):
- 词库管理子对话框(每个类别能增删词条)
- jewelry.addItem / removeItem / resetAll Slot 都已就位,缺 UI
视觉验证:QML_DEBUG_TAB=1 直接进款式设计 tab,8 字段 ComboBox + Prompt
预览(PromptAssembler 在空表单时给 fallback "一款高端精品珠宝戒指设计…
高端珠宝渲染" 52 字)+ 生成按钮全就位,UI 无回归。
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Showing
2 changed files
with
1 additions
and
11 deletions
qml_poc/qml/StyleDesignerTab.qml
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment