1 #ifndef DLG_CREATEGAME_H
2 #define DLG_CREATEGAME_H
3 
4 #include <QDialog>
5 #include <QMap>
6 
7 class QCheckBox;
8 class QDialogButtonBox;
9 class QGroupBox;
10 class QLabel;
11 class QLineEdit;
12 class QPushButton;
13 class QRadioButton;
14 class QSpinBox;
15 class Response;
16 class ServerInfo_Game;
17 class TabRoom;
18 
19 class DlgCreateGame : public QDialog
20 {
21     Q_OBJECT
22 public:
23     DlgCreateGame(TabRoom *_room, const QMap<int, QString> &_gameTypes, QWidget *parent = nullptr);
24     DlgCreateGame(const ServerInfo_Game &game, const QMap<int, QString> &_gameTypes, QWidget *parent = nullptr);
25 private slots:
26     void actOK();
27     void actReset();
28     void checkResponse(const Response &response);
29     void spectatorsAllowedChanged(int state);
30 
31 private:
32     TabRoom *room;
33     QMap<int, QString> gameTypes;
34     QMap<int, QRadioButton *> gameTypeCheckBoxes;
35 
36     QGroupBox *generalGroupBox, *spectatorsGroupBox;
37     QLabel *descriptionLabel, *passwordLabel, *maxPlayersLabel;
38     QLineEdit *descriptionEdit, *passwordEdit;
39     QSpinBox *maxPlayersEdit;
40     QCheckBox *onlyBuddiesCheckBox, *onlyRegisteredCheckBox;
41     QCheckBox *spectatorsAllowedCheckBox, *spectatorsNeedPasswordCheckBox, *spectatorsCanTalkCheckBox,
42         *spectatorsSeeEverythingCheckBox;
43     QDialogButtonBox *buttonBox;
44     QPushButton *clearButton;
45     QCheckBox *rememberGameSettings;
46 
47     void sharedCtor();
48 };
49 
50 #endif
51