Commit e00c6a2a9d39fdfde280455840c014a79079a0f5
1 parent
8c371dca94
Exists in
master
and in
2 other branches
기능 추가 구현
- 화면 하단 버튼으로 다른 계열 화면 이동 (예: 요리 -> 환경 설정)
Showing
16 changed files
with
386 additions
and
28 deletions
Show diff stats
app/gui/oven_control/autocookconfigwindow.cpp
| ... | ... | @@ -6,6 +6,9 @@ |
| 6 | 6 | #include "stringer.h" |
| 7 | 7 | #include "favoritenamepopup.h" |
| 8 | 8 | #include "soundplayer.h" |
| 9 | +#include "configwindow.h" | |
| 10 | +#include "washwindow.h" | |
| 11 | +#include "mainwindow.h" | |
| 9 | 12 | |
| 10 | 13 | AutoCookConfigWindow::AutoCookConfigWindow(QWidget *parent, Cook cook) : |
| 11 | 14 | QMainWindow(parent), |
| ... | ... | @@ -219,6 +222,16 @@ void AutoCookConfigWindow::on_backButton_clicked() |
| 219 | 222 | close(); |
| 220 | 223 | } |
| 221 | 224 | |
| 225 | +void AutoCookConfigWindow::on_configButton_clicked() | |
| 226 | +{ | |
| 227 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 228 | + w->setWindowModality(Qt::WindowModal); | |
| 229 | + w->showFullScreen(); | |
| 230 | + w->raise(); | |
| 231 | + | |
| 232 | + MainWindow::jump(w); | |
| 233 | +} | |
| 234 | + | |
| 222 | 235 | void AutoCookConfigWindow::on_favoritesButton_clicked() |
| 223 | 236 | { |
| 224 | 237 | ConfirmPopup *p = new ConfirmPopup(this, tr("즐겨찾기 항목에 추가하시겠습니까?")); |
| ... | ... | @@ -232,3 +245,13 @@ void AutoCookConfigWindow::on_favoritesButton_clicked() |
| 232 | 245 | connect(p, SIGNAL(rejected()), &cookStartTimer, SLOT(start())); |
| 233 | 246 | } |
| 234 | 247 | } |
| 248 | + | |
| 249 | +void AutoCookConfigWindow::on_washButton_clicked() | |
| 250 | +{ | |
| 251 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 252 | + w->setWindowModality(Qt::WindowModal); | |
| 253 | + w->showFullScreen(); | |
| 254 | + w->raise(); | |
| 255 | + | |
| 256 | + MainWindow::jump(w); | |
| 257 | +} | ... | ... |
app/gui/oven_control/autocookconfigwindow.h
app/gui/oven_control/autocookselectionwindow.cpp
| ... | ... | @@ -6,6 +6,9 @@ |
| 6 | 6 | |
| 7 | 7 | #include "autocookconfigwindow.h" |
| 8 | 8 | #include "soundplayer.h" |
| 9 | +#include "configwindow.h" | |
| 10 | +#include "washwindow.h" | |
| 11 | +#include "mainwindow.h" | |
| 9 | 12 | |
| 10 | 13 | AutoCookSelectionWindow::AutoCookSelectionWindow(QWidget *parent, Define::CookType type) : |
| 11 | 14 | QMainWindow(parent), |
| ... | ... | @@ -63,20 +66,38 @@ AutoCookSelectionWindow::~AutoCookSelectionWindow() |
| 63 | 66 | |
| 64 | 67 | void AutoCookSelectionWindow::onCookSelected(int idx) |
| 65 | 68 | { |
| 66 | - if (autoCookWindowOpened) | |
| 67 | - return; | |
| 68 | - | |
| 69 | - autoCookWindowOpened = true; | |
| 69 | + AutoCookConfigWindow *w = new AutoCookConfigWindow(this, book.get(idx)); | |
| 70 | + w->setWindowModality(Qt::WindowModal); | |
| 71 | + w->showFullScreen(); | |
| 72 | + w->raise(); | |
| 73 | +} | |
| 70 | 74 | |
| 75 | +void AutoCookSelectionWindow::on_backButton_clicked() | |
| 76 | +{ | |
| 71 | 77 | close(); |
| 78 | +} | |
| 79 | + | |
| 80 | +void AutoCookSelectionWindow::on_configButton_clicked() | |
| 81 | +{ | |
| 82 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 83 | + w->setWindowModality(Qt::WindowModal); | |
| 84 | + w->showFullScreen(); | |
| 85 | + w->raise(); | |
| 86 | + | |
| 87 | + MainWindow::jump(w); | |
| 88 | +} | |
| 72 | 89 | |
| 73 | - AutoCookConfigWindow *w = new AutoCookConfigWindow(parentWidget(), book.get(idx)); | |
| 90 | +void AutoCookSelectionWindow::on_washButton_clicked() | |
| 91 | +{ | |
| 92 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 74 | 93 | w->setWindowModality(Qt::WindowModal); |
| 75 | 94 | w->showFullScreen(); |
| 76 | 95 | w->raise(); |
| 96 | + | |
| 97 | + MainWindow::jump(w); | |
| 77 | 98 | } |
| 78 | 99 | |
| 79 | -void AutoCookSelectionWindow::on_backButton_clicked() | |
| 100 | +void AutoCookSelectionWindow::on_helpButton_clicked() | |
| 80 | 101 | { |
| 81 | - close(); | |
| 102 | + | |
| 82 | 103 | } | ... | ... |
app/gui/oven_control/autocookselectionwindow.h
| ... | ... | @@ -23,6 +23,12 @@ private slots: |
| 23 | 23 | |
| 24 | 24 | void on_backButton_clicked(); |
| 25 | 25 | |
| 26 | + void on_configButton_clicked(); | |
| 27 | + | |
| 28 | + void on_washButton_clicked(); | |
| 29 | + | |
| 30 | + void on_helpButton_clicked(); | |
| 31 | + | |
| 26 | 32 | private: |
| 27 | 33 | Ui::AutoCookSelectionWindow *ui; |
| 28 | 34 | Define::CookType type; | ... | ... |
app/gui/oven_control/autocookwindow.cpp
| ... | ... | @@ -7,6 +7,9 @@ |
| 7 | 7 | #include "favoritenamepopup.h" |
| 8 | 8 | #include "stringer.h" |
| 9 | 9 | #include "soundplayer.h" |
| 10 | +#include "configwindow.h" | |
| 11 | +#include "washwindow.h" | |
| 12 | +#include "mainwindow.h" | |
| 10 | 13 | |
| 11 | 14 | AutoCookWindow::AutoCookWindow(QWidget *parent, Cook cook) : |
| 12 | 15 | QMainWindow(parent), |
| ... | ... | @@ -642,6 +645,30 @@ void AutoCookWindow::addFavorite() |
| 642 | 645 | p->showFullScreen(); |
| 643 | 646 | } |
| 644 | 647 | |
| 648 | +void AutoCookWindow::jumpConfig() | |
| 649 | +{ | |
| 650 | + Oven::getInstance()->stop(); | |
| 651 | + | |
| 652 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 653 | + w->setWindowModality(Qt::WindowModal); | |
| 654 | + w->showFullScreen(); | |
| 655 | + w->raise(); | |
| 656 | + | |
| 657 | + MainWindow::jump(w); | |
| 658 | +} | |
| 659 | + | |
| 660 | +void AutoCookWindow::jumpWash() | |
| 661 | +{ | |
| 662 | + Oven::getInstance()->stop(); | |
| 663 | + | |
| 664 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 665 | + w->setWindowModality(Qt::WindowModal); | |
| 666 | + w->showFullScreen(); | |
| 667 | + w->raise(); | |
| 668 | + | |
| 669 | + MainWindow::jump(w); | |
| 670 | +} | |
| 671 | + | |
| 645 | 672 | void AutoCookWindow::on_humidityGaugeButton_pressed() |
| 646 | 673 | { |
| 647 | 674 | showCurrentHumidityTimer.start(); |
| ... | ... | @@ -676,12 +703,6 @@ void AutoCookWindow::on_heatGaugeButton_released() |
| 676 | 703 | } |
| 677 | 704 | } |
| 678 | 705 | |
| 679 | -void AutoCookWindow::on_backButton_clicked() | |
| 680 | -{ | |
| 681 | - Oven::getInstance()->stop(); | |
| 682 | - close(); | |
| 683 | -} | |
| 684 | - | |
| 685 | 706 | void AutoCookWindow::on_showPrevStepButton_clicked() |
| 686 | 707 | { |
| 687 | 708 | returnToCurrentStepTimer.start(); |
| ... | ... | @@ -704,6 +725,32 @@ void AutoCookWindow::on_showNextStepButton_clicked() |
| 704 | 725 | } |
| 705 | 726 | } |
| 706 | 727 | |
| 728 | +void AutoCookWindow::on_backButton_clicked() | |
| 729 | +{ | |
| 730 | + Oven::getInstance()->stop(); | |
| 731 | + close(); | |
| 732 | +} | |
| 733 | + | |
| 734 | +void AutoCookWindow::on_configButton_clicked() | |
| 735 | +{ | |
| 736 | + if (autocook.done()) | |
| 737 | + { | |
| 738 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 739 | + w->setWindowModality(Qt::WindowModal); | |
| 740 | + w->showFullScreen(); | |
| 741 | + w->raise(); | |
| 742 | + | |
| 743 | + MainWindow::jump(w); | |
| 744 | + } | |
| 745 | + else | |
| 746 | + { | |
| 747 | + ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 환경 설정 모드로 들어갑니다. 진행할까요?")); | |
| 748 | + p->showFullScreen(); | |
| 749 | + | |
| 750 | + connect(p, SIGNAL(accepted()), SLOT(jumpConfig())); | |
| 751 | + } | |
| 752 | +} | |
| 753 | + | |
| 707 | 754 | void AutoCookWindow::on_favoritesButton_clicked() |
| 708 | 755 | { |
| 709 | 756 | if (!autocook.done()) |
| ... | ... | @@ -714,3 +761,28 @@ void AutoCookWindow::on_favoritesButton_clicked() |
| 714 | 761 | |
| 715 | 762 | connect(p, SIGNAL(accepted()), SLOT(addFavorite())); |
| 716 | 763 | } |
| 764 | + | |
| 765 | +void AutoCookWindow::on_washButton_clicked() | |
| 766 | +{ | |
| 767 | + if (autocook.done()) | |
| 768 | + { | |
| 769 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 770 | + w->setWindowModality(Qt::WindowModal); | |
| 771 | + w->showFullScreen(); | |
| 772 | + w->raise(); | |
| 773 | + | |
| 774 | + MainWindow::jump(w); | |
| 775 | + } | |
| 776 | + else | |
| 777 | + { | |
| 778 | + ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 자동 세척 모드로 들어갑니다. 진행할까요?")); | |
| 779 | + p->showFullScreen(); | |
| 780 | + | |
| 781 | + connect(p, SIGNAL(accepted()), SLOT(jumpWash())); | |
| 782 | + } | |
| 783 | +} | |
| 784 | + | |
| 785 | +void AutoCookWindow::on_helpButton_clicked() | |
| 786 | +{ | |
| 787 | + | |
| 788 | +} | ... | ... |
app/gui/oven_control/autocookwindow.h
| ... | ... | @@ -67,6 +67,10 @@ private slots: |
| 67 | 67 | void showCurrentHumidity(); |
| 68 | 68 | void showCurrentTemp(); |
| 69 | 69 | void addFavorite(); |
| 70 | + | |
| 71 | + void jumpConfig(); | |
| 72 | + void jumpWash(); | |
| 73 | + | |
| 70 | 74 | void on_humidityGaugeButton_pressed(); |
| 71 | 75 | void on_humidityGaugeButton_released(); |
| 72 | 76 | void on_heatGaugeButton_pressed(); |
| ... | ... | @@ -75,6 +79,9 @@ private slots: |
| 75 | 79 | void on_showPrevStepButton_clicked(); |
| 76 | 80 | void on_showNextStepButton_clicked(); |
| 77 | 81 | void on_favoritesButton_clicked(); |
| 82 | + void on_configButton_clicked(); | |
| 83 | + void on_washButton_clicked(); | |
| 84 | + void on_helpButton_clicked(); | |
| 78 | 85 | }; |
| 79 | 86 | |
| 80 | 87 | #endif // AUTOCOOKWINDOW_H | ... | ... |
app/gui/oven_control/configwindow.cpp
| ... | ... | @@ -11,6 +11,8 @@ |
| 11 | 11 | #include "servicepassinputdlg.h" |
| 12 | 12 | #include "fileprocessor.h" |
| 13 | 13 | #include "soundplayer.h" |
| 14 | +#include "washwindow.h" | |
| 15 | +#include "mainwindow.h" | |
| 14 | 16 | |
| 15 | 17 | ConfigWindow::ConfigWindow(QWidget *parent) : |
| 16 | 18 | QMainWindow(parent), |
| ... | ... | @@ -254,3 +256,32 @@ void ConfigWindow::onDeleteFavoriteBtnClicked(uint16_t id){ |
| 254 | 256 | } |
| 255 | 257 | } |
| 256 | 258 | } |
| 259 | + | |
| 260 | +void ConfigWindow::on_washButton_clicked() | |
| 261 | +{ | |
| 262 | + Config* cfg = Config::getInstance(); | |
| 263 | + QDialog* dlg = new YesNoPopupDlg(this,tr("현재 설정을 적용하시겠습니까?")); | |
| 264 | + dlg->setModal(true); | |
| 265 | + dlg->exec(); | |
| 266 | + if(dlg->result() == QDialog::Accepted){ | |
| 267 | + cfg->saveConfig(); | |
| 268 | + cfg->saveFavorite(); | |
| 269 | + } | |
| 270 | + else{ | |
| 271 | + cfg->loadConfig(); | |
| 272 | + cfg->loadFavorite(); | |
| 273 | + } | |
| 274 | + cfg->applyConfig(); | |
| 275 | + | |
| 276 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 277 | + w->setWindowModality(Qt::WindowModal); | |
| 278 | + w->showFullScreen(); | |
| 279 | + w->raise(); | |
| 280 | + | |
| 281 | + MainWindow::jump(w); | |
| 282 | +} | |
| 283 | + | |
| 284 | +void ConfigWindow::on_helpButton_clicked() | |
| 285 | +{ | |
| 286 | + | |
| 287 | +} | ... | ... |
app/gui/oven_control/configwindow.h
| ... | ... | @@ -68,6 +68,10 @@ private slots: |
| 68 | 68 | |
| 69 | 69 | void on_pushButton_5_clicked(); |
| 70 | 70 | |
| 71 | + void on_washButton_clicked(); | |
| 72 | + | |
| 73 | + void on_helpButton_clicked(); | |
| 74 | + | |
| 71 | 75 | public slots: |
| 72 | 76 | void onConfigBtnClicked(uint16_t id); |
| 73 | 77 | void onConfigCheckBtnClicked(uint16_t id, bool checked); | ... | ... |
app/gui/oven_control/favoritenamepopup.cpp
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | |
| 4 | 4 | #include "soundplayer.h" |
| 5 | 5 | #include "primewindow.h" |
| 6 | +#include "mainwindow.h" | |
| 6 | 7 | |
| 7 | 8 | FavoriteNamePopup::FavoriteNamePopup(QWidget *parent) : |
| 8 | 9 | QWidget(parent), |
| ... | ... | @@ -49,14 +50,14 @@ void FavoriteNamePopup::ok() |
| 49 | 50 | return; |
| 50 | 51 | } |
| 51 | 52 | |
| 52 | - PrimeWindow *w = new PrimeWindow(parentWidget()); | |
| 53 | + PrimeWindow *w = new PrimeWindow(MainWindow::getInstance()); | |
| 53 | 54 | w->setWindowModality(Qt::WindowModal); |
| 54 | 55 | w->listFavorites(); |
| 55 | 56 | w->focusFavorite(id); |
| 56 | 57 | w->showFullScreen(); |
| 57 | 58 | w->raise(); |
| 58 | 59 | |
| 59 | - deleteLater(); | |
| 60 | + MainWindow::jump(w); | |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | 63 | void FavoriteNamePopup::cancel() | ... | ... |
app/gui/oven_control/mainwindow.cpp
| ... | ... | @@ -17,12 +17,17 @@ |
| 17 | 17 | #include "programmingwindow.h" |
| 18 | 18 | #include "primewindow.h" |
| 19 | 19 | |
| 20 | +MainWindow *MainWindow::instance = NULL; | |
| 21 | + | |
| 20 | 22 | MainWindow::MainWindow(QWidget *parent) : |
| 21 | 23 | QMainWindow(parent), |
| 22 | 24 | ui(new Ui::MainWindow) |
| 23 | 25 | { |
| 24 | 26 | ui->setupUi(this); |
| 25 | 27 | |
| 28 | + instance = this; | |
| 29 | + child = NULL; | |
| 30 | + | |
| 26 | 31 | setFocus(); |
| 27 | 32 | |
| 28 | 33 | QList<QPushButton *> buttons = findChildren<QPushButton *>(); |
| ... | ... | @@ -38,6 +43,14 @@ MainWindow::~MainWindow() |
| 38 | 43 | delete ui; |
| 39 | 44 | } |
| 40 | 45 | |
| 46 | +void MainWindow::jump(QMainWindow *newChild) | |
| 47 | +{ | |
| 48 | + if (instance->child) | |
| 49 | + instance->child->deleteLater(); | |
| 50 | + | |
| 51 | + instance->child = newChild; | |
| 52 | +} | |
| 53 | + | |
| 41 | 54 | static QPushButton *pushedChild = NULL; |
| 42 | 55 | |
| 43 | 56 | void MainWindow::keyPressEvent(QKeyEvent *event) |
| ... | ... | @@ -82,6 +95,8 @@ void MainWindow::showManualCookWindow(Define::Mode mode) |
| 82 | 95 | w->setWindowModality(Qt::WindowModal); |
| 83 | 96 | w->showFullScreen(); |
| 84 | 97 | w->raise(); |
| 98 | + | |
| 99 | + child = w; | |
| 85 | 100 | } |
| 86 | 101 | |
| 87 | 102 | void MainWindow::showAutoCookSelectionWindow(Define::CookType type) |
| ... | ... | @@ -90,6 +105,8 @@ void MainWindow::showAutoCookSelectionWindow(Define::CookType type) |
| 90 | 105 | w->setWindowModality(Qt::WindowModal); |
| 91 | 106 | w->showFullScreen(); |
| 92 | 107 | w->raise(); |
| 108 | + | |
| 109 | + child = w; | |
| 93 | 110 | } |
| 94 | 111 | |
| 95 | 112 | void MainWindow::on_steamButton_clicked() |
| ... | ... | @@ -148,6 +165,8 @@ void MainWindow::on_primeButton_clicked() |
| 148 | 165 | w->setWindowModality(Qt::WindowModal); |
| 149 | 166 | w->showFullScreen(); |
| 150 | 167 | w->raise(); |
| 168 | + | |
| 169 | + child = w; | |
| 151 | 170 | } |
| 152 | 171 | |
| 153 | 172 | void MainWindow::on_multiButton_clicked() |
| ... | ... | @@ -161,6 +180,8 @@ void MainWindow::on_programmingButton_clicked() |
| 161 | 180 | w->setWindowModality(Qt::WindowModal); |
| 162 | 181 | w->showFullScreen(); |
| 163 | 182 | w->raise(); |
| 183 | + | |
| 184 | + child = w; | |
| 164 | 185 | } |
| 165 | 186 | |
| 166 | 187 | void MainWindow::on_washButton_clicked() |
| ... | ... | @@ -169,6 +190,8 @@ void MainWindow::on_washButton_clicked() |
| 169 | 190 | w->setWindowModality(Qt::WindowModal); |
| 170 | 191 | w->showFullScreen(); |
| 171 | 192 | w->raise(); |
| 193 | + | |
| 194 | + child = w; | |
| 172 | 195 | } |
| 173 | 196 | |
| 174 | 197 | void MainWindow::on_configButton_clicked() |
| ... | ... | @@ -177,6 +200,8 @@ void MainWindow::on_configButton_clicked() |
| 177 | 200 | w->setWindowModality(Qt::WindowModal); |
| 178 | 201 | w->showFullScreen(); |
| 179 | 202 | w->raise(); |
| 203 | + | |
| 204 | + child = w; | |
| 180 | 205 | } |
| 181 | 206 | |
| 182 | 207 | void MainWindow::on_helpButton_clicked() | ... | ... |
app/gui/oven_control/mainwindow.h
| ... | ... | @@ -14,10 +14,15 @@ class MainWindow : public QMainWindow |
| 14 | 14 | { |
| 15 | 15 | Q_OBJECT |
| 16 | 16 | |
| 17 | + static MainWindow *instance; | |
| 18 | + | |
| 17 | 19 | public: |
| 18 | 20 | explicit MainWindow(QWidget *parent = 0); |
| 19 | 21 | ~MainWindow(); |
| 20 | 22 | |
| 23 | + static MainWindow *getInstance() { return instance; } | |
| 24 | + static void jump(QMainWindow *newChild); | |
| 25 | + | |
| 21 | 26 | protected: |
| 22 | 27 | void keyPressEvent(QKeyEvent *event); |
| 23 | 28 | void keyReleaseEvent(QKeyEvent *event); |
| ... | ... | @@ -48,6 +53,7 @@ private slots: |
| 48 | 53 | |
| 49 | 54 | private: |
| 50 | 55 | Ui::MainWindow *ui; |
| 56 | + QMainWindow *child; | |
| 51 | 57 | }; |
| 52 | 58 | |
| 53 | 59 | #endif // MAINWINDOW_H | ... | ... |
app/gui/oven_control/manualcookwindow.cpp
| ... | ... | @@ -16,6 +16,10 @@ |
| 16 | 16 | #include "coretempsettingpopup.h" |
| 17 | 17 | #include "reservetimepopup.h" |
| 18 | 18 | #include "reservedtimepopup.h" |
| 19 | +#include "mainwindow.h" | |
| 20 | +#include "configwindow.h" | |
| 21 | +#include "primewindow.h" | |
| 22 | +#include "washwindow.h" | |
| 19 | 23 | |
| 20 | 24 | #include <QTime> |
| 21 | 25 | |
| ... | ... | @@ -378,6 +382,58 @@ void ManualCookWindow::stop() |
| 378 | 382 | startCookingTimer.stop(); |
| 379 | 383 | } |
| 380 | 384 | |
| 385 | +void ManualCookWindow::addFavorite() | |
| 386 | +{ | |
| 387 | + ManualCookSetting s; | |
| 388 | + s.mode = oven->mode(); | |
| 389 | + s.humidity = oven->humidity(); | |
| 390 | + s.temp = oven->temp(); | |
| 391 | + s.time = oven->time(); | |
| 392 | + s.fan = oven->fan(); | |
| 393 | + s.coreTempEnabled = oven->interTempEnabled(); | |
| 394 | + s.coreTemp = oven->interTemp(); | |
| 395 | + | |
| 396 | + FavoriteNamePopup *p = new FavoriteNamePopup(this, s); | |
| 397 | + p->showFullScreen(); | |
| 398 | +} | |
| 399 | + | |
| 400 | +void ManualCookWindow::jumpConfig() | |
| 401 | +{ | |
| 402 | + stop(); | |
| 403 | + | |
| 404 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 405 | + w->setWindowModality(Qt::WindowModal); | |
| 406 | + w->showFullScreen(); | |
| 407 | + w->raise(); | |
| 408 | + | |
| 409 | + MainWindow::jump(w); | |
| 410 | +} | |
| 411 | + | |
| 412 | +void ManualCookWindow::jumpFavorites() | |
| 413 | +{ | |
| 414 | + stop(); | |
| 415 | + | |
| 416 | + PrimeWindow *w = new PrimeWindow(MainWindow::getInstance()); | |
| 417 | + w->setWindowModality(Qt::WindowModal); | |
| 418 | + w->listFavorites(); | |
| 419 | + w->showFullScreen(); | |
| 420 | + w->raise(); | |
| 421 | + | |
| 422 | + MainWindow::jump(w); | |
| 423 | +} | |
| 424 | + | |
| 425 | +void ManualCookWindow::jumpWash() | |
| 426 | +{ | |
| 427 | + stop(); | |
| 428 | + | |
| 429 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 430 | + w->setWindowModality(Qt::WindowModal); | |
| 431 | + w->showFullScreen(); | |
| 432 | + w->raise(); | |
| 433 | + | |
| 434 | + MainWindow::jump(w); | |
| 435 | +} | |
| 436 | + | |
| 381 | 437 | void ManualCookWindow::on_steamButton_clicked() |
| 382 | 438 | { |
| 383 | 439 | setOvenDefault(Define::SteamMode); |
| ... | ... | @@ -551,17 +607,68 @@ void ManualCookWindow::on_backButton_clicked() |
| 551 | 607 | close(); |
| 552 | 608 | } |
| 553 | 609 | |
| 554 | -void ManualCookWindow::addFavorite() | |
| 610 | +void ManualCookWindow::on_configButton_clicked() | |
| 611 | +{ | |
| 612 | + if (oven->cooking()) | |
| 613 | + { | |
| 614 | + ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 환경 설정 모드로 들어갑니다. 진행할까요?")); | |
| 615 | + p->showFullScreen(); | |
| 616 | + | |
| 617 | + connect(p, SIGNAL(accepted()), SLOT(jumpConfig())); | |
| 618 | + } | |
| 619 | + else | |
| 620 | + { | |
| 621 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 622 | + w->setWindowModality(Qt::WindowModal); | |
| 623 | + w->showFullScreen(); | |
| 624 | + w->raise(); | |
| 625 | + | |
| 626 | + MainWindow::jump(w); | |
| 627 | + } | |
| 628 | +} | |
| 629 | + | |
| 630 | +void ManualCookWindow::on_favoritesButton_clicked() | |
| 631 | +{ | |
| 632 | + if (oven->cooking()) | |
| 633 | + { | |
| 634 | + ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 즐겨찾기 모드로 들어갑니다. 진행할까요?")); | |
| 635 | + p->showFullScreen(); | |
| 636 | + | |
| 637 | + connect(p, SIGNAL(accepted()), SLOT(jumpFavorites())); | |
| 638 | + } | |
| 639 | + else | |
| 640 | + { | |
| 641 | + PrimeWindow *w = new PrimeWindow(MainWindow::getInstance()); | |
| 642 | + w->setWindowModality(Qt::WindowModal); | |
| 643 | + w->listFavorites(); | |
| 644 | + w->showFullScreen(); | |
| 645 | + w->raise(); | |
| 646 | + | |
| 647 | + MainWindow::jump(w); | |
| 648 | + } | |
| 649 | +} | |
| 650 | + | |
| 651 | +void ManualCookWindow::on_washButton_clicked() | |
| 652 | +{ | |
| 653 | + if (oven->cooking()) | |
| 654 | + { | |
| 655 | + ConfirmPopup *p = new ConfirmPopup(this, tr("요리가 중단되고 자동 세척 모드로 들어갑니다. 진행할까요?")); | |
| 656 | + p->showFullScreen(); | |
| 657 | + | |
| 658 | + connect(p, SIGNAL(accepted()), SLOT(jumpWash())); | |
| 659 | + } | |
| 660 | + else | |
| 661 | + { | |
| 662 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 663 | + w->setWindowModality(Qt::WindowModal); | |
| 664 | + w->showFullScreen(); | |
| 665 | + w->raise(); | |
| 666 | + | |
| 667 | + MainWindow::jump(w); | |
| 668 | + } | |
| 669 | +} | |
| 670 | + | |
| 671 | +void ManualCookWindow::on_helpButton_clicked() | |
| 555 | 672 | { |
| 556 | - ManualCookSetting s; | |
| 557 | - s.mode = oven->mode(); | |
| 558 | - s.humidity = oven->humidity(); | |
| 559 | - s.temp = oven->temp(); | |
| 560 | - s.time = oven->time(); | |
| 561 | - s.fan = oven->fan(); | |
| 562 | - s.coreTempEnabled = oven->interTempEnabled(); | |
| 563 | - s.coreTemp = oven->interTemp(); | |
| 564 | 673 | |
| 565 | - FavoriteNamePopup *p = new FavoriteNamePopup(this, s); | |
| 566 | - p->showFullScreen(); | |
| 567 | 674 | } | ... | ... |
app/gui/oven_control/manualcookwindow.h
| ... | ... | @@ -39,6 +39,11 @@ private slots: |
| 39 | 39 | |
| 40 | 40 | void onOvenUpdated(Oven *oven); |
| 41 | 41 | |
| 42 | + void addFavorite(); | |
| 43 | + void jumpConfig(); | |
| 44 | + void jumpFavorites(); | |
| 45 | + void jumpWash(); | |
| 46 | + | |
| 42 | 47 | void on_steamButton_clicked(); |
| 43 | 48 | void on_combiButton_clicked(); |
| 44 | 49 | void on_dryheatButton_clicked(); |
| ... | ... | @@ -62,8 +67,10 @@ private slots: |
| 62 | 67 | void on_goFrontStackButton_clicked(); |
| 63 | 68 | |
| 64 | 69 | void on_backButton_clicked(); |
| 65 | - | |
| 66 | - void addFavorite(); | |
| 70 | + void on_configButton_clicked(); | |
| 71 | + void on_favoritesButton_clicked(); | |
| 72 | + void on_washButton_clicked(); | |
| 73 | + void on_helpButton_clicked(); | |
| 67 | 74 | |
| 68 | 75 | private: |
| 69 | 76 | Ui::ManualCookWindow *ui; | ... | ... |
app/gui/oven_control/primewindow.cpp
| ... | ... | @@ -8,6 +8,9 @@ |
| 8 | 8 | #include "manualcooksettingwidget.h" |
| 9 | 9 | #include "cookhistory.h" |
| 10 | 10 | #include "soundplayer.h" |
| 11 | +#include "configwindow.h" | |
| 12 | +#include "washwindow.h" | |
| 13 | +#include "mainwindow.h" | |
| 11 | 14 | |
| 12 | 15 | PrimeWindow::PrimeWindow(QWidget *parent) : |
| 13 | 16 | QMainWindow(parent), |
| ... | ... | @@ -184,3 +187,28 @@ void PrimeWindow::on_backButton_clicked() |
| 184 | 187 | { |
| 185 | 188 | close(); |
| 186 | 189 | } |
| 190 | + | |
| 191 | +void PrimeWindow::on_configButton_clicked() | |
| 192 | +{ | |
| 193 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 194 | + w->setWindowModality(Qt::WindowModal); | |
| 195 | + w->showFullScreen(); | |
| 196 | + w->raise(); | |
| 197 | + | |
| 198 | + MainWindow::jump(w); | |
| 199 | +} | |
| 200 | + | |
| 201 | +void PrimeWindow::on_washButton_clicked() | |
| 202 | +{ | |
| 203 | + WashWindow *w = new WashWindow(MainWindow::getInstance()); | |
| 204 | + w->setWindowModality(Qt::WindowModal); | |
| 205 | + w->showFullScreen(); | |
| 206 | + w->raise(); | |
| 207 | + | |
| 208 | + MainWindow::jump(w); | |
| 209 | +} | |
| 210 | + | |
| 211 | +void PrimeWindow::on_helpButton_clicked() | |
| 212 | +{ | |
| 213 | + | |
| 214 | +} | ... | ... |
app/gui/oven_control/primewindow.h
app/gui/oven_control/washwindow.cpp
| ... | ... | @@ -5,6 +5,8 @@ |
| 5 | 5 | |
| 6 | 6 | #include "soundplayer.h" |
| 7 | 7 | #include "dirtylevel.h" |
| 8 | +#include "configwindow.h" | |
| 9 | +#include "mainwindow.h" | |
| 8 | 10 | |
| 9 | 11 | WashWindow::WashWindow(QWidget *parent) : |
| 10 | 12 | QMainWindow(parent), |
| ... | ... | @@ -254,7 +256,17 @@ void WashWindow::on_backButton_clicked() |
| 254 | 256 | |
| 255 | 257 | void WashWindow::on_configButton_clicked() |
| 256 | 258 | { |
| 259 | + if (started) | |
| 260 | + stop(); | |
| 261 | + else | |
| 262 | + { | |
| 263 | + ConfigWindow *w = new ConfigWindow(MainWindow::getInstance()); | |
| 264 | + w->setWindowModality(Qt::WindowModal); | |
| 265 | + w->showFullScreen(); | |
| 266 | + w->raise(); | |
| 257 | 267 | |
| 268 | + MainWindow::jump(w); | |
| 269 | + } | |
| 258 | 270 | } |
| 259 | 271 | |
| 260 | 272 | void WashWindow::on_helpButton_clicked() | ... | ... |