-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto.cpp
63 lines (51 loc) · 981 Bytes
/
auto.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
#include "auto.h"
#include "ui_auto.h"
#include "mainwindow.h"
#include <QWidget>
Auto::Auto(QWidget *parent) :
QDialog(parent),
ui(new Ui::Auto)
{
ui->setupUi(this);
}
Auto::~Auto()
{
delete ui;
}
void Auto::on_pushButton_clicked()
{
this->close();
emit baseWindow();
}
void Auto::on_pushButton2_clicked()
{
this->close();
emit butt2clicked();
}
void Auto::setDef()
{
ui->comboBox_2->setCurrentIndex(0);
ui->comboBox_3->setCurrentIndex(1);
ui->comboBox_4->setCurrentIndex(2);
ui->groupBox_5->setChecked(false);
ui->spinBox->setSpecialValueText("0");
}
int Auto::getElect()
{
return ui->comboBox_4->currentIndex();
}
int Auto::getBatt()
{
return ui->comboBox_3->currentIndex();
}
int Auto::getMode()
{
if (ui->groupBox_5->isChecked())
return ui->comboBox_2->currentIndex();
}
int Auto::getProc()
{
if (ui->groupBox_5->isChecked())
return ui->spinBox->value();
else return -2;
}