mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-22 17:45:09 -07:00
Wires the tournament protocol into the client: - DlgCreateGame gains a tournament checkbox with a games-per-match settings sub-dialog; both values are sent with Command_CreateGame and mirrored in the join-info variant of the dialog - TournamentWidget renders live standings (with deck-submission state) and pairings for the local player's perspective, and asks to open the current match game via openMatchGameRequested() - TournamentTabGameExtension attaches an overview page to TabGame's stacked views, mirrors phase and submission progress onto a deck-view status strip, and provides round-trip navigation between game view and standings; hosts get an in-game settings dialog during deck building - Open-match falls back to joining as spectator through TabSupervisor; sub-games now return to their parent tab on close, falling back to the normal leave-game flow when the parent is gone
30 lines
542 B
C++
30 lines
542 B
C++
#ifndef DLG_TOURNAMENT_SETTINGS_H
|
|
#define DLG_TOURNAMENT_SETTINGS_H
|
|
|
|
#include <QDialog>
|
|
|
|
class QDialogButtonBox;
|
|
class QSpinBox;
|
|
|
|
struct DlgTournamentSettingsResult
|
|
{
|
|
int gamesPerMatch = 1;
|
|
};
|
|
|
|
class DlgTournamentSettings : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DlgTournamentSettings(QWidget *parent = nullptr);
|
|
DlgTournamentSettingsResult getResult() const;
|
|
void setCurrentGamesPerMatch(int n);
|
|
|
|
private slots:
|
|
void actOK();
|
|
|
|
private:
|
|
QSpinBox *gamesPerMatchSpin;
|
|
QDialogButtonBox *buttonBox;
|
|
};
|
|
|
|
#endif
|