-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathset.cpp
More file actions
executable file
·48 lines (41 loc) · 1.04 KB
/
set.cpp
File metadata and controls
executable file
·48 lines (41 loc) · 1.04 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
#include "set.h"
#include "ui_set.h"
#include"mainwindow.h"
#include "TomatoConfig.h"
#include "numoftomato.h"
#include "totaltask.h"
set::set(QWidget *parent) :
QDialog(parent),
ui(new Ui::set)
{
ui->setupUi(this);
TomatoConfig *config = TomatoConfig::instance();
ui->worksb->setValue(config->mWorkLength / 60);
ui->restsb->setValue(config->mRestLength / 60);
}
set::~set()
{
delete ui;
}
void set::on_pushButton_clicked()
{
TomatoConfig *config = TomatoConfig::instance();
config->mWorkLength = ui->worksb->value() * 60;
config->mRestLength = ui->restsb->value() * 60;
//config->mWorkLength = ui->worksb->value() * 2;
//config->mRestLength = ui->restsb->value() * 2;
totalTask::taskTime = config->mWorkLength / 60;
config->save();
MainWindow *main =new MainWindow();
this ->hide();
main->show();
}
void set::on_pushButton_2_clicked()
{
MainWindow *reset = new MainWindow;
//number = 0;
numOfTomato::num = 0;
this ->hide();
reset->show();
reset->red_show(0);
}