Blame view

app/gui/oven_control/programmingselectionwindow.cpp 2.48 KB
81b835e59   김태훈   한글 폰트 변경
1
2
  #include "programmingselectionwindow.h"
  #include "ui_programmingselectionwindow.h"
dcfd897f3   김태훈   수동 요리 만들기 추가
3
  #include "programmingmanualwindow.h"
81b835e59   김태훈   한글 폰트 변경
4
5
6
7
8
  ProgrammingSelectionWindow::ProgrammingSelectionWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::ProgrammingSelectionWindow)
  {
      ui->setupUi(this);
dcfd897f3   김태훈   수동 요리 만들기 추가
9
10
11
12
13
  
  //    ui->clockContainer->setParent(ui->upperStack);
      setAttribute(Qt::WA_DeleteOnClose);
  
      setFocus();
81b835e59   김태훈   한글 폰트 변경
14
15
16
17
18
19
  }
  
  ProgrammingSelectionWindow::~ProgrammingSelectionWindow()
  {
      delete ui;
  }
dcfd897f3   김태훈   수동 요리 만들기 추가
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  
  void ProgrammingSelectionWindow::setModeEnabled(bool enabled)
  {
      ui->steamButton->setEnabled(enabled);
      ui->combiButton->setEnabled(enabled);
      ui->dryheatButton->setEnabled(enabled);
  }
  
  void ProgrammingSelectionWindow::setCookTypeEnabled(bool enabled)
  {
      ui->poultryButton->setEnabled(enabled);
      ui->meatButton->setEnabled(enabled);
      ui->fishButton->setEnabled(enabled);
      ui->dessertButton->setEnabled(enabled);
      ui->grainButton->setEnabled(enabled);
      ui->breadButton->setEnabled(enabled);
      ui->etcButton->setEnabled(enabled);
  }
  
  void ProgrammingSelectionWindow::onModeClicked(Define::Mode mode)
  {
      ProgrammingManualWindow *w = new ProgrammingManualWindow(this, mode);
      connect(w, SIGNAL(added()), SIGNAL(added()));
      connect(w, SIGNAL(destroyed(QObject*)), SLOT(deleteLater()));
      w->setWindowModality(Qt::WindowModal);
      w->showFullScreen();
      w->raise();
  
      hide();
  }
  
  void ProgrammingSelectionWindow::onCookTypeClicked(Define::CookType type)
  {
      emit cookTypeSelected(type);
      close();
  }
  
  void ProgrammingSelectionWindow::on_steamButton_clicked()
  {
      onModeClicked(Define::SteamMode);
  }
  
  void ProgrammingSelectionWindow::on_combiButton_clicked()
  {
      onModeClicked(Define::CombiMode);
  }
  
  void ProgrammingSelectionWindow::on_dryheatButton_clicked()
  {
      onModeClicked(Define::DryMode);
  }
  
  void ProgrammingSelectionWindow::on_poultryButton_clicked()
  {
      onCookTypeClicked(Define::Poultry);
  }
  
  void ProgrammingSelectionWindow::on_meatButton_clicked()
  {
      onCookTypeClicked(Define::Meat);
  }
  
  void ProgrammingSelectionWindow::on_fishButton_clicked()
  {
      onCookTypeClicked(Define::Fish);
  }
  
  void ProgrammingSelectionWindow::on_dessertButton_clicked()
  {
      onCookTypeClicked(Define::Desert);
  }
  
  void ProgrammingSelectionWindow::on_grainButton_clicked()
  {
      onCookTypeClicked(Define::Vegetable);
  }
  
  void ProgrammingSelectionWindow::on_breadButton_clicked()
  {
      onCookTypeClicked(Define::Bread);
  }
  
  void ProgrammingSelectionWindow::on_etcButton_clicked()
  {
      onCookTypeClicked(Define::Etc);
  }