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
| ... | @@ -95,17 +95,7 @@ Rectangle { | ... | @@ -95,17 +95,7 @@ Rectangle { |
| 95 | 95 | ||
| 96 | ImageGenTab {} | 96 | ImageGenTab {} |
| 97 | 97 | ||
| 98 | // 款式设计 — 占位 | 98 | StyleDesignerTab {} |
| 99 | Item { | ||
| 100 | Text { | ||
| 101 | anchors.centerIn: parent | ||
| 102 | text: "款式设计 tab 内容\n(QML PoC 暂未实现)" | ||
| 103 | color: App.Theme.textTertiary | ||
| 104 | font.family: App.Theme.fontFamily | ||
| 105 | font.pointSize: App.Theme.fontLg | ||
| 106 | horizontalAlignment: Text.AlignHCenter | ||
| 107 | } | ||
| 108 | } | ||
| 109 | 99 | ||
| 110 | HistoryTab {} | 100 | HistoryTab {} |
| 111 | } | 101 | } | ... | ... |
qml_poc/qml/StyleDesignerTab.qml
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment