Cockatrice/cockatrice/src/interface/widgets/dialogs/dlg_tournament_settings.h
Lukas Brübach 5c30c52714
[Client] Add tournament UI for creating and following lobby tournaments
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
2026-08-31 13:49:17 +02:00

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