-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.cpp
More file actions
43 lines (33 loc) · 742 Bytes
/
Copy pathstart.cpp
File metadata and controls
43 lines (33 loc) · 742 Bytes
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
#include "start.h"
#include "ui_start.h"
#include <QMessageBox>
Start::Start(QWidget *parent)
: QDialog(parent)
, ui(new Ui::Start)
{
ui->setupUi(this);
ui->sb->setMaximum(6);
ui->sb->setMinimum(3);
this->setWindowTitle("get player number");
}
Start::~Start()
{
delete ui;
}
size_t Start::get_players_number() // players information
{
ui->sb->setValue(3); // 3 4 5 6
this->show();
QEventLoop loop;
connect(ui->btn_next, SIGNAL(clicked(bool)), &loop, SLOT(quit()));
loop.exec();
disconnect(ui->btn_next, SIGNAL(clicked(bool)), &loop, SLOT(quit()));
this->hide();
return ui->sb->value();
}
void Start::on_btn_next_clicked()
{
}
void Start::on_btn_back_clicked()
{
}