-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathopenWidget.cpp
More file actions
44 lines (40 loc) · 1.02 KB
/
Copy pathopenWidget.cpp
File metadata and controls
44 lines (40 loc) · 1.02 KB
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
#include "openWidget.h"
#include "ui_openWidget.h"
#include "Board.h"
#include "SingleGame.h"
#include "NetGame.h"
openWidget::openWidget(QWidget *parent) :
QDialog(parent),
ui(new Ui::openWidget)
{
ui->setupUi(this);
this->setWindowTitle("中国象棋");
ui->button2->setFocusPolicy(Qt::TabFocus);
this->setMinimumSize(409, 583);
this->setMaximumSize(409, 583);
connect(ui->button1,SIGNAL(clicked(bool)),this,SLOT(button1Slot()));
connect(ui->button2,SIGNAL(clicked(bool)),this,SLOT(button2Slot()));
connect(ui->button3,SIGNAL(clicked(bool)),this,SLOT(button3Slot()));
}
openWidget::~openWidget()
{
delete ui;
}
void openWidget::button1Slot()
{
this->close();
Board *board = new Board;
board->show();
}
void openWidget::button2Slot()
{
this->close();
SingleGame *singleGame = new SingleGame;
singleGame->show();
}
void openWidget::button3Slot()
{
this->close();
NetGame *netGame = new NetGame;
netGame->show();
}