-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.cpp
72 lines (68 loc) · 1.39 KB
/
settings.cpp
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 "settings.h"
#include "ui_settings.h"
#include "mainwindow.h"
Settings::Settings(QWidget *parent) :
QDialog(parent),
ui(new Ui::Settings)
{
ui->setupUi(this);
setWindowTitle("设置");
groupButton1=new QButtonGroup(this);
groupButton1->addButton(ui->radioButton1,1);
groupButton1->addButton(ui->radioButton2,2);
}
Settings::~Settings()
{
delete ui;
}
void Settings::showsettings()
{
this->show();
}
void Settings::on_pushButton_clicked()
{
if (ui->checkBox->isChecked())
{
MainWindow::isTab = true;
}
else
{
MainWindow::isTab = false;
}
switch(groupButton1->checkedId())
{
case 1:
MainWindow::choose=1;
break;
case 2:
MainWindow::choose=2;
break;
}
if (ui->checkBox_2->isChecked())
{
MainWindow::isFucked = true;
}
else
{
MainWindow::isAuto = false;
ui->checkBox_4->setChecked(false);
MainWindow::isFucked = false;
}
if (ui->checkBox_3->isChecked())
{
MainWindow::isTesting = true;
}
else
{
MainWindow::isTesting = false;
}
if (ui->checkBox_4->isChecked())
{
MainWindow::isAuto = true;
}
else
{
MainWindow::isAuto = false;
}
this->close();
}