Commit bb26a05231b1e3a5bdc24ecf1dc6d8a0cfa57e9d
1 parent
b9f5e8f6d2
Exists in
master
and in
2 other branches
소스 코드 정리
- 윈도우 생성 속도 개선 - 소스 코드 구조 개선 - GUI 동작 개선
Showing
3 changed files
with
193 additions
and
273 deletions
Show diff stats
app/gui/oven_control/manualcookwindow.cpp
| @@ -8,6 +8,8 @@ | @@ -8,6 +8,8 @@ | ||
| 8 | #include "preheatpopup.h" | 8 | #include "preheatpopup.h" |
| 9 | #include "cooldownpopup.h" | 9 | #include "cooldownpopup.h" |
| 10 | 10 | ||
| 11 | +#include <QTime> | ||
| 12 | + | ||
| 11 | ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | 13 | ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : |
| 12 | QMainWindow(parent), | 14 | QMainWindow(parent), |
| 13 | ui(new Ui::ManualCookWindow) | 15 | ui(new Ui::ManualCookWindow) |
| @@ -23,22 +25,11 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | @@ -23,22 +25,11 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | ||
| 23 | oven = Oven::getInstance(); | 25 | oven = Oven::getInstance(); |
| 24 | connect(oven, SIGNAL(changed(Oven*)), this, SLOT(onOvenUpdated(Oven*))); | 26 | connect(oven, SIGNAL(changed(Oven*)), this, SLOT(onOvenUpdated(Oven*))); |
| 25 | 27 | ||
| 26 | - connect(ui->steamButton, SIGNAL(clicked()), this, SIGNAL(modeButtonClicked())); | ||
| 27 | - connect(ui->combiButton, SIGNAL(clicked()), this, SIGNAL(modeButtonClicked())); | ||
| 28 | - connect(ui->dryheatButton, SIGNAL(clicked()), this, SIGNAL(modeButtonClicked())); | ||
| 29 | - | ||
| 30 | - QSignalMapper *sm = new QSignalMapper(this); | ||
| 31 | - sm->setMapping(ui->steamButton, (int) Oven::SteamMode); | ||
| 32 | - sm->setMapping(ui->combiButton, (int) Oven::CombinationMode); | ||
| 33 | - sm->setMapping(ui->dryheatButton, (int) Oven::HeatMode); | ||
| 34 | - connect(ui->steamButton, SIGNAL(clicked()), sm, SLOT(map())); | ||
| 35 | - connect(ui->combiButton, SIGNAL(clicked()), sm, SLOT(map())); | ||
| 36 | - connect(ui->dryheatButton, SIGNAL(clicked()), sm, SLOT(map())); | ||
| 37 | - connect(sm, SIGNAL(mapped(int)), this, SLOT(onModeButtonClicked(int))); | ||
| 38 | - | ||
| 39 | connect(ui->humiditySlider, SIGNAL(valueChanged(int)), oven, SLOT(setHumidity(int))); | 28 | connect(ui->humiditySlider, SIGNAL(valueChanged(int)), oven, SLOT(setHumidity(int))); |
| 40 | connect(ui->tempSlider, SIGNAL(valueChanged(int)), oven, SLOT(setTemp(int))); | 29 | connect(ui->tempSlider, SIGNAL(valueChanged(int)), oven, SLOT(setTemp(int))); |
| 41 | connect(ui->timeSlider, SIGNAL(valueChanged(int)), oven, SLOT(setTime(int))); | 30 | connect(ui->timeSlider, SIGNAL(valueChanged(int)), oven, SLOT(setTime(int))); |
| 31 | + connect(ui->timeSlider, SIGNAL(valueChanged(int)), &startCookingTimer, SLOT(start())); | ||
| 32 | + connect(ui->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateLabels())); | ||
| 42 | connect(ui->interTempSlider, SIGNAL(valueChanged(int)), oven, SLOT(setInterTemp(int))); | 33 | connect(ui->interTempSlider, SIGNAL(valueChanged(int)), oven, SLOT(setInterTemp(int))); |
| 43 | 34 | ||
| 44 | connect(ui->humiditySlider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabels())); | 35 | connect(ui->humiditySlider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabels())); |
| @@ -48,53 +39,39 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | @@ -48,53 +39,39 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | ||
| 48 | connect(ui->innerInterTempSlider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabels())); | 39 | connect(ui->innerInterTempSlider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabels())); |
| 49 | connect(ui->innerInterTempSlider, SIGNAL(valueChanged(int)), this, SLOT(updateLabels())); | 40 | connect(ui->innerInterTempSlider, SIGNAL(valueChanged(int)), this, SLOT(updateLabels())); |
| 50 | 41 | ||
| 51 | - QTimer *cookingTimerCheckTimer = new QTimer(this); | ||
| 52 | - cookingTimerCheckTimer->setInterval(100); | ||
| 53 | - connect(cookingTimerCheckTimer, SIGNAL(timeout()), this, SLOT(checkTime())); | ||
| 54 | - connect(this, SIGNAL(modeButtonClicked()), cookingTimerCheckTimer, SLOT(stop())); | 42 | + checkTimeTimer.setInterval(100); |
| 43 | + connect(&checkTimeTimer, SIGNAL(timeout()), SLOT(checkTime())); | ||
| 55 | 44 | ||
| 56 | - cookingStartTimer = new QTimer(this); | ||
| 57 | - cookingStartTimer->setSingleShot(true); | ||
| 58 | - cookingStartTimer->setInterval(3000); | ||
| 59 | - connect(ui->timeSlider, SIGNAL(valueChanged(int)), cookingStartTimer, SLOT(start())); | ||
| 60 | - connect(ui->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(updateLabels())); | ||
| 61 | - connect(this, SIGNAL(modeButtonClicked()), cookingStartTimer, SLOT(stop())); | ||
| 62 | - connect(cookingStartTimer, SIGNAL(timeout()), oven, SLOT(startCooking())); | ||
| 63 | - connect(cookingStartTimer, SIGNAL(timeout()), cookingTimerCheckTimer, SLOT(start())); | ||
| 64 | - | ||
| 65 | - QTimer *showCurHumTimer = new QTimer(this); | ||
| 66 | - QTimer *showCurTempTimer = new QTimer(this); | ||
| 67 | - showCurHumTimer->setInterval(2000); | ||
| 68 | - showCurTempTimer->setInterval(2000); | ||
| 69 | - | ||
| 70 | - connect(ui->humidityButton, SIGNAL(pressed()), showCurHumTimer, SLOT(start())); | ||
| 71 | - connect(ui->humidityButton, SIGNAL(released()), showCurHumTimer, SLOT(stop())); | ||
| 72 | - connect(showCurHumTimer, SIGNAL(timeout()), this, SLOT(showCurrentHumidity())); | ||
| 73 | - connect(ui->humidityButton, SIGNAL(released()), this, SLOT(hideCurrentHumidity())); | ||
| 74 | - | ||
| 75 | - connect(ui->tempButton, SIGNAL(pressed()), showCurTempTimer, SLOT(start())); | ||
| 76 | - connect(ui->tempButton, SIGNAL(released()), showCurTempTimer, SLOT(stop())); | ||
| 77 | - connect(showCurTempTimer, SIGNAL(timeout()), this, SLOT(showCurrentTemp())); | ||
| 78 | - connect(ui->tempButton, SIGNAL(released()), this, SLOT(hideCurrentTemp())); | ||
| 79 | - | ||
| 80 | - QSignalMapper *smStack = new QSignalMapper(this); | ||
| 81 | - smStack->setMapping(ui->goFrontStackButton, 0); | ||
| 82 | - smStack->setMapping(ui->goBackStackButton, 1); | ||
| 83 | - connect(ui->goFrontStackButton, SIGNAL(clicked()), smStack, SLOT(map())); | ||
| 84 | - connect(ui->goBackStackButton, SIGNAL(clicked()), smStack, SLOT(map())); | ||
| 85 | - connect(smStack, SIGNAL(mapped(int)), ui->buttonStack, SLOT(setCurrentIndex(int))); | ||
| 86 | - | ||
| 87 | - connect(ui->backButton, SIGNAL(clicked()), this, SLOT(hide())); | ||
| 88 | - connect(ui->backButton, SIGNAL(clicked()), oven, SLOT(stop())); | ||
| 89 | - connect(ui->backButton, SIGNAL(clicked()), cookingTimerCheckTimer, SLOT(stop())); | ||
| 90 | - connect(ui->backButton, SIGNAL(clicked()), cookingStartTimer, SLOT(stop())); | ||
| 91 | - connect(ui->backButton, SIGNAL(clicked()), showCurHumTimer, SLOT(stop())); | ||
| 92 | - connect(ui->backButton, SIGNAL(clicked()), showCurTempTimer, SLOT(stop())); | ||
| 93 | - | ||
| 94 | - connect(this, SIGNAL(cookStopRequested()), cookingStartTimer, SLOT(stop())); | 45 | + startCookingTimer.setSingleShot(true); |
| 46 | + startCookingTimer.setInterval(3000); | ||
| 47 | + connect(&startCookingTimer, SIGNAL(timeout()), SLOT(start())); | ||
| 48 | + | ||
| 49 | + showCurrentHumidityTimer.setSingleShot(true); | ||
| 50 | + showCurrentHumidityTimer.setInterval(3000); | ||
| 51 | + connect(&showCurrentHumidityTimer, SIGNAL(timeout()), SLOT(showCurrentHumidity())); | ||
| 52 | + | ||
| 53 | + showCurrentTempTimer.setSingleShot(true); | ||
| 54 | + showCurrentTempTimer.setInterval(3000); | ||
| 55 | + connect(&showCurrentTempTimer, SIGNAL(timeout()), SLOT(showCurrentTemp())); | ||
| 95 | 56 | ||
| 96 | ui->bodyStack->setCurrentIndex(0); | 57 | ui->bodyStack->setCurrentIndex(0); |
| 97 | 58 | ||
| 59 | + QTimer *setupAnimationTimer = new QTimer(this); | ||
| 60 | + setupAnimationTimer->setSingleShot(true); | ||
| 61 | + connect(setupAnimationTimer, SIGNAL(timeout()), SLOT(setupAnimation())); | ||
| 62 | + | ||
| 63 | + oven->setDefault(mode); | ||
| 64 | + | ||
| 65 | + setupAnimationTimer->start(0); | ||
| 66 | +} | ||
| 67 | + | ||
| 68 | +ManualCookWindow::~ManualCookWindow() | ||
| 69 | +{ | ||
| 70 | + delete ui; | ||
| 71 | +} | ||
| 72 | + | ||
| 73 | +void ManualCookWindow::setupAnimation() | ||
| 74 | +{ | ||
| 98 | ui->openDoorAnimation->load(":/images/animation/door_big_09.png"); | 75 | ui->openDoorAnimation->load(":/images/animation/door_big_09.png"); |
| 99 | ui->openDoorAnimation->load(":/images/animation/door_big_08.png"); | 76 | ui->openDoorAnimation->load(":/images/animation/door_big_08.png"); |
| 100 | ui->openDoorAnimation->load(":/images/animation/door_big_07.png"); | 77 | ui->openDoorAnimation->load(":/images/animation/door_big_07.png"); |
| @@ -105,13 +82,6 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | @@ -105,13 +82,6 @@ ManualCookWindow::ManualCookWindow(QWidget *parent, Oven::Mode mode) : | ||
| 105 | ui->openDoorAnimation->load(":/images/animation/door_big_02.png"); | 82 | ui->openDoorAnimation->load(":/images/animation/door_big_02.png"); |
| 106 | ui->openDoorAnimation->load(":/images/animation/door_big_01.png"); | 83 | ui->openDoorAnimation->load(":/images/animation/door_big_01.png"); |
| 107 | ui->openDoorAnimation->start(300); | 84 | ui->openDoorAnimation->start(300); |
| 108 | - | ||
| 109 | - oven->setDefault(mode); | ||
| 110 | -} | ||
| 111 | - | ||
| 112 | -ManualCookWindow::~ManualCookWindow() | ||
| 113 | -{ | ||
| 114 | - delete ui; | ||
| 115 | } | 85 | } |
| 116 | 86 | ||
| 117 | void ManualCookWindow::checkTime() | 87 | void ManualCookWindow::checkTime() |
| @@ -214,13 +184,6 @@ void ManualCookWindow::updateLabels() | @@ -214,13 +184,6 @@ void ManualCookWindow::updateLabels() | ||
| 214 | ui->curInterTempLabel->setText(buf.sprintf("%d", oven->currentInterTemp())); | 184 | ui->curInterTempLabel->setText(buf.sprintf("%d", oven->currentInterTemp())); |
| 215 | } | 185 | } |
| 216 | 186 | ||
| 217 | -void ManualCookWindow::onModeButtonClicked(int mode) | ||
| 218 | -{ | ||
| 219 | - oven->stop(); | ||
| 220 | - oven->setDefault((Oven::Mode) mode); | ||
| 221 | - ui->bodyStack->setCurrentIndex(0); | ||
| 222 | -} | ||
| 223 | - | ||
| 224 | void ManualCookWindow::onOvenUpdated(Oven *oven) | 187 | void ManualCookWindow::onOvenUpdated(Oven *oven) |
| 225 | { | 188 | { |
| 226 | switch (oven->mode()) | 189 | switch (oven->mode()) |
| @@ -342,24 +305,74 @@ QPushButton:pressed {\ | @@ -342,24 +305,74 @@ QPushButton:pressed {\ | ||
| 342 | updateLabels(); | 305 | updateLabels(); |
| 343 | } | 306 | } |
| 344 | 307 | ||
| 345 | -void ManualCookWindow::on_runStopButton_clicked() | 308 | +void ManualCookWindow::setOvenDefault(Oven::Mode mode) |
| 346 | { | 309 | { |
| 347 | - if (oven->cooking()) | ||
| 348 | - { | ||
| 349 | - oven->stopCooking(); | ||
| 350 | - emit cookStopRequested(); | ||
| 351 | - } | 310 | + stop(); |
| 311 | + | ||
| 312 | + oven->setDefault(mode); | ||
| 313 | + ui->bodyStack->setCurrentIndex(0); | ||
| 314 | +} | ||
| 315 | + | ||
| 316 | +void ManualCookWindow::start() | ||
| 317 | +{ | ||
| 318 | + oven->startCooking(); | ||
| 319 | + checkTimeTimer.start(); | ||
| 320 | +} | ||
| 321 | + | ||
| 322 | +void ManualCookWindow::stop() | ||
| 323 | +{ | ||
| 324 | + oven->stop(); | ||
| 325 | + startCookingTimer.stop(); | ||
| 326 | + checkTimeTimer.stop(); | ||
| 327 | +} | ||
| 328 | + | ||
| 329 | +void ManualCookWindow::on_steamButton_clicked() | ||
| 330 | +{ | ||
| 331 | + setOvenDefault(Oven::SteamMode); | ||
| 332 | +} | ||
| 333 | + | ||
| 334 | +void ManualCookWindow::on_combiButton_clicked() | ||
| 335 | +{ | ||
| 336 | + setOvenDefault(Oven::CombinationMode); | ||
| 337 | +} | ||
| 338 | + | ||
| 339 | +void ManualCookWindow::on_dryheatButton_clicked() | ||
| 340 | +{ | ||
| 341 | + setOvenDefault(Oven::HeatMode); | ||
| 342 | +} | ||
| 343 | + | ||
| 344 | +void ManualCookWindow::on_humidityButton_pressed() | ||
| 345 | +{ | ||
| 346 | + showCurrentHumidityTimer.start(); | ||
| 347 | +} | ||
| 348 | + | ||
| 349 | +void ManualCookWindow::on_humidityButton_released() | ||
| 350 | +{ | ||
| 351 | + if (showCurrentHumidityTimer.isActive()) | ||
| 352 | + showCurrentHumidityTimer.stop(); | ||
| 352 | else | 353 | else |
| 353 | - oven->startCooking(); | 354 | + hideCurrentHumidity(); |
| 354 | } | 355 | } |
| 355 | 356 | ||
| 356 | -void ManualCookWindow::on_fanButton_clicked() | 357 | +void ManualCookWindow::on_tempButton_pressed() |
| 357 | { | 358 | { |
| 358 | - int fan = oven->fan() + 1; | ||
| 359 | - if (fan > oven->maxFan()) | ||
| 360 | - fan = oven->minFan(); | 359 | + showCurrentTempTimer.start(); |
| 360 | +} | ||
| 361 | 361 | ||
| 362 | - oven->setFan(fan); | 362 | +void ManualCookWindow::on_tempButton_released() |
| 363 | +{ | ||
| 364 | + if (showCurrentTempTimer.isActive()) | ||
| 365 | + showCurrentTempTimer.stop(); | ||
| 366 | + else | ||
| 367 | + hideCurrentTemp(); | ||
| 368 | +} | ||
| 369 | + | ||
| 370 | +void ManualCookWindow::on_interTempButton_clicked() | ||
| 371 | +{ | ||
| 372 | + if (oven->interTempEnabled()) | ||
| 373 | + oven->setInterTempEnabled(false); | ||
| 374 | + else | ||
| 375 | + ui->bodyStack->setCurrentIndex(1); | ||
| 363 | } | 376 | } |
| 364 | 377 | ||
| 365 | void ManualCookWindow::on_goOuterButton_clicked() | 378 | void ManualCookWindow::on_goOuterButton_clicked() |
| @@ -375,17 +388,28 @@ void ManualCookWindow::on_applyButton_clicked() | @@ -375,17 +388,28 @@ void ManualCookWindow::on_applyButton_clicked() | ||
| 375 | oven->setInterTempEnabled(true); | 388 | oven->setInterTempEnabled(true); |
| 376 | } | 389 | } |
| 377 | 390 | ||
| 378 | -void ManualCookWindow::on_interTempButton_clicked() | 391 | +void ManualCookWindow::on_runStopButton_clicked() |
| 379 | { | 392 | { |
| 380 | - if (oven->interTempEnabled()) | ||
| 381 | - oven->setInterTempEnabled(false); | 393 | + if (oven->cooking()) |
| 394 | + { | ||
| 395 | + stop(); | ||
| 396 | + } | ||
| 382 | else | 397 | else |
| 383 | - ui->bodyStack->setCurrentIndex(1); | 398 | + oven->startCooking(); |
| 399 | +} | ||
| 400 | + | ||
| 401 | +void ManualCookWindow::on_fanButton_clicked() | ||
| 402 | +{ | ||
| 403 | + int fan = oven->fan() + 1; | ||
| 404 | + if (fan > oven->maxFan()) | ||
| 405 | + fan = oven->minFan(); | ||
| 406 | + | ||
| 407 | + oven->setFan(fan); | ||
| 384 | } | 408 | } |
| 385 | 409 | ||
| 386 | void ManualCookWindow::on_preheatButton_clicked() | 410 | void ManualCookWindow::on_preheatButton_clicked() |
| 387 | { | 411 | { |
| 388 | - cookingStartTimer->stop(); | 412 | + startCookingTimer.stop(); |
| 389 | 413 | ||
| 390 | PreheatPopup *p = new PreheatPopup(this, oven); | 414 | PreheatPopup *p = new PreheatPopup(this, oven); |
| 391 | p->setWindowModality(Qt::WindowModal); | 415 | p->setWindowModality(Qt::WindowModal); |
| @@ -415,7 +439,7 @@ void ManualCookWindow::on_repeatButton_clicked() | @@ -415,7 +439,7 @@ void ManualCookWindow::on_repeatButton_clicked() | ||
| 415 | 439 | ||
| 416 | void ManualCookWindow::on_cooldownButton_clicked() | 440 | void ManualCookWindow::on_cooldownButton_clicked() |
| 417 | { | 441 | { |
| 418 | - cookingStartTimer->stop(); | 442 | + startCookingTimer.stop(); |
| 419 | 443 | ||
| 420 | CooldownPopup *p = new CooldownPopup(this, oven); | 444 | CooldownPopup *p = new CooldownPopup(this, oven); |
| 421 | p->setWindowModality(Qt::WindowModal); | 445 | p->setWindowModality(Qt::WindowModal); |
| @@ -431,3 +455,19 @@ void ManualCookWindow::on_favoritesButton_clicked() | @@ -431,3 +455,19 @@ void ManualCookWindow::on_favoritesButton_clicked() | ||
| 431 | { | 455 | { |
| 432 | 456 | ||
| 433 | } | 457 | } |
| 458 | + | ||
| 459 | +void ManualCookWindow::on_goBackStackButton_clicked() | ||
| 460 | +{ | ||
| 461 | + ui->buttonStack->setCurrentIndex(1); | ||
| 462 | +} | ||
| 463 | + | ||
| 464 | +void ManualCookWindow::on_goFrontStackButton_clicked() | ||
| 465 | +{ | ||
| 466 | + ui->buttonStack->setCurrentIndex(0); | ||
| 467 | +} | ||
| 468 | + | ||
| 469 | +void ManualCookWindow::on_backButton_clicked() | ||
| 470 | +{ | ||
| 471 | + stop(); | ||
| 472 | + close(); | ||
| 473 | +} |
app/gui/oven_control/manualcookwindow.h
| @@ -19,14 +19,15 @@ public: | @@ -19,14 +19,15 @@ public: | ||
| 19 | ~ManualCookWindow(); | 19 | ~ManualCookWindow(); |
| 20 | 20 | ||
| 21 | signals: | 21 | signals: |
| 22 | - void modeButtonClicked(); | ||
| 23 | void cookStopRequested(); | 22 | void cookStopRequested(); |
| 24 | 23 | ||
| 25 | public slots: | 24 | public slots: |
| 26 | - void onModeButtonClicked(int mode); | ||
| 27 | - void onOvenUpdated(Oven *oven); | ||
| 28 | 25 | ||
| 29 | private slots: | 26 | private slots: |
| 27 | + void setupAnimation(); | ||
| 28 | + void setOvenDefault(Oven::Mode mode); | ||
| 29 | + void start(); | ||
| 30 | + void stop(); | ||
| 30 | void checkTime(); | 31 | void checkTime(); |
| 31 | void updateLabels(); | 32 | void updateLabels(); |
| 32 | void showCurrentHumidity(); | 33 | void showCurrentHumidity(); |
| @@ -34,30 +35,44 @@ private slots: | @@ -34,30 +35,44 @@ private slots: | ||
| 34 | void showCurrentTemp(); | 35 | void showCurrentTemp(); |
| 35 | void hideCurrentTemp(); | 36 | void hideCurrentTemp(); |
| 36 | 37 | ||
| 37 | - void on_runStopButton_clicked(); | ||
| 38 | - void on_fanButton_clicked(); | 38 | + void onOvenUpdated(Oven *oven); |
| 39 | + | ||
| 40 | + void on_steamButton_clicked(); | ||
| 41 | + void on_combiButton_clicked(); | ||
| 42 | + void on_dryheatButton_clicked(); | ||
| 43 | + | ||
| 44 | + void on_humidityButton_pressed(); | ||
| 45 | + void on_humidityButton_released(); | ||
| 46 | + void on_tempButton_pressed(); | ||
| 47 | + void on_tempButton_released(); | ||
| 48 | + void on_interTempButton_clicked(); | ||
| 39 | void on_goOuterButton_clicked(); | 49 | void on_goOuterButton_clicked(); |
| 40 | void on_applyButton_clicked(); | 50 | void on_applyButton_clicked(); |
| 41 | - void on_interTempButton_clicked(); | ||
| 42 | 51 | ||
| 52 | + void on_runStopButton_clicked(); | ||
| 53 | + void on_fanButton_clicked(); | ||
| 43 | void on_preheatButton_clicked(); | 54 | void on_preheatButton_clicked(); |
| 44 | - | ||
| 45 | void on_damperButton_clicked(); | 55 | void on_damperButton_clicked(); |
| 46 | - | ||
| 47 | void on_humidificationButton_clicked(); | 56 | void on_humidificationButton_clicked(); |
| 48 | - | ||
| 49 | void on_repeatButton_clicked(); | 57 | void on_repeatButton_clicked(); |
| 50 | - | ||
| 51 | void on_cooldownButton_clicked(); | 58 | void on_cooldownButton_clicked(); |
| 52 | - | ||
| 53 | void on_reserveButton_clicked(); | 59 | void on_reserveButton_clicked(); |
| 54 | - | ||
| 55 | void on_favoritesButton_clicked(); | 60 | void on_favoritesButton_clicked(); |
| 61 | + void on_goBackStackButton_clicked(); | ||
| 62 | + void on_goFrontStackButton_clicked(); | ||
| 63 | + | ||
| 64 | + void on_backButton_clicked(); | ||
| 65 | + | ||
| 56 | 66 | ||
| 57 | private: | 67 | private: |
| 58 | Ui::ManualCookWindow *ui; | 68 | Ui::ManualCookWindow *ui; |
| 59 | Oven *oven; | 69 | Oven *oven; |
| 60 | - QTimer *cookingStartTimer; | 70 | + |
| 71 | + QTimer startCookingTimer; | ||
| 72 | + QTimer checkTimeTimer; | ||
| 73 | + | ||
| 74 | + QTimer showCurrentHumidityTimer; | ||
| 75 | + QTimer showCurrentTempTimer; | ||
| 61 | 76 | ||
| 62 | int humidity; | 77 | int humidity; |
| 63 | int temp; | 78 | int temp; |
app/gui/oven_control/manualcookwindow.ui
| @@ -46,6 +46,18 @@ background-position: center; | @@ -46,6 +46,18 @@ background-position: center; | ||
| 46 | border: none; | 46 | border: none; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | +QPushButton[style="interTemp"] { | ||
| 50 | +background-repeat: no-repeat; | ||
| 51 | +background-position: center; | ||
| 52 | +background-clip: border; | ||
| 53 | +background-origin: border; | ||
| 54 | + | ||
| 55 | +border-top: 130px; | ||
| 56 | +border-style: hidden; | ||
| 57 | +color: white; | ||
| 58 | +font-size: 30px; | ||
| 59 | +} | ||
| 60 | + | ||
| 49 | QSlider::groove { | 61 | QSlider::groove { |
| 50 | background-image: url(:/images/slider/groove_ticks.png); | 62 | background-image: url(:/images/slider/groove_ticks.png); |
| 51 | background-repeat: no-repeat; | 63 | background-repeat: no-repeat; |
| @@ -73,24 +85,6 @@ height: 33px; | @@ -73,24 +85,6 @@ height: 33px; | ||
| 73 | <height>426</height> | 85 | <height>426</height> |
| 74 | </rect> | 86 | </rect> |
| 75 | </property> | 87 | </property> |
| 76 | - <property name="sizePolicy"> | ||
| 77 | - <sizepolicy hsizetype="Ignored" vsizetype="Ignored"> | ||
| 78 | - <horstretch>0</horstretch> | ||
| 79 | - <verstretch>0</verstretch> | ||
| 80 | - </sizepolicy> | ||
| 81 | - </property> | ||
| 82 | - <property name="minimumSize"> | ||
| 83 | - <size> | ||
| 84 | - <width>900</width> | ||
| 85 | - <height>426</height> | ||
| 86 | - </size> | ||
| 87 | - </property> | ||
| 88 | - <property name="maximumSize"> | ||
| 89 | - <size> | ||
| 90 | - <width>900</width> | ||
| 91 | - <height>426</height> | ||
| 92 | - </size> | ||
| 93 | - </property> | ||
| 94 | <widget class="QWidget" name="clockContainer"> | 88 | <widget class="QWidget" name="clockContainer"> |
| 95 | <property name="styleSheet"> | 89 | <property name="styleSheet"> |
| 96 | <string notr="true">#clockContainer { background-image: url(:/images/clock/background.png); }</string> | 90 | <string notr="true">#clockContainer { background-image: url(:/images/clock/background.png); }</string> |
| @@ -119,12 +113,6 @@ height: 33px; | @@ -119,12 +113,6 @@ height: 33px; | ||
| 119 | <height>292</height> | 113 | <height>292</height> |
| 120 | </rect> | 114 | </rect> |
| 121 | </property> | 115 | </property> |
| 122 | - <property name="text"> | ||
| 123 | - <string/> | ||
| 124 | - </property> | ||
| 125 | - <property name="pixmap"> | ||
| 126 | - <pixmap resource="resources.qrc">:/images/animation/door_big_02.png</pixmap> | ||
| 127 | - </property> | ||
| 128 | </widget> | 116 | </widget> |
| 129 | <widget class="QLabel" name="label_5"> | 117 | <widget class="QLabel" name="label_5"> |
| 130 | <property name="geometry"> | 118 | <property name="geometry"> |
| @@ -135,9 +123,6 @@ height: 33px; | @@ -135,9 +123,6 @@ height: 33px; | ||
| 135 | <height>24</height> | 123 | <height>24</height> |
| 136 | </rect> | 124 | </rect> |
| 137 | </property> | 125 | </property> |
| 138 | - <property name="text"> | ||
| 139 | - <string/> | ||
| 140 | - </property> | ||
| 141 | <property name="pixmap"> | 126 | <property name="pixmap"> |
| 142 | <pixmap resource="resources.qrc">:/images/animation/close_door_arrow.png</pixmap> | 127 | <pixmap resource="resources.qrc">:/images/animation/close_door_arrow.png</pixmap> |
| 143 | </property> | 128 | </property> |
| @@ -326,7 +311,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</str | @@ -326,7 +311,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</str | ||
| 326 | <x>0</x> | 311 | <x>0</x> |
| 327 | <y>0</y> | 312 | <y>0</y> |
| 328 | <width>900</width> | 313 | <width>900</width> |
| 329 | - <height>1451</height> | 314 | + <height>1600</height> |
| 330 | </rect> | 315 | </rect> |
| 331 | </property> | 316 | </property> |
| 332 | <widget class="QWidget" name="outerStack"> | 317 | <widget class="QWidget" name="outerStack"> |
| @@ -1109,7 +1094,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | @@ -1109,7 +1094,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | ||
| 1109 | </font> | 1094 | </font> |
| 1110 | </property> | 1095 | </property> |
| 1111 | <property name="text"> | 1096 | <property name="text"> |
| 1112 | - <string>스팀</string> | 1097 | + <string>0%</string> |
| 1113 | </property> | 1098 | </property> |
| 1114 | <property name="alignment"> | 1099 | <property name="alignment"> |
| 1115 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | 1100 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
| @@ -1173,7 +1158,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | @@ -1173,7 +1158,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | ||
| 1173 | </font> | 1158 | </font> |
| 1174 | </property> | 1159 | </property> |
| 1175 | <property name="text"> | 1160 | <property name="text"> |
| 1176 | - <string>스팀</string> | 1161 | + <string>30<span style="font-size:11pt;">℃</span></string> |
| 1177 | </property> | 1162 | </property> |
| 1178 | <property name="alignment"> | 1163 | <property name="alignment"> |
| 1179 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | 1164 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
| @@ -1237,7 +1222,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | @@ -1237,7 +1222,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | ||
| 1237 | </font> | 1222 | </font> |
| 1238 | </property> | 1223 | </property> |
| 1239 | <property name="text"> | 1224 | <property name="text"> |
| 1240 | - <string>스팀</string> | 1225 | + <string>0<span style="font-size:11pt;">초</span></string> |
| 1241 | </property> | 1226 | </property> |
| 1242 | <property name="alignment"> | 1227 | <property name="alignment"> |
| 1243 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | 1228 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
| @@ -1301,7 +1286,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | @@ -1301,7 +1286,7 @@ QPushButton:pressed { background-image: url(:/images/manual_button/favorites_ov. | ||
| 1301 | </font> | 1286 | </font> |
| 1302 | </property> | 1287 | </property> |
| 1303 | <property name="text"> | 1288 | <property name="text"> |
| 1304 | - <string>스팀</string> | 1289 | + <string><span style="font-size:11pt;">℃</span></string> |
| 1305 | </property> | 1290 | </property> |
| 1306 | <property name="alignment"> | 1291 | <property name="alignment"> |
| 1307 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | 1292 | <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |
| @@ -1381,35 +1366,41 @@ QPushButton:pressed { image: url(:/images/slider_icon/core_temp_ov.png); }</stri | @@ -1381,35 +1366,41 @@ QPushButton:pressed { image: url(:/images/slider_icon/core_temp_ov.png); }</stri | ||
| 1381 | <widget class="QPushButton" name="goOuterButton"> | 1366 | <widget class="QPushButton" name="goOuterButton"> |
| 1382 | <property name="geometry"> | 1367 | <property name="geometry"> |
| 1383 | <rect> | 1368 | <rect> |
| 1384 | - <x>282</x> | ||
| 1385 | - <y>1314</y> | ||
| 1386 | - <width>86</width> | ||
| 1387 | - <height>85</height> | 1369 | + <x>200</x> |
| 1370 | + <y>1260</y> | ||
| 1371 | + <width>250</width> | ||
| 1372 | + <height>190</height> | ||
| 1388 | </rect> | 1373 | </rect> |
| 1389 | </property> | 1374 | </property> |
| 1390 | <property name="styleSheet"> | 1375 | <property name="styleSheet"> |
| 1391 | - <string notr="true">QPushButton { border-image: url(:/images/manual_button/back.png); } | ||
| 1392 | -QPushButton:pressed { border-image: url(:/images/manual_button/back_ov.png); }</string> | 1376 | + <string notr="true">QPushButton { background-image: url(:/images/manual_button/back.png); } |
| 1377 | +QPushButton:pressed { background-image: url(:/images/manual_button/back_ov.png); }</string> | ||
| 1393 | </property> | 1378 | </property> |
| 1394 | <property name="text"> | 1379 | <property name="text"> |
| 1395 | - <string/> | 1380 | + <string>이전으로</string> |
| 1381 | + </property> | ||
| 1382 | + <property name="style" stdset="0"> | ||
| 1383 | + <string notr="true">interTemp</string> | ||
| 1396 | </property> | 1384 | </property> |
| 1397 | </widget> | 1385 | </widget> |
| 1398 | <widget class="QPushButton" name="applyButton"> | 1386 | <widget class="QPushButton" name="applyButton"> |
| 1399 | <property name="geometry"> | 1387 | <property name="geometry"> |
| 1400 | <rect> | 1388 | <rect> |
| 1401 | - <x>532</x> | ||
| 1402 | - <y>1314</y> | ||
| 1403 | - <width>86</width> | ||
| 1404 | - <height>85</height> | 1389 | + <x>450</x> |
| 1390 | + <y>1260</y> | ||
| 1391 | + <width>250</width> | ||
| 1392 | + <height>190</height> | ||
| 1405 | </rect> | 1393 | </rect> |
| 1406 | </property> | 1394 | </property> |
| 1407 | <property name="styleSheet"> | 1395 | <property name="styleSheet"> |
| 1408 | - <string notr="true">QPushButton { border-image: url(:/images/manual_button/ok.png); } | ||
| 1409 | -QPushButton:pressed { border-image: url(:/images/manual_button/ok_ov.png); }</string> | 1396 | + <string notr="true">QPushButton { background-image: url(:/images/manual_button/ok.png); } |
| 1397 | +QPushButton:pressed { background-image: url(:/images/manual_button/ok_ov.png); }</string> | ||
| 1410 | </property> | 1398 | </property> |
| 1411 | <property name="text"> | 1399 | <property name="text"> |
| 1412 | - <string/> | 1400 | + <string>확인/적용하기</string> |
| 1401 | + </property> | ||
| 1402 | + <property name="style" stdset="0"> | ||
| 1403 | + <string notr="true">interTemp</string> | ||
| 1413 | </property> | 1404 | </property> |
| 1414 | </widget> | 1405 | </widget> |
| 1415 | <widget class="QLabel" name="label"> | 1406 | <widget class="QLabel" name="label"> |
| @@ -2300,130 +2291,6 @@ QPushButton:pressed { border-image: url(:/images/manual_button/ok_ov.png); }</st | @@ -2300,130 +2291,6 @@ QPushButton:pressed { border-image: url(:/images/manual_button/ok_ov.png); }</st | ||
| 2300 | <set>Qt::AlignCenter</set> | 2291 | <set>Qt::AlignCenter</set> |
| 2301 | </property> | 2292 | </property> |
| 2302 | </widget> | 2293 | </widget> |
| 2303 | - <widget class="QLabel" name="steamLabel_14"> | ||
| 2304 | - <property name="enabled"> | ||
| 2305 | - <bool>true</bool> | ||
| 2306 | - </property> | ||
| 2307 | - <property name="geometry"> | ||
| 2308 | - <rect> | ||
| 2309 | - <x>214</x> | ||
| 2310 | - <y>1390</y> | ||
| 2311 | - <width>225</width> | ||
| 2312 | - <height>50</height> | ||
| 2313 | - </rect> | ||
| 2314 | - </property> | ||
| 2315 | - <property name="palette"> | ||
| 2316 | - <palette> | ||
| 2317 | - <active> | ||
| 2318 | - <colorrole role="WindowText"> | ||
| 2319 | - <brush brushstyle="SolidPattern"> | ||
| 2320 | - <color alpha="255"> | ||
| 2321 | - <red>255</red> | ||
| 2322 | - <green>255</green> | ||
| 2323 | - <blue>255</blue> | ||
| 2324 | - </color> | ||
| 2325 | - </brush> | ||
| 2326 | - </colorrole> | ||
| 2327 | - </active> | ||
| 2328 | - <inactive> | ||
| 2329 | - <colorrole role="WindowText"> | ||
| 2330 | - <brush brushstyle="SolidPattern"> | ||
| 2331 | - <color alpha="255"> | ||
| 2332 | - <red>255</red> | ||
| 2333 | - <green>255</green> | ||
| 2334 | - <blue>255</blue> | ||
| 2335 | - </color> | ||
| 2336 | - </brush> | ||
| 2337 | - </colorrole> | ||
| 2338 | - </inactive> | ||
| 2339 | - <disabled> | ||
| 2340 | - <colorrole role="WindowText"> | ||
| 2341 | - <brush brushstyle="SolidPattern"> | ||
| 2342 | - <color alpha="255"> | ||
| 2343 | - <red>123</red> | ||
| 2344 | - <green>123</green> | ||
| 2345 | - <blue>123</blue> | ||
| 2346 | - </color> | ||
| 2347 | - </brush> | ||
| 2348 | - </colorrole> | ||
| 2349 | - </disabled> | ||
| 2350 | - </palette> | ||
| 2351 | - </property> | ||
| 2352 | - <property name="font"> | ||
| 2353 | - <font> | ||
| 2354 | - <family>Malgun Gothic</family> | ||
| 2355 | - <pointsize>11</pointsize> | ||
| 2356 | - </font> | ||
| 2357 | - </property> | ||
| 2358 | - <property name="text"> | ||
| 2359 | - <string>이전으로</string> | ||
| 2360 | - </property> | ||
| 2361 | - <property name="alignment"> | ||
| 2362 | - <set>Qt::AlignBottom|Qt::AlignHCenter</set> | ||
| 2363 | - </property> | ||
| 2364 | - </widget> | ||
| 2365 | - <widget class="QLabel" name="steamLabel_15"> | ||
| 2366 | - <property name="enabled"> | ||
| 2367 | - <bool>true</bool> | ||
| 2368 | - </property> | ||
| 2369 | - <property name="geometry"> | ||
| 2370 | - <rect> | ||
| 2371 | - <x>467</x> | ||
| 2372 | - <y>1389</y> | ||
| 2373 | - <width>225</width> | ||
| 2374 | - <height>50</height> | ||
| 2375 | - </rect> | ||
| 2376 | - </property> | ||
| 2377 | - <property name="palette"> | ||
| 2378 | - <palette> | ||
| 2379 | - <active> | ||
| 2380 | - <colorrole role="WindowText"> | ||
| 2381 | - <brush brushstyle="SolidPattern"> | ||
| 2382 | - <color alpha="255"> | ||
| 2383 | - <red>255</red> | ||
| 2384 | - <green>255</green> | ||
| 2385 | - <blue>255</blue> | ||
| 2386 | - </color> | ||
| 2387 | - </brush> | ||
| 2388 | - </colorrole> | ||
| 2389 | - </active> | ||
| 2390 | - <inactive> | ||
| 2391 | - <colorrole role="WindowText"> | ||
| 2392 | - <brush brushstyle="SolidPattern"> | ||
| 2393 | - <color alpha="255"> | ||
| 2394 | - <red>255</red> | ||
| 2395 | - <green>255</green> | ||
| 2396 | - <blue>255</blue> | ||
| 2397 | - </color> | ||
| 2398 | - </brush> | ||
| 2399 | - </colorrole> | ||
| 2400 | - </inactive> | ||
| 2401 | - <disabled> | ||
| 2402 | - <colorrole role="WindowText"> | ||
| 2403 | - <brush brushstyle="SolidPattern"> | ||
| 2404 | - <color alpha="255"> | ||
| 2405 | - <red>123</red> | ||
| 2406 | - <green>123</green> | ||
| 2407 | - <blue>123</blue> | ||
| 2408 | - </color> | ||
| 2409 | - </brush> | ||
| 2410 | - </colorrole> | ||
| 2411 | - </disabled> | ||
| 2412 | - </palette> | ||
| 2413 | - </property> | ||
| 2414 | - <property name="font"> | ||
| 2415 | - <font> | ||
| 2416 | - <family>Malgun Gothic</family> | ||
| 2417 | - <pointsize>11</pointsize> | ||
| 2418 | - </font> | ||
| 2419 | - </property> | ||
| 2420 | - <property name="text"> | ||
| 2421 | - <string>확인/적용하기</string> | ||
| 2422 | - </property> | ||
| 2423 | - <property name="alignment"> | ||
| 2424 | - <set>Qt::AlignBottom|Qt::AlignHCenter</set> | ||
| 2425 | - </property> | ||
| 2426 | - </widget> | ||
| 2427 | <zorder>curHumidityLabel</zorder> | 2294 | <zorder>curHumidityLabel</zorder> |
| 2428 | <zorder>targetHumidityLabel</zorder> | 2295 | <zorder>targetHumidityLabel</zorder> |
| 2429 | <zorder>curTempLabel</zorder> | 2296 | <zorder>curTempLabel</zorder> |
| @@ -2445,8 +2312,6 @@ QPushButton:pressed { border-image: url(:/images/manual_button/ok_ov.png); }</st | @@ -2445,8 +2312,6 @@ QPushButton:pressed { border-image: url(:/images/manual_button/ok_ov.png); }</st | ||
| 2445 | <zorder>steamLabel_11</zorder> | 2312 | <zorder>steamLabel_11</zorder> |
| 2446 | <zorder>steamLabel_12</zorder> | 2313 | <zorder>steamLabel_12</zorder> |
| 2447 | <zorder>steamLabel_13</zorder> | 2314 | <zorder>steamLabel_13</zorder> |
| 2448 | - <zorder>steamLabel_14</zorder> | ||
| 2449 | - <zorder>steamLabel_15</zorder> | ||
| 2450 | </widget> | 2315 | </widget> |
| 2451 | </widget> | 2316 | </widget> |
| 2452 | <zorder>bodyStack</zorder> | 2317 | <zorder>bodyStack</zorder> |