[Replay] Make fast forward speed configurable (#7037)

* [Replay] Make fast forward speed configurable

* fix settings widget

* clamp interval
This commit is contained in:
RickyRister 2026-07-26 15:18:40 -07:00 committed by GitHub
parent ae37762ee1
commit b70f770633
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 102 additions and 7 deletions

View file

@ -11,6 +11,7 @@ ReplayTimelineWidget::ReplayTimelineWidget(QWidget *parent)
currentEvent(0)
{
replayTimer = new QTimer(this);
replayTimer->setInterval(TIMER_INTERVAL_MS);
connect(replayTimer, &QTimer::timeout, this, &ReplayTimelineWidget::replayTimerTimeout);
rewindBufferingTimer = new QTimer(this);
@ -186,12 +187,13 @@ void ReplayTimelineWidget::processNewEvents(PlaybackMode playbackMode)
void ReplayTimelineWidget::setTimeScaleFactor(qreal _timeScaleFactor)
{
timeScaleFactor = _timeScaleFactor;
replayTimer->setInterval(static_cast<int>(TIMER_INTERVAL_MS / timeScaleFactor));
int interval = std::max(1, qRound(TIMER_INTERVAL_MS / timeScaleFactor));
replayTimer->setInterval(interval);
}
void ReplayTimelineWidget::startReplay()
{
replayTimer->start(static_cast<int>(TIMER_INTERVAL_MS / timeScaleFactor));
replayTimer->start();
}
void ReplayTimelineWidget::stopReplay()