-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfin.cpp
More file actions
72 lines (66 loc) · 1.37 KB
/
fin.cpp
File metadata and controls
72 lines (66 loc) · 1.37 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include "fin.h"
#include "ui_fin.h"
#include <QColorDialog>
fin::fin(QWidget *parent,int mode,int e) :
QDialog(parent),
ui(new Ui::fin)
{
ui->setupUi(this);
QPixmap pix("C:/Users/msii/Desktop/JeuxDechec/images/bgrd");
ui->label->setGeometry(0,0,900,500);
ui->label->setPixmap(pix);
ui->textEdit->setTextBackgroundColor("blue");
if(e==1)
{
ui->textEdit->append("player 2 won");
QMessageBox::information(0,"win","end game");
}
else
{
ui->textEdit->append("player 1 won");
QMessageBox::information(0,"win","end game");
}
ui->button1->setStyleSheet("background-color: #1e3799; color: black;");
ui->button2->setStyleSheet("background-color: #1e3799; color: black;");
ui->button3->setStyleSheet("background-color: #1e3799; color: black;");
m=mode;
}
fin::~fin()
{
delete ui;
}
void fin::on_button1_clicked()
{
if(m==1)
{
MainWindow *m;
m=new MainWindow(this);
hide();
m->show();
}
else if(m==2)
{
ia *i;
i=new ia(this);
hide();
i->show();
}
else if(m==3)
{
ia2 *i2;
i2=new ia2(this);
hide();
i2->show();
}
}
void fin::on_button2_clicked()
{
game *g;
g=new game(this);
hide();
g->show();
}
void fin::on_button3_clicked()
{
exit(EXIT_FAILURE);
}