move replay-related constants into ReplayTimelineWidget (#5166)

* move constants

* make the existing static const into a constexpr
This commit is contained in:
RickyRister 2024-11-09 02:18:51 -08:00 committed by GitHub
parent e894e78346
commit f0fb77bade
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 21 deletions

View file

@ -26,13 +26,15 @@ private:
BACKWARD_SKIP
};
QTimer *replayTimer;
static constexpr int TIMER_INTERVAL_MS = 200;
static constexpr int BIN_LENGTH = 5000;
static constexpr int BASE_REWIND_BUFFERING_TIMEOUT_MS = 180;
static constexpr int MAX_REWIND_BUFFERING_TIMEOUT_MS = 280;
QTimer *replayTimer;
QTimer *rewindBufferingTimer;
QList<int> replayTimeline;
QList<int> histogram;
static const int binLength;
int maxBinValue, maxTime;
qreal timeScaleFactor;
int currentTime;
@ -47,6 +49,10 @@ private slots:
void replayTimerTimeout();
public:
static constexpr int SMALL_SKIP_MS = 1000;
static constexpr int BIG_SKIP_MS = 10000;
static constexpr qreal FAST_FORWARD_SCALE_FACTOR = 10.0;
explicit ReplayTimelineWidget(QWidget *parent = nullptr);
void setTimeline(const QList<int> &_replayTimeline);
QSize sizeHint() const override;