feat(qml): task #14a 图片生成 tab 核心闭环(无参考图)
ImageGenTab.qml wiring 改造: - 加状态 properties: refImages / currentTaskId / lastResultPath / statusText / statusColor - TextArea 取 placeholder,删硬编码 "风景画" 占位 - 模式/宽高比/尺寸 三个 ComboBox 给 id,submit() 时取 currentText - 操作行 "生成图片" PrimaryButton onClicked → tab.submit() - submit 内部空 prompt 阻断 + 重复点击防护 + 调 imageGen.submitTask - 任务进行中按钮文字 "生成中…",结束自动恢复 - Connections 监听 imageGen 4 个信号: - taskSubmitted → "● 已提交" - taskProgress → "● 正在生成…" - taskCompleted → 拿 resultPath 更新 lastResultPath,"● 已完成" - taskFailed → "● <error>",红色 - 预览 Rectangle 内嵌 Image (file:/// + lastResultPath, cache:false 强制重读) - 无图片时显示占位文字,有图时直接展示 未做(task #14b/c/d 后续 commit): - 添加图片 / 粘贴图片 按钮(QFileDialog + QClipboard,桥要补 Slot) -收藏 + 删除 saved_prompts 持久化 - 下载图片 按钮 / 双击预览打开系统查看器 视觉验证:QML_AUTO_LOGIN=1 启动主窗口,所有控件渲染无回归。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Showing
1 changed file
with
116 additions
and
18 deletions
-
Please register or sign in to post a comment