app: PlaybackController + playhead subscription migration (issues 0c, 1-4)
New app/playback/playbackcontroller.{h,cpp}: a lazily created
process-wide singleton whose set_playhead() forwards to
oakengine_viewer_set_playhead and re-broadcasts playhead_changed as a
plain Qt signal. Every app-side oakengine_viewer_set_playhead call site
(17 across viewer, timelinewidget, timelineview, import tool,
timebasedwidget, keyframecontrol, export dialog, mainwindow) now goes
through it.
Migrate the first four playhead subscribers off the raw C event
subscription / EngineEventBridge to the controller signal:
- TimeBasedView (issue 1)
- NodeParamViewWidgetBridge (issue 2)
- NodeParamViewKeyframeControl (issue 3)
- NodeParamViewConnectedLabel (issue 4)
Each stores a QMetaObject::Connection filtered on its viewer node and
disconnects on teardown; the viewer_sub_ members are gone. Plan docs
mark issues 0c and 1-4 as done.
Closes #30, closes #31, closes #32, closes #51, closes #52.
This commit is contained in:
@@ -67,7 +67,7 @@ events; C callbacks just queue to the GUI thread and re-emit typed Qt signals.
|
||||
must use it instead of their own subscriptions.
|
||||
- **必做 / Required:build + ctest 全绿。**
|
||||
|
||||
### issue 0c — 建 app 内 PlaybackController(1 天)
|
||||
### issue 0c ✅ (done) — 建 app 内 PlaybackController(1 天)
|
||||
新建 `app/playback/playbackcontroller.{h,cpp}`,信号
|
||||
`playhead_changed(oak::Node viewer, Rational)`。
|
||||
把 app 内所有 `oakengine_viewer_set_playhead` 调用点(ViewerWidget 播放循环、
|
||||
@@ -83,23 +83,23 @@ goes through; it re-broadcasts `playhead_changed` as an app-internal Qt signal.
|
||||
|
||||
## playhead 族迁移 / Playhead migrations(模式 A,约半天/个)
|
||||
|
||||
### issue 1 — timebasedview 的 playhead 订阅
|
||||
### issue 1 ✅ (done) — timebasedview 的 playhead 订阅
|
||||
`app/widget/timebased/timebasedview.cpp:168`(裸 C 回调)。改连
|
||||
PlaybackController::playhead_changed。
|
||||
- 验收 / Acceptance:播放时 ruler 播放头线正常移动;无裸 C 订阅残留。
|
||||
- **必做 / Required:build + ctest 全绿。**
|
||||
|
||||
### issue 2 — NodeParamViewWidgetBridge playhead
|
||||
### issue 2 ✅ (done) — NodeParamViewWidgetBridge playhead
|
||||
`app/widget/nodeparamview/nodeparamviewwidgetbridge.cpp:1140`(裸 C)。
|
||||
- 验收 / Acceptance:播放时关键帧插值滑条值随播放头更新。
|
||||
- **必做 / Required:build + ctest 全绿。**
|
||||
|
||||
### issue 3 — NodeParamViewKeyframeControl playhead
|
||||
### issue 3 ✅ (done) — NodeParamViewKeyframeControl playhead
|
||||
`app/widget/nodeparamview/nodeparamviewkeyframecontrol.cpp:222`(裸 C)。
|
||||
- 验收 / Acceptance:播放头移动时 prev/next/toggle 关键帧按钮状态正确。
|
||||
- **必做 / Required:build + ctest 全绿。**
|
||||
|
||||
### issue 4 — NodeParamViewConnectedLabel playhead
|
||||
### issue 4 ✅ (done) — NodeParamViewConnectedLabel playhead
|
||||
`app/widget/nodeparamview/nodeparamviewconnectedlabel.cpp:131`(裸 C)。
|
||||
- 验收 / Acceptance:值树随播放头刷新。
|
||||
- **必做 / Required:build + ctest 全绿。**
|
||||
|
||||
Reference in New Issue
Block a user