TimeScrollBar
TimeScrollBar
The timeline widget (TimeScrollBar) drives the active TimeFrame and syncs with EditorRegistry.
Playback (Phase 3)
Playback advances at the selected logical target_fps (frames of time per second). The QTimer tick rate is capped at 30 Hz (time_scroll_bar::kMaxPlaybackUiRefreshFps): when target_fps exceeds that cap, each tick advances multiple frames so average speed matches target_fps, while UI callbacks stay bounded. For rates at or below the cap, the timer interval is 1000 / target_fps milliseconds (for example 0.5 FPS, one frame every two seconds).
Discrete FPS presets
Rewind and fast-forward step through this ladder (also used when persisting target_fps in TimeScrollBarStateData):
0.5 → 1 → 2 → 5 → 10 → 25 → 50 → 100 → 200
Shared helpers live in TimeScrollBarPlayback.hpp (time_scroll_bar::kFpsPresets, snapTargetFpsToPreset, timerPeriodMsForTargetFps, playbackUiRefreshFps, timerPeriodMsForPlayback).
Workspace JSON
- Current field:
target_fps(float), snapped to a preset when set viaTimeScrollBarState::setTargetFps. - Legacy:
play_speed(integer multiplier on a fixed 25 FPS base) is migrated onfromJsontotarget_fps = 25 * play_speed.