-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdialog.cpp
More file actions
90 lines (55 loc) · 1.92 KB
/
dialog.cpp
File metadata and controls
90 lines (55 loc) · 1.92 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#include "dialog.h"
#include "ui_dialog.h"
#include <unistd.h>
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
ui->sq_one_one->setFixedSize(50,50);
ui->sq_one_two->setFixedSize(50,50);
ui->sq_one_three->setFixedSize(50,50);
ui->sq_two_one->setFixedSize(50,50);
ui->sq_two_two->setFixedSize(50,50);
ui->sq_two_three->setFixedSize(50,50);
ui->sq_three_one->setFixedSize(50,50);
ui->sq_three_two->setFixedSize(50,50);
ui->sq_three_three->setFixedSize(50,50);
connect(ui->sq_one_one,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_one_two,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_one_three,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_two_one,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_two_two,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_two_three,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_three_one,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_three_two,SIGNAL(clicked()),SLOT(turn()));
connect(ui->sq_three_three,SIGNAL(clicked()),SLOT(turn()));
}
Dialog::~Dialog()
{
delete ui;
}
void Dialog::turn(){
QPushButton* sq_button = (QPushButton*) sender();
if (gamer == true){
sq_button->setIcon(QIcon(":/new/prefix1/krestus"));
sq_button->setIconSize(QSize(50,50));
}
else{
sq_button->setIcon(QIcon(":/new/prefix1/lus"));
sq_button->setIconSize(QSize(50,50));
}
gamer = !gamer;
}
void Dialog::krest_drow(){
this->gamer=true;
QPushButton* sq_button = (QPushButton*) sender();
sq_button->setIcon(QIcon(":/new/prefix1/krestus"));
sq_button->setIconSize(QSize(50,50));
}
void Dialog::nol_drow( ){
this->gamer = false;
QPushButton* sq_button = (QPushButton*) sender();
sq_button->setIcon(QIcon(":/new/prefix1/lus"));
sq_button->setIconSize(QSize(50,50));
}