-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserver.hpp
35 lines (28 loc) · 879 Bytes
/
server.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef SERVER_HPP
#define SERVER_HPP
#include <memory>
#include <QVBoxLayout>
#include <QPushButton>
#include "asip.hpp"
struct Globals;
class MainWindow;
class GameList;
class Server : public QWidget {
Q_OBJECT
public:
explicit Server(Globals& globals_,ASIP& session_,MainWindow& mainWindow_);
virtual ~Server() override;
void refreshPage() const;
void enterGame(const ASIP::GameInfo& game,const Side role,const Side viewpoint);
void addGame(QNetworkReply& networkReply,const Side viewpoint,const bool guaranteedUnique=false) const;
ASIP& session;
MainWindow& mainWindow;
private:
virtual void resizeEvent(QResizeEvent* event) override;
Globals& globals;
QVBoxLayout vBoxLayout;
QHBoxLayout hBoxLayout;
QPushButton newGame,openGame,refresh;
std::map<ASIP::GameListCategory,std::unique_ptr<GameList> > gameLists;
};
#endif // SERVER_HPP