99b8066f4
김태훈
V0.1.1
|
1
2
|
#include "autocookwindow.h"
#include "ui_autocookwindow.h"
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
3
|
#include <QKeyEvent>
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
4
|
#include "keepwarmpopup.h"
|
f588aa273
김태훈
부가 기능 로직 추가
|
5
6
7
|
#include "cookhistory.h"
#include "confirmpopup.h"
#include "favoritenamepopup.h"
|
2bfd3a050
김태훈
환경 설정 대응
|
8
|
#include "stringer.h"
|
bbd7d8f29
김태훈
버튼 음향 추가
|
9
|
#include "soundplayer.h"
|
e00c6a2a9
김태훈
기능 추가 구현
|
10
11
12
|
#include "configwindow.h"
#include "washwindow.h"
#include "mainwindow.h"
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
13
14
|
#include "config.h"
#include "errorpopupdlg.h"
|
11c611782
김태훈
자동 요리 세부 사항 구현
|
15
|
#include "autocookselectionpopup.h"
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
16
17
|
AutoCookWindow::AutoCookWindow(QWidget *parent, Cook cook) :
|
99b8066f4
김태훈
V0.1.1
|
18
19
|
QMainWindow(parent),
ui(new Ui::AutoCookWindow),
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
20
|
cook(cook)
|
99b8066f4
김태훈
V0.1.1
|
21
22
|
{
ui->setupUi(this);
|
99b8066f4
김태훈
V0.1.1
|
23
|
ui->clockContainer->setParent(ui->upperStack);
|
6f96c947a
김태훈
GUI 0.1.4
|
24
|
setAttribute(Qt::WA_DeleteOnClose);
|
99b8066f4
김태훈
V0.1.1
|
25
|
|
f588aa273
김태훈
부가 기능 로직 추가
|
26
27
28
29
|
if (!this->cook.isLoaded())
this->cook.load();
autocook = AutoCook(this->cook);
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
30
|
processSelected = false;
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
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
|
config_item item = Config::getInstance()->getConfigValue(Define::config_loading_door_monitoring);
if (item.d8.d8_0 > 0 && item.d8.d8_0 < 4)
{
loadingMonitorLevel = item.d8.d8_0;
loadingMonitor1 = item.d8.d8_1 * 1000;
loadingMonitor2 = item.d8.d8_2 * 1000;
loadingMonitor3 = item.d8.d8_3 * 1000;
currentLoadingMonitorLevel = 0;
}
else
loadingMonitorLevel = 0;
item = Config::getInstance()->getConfigValue(Define::config_cooking_door_monitoring);
if (item.d8.d8_0 > 0 && item.d8.d8_0 < 4)
{
cookingMonitorLevel = item.d8.d8_0;
cookingMonitor1 = item.d8.d8_1 * 1000;
cookingMonitor2 = item.d8.d8_2 * 1000;
cookingMonitor3 = item.d8.d8_3 * 1000;
currentCookingMonitorLevel = 0;
}
else
cookingMonitorLevel = 0;
if (loadingMonitorLevel > 0 || cookingMonitorLevel > 0)
{
connect(&monitorTimer, SIGNAL(timeout()), SLOT(monitor()));
monitorTimer.start(100);
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
60
|
setupUi();
|
99b8066f4
김태훈
V0.1.1
|
61
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
62
63
|
Oven *oven = Oven::getInstance();
connect(oven, SIGNAL(changed(Oven*)), SLOT(updateView()));
|
99b8066f4
김태훈
V0.1.1
|
64
65
66
67
|
returnToCurrentStepTimer.setSingleShot(true);
returnToCurrentStepTimer.setInterval(3000);
connect(&returnToCurrentStepTimer, SIGNAL(timeout()), SLOT(returnToCurrentStep()));
|
99b8066f4
김태훈
V0.1.1
|
68
|
showCurrentHumidityTimer.setSingleShot(true);
|
5228da630
김태훈
딜레이 변경
|
69
|
showCurrentHumidityTimer.setInterval(1000);
|
99b8066f4
김태훈
V0.1.1
|
70
|
connect(&showCurrentHumidityTimer, SIGNAL(timeout()), SLOT(showCurrentHumidity()));
|
99b8066f4
김태훈
V0.1.1
|
71
|
showCurrentTempTimer.setSingleShot(true);
|
5228da630
김태훈
딜레이 변경
|
72
|
showCurrentTempTimer.setInterval(1000);
|
99b8066f4
김태훈
V0.1.1
|
73
|
connect(&showCurrentTempTimer, SIGNAL(timeout()), SLOT(showCurrentTemp()));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
74
75
|
connect(&checkCookTimer, SIGNAL(timeout()), SLOT(checkCook()));
checkCookTimer.start(100);
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
76
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
77
|
connect(&checkProcessTimer, SIGNAL(timeout()), SLOT(checkProcess()));
|
f588aa273
김태훈
부가 기능 로직 추가
|
78
79
80
81
82
83
84
85
86
87
|
AutoCookSetting setting;
setting.type = cook.type;
setting.root = cook.root;
setting.name = cook.name;
for (int i = 0; i < 5; i++)
setting.configs[i] = cook.configs[i].current;
CookHistory::record(setting);
|
2bfd3a050
김태훈
환경 설정 대응
|
88
|
|
bbd7d8f29
김태훈
버튼 음향 추가
|
89
90
|
foreach (QPushButton *button, findChildren<QPushButton *>())
connect(button, &QPushButton::pressed, SoundPlayer::playClick);
|
2bfd3a050
김태훈
환경 설정 대응
|
91
92
|
connect(&updateViewTimer, SIGNAL(timeout()), SLOT(updateView()));
updateViewTimer.start(100);
|
c6dd03260
김태훈
요리 시작/종료 관련 음향 효과...
|
93
94
|
SoundPlayer::playStart();
|
98f4a2932
김태훈
엔코더 구현
|
95
96
|
setFocus();
|
99b8066f4
김태훈
V0.1.1
|
97
98
99
100
|
}
AutoCookWindow::~AutoCookWindow()
{
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
101
|
Oven::getInstance()->stop();
|
99b8066f4
김태훈
V0.1.1
|
102
103
|
delete ui;
}
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
void AutoCookWindow::keyPressEvent(QKeyEvent *event)
{
switch (event->key())
{
case 0x01000030: // Turn left
onEncoderLeft();
break;
case 0x01000031: // Push
pushed = focusWidget();
break;
case 0x01000032: // Turn right
onEncoderRight();
break;
}
}
void AutoCookWindow::keyReleaseEvent(QKeyEvent *event)
{
switch (event->key())
{
case 0x01000030: // Turn left
onEncoderLeft();
break;
case 0x01000031: // Push
if (focusWidget() == pushed)
onEncoderClicked(pushed);
pushed = NULL;
break;
case 0x01000032: // Turn right
onEncoderRight();
break;
}
}
|
99b8066f4
김태훈
V0.1.1
|
138
139
|
void AutoCookWindow::setupUi()
{
|
05f2a7552
김태훈
image 관리 구조 변경
|
140
141
142
|
steamModeIcon.load(":/images/cook_mode/small_steam.png");
dryModeIcon.load(":/images/cook_mode/small_dryheat.png");
combiModeIcon.load(":/images/cook_mode/small_combi.png");
|
6f96c947a
김태훈
GUI 0.1.4
|
143
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
144
145
|
ui->cookTypeIcon->setPixmap(Define::icon(cook.type));
ui->selectCookButton->setText(cook.name);
|
99b8066f4
김태훈
V0.1.1
|
146
|
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
147
|
ui->stepIndicator->setMaximum(cook.steps.size() - 1);
|
99b8066f4
김태훈
V0.1.1
|
148
149
150
151
152
153
154
155
156
157
|
ui->cookStepAnimation->start(300);
ui->humidityGauge->setMinimum(0);
ui->humidityGauge->setMaximum(100);
ui->humidityGauge->setValue(0);
ui->heatGauge->setMinimum(30);
ui->heatGauge->setMaximum(300);
ui->heatGauge->setValue(30);
|
05f2a7552
김태훈
image 관리 구조 변경
|
158
159
160
161
162
163
164
165
166
|
ui->openDoorAnimation->load(":/images/animation/door_01.png");
ui->openDoorAnimation->load(":/images/animation/door_02.png");
ui->openDoorAnimation->load(":/images/animation/door_03.png");
ui->openDoorAnimation->load(":/images/animation/door_04.png");
ui->openDoorAnimation->load(":/images/animation/door_05.png");
ui->openDoorAnimation->load(":/images/animation/door_06.png");
ui->openDoorAnimation->load(":/images/animation/door_07.png");
ui->openDoorAnimation->load(":/images/animation/door_08.png");
ui->openDoorAnimation->load(":/images/animation/door_09.png");
|
6f96c947a
김태훈
GUI 0.1.4
|
167
168
169
|
ui->openDoorAnimation->start(300);
ui->openDoorAnimation->hide();
ui->openDoorArrow->hide();
|
05f2a7552
김태훈
image 관리 구조 변경
|
170
171
172
173
174
175
176
177
178
|
ui->closeDoorAnimation->load(":/images/animation/door_09.png");
ui->closeDoorAnimation->load(":/images/animation/door_08.png");
ui->closeDoorAnimation->load(":/images/animation/door_07.png");
ui->closeDoorAnimation->load(":/images/animation/door_06.png");
ui->closeDoorAnimation->load(":/images/animation/door_05.png");
ui->closeDoorAnimation->load(":/images/animation/door_04.png");
ui->closeDoorAnimation->load(":/images/animation/door_03.png");
ui->closeDoorAnimation->load(":/images/animation/door_02.png");
ui->closeDoorAnimation->load(":/images/animation/door_01.png");
|
6f96c947a
김태훈
GUI 0.1.4
|
179
180
181
|
ui->closeDoorAnimation->start(300);
ui->closeDoorAnimation->hide();
ui->closeDoorArrow->hide();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
182
183
184
185
186
187
|
lastViewCookMode = Define::InvalidMode;
lastViewCookType = Define::Invalid;
lastViewCoreTemp = 999;
lastViewDoorType = Define::Invalid;
lastViewTime = 0;
lastViewStepIndex = -1;
|
7d0288172
김태훈
기능 추가 구현
|
188
189
|
lastViewTemp = 999;
lastViewHumidity = 999;
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
190
191
192
|
selectedStepIndex = 0;
showingCurrentHumidity = false;
showingCurrentTemp = false;
|
99b8066f4
김태훈
V0.1.1
|
193
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
194
|
if (autocook.cook.processes.isEmpty())
|
99b8066f4
김태훈
V0.1.1
|
195
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
196
197
198
199
200
|
ui->processTitleLabel->hide();
ui->processTypeLabel->hide();
ui->processButton_1->hide();
ui->processButton_2->hide();
ui->processButton_3->hide();
|
99b8066f4
김태훈
V0.1.1
|
201
202
203
|
}
else
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
204
205
206
|
QString typeText;
QSignalMapper *sm = NULL;
for (int i = 0; i < 3; i++)
|
99b8066f4
김태훈
V0.1.1
|
207
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
208
209
|
QPushButton *pb;
switch (i)
|
99b8066f4
김태훈
V0.1.1
|
210
211
|
{
case 0:
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
212
|
pb = ui->processButton_1;
|
99b8066f4
김태훈
V0.1.1
|
213
214
|
break;
case 1:
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
215
|
pb = ui->processButton_2;
|
99b8066f4
김태훈
V0.1.1
|
216
217
|
break;
case 2:
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
218
|
pb = ui->processButton_3;
|
99b8066f4
김태훈
V0.1.1
|
219
220
|
break;
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
221
|
if (i < autocook.cook.processes.size())
|
99b8066f4
김태훈
V0.1.1
|
222
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
223
224
225
226
227
228
229
230
231
232
233
|
if (sm == NULL)
{
sm = new QSignalMapper(this);
connect(sm, SIGNAL(mapped(int)), SLOT(startProcess(int)));
}
Define::Process process = autocook.cook.processes[i];
QString text = Define::name(process);
if (typeText.isEmpty())
typeText = text;
|
6f96c947a
김태훈
GUI 0.1.4
|
234
|
else
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
typeText += ", " + text;
QString styleSheet = QString("QPushButton { border-image: url(%1) } QPushButton:pressed { border-image: url(%2) }")
.arg(Define::icon(process))
.arg(Define::iconOverlay(process));
pb->setStyleSheet(styleSheet);
sm->setMapping(pb, (int) process);
connect(pb, SIGNAL(clicked()), sm, SLOT(map()));
}
else
{
pb->hide();
|
99b8066f4
김태훈
V0.1.1
|
249
250
|
}
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
251
|
ui->processTypeLabel->setText(typeText);
|
99b8066f4
김태훈
V0.1.1
|
252
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
253
254
|
ui->processContainer->hide();
|
f588aa273
김태훈
부가 기능 로직 추가
|
255
|
ui->doorStepLabel->hide();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
256
257
|
updateView();
|
99b8066f4
김태훈
V0.1.1
|
258
|
}
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
259
260
|
void AutoCookWindow::onEncoderLeft()
{
|
98f4a2932
김태훈
엔코더 구현
|
261
|
focusPreviousChild();
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
262
263
264
265
|
}
void AutoCookWindow::onEncoderRight()
{
|
98f4a2932
김태훈
엔코더 구현
|
266
|
focusNextChild();
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
267
268
269
270
|
}
void AutoCookWindow::onEncoderClicked(QWidget *clicked)
{
|
98f4a2932
김태훈
엔코더 구현
|
271
272
273
|
QPushButton *b = qobject_cast<QPushButton *>(clicked);
if (b)
b->click();
|
9e1f8d093
김태훈
엔코더 구현 대비 선행 수정
|
274
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
275
|
void AutoCookWindow::updateView()
|
99b8066f4
김태훈
V0.1.1
|
276
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
277
|
Oven *oven = Oven::getInstance();
|
2bfd3a050
김태훈
환경 설정 대응
|
278
|
if (!autocook.done())
|
99b8066f4
김태훈
V0.1.1
|
279
|
{
|
2bfd3a050
김태훈
환경 설정 대응
|
280
281
|
int remainingTime = qMax(0, autocook.msecs());
ui->timeLabel->setText(Stringer::remainingTime(remainingTime));
|
99b8066f4
김태훈
V0.1.1
|
282
|
}
|
99b8066f4
김태훈
V0.1.1
|
283
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
284
285
286
287
|
int coreTemp = oven->currentInterTemp();
if (coreTemp != lastViewCoreTemp)
{
lastViewCoreTemp = coreTemp;
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
288
|
if (cook.isCoreTempValid())
|
2bfd3a050
김태훈
환경 설정 대응
|
289
|
ui->interTempLabel->setText(Stringer::temperature(coreTemp, cook.coreTemp(), Stringer::fontSize14));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
290
|
else
|
2bfd3a050
김태훈
환경 설정 대응
|
291
|
ui->interTempLabel->setText(Stringer::temperature(coreTemp, Stringer::fontSize14));
|
99b8066f4
김태훈
V0.1.1
|
292
|
}
|
99b8066f4
김태훈
V0.1.1
|
293
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
294
|
if (autocook.done())
|
99b8066f4
김태훈
V0.1.1
|
295
|
{
|
36aae9ce0
김태훈
바삭함 주기 중 문 열림/닫힘 ...
|
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
if (processSelected)
{
if (ui->openDoorAnimation->isVisible())
ui->openDoorAnimation->hide();
if (ui->openDoorArrow->isVisible())
ui->openDoorArrow->hide();
if (oven->door())
{
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
}
else
{
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
}
}
else if (!oven->door())
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
322
323
324
|
{
if (ui->openDoorAnimation->isHidden())
ui->openDoorAnimation->show();
|
6f96c947a
김태훈
GUI 0.1.4
|
325
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
326
327
328
329
330
331
332
333
334
335
|
if (ui->openDoorArrow->isHidden())
ui->openDoorArrow->show();
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
}
else
|
6f96c947a
김태훈
GUI 0.1.4
|
336
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
337
338
339
340
341
342
343
344
345
346
347
|
if (ui->openDoorAnimation->isVisible())
ui->openDoorAnimation->hide();
if (ui->openDoorArrow->isVisible())
ui->openDoorArrow->hide();
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
|
6f96c947a
김태훈
GUI 0.1.4
|
348
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
349
|
|
36aae9ce0
김태훈
바삭함 주기 중 문 열림/닫힘 ...
|
350
351
352
|
if (processSelected)
ui->processContainer->hide();
else if (ui->processContainer->isHidden())
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
353
|
ui->processContainer->show();
|
99b8066f4
김태훈
V0.1.1
|
354
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
355
356
357
358
|
else if (autocook.isWaitingDoorOpened() && !oven->door())
{
if (ui->openDoorAnimation->isHidden())
ui->openDoorAnimation->show();
|
99b8066f4
김태훈
V0.1.1
|
359
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
360
361
|
if (ui->openDoorArrow->isHidden())
ui->openDoorArrow->show();
|
99b8066f4
김태훈
V0.1.1
|
362
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
363
364
|
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
|
99b8066f4
김태훈
V0.1.1
|
365
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
366
367
|
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
|
99b8066f4
김태훈
V0.1.1
|
368
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
369
370
371
372
|
else if (!autocook.isWaitingDoorOpened() && oven->door())
{
if (ui->openDoorAnimation->isVisible())
ui->openDoorAnimation->hide();
|
99b8066f4
김태훈
V0.1.1
|
373
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
374
375
|
if (ui->openDoorArrow->isVisible())
ui->openDoorArrow->hide();
|
99b8066f4
김태훈
V0.1.1
|
376
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
377
378
|
if (ui->closeDoorAnimation->isHidden())
ui->closeDoorAnimation->show();
|
99b8066f4
김태훈
V0.1.1
|
379
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
380
381
382
383
384
385
386
|
if (ui->closeDoorArrow->isHidden())
ui->closeDoorArrow->show();
}
else
{
if (ui->openDoorAnimation->isVisible())
ui->openDoorAnimation->hide();
|
99b8066f4
김태훈
V0.1.1
|
387
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
388
389
|
if (ui->openDoorArrow->isVisible())
ui->openDoorArrow->hide();
|
99b8066f4
김태훈
V0.1.1
|
390
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
391
392
|
if (ui->closeDoorAnimation->isVisible())
ui->closeDoorAnimation->hide();
|
99b8066f4
김태훈
V0.1.1
|
393
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
394
395
396
|
if (ui->closeDoorArrow->isVisible())
ui->closeDoorArrow->hide();
}
|
99b8066f4
김태훈
V0.1.1
|
397
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
398
399
400
401
|
if (autocook.cook.steps[autocook.currentStepIndex].type == Define::Preheat)
{
if (ui->preheatIcon->isHidden())
ui->preheatIcon->show();
|
6f96c947a
김태훈
GUI 0.1.4
|
402
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
403
404
|
if (ui->preheatLabel->isHidden())
ui->preheatLabel->show();
|
6f96c947a
김태훈
GUI 0.1.4
|
405
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
406
407
408
409
410
411
412
413
|
if (ui->preheatGauge->isHidden())
ui->preheatGauge->show();
ui->preheatGauge->setMaximum(autocook.cook.steps[autocook.currentStepIndex].temp);
ui->preheatGauge->setMinimum(autocook.startTemp);
ui->preheatGauge->setValue(oven->currentTemp());
}
else
|
99b8066f4
김태훈
V0.1.1
|
414
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
415
416
|
if (ui->preheatIcon->isVisible())
ui->preheatIcon->hide();
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
417
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
418
419
|
if (ui->preheatLabel->isVisible())
ui->preheatLabel->hide();
|
6f96c947a
김태훈
GUI 0.1.4
|
420
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
421
422
|
if (ui->preheatGauge->isVisible())
ui->preheatGauge->hide();
|
99b8066f4
김태훈
V0.1.1
|
423
|
}
|
99b8066f4
김태훈
V0.1.1
|
424
|
|
b13e23ee4
김태훈
자동 요리 수정
|
425
426
427
428
429
430
431
|
if (selectedStepIndex != autocook.currentStepIndex)
{
if (!returnToCurrentStepTimer.isActive())
{
selectedStepIndex = autocook.currentStepIndex;
}
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
432
|
if (selectedStepIndex != lastViewStepIndex)
|
99b8066f4
김태훈
V0.1.1
|
433
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
434
|
lastViewStepIndex = selectedStepIndex;
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
435
|
ui->stepIndicator->setCurrentIndex(selectedStepIndex);
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
436
|
}
|
99b8066f4
김태훈
V0.1.1
|
437
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
438
439
|
CookStep showingStep = autocook.cook.steps[selectedStepIndex];
if (Define::classify(showingStep.type) == Define::DoorClass)
|
99b8066f4
김태훈
V0.1.1
|
440
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
441
442
|
if (ui->cookStepIcon->isVisible())
ui->cookStepIcon->hide();
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
443
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
if (ui->cookStepLabel->isVisible())
ui->cookStepLabel->hide();
if (ui->cookModeIcon->isVisible())
ui->cookModeIcon->hide();
if (ui->humidityGauge->isVisible())
ui->humidityGauge->hide();
if (ui->humidityGaugeButton->isVisible())
ui->humidityGaugeButton->hide();
if (ui->humidityLabel->isVisible())
ui->humidityLabel->hide();
if (ui->heatGauge->isVisible())
ui->heatGauge->hide();
if (ui->heatGaugeButton->isVisible())
ui->heatGaugeButton->hide();
if (ui->heatLabel->isVisible())
ui->heatLabel->hide();
if (ui->doorStepLabel->isHidden())
ui->doorStepLabel->show();
if (ui->cookStepAnimation->isHidden())
ui->cookStepAnimation->show();
if (showingStep.type != lastViewDoorType)
|
99b8066f4
김태훈
V0.1.1
|
475
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
476
|
lastViewDoorType = showingStep.type;
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
477
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
478
479
480
481
482
|
ui->doorStepLabel->setText(Define::name(showingStep.type));
ui->cookStepAnimation->clear();
switch (showingStep.type)
{
case Define::PutThermometer:
|
64f6e5e04
고영탁
한글화 진행
|
483
|
ui->doorStepLabel->setText(tr("중심 온도계 삽입"));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
484
485
486
487
488
489
|
ui->cookStepAnimation->load(":/images/animation/thermometer_01.png");
ui->cookStepAnimation->load(":/images/animation/thermometer_02.png");
ui->cookStepAnimation->setGeometry((900-210)/2, 800, 210, 307);
ui->cookStepAnimation->start(300);
break;
case Define::Load:
|
64f6e5e04
고영탁
한글화 진행
|
490
|
ui->doorStepLabel->setText(tr("식재료 적재"));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
491
492
493
494
495
496
497
498
499
500
501
|
ui->cookStepAnimation->load(":/images/animation/load_01.png");
ui->cookStepAnimation->load(":/images/animation/load_02.png");
ui->cookStepAnimation->load(":/images/animation/load_03.png");
ui->cookStepAnimation->load(":/images/animation/load_04.png");
ui->cookStepAnimation->load(":/images/animation/load_03.png");
ui->cookStepAnimation->load(":/images/animation/load_02.png");
ui->cookStepAnimation->load(":/images/animation/load_01.png");
ui->cookStepAnimation->setGeometry((900-264)/2, 800, 264, 307);
ui->cookStepAnimation->start(300);
break;
case Define::Cut:
|
64f6e5e04
고영탁
한글화 진행
|
502
|
ui->doorStepLabel->setText(tr("자르기"));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
503
504
505
506
507
508
509
|
ui->cookStepAnimation->load(":/images/animation/cut_01.png");
ui->cookStepAnimation->load(":/images/animation/cut_02.png");
ui->cookStepAnimation->load(":/images/animation/cut_03.png");
ui->cookStepAnimation->setGeometry((900-264)/2, 800, 264, 307);
ui->cookStepAnimation->start(300);
break;
case Define::Pour:
|
64f6e5e04
고영탁
한글화 진행
|
510
|
ui->doorStepLabel->setText(tr("물 붓기"));
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
511
512
513
514
515
516
517
518
519
520
|
ui->cookStepAnimation->load(":/images/animation/pour_01.png");
ui->cookStepAnimation->load(":/images/animation/pour_02.png");
ui->cookStepAnimation->load(":/images/animation/pour_03.png");
ui->cookStepAnimation->load(":/images/animation/pour_04.png");
ui->cookStepAnimation->setGeometry((900-264)/2, 800, 264, 307);
ui->cookStepAnimation->start(300);
break;
default:
ui->doorStepLabel->hide();
ui->cookStepAnimation->hide();
|
99b8066f4
김태훈
V0.1.1
|
521
522
523
|
}
}
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
524
|
else
|
6f96c947a
김태훈
GUI 0.1.4
|
525
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
|
if (ui->doorStepLabel->isVisible())
ui->doorStepLabel->hide();
if (ui->cookStepAnimation->isVisible())
ui->cookStepAnimation->hide();
if (ui->cookStepIcon->isHidden())
ui->cookStepIcon->show();
if (ui->cookStepLabel->isHidden())
ui->cookStepLabel->show();
if (ui->cookModeIcon->isHidden())
ui->cookModeIcon->show();
if (ui->humidityGauge->isHidden())
ui->humidityGauge->show();
if (ui->humidityGaugeButton->isHidden())
ui->humidityGaugeButton->show();
if (ui->humidityLabel->isHidden())
ui->humidityLabel->show();
if (ui->heatGauge->isHidden())
ui->heatGauge->show();
if (ui->heatGaugeButton->isHidden())
ui->heatGaugeButton->show();
if (ui->heatLabel->isHidden())
ui->heatLabel->show();
if (showingStep.type != lastViewCookType)
|
6f96c947a
김태훈
GUI 0.1.4
|
560
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
561
|
lastViewCookType = showingStep.type;
|
6f96c947a
김태훈
GUI 0.1.4
|
562
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
563
564
|
ui->cookStepIcon->setPixmap(Define::icon(showingStep.type));
ui->cookStepLabel->setText(Define::name(showingStep.type));
|
6f96c947a
김태훈
GUI 0.1.4
|
565
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
566
567
|
if (showingStep.mode != lastViewCookMode)
|
6f96c947a
김태훈
GUI 0.1.4
|
568
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
569
|
lastViewCookMode = showingStep.mode;
|
6f96c947a
김태훈
GUI 0.1.4
|
570
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
571
572
573
574
575
576
577
578
579
580
581
582
583
584
|
switch (showingStep.mode)
{
case Define::SteamMode:
ui->cookModeIcon->setPixmap(steamModeIcon);
break;
case Define::CombiMode:
ui->cookModeIcon->setPixmap(combiModeIcon);
break;
case Define::DryMode:
ui->cookModeIcon->setPixmap(dryModeIcon);
break;
case Define::InvalidClass:
ui->cookModeIcon->hide();
break;
|
6f96c947a
김태훈
GUI 0.1.4
|
585
586
|
}
}
|
d66d7f5b4
김태훈
GUI 버전 0.1.2
|
587
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
588
589
590
591
592
|
int humidity;
if (showingCurrentHumidity)
humidity = oven->currentHumidity();
else
humidity = showingStep.humidity;
|
99b8066f4
김태훈
V0.1.1
|
593
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
594
595
596
597
|
if (humidity != lastViewHumidity)
{
lastViewHumidity = humidity;
ui->humidityLabel->setText(QString("%1%").arg(humidity));
|
ecfb5801a
김태훈
디버깅 요청 사항 반영
|
598
|
ui->humidityGauge->setValue(humidity);
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
599
|
}
|
99b8066f4
김태훈
V0.1.1
|
600
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
601
602
603
604
605
|
int temp;
if (showingCurrentTemp)
temp = oven->currentTemp();
else
temp = showingStep.temp;
|
99b8066f4
김태훈
V0.1.1
|
606
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
607
608
609
|
if (temp != lastViewTemp)
{
lastViewTemp = temp;
|
2bfd3a050
김태훈
환경 설정 대응
|
610
|
ui->heatLabel->setText(Stringer::temperature(temp));
|
ecfb5801a
김태훈
디버깅 요청 사항 반영
|
611
|
ui->heatGauge->setValue(temp);
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
612
|
}
|
99b8066f4
김태훈
V0.1.1
|
613
614
615
616
617
|
}
}
void AutoCookWindow::checkCook()
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
618
619
|
int lastStepIndex = autocook.currentStepIndex;
if (autocook.advance())
|
99b8066f4
김태훈
V0.1.1
|
620
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
621
622
623
624
625
|
if (lastStepIndex != autocook.currentStepIndex)
selectedStepIndex = autocook.currentStepIndex;
if (autocook.done())
checkCookTimer.stop();
|
99b8066f4
김태훈
V0.1.1
|
626
627
628
629
|
}
updateView();
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
630
|
void AutoCookWindow::startProcess(int process)
|
99b8066f4
김태훈
V0.1.1
|
631
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
632
633
|
if (processSelected)
return;
|
99b8066f4
김태훈
V0.1.1
|
634
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
635
|
processSelected = true;
|
99b8066f4
김태훈
V0.1.1
|
636
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
637
638
639
640
641
642
|
Define::Process p = (Define::Process) process;
switch (p)
{
case Define::CookAgain:
{
close();
|
99b8066f4
김태훈
V0.1.1
|
643
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
644
645
646
647
|
AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook);
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
|
99b8066f4
김태훈
V0.1.1
|
648
|
|
11c611782
김태훈
자동 요리 세부 사항 구현
|
649
|
emit newWindow(w);
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
650
651
652
653
654
|
break;
}
case Define::MakeCrisper:
{
selectedProcess = (Define::Process) process;
|
99b8066f4
김태훈
V0.1.1
|
655
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
656
|
CookStep &step = autocook.cook.steps[autocook.cook.steps.size() - 1];
|
99b8066f4
김태훈
V0.1.1
|
657
|
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
658
659
660
661
662
663
664
665
666
667
668
|
CookStep newStep = step;
newStep.type = Define::MakeCrispy;
newStep.humidity = 0;
newStep.temp += 10;
newStep.time = 0;
newStep.humidification = 0;
newStep.dehumidification = 0;
autocook.cook.steps.append(newStep);
autocook.currentStepIndex = autocook.cook.steps.size() - 1;
ui->stepIndicator->setMaximum(autocook.cook.steps.size() - 1);
returnToCurrentStep();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
669
|
Oven *oven = Oven::getInstance();
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
670
|
oven->setHumidity(0);
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
671
672
|
oven->setTemp(step.temp + 10);
oven->startCooking();
|
99b8066f4
김태훈
V0.1.1
|
673
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
674
|
checkProcessTimer.start(100);
|
c6dd03260
김태훈
요리 시작/종료 관련 음향 효과...
|
675
676
|
SoundPlayer::playStart();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
677
678
679
680
681
682
|
break;
}
case Define::KeepWarm:
{
processSelected = false;
selectedProcess = (Define::Process) process;
|
99b8066f4
김태훈
V0.1.1
|
683
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
684
685
686
687
688
|
KeepWarmPopup *p = new KeepWarmPopup(this);
p->showFullScreen();
p->raise();
break;
}
|
1f7568d7e
김태훈
컴파일 경고 제거
|
689
690
|
default:
return;
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
691
|
}
|
99b8066f4
김태훈
V0.1.1
|
692
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
693
|
void AutoCookWindow::checkProcess()
|
99b8066f4
김태훈
V0.1.1
|
694
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
695
696
|
if (!processSelected)
return;
|
99b8066f4
김태훈
V0.1.1
|
697
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
698
699
700
701
702
703
|
switch (selectedProcess)
{
case Define::MakeCrisper:
{
Oven *oven = Oven::getInstance();
if (oven->currentTemp() >= oven->temp())
|
99b8066f4
김태훈
V0.1.1
|
704
|
{
|
c6dd03260
김태훈
요리 시작/종료 관련 음향 효과...
|
705
|
SoundPlayer::playStop();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
706
707
|
oven->stopCooking();
checkProcessTimer.stop();
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
708
|
processSelected = false;
|
99b8066f4
김태훈
V0.1.1
|
709
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
710
711
712
713
|
break;
}
default:
break;
|
99b8066f4
김태훈
V0.1.1
|
714
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
715
716
|
updateView();
|
99b8066f4
김태훈
V0.1.1
|
717
|
}
|
11c611782
김태훈
자동 요리 세부 사항 구현
|
718
719
720
721
722
723
724
725
726
727
728
|
void AutoCookWindow::changeCook(Cook cook)
{
close();
AutoCookWindow *w = new AutoCookWindow(parentWidget(), cook);
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
emit newWindow(w);
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
729
|
void AutoCookWindow::returnToCurrentStep()
|
99b8066f4
김태훈
V0.1.1
|
730
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
731
732
733
|
selectedStepIndex = autocook.currentStepIndex;
showingDifferentStep = false;
updateView();
|
99b8066f4
김태훈
V0.1.1
|
734
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
735
|
void AutoCookWindow::showCurrentHumidity()
|
99b8066f4
김태훈
V0.1.1
|
736
|
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
737
738
739
|
showingCurrentHumidity = true;
updateView();
}
|
99b8066f4
김태훈
V0.1.1
|
740
|
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
741
742
743
744
|
void AutoCookWindow::showCurrentTemp()
{
showingCurrentTemp = true;
updateView();
|
99b8066f4
김태훈
V0.1.1
|
745
|
}
|
f588aa273
김태훈
부가 기능 로직 추가
|
746
747
748
749
750
751
752
753
754
755
756
|
void AutoCookWindow::addFavorite()
{
AutoCookSetting s;
s.type = cook.type;
s.root = cook.root;
for (int i = 0; i < 5; i++)
s.configs[i] = cook.configs[i].current;
FavoriteNamePopup *p = new FavoriteNamePopup(this, s);
p->showFullScreen();
}
|
e00c6a2a9
김태훈
기능 추가 구현
|
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
|
void AutoCookWindow::jumpConfig()
{
Oven::getInstance()->stop();
ConfigWindow *w = new ConfigWindow(MainWindow::getInstance());
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
MainWindow::jump(w);
}
void AutoCookWindow::jumpWash()
{
Oven::getInstance()->stop();
WashWindow *w = new WashWindow(MainWindow::getInstance());
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
MainWindow::jump(w);
}
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
|
void AutoCookWindow::monitor()
{
Define::StepClass step = Define::classify(autocook.cook.steps[autocook.currentStepIndex].type);
if (step == Define::PreheatClass || step == Define::CookClass)
{
if (Oven::getInstance()->door())
{
switch (currentCookingMonitorLevel)
{
case 0:
cookingMonitorTime1.start();
currentCookingMonitorLevel = 1;
break;
case 1:
if (cookingMonitorLevel >= 1 && cookingMonitorTime1.elapsed() > cookingMonitor1)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
798
|
ErrorPopupDlg *d = new ErrorPopupDlg(this, tr("문을 닫아주세요"), tr("조리 중 문 열림 시간 모니터링 1단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
799
800
801
802
803
804
805
806
807
808
|
d->showFullScreen();
cookingMonitorTime2.start();
currentCookingMonitorLevel = 2;
}
break;
case 2:
if (cookingMonitorLevel >= 2 && cookingMonitorTime2.elapsed() > cookingMonitor2)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
809
|
ErrorPopupDlg *d = new ErrorPopupDlg(this, tr("문을 닫아주세요"), tr("조리 중 문 열림 시간 모니터링 2단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
810
811
812
813
814
815
816
817
818
819
|
d->showFullScreen();
cookingMonitorTime3.start();
currentCookingMonitorLevel = 3;
}
break;
case 3:
if (cookingMonitorLevel >= 3 && cookingMonitorTime3.elapsed() > cookingMonitor3)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
820
|
ErrorPopupDlg *d = new ErrorPopupDlg(MainWindow::getInstance(), tr("문이 오래 열려있어 조리가 취소되었습니다"), tr("조리 중 문 열림 시간 모니터링 3단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
|
d->showFullScreen();
MainWindow::killChild();
}
}
}
else if (currentCookingMonitorLevel > 0)
{
currentCookingMonitorLevel = 0;
}
}
else if (step == Define::DoorClass)
{
if (Oven::getInstance()->door())
{
switch (currentLoadingMonitorLevel)
{
case 0:
loadingMonitorTime1.start();
currentLoadingMonitorLevel = 1;
break;
case 1:
if (loadingMonitorLevel >= 1 && loadingMonitorTime1.elapsed() > loadingMonitor1)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
846
|
ErrorPopupDlg *d = new ErrorPopupDlg(this, tr("문을 닫아주세요"), tr("적재 중 문 열림 시간 모니터링 1단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
847
848
849
850
851
852
853
854
855
856
|
d->showFullScreen();
loadingMonitorTime2.start();
currentLoadingMonitorLevel = 2;
}
break;
case 2:
if (loadingMonitorLevel >= 2 && loadingMonitorTime2.elapsed() > loadingMonitor2)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
857
|
ErrorPopupDlg *d = new ErrorPopupDlg(this, tr("문을 닫아주세요"), tr("적재 중 문 열림 시간 모니터링 2단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
858
859
860
861
862
863
864
865
866
867
|
d->showFullScreen();
loadingMonitorTime3.start();
currentLoadingMonitorLevel = 3;
}
break;
case 3:
if (loadingMonitorLevel >= 3 && loadingMonitorTime3.elapsed() > loadingMonitor3)
{
SoundPlayer::playError2();
|
ffa23885e
김태훈
tr 추가
|
868
|
ErrorPopupDlg *d = new ErrorPopupDlg(this, tr("문을 닫아주세요"), tr("적재 중 문 열림 시간 모니터링 3단계"));
|
ea536cd1d
김태훈
적재 / 조리 중 문 열림 시간...
|
869
870
871
872
873
874
875
876
877
878
879
880
|
d->showFullScreen();
MainWindow::killChild();
}
}
}
else if (currentLoadingMonitorLevel > 0)
{
currentLoadingMonitorLevel = 0;
}
}
}
|
7d0288172
김태훈
기능 추가 구현
|
881
882
|
void AutoCookWindow::on_selectCookButton_clicked()
{
|
11c611782
김태훈
자동 요리 세부 사항 구현
|
883
884
885
886
887
888
|
if (!autocook.done())
return;
AutoCookSelectionPopup *p = new AutoCookSelectionPopup(this, cook.type);
p->showFullScreen();
p->raise();
|
7d0288172
김태훈
기능 추가 구현
|
889
|
|
11c611782
김태훈
자동 요리 세부 사항 구현
|
890
|
connect(p, SIGNAL(selected(Cook)), SLOT(changeCook(Cook)));
|
7d0288172
김태훈
기능 추가 구현
|
891
892
893
894
895
896
897
898
899
900
901
902
903
|
}
void AutoCookWindow::on_homeButton_clicked()
{
Oven::getInstance()->stop();
MainWindow::killChild();
}
void AutoCookWindow::on_configCookButton_clicked()
{
}
|
99b8066f4
김태훈
V0.1.1
|
904
905
906
907
908
909
910
|
void AutoCookWindow::on_humidityGaugeButton_pressed()
{
showCurrentHumidityTimer.start();
}
void AutoCookWindow::on_humidityGaugeButton_released()
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
911
912
|
if (showCurrentHumidityTimer.isActive())
showCurrentHumidityTimer.stop();
|
99b8066f4
김태훈
V0.1.1
|
913
|
|
618320ecd
김태훈
불필요한 UI 갱신 제거
|
914
915
916
917
918
|
if (showingCurrentHumidity)
{
showingCurrentHumidity = false;
updateView();
}
|
99b8066f4
김태훈
V0.1.1
|
919
920
921
922
923
924
925
926
927
|
}
void AutoCookWindow::on_heatGaugeButton_pressed()
{
showCurrentTempTimer.start();
}
void AutoCookWindow::on_heatGaugeButton_released()
{
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
928
929
|
if (showCurrentTempTimer.isActive())
showCurrentTempTimer.stop();
|
99b8066f4
김태훈
V0.1.1
|
930
|
|
618320ecd
김태훈
불필요한 UI 갱신 제거
|
931
932
933
934
935
|
if (showingCurrentTemp)
{
showingCurrentTemp = false;
updateView();
}
|
99b8066f4
김태훈
V0.1.1
|
936
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
937
938
|
void AutoCookWindow::on_showPrevStepButton_clicked()
{
|
b13e23ee4
김태훈
자동 요리 수정
|
939
|
returnToCurrentStepTimer.start();
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
940
941
942
943
944
|
if (selectedStepIndex > 0)
{
selectedStepIndex--;
updateView();
}
|
99b8066f4
김태훈
V0.1.1
|
945
|
}
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
946
|
void AutoCookWindow::on_showNextStepButton_clicked()
|
99b8066f4
김태훈
V0.1.1
|
947
|
{
|
b13e23ee4
김태훈
자동 요리 수정
|
948
|
returnToCurrentStepTimer.start();
|
a366f320c
김태훈
자동 요리 후속 공정 동작 개선
|
949
|
if (selectedStepIndex + 1 < autocook.cook.steps.size())
|
6a81d38e4
김태훈
자동 요리 관련 로직 전면 재작성
|
950
951
952
953
|
{
selectedStepIndex++;
updateView();
}
|
99b8066f4
김태훈
V0.1.1
|
954
|
}
|
f588aa273
김태훈
부가 기능 로직 추가
|
955
|
|
e00c6a2a9
김태훈
기능 추가 구현
|
956
957
958
|
void AutoCookWindow::on_backButton_clicked()
{
Oven::getInstance()->stop();
|
b2ddac079
김태훈
버그 수정
|
959
|
emit back();
|
e00c6a2a9
김태훈
기능 추가 구현
|
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
|
close();
}
void AutoCookWindow::on_configButton_clicked()
{
if (autocook.done())
{
ConfigWindow *w = new ConfigWindow(MainWindow::getInstance());
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
MainWindow::jump(w);
}
else
{
ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 환경 설정 모드로 들어갑니다. 진행할까요?"));
p->showFullScreen();
connect(p, SIGNAL(accepted()), SLOT(jumpConfig()));
}
}
|
f588aa273
김태훈
부가 기능 로직 추가
|
982
983
984
985
986
987
988
989
990
991
|
void AutoCookWindow::on_favoritesButton_clicked()
{
if (!autocook.done())
return;
ConfirmPopup *p = new ConfirmPopup(this, tr("즐겨찾기 항목에 추가하시겠습니까?"));
p->showFullScreen();
connect(p, SIGNAL(accepted()), SLOT(addFavorite()));
}
|
e00c6a2a9
김태훈
기능 추가 구현
|
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
|
void AutoCookWindow::on_washButton_clicked()
{
if (autocook.done())
{
WashWindow *w = new WashWindow(MainWindow::getInstance());
w->setWindowModality(Qt::WindowModal);
w->showFullScreen();
w->raise();
MainWindow::jump(w);
}
else
{
ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 자동 세척 모드로 들어갑니다. 진행할까요?"));
p->showFullScreen();
connect(p, SIGNAL(accepted()), SLOT(jumpWash()));
}
}
void AutoCookWindow::on_helpButton_clicked()
{
}
|