[Replay] Refactor: rename ReplayManager to ReplayWidget (#7059)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run

This commit is contained in:
RickyRister 2026-07-27 19:40:43 -07:00 committed by GitHub
parent 6260bd1ed1
commit be6a783c12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 30 deletions

View file

@ -0,0 +1,55 @@
/**
* @file replay_widget.h
* @ingroup Core
* @ingroup Replay
*/
//! \todo Document this file.
#ifndef REPLAY_WIDGET_H
#define REPLAY_WIDGET_H
#include "replay_timeline_widget.h"
#include <QToolButton>
#include <QWidget>
#include <libcockatrice/protocol/pb/game_replay.pb.h>
class ReplayQuickSettingsWidget;
class TabGame;
/**
* @brief The top-level that is put in the replay dock widget.
* Contains the replay timeline as well as the buttons.
*/
class ReplayWidget : public QWidget
{
Q_OBJECT
public:
ReplayWidget(TabGame *parent, GameReplay *replay);
TabGame *game;
GameReplay *replay;
signals:
void requestChatAndPhaseReset();
void eventReplayed(const GameEventContainer &cont, EventProcessingOptions options);
private:
// Replay related members
int currentReplayStep = 0;
QList<int> replayTimeline;
ReplayTimelineWidget *timelineWidget;
QToolButton *replayPlayButton, *replayFastForwardButton;
ReplayQuickSettingsWidget *settingsWidget;
QAction *aReplaySkipForward, *aReplaySkipBackward, *aReplaySkipForwardBig, *aReplaySkipBackwardBig;
private slots:
void replayNextEvent(EventProcessingOptions options);
void replayFinished();
void replayPlayButtonToggled(bool checked);
void updateTimeScaleFactor(bool checked);
void replayRewind();
void refreshShortcuts();
};
#endif // REPLAY_WIDGET_H