-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbots.hpp
50 lines (45 loc) · 1.19 KB
/
bots.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef BOTS_HPP
#define BOTS_HPP
#include <memory>
#include <QDialog>
#include <QUrl>
#include <QNetworkAccessManager>
#include <QStandardItemModel>
#include <QLayout>
#include <QTableView>
#include <QCheckBox>
#include <QPushButton>
#include <QLabel>
#include <QRadioButton>
class MainWindow;
#include "def.hpp"
#include "asip.hpp"
class Bots : public QDialog {
Q_OBJECT
public:
explicit Bots(ASIP& session_,const QUrl& url_,MainWindow& mainWindow_);
private:
void update();
void parse(QString page);
void createGame(const QModelIndex& index);
void enterGame(const ASIP::GameInfo& game,const Side role,const Side viewpoint);
void enable();
Side getSide() const;
virtual QSize sizeHint() const override;
ASIP& session;
QNetworkAccessManager& networkAccessManager;
MainWindow& mainWindow;
const QUrl url;
QStandardItemModel standardItemModel;
unsigned int nameColumn,linkColumn;
QVBoxLayout vBoxLayout;
QHBoxLayout hBoxLayout;
QPushButton create,refresh,closeButton;
QCheckBox join;
QHBoxLayout sideLayout;
QLabel botSide;
std::unique_ptr<QRadioButton> sideButtons[NUM_SIDES+1];
QTableView tableView;
QLabel label,message;
};
#endif // BOTS_HPP