13 #include <QNetworkAccessManager>
17 #include <QtWebSockets/QtWebSockets>
41 explicit GameWindow(
Player usr, QString sub, QString ip, QWidget *parent = 0);
56 void on_windowLoaded();
60 void on_option1PushButton_clicked();
62 void webSocketConnected();
64 void webSocketDisconnected();
66 void onWebSocketRead(QString message);
68 void on_option2PushButton_clicked();
70 void on_option3PushButton_clicked();
72 void on_option4PushButton_clicked();
77 void disableOptionButtons();
79 void enableOptionButtons();
81 void updateOpponentsBoard(QString player1Name,QString player1Score,QString player2Name,QString player2Score);
83 void setupQuestionAnswer(QString question, QString option1, QString option2, QString option3, QString option4, QString ownScore);
85 void sendChoiceToServer(
bool isCorrect, QString timeOfAnswer);
87 void checkSelectedChoice(
int choice);
89 void handleButtonClicked(
int buttonNumber);
99 void changeQuestionTextEdit(
const QString &s);
107 int currentQuestionNumber;
110 QWebSocket webSocket;
111 bool finalScoreRecieved;
114 #endif // GAMEWINDOW_H
Definition: contribute.h:16
GameWindow(Player usr, QString sub, QString ip, QWidget *parent=0)
Constructor for gamewindow.
Definition: gamewindow.cpp:27
void showEvent(QShowEvent *ev)
Overridden showEvent function.
Definition: gamewindow.cpp:293
~GameWindow()
Destructor for game window.
Definition: gamewindow.cpp:66
Gamewindow class.
Definition: gamewindow.h:28
Player class.
Definition: Player.h:19