Cockatrice/cockatrice/src/interface/widgets/replay/replay_widget.h
RickyRister be6a783c12
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
[Replay] Refactor: rename ReplayManager to ReplayWidget (#7059)
2026-07-27 19:40:43 -07:00

55 lines
1.4 KiB
C++

/**
* @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