Commit 9146b87b4676e8eede1c5f619a2f0a0d1674259b

Authored by 고영탁
1 parent 9a521fdbff
Exists in master and in 2 other branches fhd, fhd-demo

엔코더 작업 진행중

 - 서비스 항목 적용
Showing 34 changed files with 620 additions and 73 deletions   Show diff stats
app/gui/oven_control/configfavoritebutton.ui
... ... @@ -90,7 +90,7 @@ QPushButton:focus { background-image: url(:/images/config/pannel_ov.png); }</str
90 90 </property>
91 91 <property name="styleSheet">
92 92 <string notr="true">QPushButton { background-image: url(:/images/config/100_fav_pannel_icon.png); }
93   -QPushButton:checked { background-image: url(:/images/config/100_fav_pannel_icon_ov.png); }</string>
  93 +QPushButton:checked, QPushButton:focus, QPushButton:pressed { background-image: url(:/images/config/100_fav_pannel_icon_ov.png); }</string>
94 94 </property>
95 95 <property name="text">
96 96 <string/>
... ...
app/gui/oven_control/electricmodelsettingwindow.cpp
... ... @@ -20,20 +20,26 @@ ElectricModelSettingWindow::ElectricModelSettingWindow(QWidget *parent) :
20 20 Define::config_item item;
21 21 item = cfg->getConfigValue(Define::config_model);
22 22 selitem = item.d32;
  23 + m_ctrChkedbtn = NULL;
23 24 switch(selitem){
24 25 case Define::model_electric_10:
25 26 ui->e10Button->setChecked(true);
  27 + m_ctrChkedbtn = ui->e10Button;
26 28 break;
27 29 case Define::model_electric_20:
28 30 ui->e20Button->setChecked(true);
  31 + m_ctrChkedbtn = ui->e20Button;
29 32 break;
30 33 case Define::model_electric_24:
31 34 ui->e24Button->setChecked(true);
  35 + m_ctrChkedbtn = ui->e24Button;
32 36 break;
33 37 case Define::model_electric_40:
34 38 ui->e40Button->setChecked(true);
  39 + m_ctrChkedbtn = ui->e40Button;
35 40 break;
36 41 }
  42 + this->setFocus();
37 43 }
38 44  
39 45 ElectricModelSettingWindow::~ElectricModelSettingWindow()
... ... @@ -89,18 +95,25 @@ void ElectricModelSettingWindow::setModel(Define::model_type model)
89 95 void ElectricModelSettingWindow::on_e10Button_clicked()
90 96 {
91 97 //setModel(Define::model_electric_10);
  98 + if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false);
  99 + m_ctrChkedbtn = ui->e10Button;
92 100 selitem = Define::model_electric_10;
93 101 }
94 102  
95 103 void ElectricModelSettingWindow::on_e20Button_clicked()
96 104 {
97 105 //setModel(Define::model_electric_20);
  106 + if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false);
  107 + m_ctrChkedbtn = ui->e20Button;
98 108 selitem = Define::model_electric_20;
99 109 }
100 110  
101 111 void ElectricModelSettingWindow::on_e24Button_clicked()
102 112 {
103 113 //setModel(Define::model_electric_24);
  114 + if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false);
  115 + m_ctrChkedbtn = ui->e24Button;
  116 +
104 117 selitem = Define::model_electric_24;
105 118  
106 119 }
... ... @@ -108,6 +121,9 @@ void ElectricModelSettingWindow::on_e24Button_clicked()
108 121 void ElectricModelSettingWindow::on_e40Button_clicked()
109 122 {
110 123 //setModel(Define::model_electric_40);
  124 + if(m_ctrChkedbtn != NULL) m_ctrChkedbtn->setChecked(false);
  125 + m_ctrChkedbtn = ui->e40Button;
  126 +
111 127 selitem = Define::model_electric_40;
112 128 }
113 129  
... ...
app/gui/oven_control/electricmodelsettingwindow.h
... ... @@ -2,6 +2,7 @@
2 2 #define ELECTRICMODELSETTINGWINDOW_H
3 3  
4 4 #include <QMainWindow>
  5 +#include <QPushButton>
5 6  
6 7 #include "config.h"
7 8  
... ... @@ -40,6 +41,8 @@ private:
40 41 void onEncoderLeft();
41 42 void onEncoderRight();
42 43 void onEncoderClicked(QWidget *clicked);
  44 +
  45 + QPushButton *m_ctrChkedbtn;
43 46 };
44 47  
45 48 #endif // ELECTRICMODELSETTINGWINDOW_H
... ...
app/gui/oven_control/electricmodelsettingwindow.ui
... ... @@ -40,7 +40,7 @@
40 40 </property>
41 41 <property name="styleSheet">
42 42 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
43   -QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379_ov.png); }</string>
  43 +QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
44 44 </property>
45 45 <property name="text">
46 46 <string>24단</string>
... ... @@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
49 49 <bool>true</bool>
50 50 </property>
51 51 <property name="autoExclusive">
52   - <bool>true</bool>
  52 + <bool>false</bool>
53 53 </property>
54 54 </widget>
55 55 <widget class="QWidget" name="widget" native="true">
... ... @@ -174,7 +174,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
174 174 </property>
175 175 <property name="styleSheet">
176 176 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
177   -QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379_ov.png); }</string>
  177 +QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
178 178 </property>
179 179 <property name="text">
180 180 <string>40단</string>
... ... @@ -183,7 +183,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
183 183 <bool>true</bool>
184 184 </property>
185 185 <property name="autoExclusive">
186   - <bool>true</bool>
  186 + <bool>false</bool>
187 187 </property>
188 188 </widget>
189 189 <widget class="QLabel" name="label_15">
... ... @@ -387,7 +387,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b
387 387 </property>
388 388 <property name="styleSheet">
389 389 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
390   -QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379_ov.png); }</string>
  390 +QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
391 391 </property>
392 392 <property name="text">
393 393 <string>10단</string>
... ... @@ -396,7 +396,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
396 396 <bool>true</bool>
397 397 </property>
398 398 <property name="autoExclusive">
399   - <bool>true</bool>
  399 + <bool>false</bool>
400 400 </property>
401 401 </widget>
402 402 <widget class="QPushButton" name="e20Button">
... ... @@ -424,7 +424,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
424 424 </property>
425 425 <property name="styleSheet">
426 426 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
427   -QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379_ov.png); }</string>
  427 +QPushButton:pressed, QPushButton:checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
428 428 </property>
429 429 <property name="text">
430 430 <string>20단</string>
... ... @@ -433,7 +433,7 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
433 433 <bool>true</bool>
434 434 </property>
435 435 <property name="autoExclusive">
436   - <bool>true</bool>
  436 + <bool>false</bool>
437 437 </property>
438 438 </widget>
439 439 <widget class="Line" name="line_3">
... ... @@ -500,6 +500,13 @@ QPushButton:pressed, QPushButton:checked { border-image: url(:/images/button/379
500 500 <header>washwarnicon.h</header>
501 501 </customwidget>
502 502 </customwidgets>
  503 + <tabstops>
  504 + <tabstop>e10Button</tabstop>
  505 + <tabstop>e20Button</tabstop>
  506 + <tabstop>e24Button</tabstop>
  507 + <tabstop>e40Button</tabstop>
  508 + <tabstop>backButton</tabstop>
  509 + </tabstops>
503 510 <resources/>
504 511 <connections/>
505 512 </ui>
... ...
app/gui/oven_control/gasmodelsettingwindow.cpp
... ... @@ -21,32 +21,42 @@ GasModelSettingWindow::GasModelSettingWindow(QWidget *parent) :
21 21 Define::config_item item;
22 22 item = cfg->getConfigValue(Define::config_model);
23 23 selitem = item.d32;
  24 + m_ctrChkedBtn = NULL;
24 25 switch(item.d32){
25 26 case Define::model_gas_lng_10:
26 27 ui->lng10Button->setChecked(true);
  28 + m_ctrChkedBtn = ui->lng10Button;
27 29 break;
28 30 case Define::model_gas_lng_20:
29 31 ui->lng20Button->setChecked(true);
  32 + m_ctrChkedBtn = ui->lng20Button;
30 33 break;
31 34 case Define::model_gas_lng_24:
32 35 ui->lng24Button->setChecked(true);
  36 + m_ctrChkedBtn = ui->lng24Button;
33 37 break;
34 38 case Define::model_gas_lng_40:
35 39 ui->lng40Button->setChecked(true);
  40 + m_ctrChkedBtn = ui->lng40Button;
36 41 break;
37 42 case Define::model_gas_lpg_10:
38 43 ui->lpg10Button->setChecked(true);
  44 + m_ctrChkedBtn = ui->lpg10Button;
39 45 break;
40 46 case Define::model_gas_lpg_20:
41 47 ui->lpg20Button->setChecked(true);
  48 + m_ctrChkedBtn = ui->lpg20Button;
42 49 break;
43 50 case Define::model_gas_lpg_24:
44 51 ui->lpg24Button->setChecked(true);
  52 + m_ctrChkedBtn = ui->lpg24Button;
45 53 break;
46 54 case Define::model_gas_lpg_40:
47 55 ui->lpg40Button->setChecked(true);
  56 + m_ctrChkedBtn = ui->lpg40Button;
48 57 break;
49 58 }
  59 + this->setFocus();
50 60 }
51 61  
52 62 GasModelSettingWindow::~GasModelSettingWindow()
... ... @@ -102,48 +112,71 @@ void GasModelSettingWindow::setModel(Define::model_type model)
102 112 void GasModelSettingWindow::on_lpg10Button_clicked()
103 113 {
104 114 //setModel(Define::model_gas_lpg_10);
  115 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  116 + m_ctrChkedBtn = ui->lpg10Button;
105 117 selitem = Define::model_gas_lpg_10;
106 118 }
107 119  
108 120 void GasModelSettingWindow::on_lng10Button_clicked()
109 121 {
110 122 //setModel(Define::model_gas_lng_10);
  123 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  124 + m_ctrChkedBtn = ui->lng10Button;
  125 +
111 126 selitem = Define::model_gas_lng_10;
112 127 }
113 128  
114 129 void GasModelSettingWindow::on_lpg20Button_clicked()
115 130 {
116 131 //setModel(Define::model_gas_lpg_20);
  132 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  133 + m_ctrChkedBtn = ui->lpg20Button;
  134 +
117 135 selitem = Define::model_gas_lpg_20;
118 136 }
119 137  
120 138 void GasModelSettingWindow::on_lng20Button_clicked()
121 139 {
122 140 //setModel(Define::model_gas_lng_20);
  141 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  142 + m_ctrChkedBtn = ui->lng20Button;
  143 +
123 144 selitem = Define::model_gas_lng_20;
124 145 }
125 146  
126 147 void GasModelSettingWindow::on_lpg24Button_clicked()
127 148 {
128 149 //setModel(Define::model_gas_lpg_24);
  150 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  151 + m_ctrChkedBtn = ui->lpg24Button;
  152 +
129 153 selitem = Define::model_gas_lpg_24;
130 154 }
131 155  
132 156 void GasModelSettingWindow::on_lng24Button_clicked()
133 157 {
134 158 //setModel(Define::model_gas_lng_24);
  159 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  160 + m_ctrChkedBtn = ui->lng24Button;
  161 +
135 162 selitem = Define::model_gas_lng_24;
136 163 }
137 164  
138 165 void GasModelSettingWindow::on_lpg40Button_clicked()
139 166 {
140 167 //setModel(Define::model_gas_lpg_40);
  168 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  169 + m_ctrChkedBtn = ui->lpg40Button;
  170 +
141 171 selitem = Define::model_gas_lpg_40;
142 172 }
143 173  
144 174 void GasModelSettingWindow::on_lng40Button_clicked()
145 175 {
146 176 //setModel(Define::model_gas_lng_40);
  177 + if(m_ctrChkedBtn != NULL)m_ctrChkedBtn->setChecked(false);
  178 + m_ctrChkedBtn = ui->lng40Button;
  179 +
147 180 selitem = Define::model_gas_lng_40;
148 181 }
149 182  
... ...
app/gui/oven_control/gasmodelsettingwindow.h
... ... @@ -2,6 +2,7 @@
2 2 #define GASMODELSETTINGWINDOW_H
3 3  
4 4 #include <QMainWindow>
  5 +#include <QPushButton>
5 6  
6 7 #include "config.h"
7 8  
... ... @@ -43,6 +44,7 @@ private:
43 44 void onEncoderLeft();
44 45 void onEncoderRight();
45 46 void onEncoderClicked(QWidget *clicked);
  47 + QPushButton* m_ctrChkedBtn;
46 48 };
47 49  
48 50 #endif // GASMODELSETTINGWINDOW_H
... ...
app/gui/oven_control/gasmodelsettingwindow.ui
... ... @@ -40,7 +40,7 @@
40 40 </property>
41 41 <property name="styleSheet">
42 42 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
43   -QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  43 +QPushButton:pressed, QPushButton::checked , QPushButton:focus{ border-image: url(:/images/button/379_ov.png); }</string>
44 44 </property>
45 45 <property name="text">
46 46 <string>20단 LPG</string>
... ... @@ -49,7 +49,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
49 49 <bool>true</bool>
50 50 </property>
51 51 <property name="autoExclusive">
52   - <bool>true</bool>
  52 + <bool>false</bool>
53 53 </property>
54 54 </widget>
55 55 <widget class="QWidget" name="widget" native="true">
... ... @@ -187,7 +187,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
187 187 </property>
188 188 <property name="styleSheet">
189 189 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
190   -QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  190 +QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
191 191 </property>
192 192 <property name="text">
193 193 <string>24단 LNG</string>
... ... @@ -196,7 +196,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
196 196 <bool>true</bool>
197 197 </property>
198 198 <property name="autoExclusive">
199   - <bool>true</bool>
  199 + <bool>false</bool>
200 200 </property>
201 201 </widget>
202 202 <widget class="QPushButton" name="lng20Button">
... ... @@ -224,7 +224,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
224 224 </property>
225 225 <property name="styleSheet">
226 226 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
227   -QPushButton:pressed , QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  227 +QPushButton:pressed , QPushButton::checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
228 228 </property>
229 229 <property name="text">
230 230 <string>20단 LNG</string>
... ... @@ -233,7 +233,7 @@ QPushButton:pressed , QPushButton::checked { border-image: url(:/images/button/3
233 233 <bool>true</bool>
234 234 </property>
235 235 <property name="autoExclusive">
236   - <bool>true</bool>
  236 + <bool>false</bool>
237 237 </property>
238 238 </widget>
239 239 <widget class="QPushButton" name="lpg24Button">
... ... @@ -261,7 +261,7 @@ QPushButton:pressed , QPushButton::checked { border-image: url(:/images/button/3
261 261 </property>
262 262 <property name="styleSheet">
263 263 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
264   -QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  264 +QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
265 265 </property>
266 266 <property name="text">
267 267 <string>24단 LPG</string>
... ... @@ -270,7 +270,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
270 270 <bool>true</bool>
271 271 </property>
272 272 <property name="autoExclusive">
273   - <bool>true</bool>
  273 + <bool>false</bool>
274 274 </property>
275 275 </widget>
276 276 <widget class="QLabel" name="label_15">
... ... @@ -487,7 +487,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b
487 487 </property>
488 488 <property name="styleSheet">
489 489 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
490   -QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  490 +QPushButton:pressed, QPushButton::checked, QPushButton:focus{ border-image: url(:/images/button/379_ov.png); }</string>
491 491 </property>
492 492 <property name="text">
493 493 <string>10단 LPG</string>
... ... @@ -496,7 +496,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
496 496 <bool>true</bool>
497 497 </property>
498 498 <property name="autoExclusive">
499   - <bool>true</bool>
  499 + <bool>false</bool>
500 500 </property>
501 501 </widget>
502 502 <widget class="QPushButton" name="lng10Button">
... ... @@ -524,7 +524,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
524 524 </property>
525 525 <property name="styleSheet">
526 526 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
527   -QPushButton:pressed , QPushButton::checked{ border-image: url(:/images/button/379_ov.png); }</string>
  527 +QPushButton:pressed , QPushButton::checked, QPushButton:focus{ border-image: url(:/images/button/379_ov.png); }</string>
528 528 </property>
529 529 <property name="text">
530 530 <string>10단 LNG</string>
... ... @@ -533,7 +533,7 @@ QPushButton:pressed , QPushButton::checked{ border-image: url(:/images/button/37
533 533 <bool>true</bool>
534 534 </property>
535 535 <property name="autoExclusive">
536   - <bool>true</bool>
  536 + <bool>false</bool>
537 537 </property>
538 538 </widget>
539 539 <widget class="Line" name="line_3">
... ... @@ -610,7 +610,7 @@ QPushButton:pressed , QPushButton::checked{ border-image: url(:/images/button/37
610 610 </property>
611 611 <property name="styleSheet">
612 612 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
613   -QPushButton:pressed,QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  613 +QPushButton:pressed,QPushButton::checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
614 614 </property>
615 615 <property name="text">
616 616 <string>40단 LPG</string>
... ... @@ -619,7 +619,7 @@ QPushButton:pressed,QPushButton::checked { border-image: url(:/images/button/379
619 619 <bool>true</bool>
620 620 </property>
621 621 <property name="autoExclusive">
622   - <bool>true</bool>
  622 + <bool>false</bool>
623 623 </property>
624 624 </widget>
625 625 <widget class="Line" name="line_8">
... ... @@ -673,7 +673,7 @@ QPushButton:pressed,QPushButton::checked { border-image: url(:/images/button/379
673 673 </property>
674 674 <property name="styleSheet">
675 675 <string notr="true">QPushButton { border-image: url(:/images/button/379.png); }
676   -QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/379_ov.png); }</string>
  676 +QPushButton:pressed, QPushButton::checked, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string>
677 677 </property>
678 678 <property name="text">
679 679 <string>40단 LNG</string>
... ... @@ -682,7 +682,7 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
682 682 <bool>true</bool>
683 683 </property>
684 684 <property name="autoExclusive">
685   - <bool>true</bool>
  685 + <bool>false</bool>
686 686 </property>
687 687 </widget>
688 688 </widget>
... ... @@ -700,6 +700,17 @@ QPushButton:pressed, QPushButton::checked { border-image: url(:/images/button/37
700 700 <header>washwarnicon.h</header>
701 701 </customwidget>
702 702 </customwidgets>
  703 + <tabstops>
  704 + <tabstop>lpg10Button</tabstop>
  705 + <tabstop>lng10Button</tabstop>
  706 + <tabstop>lpg20Button</tabstop>
  707 + <tabstop>lng20Button</tabstop>
  708 + <tabstop>lpg24Button</tabstop>
  709 + <tabstop>lng24Button</tabstop>
  710 + <tabstop>lpg40Button</tabstop>
  711 + <tabstop>lng40Button</tabstop>
  712 + <tabstop>backButton</tabstop>
  713 + </tabstops>
703 714 <resources/>
704 715 <connections/>
705 716 </ui>
... ...
app/gui/oven_control/historylistwindow.cpp
... ... @@ -2,6 +2,7 @@
2 2 #include <QStandardItemModel>
3 3 #include <QHBoxLayout>
4 4 #include <QDateTime>
  5 +#include <QKeyEvent>
5 6 #include <time.h>
6 7 #include "historylistwindow.h"
7 8 #include "ui_historylistwindow.h"
... ... @@ -362,3 +363,40 @@ void HistoryListWindow::on_ctrlResetBtn_clicked()
362 363 setWindosDataSet(m_nWindowType);
363 364  
364 365 }
  366 +
  367 +void HistoryListWindow::keyPressEvent(QKeyEvent *event)
  368 +{
  369 + switch (event->key())
  370 + {
  371 + case 0x01000030: // Turn left
  372 + focusPreviousChild();
  373 + break;
  374 + case 0x01000031: // Push
  375 + break;
  376 + case 0x01000032: // Turn right
  377 + focusNextChild();
  378 + break;
  379 + }
  380 +}
  381 +
  382 +void HistoryListWindow::keyReleaseEvent(QKeyEvent *event)
  383 +{
  384 + switch (event->key())
  385 + {
  386 + case 0x01000030: // Turn left
  387 + focusPreviousChild();
  388 + break;
  389 + case 0x01000031: // Push
  390 + {
  391 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  392 + if(btn != NULL){
  393 + btn->click();
  394 + }
  395 + break;
  396 + }
  397 + case 0x01000032: // Turn right
  398 + focusNextChild();
  399 + break;
  400 + }
  401 +}
  402 +
... ...
app/gui/oven_control/historylistwindow.h
... ... @@ -82,6 +82,10 @@ private:
82 82  
83 83 bool m_bDataInitCplt;
84 84  
  85 +protected:
  86 + void keyPressEvent(QKeyEvent *event);
  87 + void keyReleaseEvent(QKeyEvent *event);
  88 +
85 89 private:
86 90 void setUpperBunnerDataSet(void);
87 91 void setSteamBunnerDataSet(void);
... ...
app/gui/oven_control/historylistwindow.ui
... ... @@ -97,7 +97,7 @@ QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
97 97 </property>
98 98 <property name="styleSheet">
99 99 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
100   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  100 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
101 101 </property>
102 102 <property name="text">
103 103 <string/>
... ... @@ -120,7 +120,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
120 120 </property>
121 121 <property name="styleSheet">
122 122 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/006_sys_icon_12.png); }
123   -QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_12_ov.png); }</string>
  123 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/006_sys_icon_12_ov.png); }</string>
124 124 </property>
125 125 <property name="text">
126 126 <string/>
... ... @@ -143,7 +143,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_12_ov.p
143 143 </property>
144 144 <property name="styleSheet">
145 145 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/006_sys_icon_13.png); }
146   -QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_13_ov.png); }</string>
  146 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/006_sys_icon_13_ov.png); }</string>
147 147 </property>
148 148 <property name="text">
149 149 <string/>
... ... @@ -166,7 +166,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_13_ov.p
166 166 </property>
167 167 <property name="styleSheet">
168 168 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/006_sys_icon_14.png); }
169   -QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_14_ov.png); }</string>
  169 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/bottom_bar/006_sys_icon_14_ov.png); }</string>
170 170 </property>
171 171 <property name="text">
172 172 <string/>
... ... @@ -353,7 +353,6 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/006_sys_icon_14_ov.p
353 353 </property>
354 354 <property name="styleSheet">
355 355 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
356   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
357 356 QPushButton { text-align:center;}</string>
358 357 </property>
359 358 <property name="text">
... ... @@ -384,7 +383,6 @@ QPushButton { text-align:center;}&lt;/string&gt;
384 383 </property>
385 384 <property name="styleSheet">
386 385 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
387   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
388 386 QPushButton { text-align:center;}</string>
389 387 </property>
390 388 <property name="text">
... ... @@ -413,9 +411,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
413 411 <bold>false</bold>
414 412 </font>
415 413 </property>
  414 + <property name="focusPolicy">
  415 + <enum>Qt::NoFocus</enum>
  416 + </property>
416 417 <property name="styleSheet">
417 418 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
418   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
419 419 QPushButton { text-align:center;}</string>
420 420 </property>
421 421 <property name="text">
... ... @@ -444,9 +444,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
444 444 <bold>false</bold>
445 445 </font>
446 446 </property>
  447 + <property name="focusPolicy">
  448 + <enum>Qt::NoFocus</enum>
  449 + </property>
447 450 <property name="styleSheet">
448 451 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
449   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
450 452 QPushButton { text-align:center;}</string>
451 453 </property>
452 454 <property name="text">
... ... @@ -475,9 +477,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
475 477 <bold>false</bold>
476 478 </font>
477 479 </property>
  480 + <property name="focusPolicy">
  481 + <enum>Qt::NoFocus</enum>
  482 + </property>
478 483 <property name="styleSheet">
479 484 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
480   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
481 485 QPushButton { text-align:center;}</string>
482 486 </property>
483 487 <property name="text">
... ... @@ -506,9 +510,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
506 510 <bold>false</bold>
507 511 </font>
508 512 </property>
  513 + <property name="focusPolicy">
  514 + <enum>Qt::NoFocus</enum>
  515 + </property>
509 516 <property name="styleSheet">
510 517 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
511   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
512 518 QPushButton { text-align:center;}</string>
513 519 </property>
514 520 <property name="text">
... ... @@ -537,9 +543,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
537 543 <bold>false</bold>
538 544 </font>
539 545 </property>
  546 + <property name="focusPolicy">
  547 + <enum>Qt::NoFocus</enum>
  548 + </property>
540 549 <property name="styleSheet">
541 550 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
542   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
543 551 QPushButton { text-align:center;}</string>
544 552 </property>
545 553 <property name="text">
... ... @@ -568,9 +576,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
568 576 <bold>false</bold>
569 577 </font>
570 578 </property>
  579 + <property name="focusPolicy">
  580 + <enum>Qt::NoFocus</enum>
  581 + </property>
571 582 <property name="styleSheet">
572 583 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
573   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
574 584 QPushButton { text-align:center;}</string>
575 585 </property>
576 586 <property name="text">
... ... @@ -599,9 +609,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
599 609 <bold>false</bold>
600 610 </font>
601 611 </property>
  612 + <property name="focusPolicy">
  613 + <enum>Qt::NoFocus</enum>
  614 + </property>
602 615 <property name="styleSheet">
603 616 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
604   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
605 617 QPushButton { text-align:center;}</string>
606 618 </property>
607 619 <property name="text">
... ... @@ -630,9 +642,11 @@ QPushButton { text-align:center;}&lt;/string&gt;
630 642 <bold>false</bold>
631 643 </font>
632 644 </property>
  645 + <property name="focusPolicy">
  646 + <enum>Qt::NoFocus</enum>
  647 + </property>
633 648 <property name="styleSheet">
634 649 <string notr="true">QPushButton {border-image: url(:/images/button/152.png);}
635   -QPushButton::pressed {border-image: url(:/images/button/152_ov.png);}
636 650 QPushButton { text-align:center;}</string>
637 651 </property>
638 652 <property name="text">
... ...
app/gui/oven_control/operationtimeheat.cpp
  1 +#include <QKeyEvent>
1 2 #include "operationtimeheat.h"
2 3 #include "ui_operationtimeheat.h"
3 4 #include "ovenstatics.h"
... ... @@ -68,3 +69,39 @@ void OperationTimeHeat::on_backButton_clicked()
68 69 {
69 70 close();
70 71 }
  72 +
  73 +void OperationTimeHeat::keyPressEvent(QKeyEvent *event)
  74 +{
  75 + switch (event->key())
  76 + {
  77 + case 0x01000030: // Turn left
  78 + focusPreviousChild();
  79 + break;
  80 + case 0x01000031: // Push
  81 + break;
  82 + case 0x01000032: // Turn right
  83 + focusNextChild();
  84 + break;
  85 + }
  86 +}
  87 +
  88 +void OperationTimeHeat::keyReleaseEvent(QKeyEvent *event)
  89 +{
  90 + switch (event->key())
  91 + {
  92 + case 0x01000030: // Turn left
  93 + focusPreviousChild();
  94 + break;
  95 + case 0x01000031: // Push
  96 + {
  97 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  98 + if(btn != NULL){
  99 + btn->click();
  100 + }
  101 + break;
  102 + }
  103 + case 0x01000032: // Turn right
  104 + focusNextChild();
  105 + break;
  106 + }
  107 +}
... ...
app/gui/oven_control/operationtimeheat.h
... ... @@ -15,6 +15,10 @@ public:
15 15 explicit OperationTimeHeat(QWidget *parent = 0);
16 16 ~OperationTimeHeat();
17 17  
  18 +protected:
  19 + void keyPressEvent(QKeyEvent *event);
  20 + void keyReleaseEvent(QKeyEvent *event);
  21 +
18 22 private slots:
19 23 void on_btnReset1_clicked();
20 24  
... ...
app/gui/oven_control/operationtimeheat.ui
... ... @@ -103,7 +103,7 @@
103 103 </property>
104 104 <property name="styleSheet">
105 105 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
106   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  106 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
107 107 </property>
108 108 <property name="text">
109 109 <string/>
... ... @@ -126,7 +126,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
126 126 </property>
127 127 <property name="styleSheet">
128 128 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); }
129   -QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
  129 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
130 130 </property>
131 131 <property name="text">
132 132 <string/>
... ... @@ -264,7 +264,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }&lt;/str
264 264 <property name="styleSheet">
265 265 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
266 266 color: rgb(55, 55, 55); }
267   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  267 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
268 268 QPushButton { text-align: center;}
269 269 </string>
270 270 </property>
... ... @@ -299,7 +299,7 @@ QPushButton { text-align: center;}
299 299 <property name="styleSheet">
300 300 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
301 301 color: rgb(55, 55, 55); }
302   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  302 +QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/button/379_ov_63.png); }
303 303 QPushButton { text-align: center;}
304 304 </string>
305 305 </property>
... ...
app/gui/oven_control/operationtimemain.cpp
  1 +#include <QKeyEvent>
1 2 #include "operationtimemain.h"
2 3 #include "ui_operationtimemain.h"
3 4 #include "operationtimeheat.h"
... ... @@ -48,3 +49,39 @@ void OperationTimeMain::on_backButton_clicked()
48 49 {
49 50 close();
50 51 }
  52 +
  53 +void OperationTimeMain::keyPressEvent(QKeyEvent *event)
  54 +{
  55 + switch (event->key())
  56 + {
  57 + case 0x01000030: // Turn left
  58 + focusPreviousChild();
  59 + break;
  60 + case 0x01000031: // Push
  61 + break;
  62 + case 0x01000032: // Turn right
  63 + focusNextChild();
  64 + break;
  65 + }
  66 +}
  67 +
  68 +void OperationTimeMain::keyReleaseEvent(QKeyEvent *event)
  69 +{
  70 + switch (event->key())
  71 + {
  72 + case 0x01000030: // Turn left
  73 + focusPreviousChild();
  74 + break;
  75 + case 0x01000031: // Push
  76 + {
  77 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  78 + if(btn != NULL){
  79 + btn->click();
  80 + }
  81 + break;
  82 + }
  83 + case 0x01000032: // Turn right
  84 + focusNextChild();
  85 + break;
  86 + }
  87 +}
... ...
app/gui/oven_control/operationtimemain.h
... ... @@ -24,6 +24,10 @@ private slots:
24 24  
25 25 void on_backButton_clicked();
26 26  
  27 +protected:
  28 + void keyPressEvent(QKeyEvent *event);
  29 + void keyReleaseEvent(QKeyEvent *event);
  30 +
27 31 private:
28 32 Ui::OperationTimeMain *ui;
29 33 };
... ...
app/gui/oven_control/operationtimemain.ui
... ... @@ -102,7 +102,7 @@
102 102 </property>
103 103 <property name="styleSheet">
104 104 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
105   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  105 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
106 106 </property>
107 107 <property name="text">
108 108 <string/>
... ... @@ -142,6 +142,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
142 142 <underline>false</underline>
143 143 </font>
144 144 </property>
  145 + <property name="focusPolicy">
  146 + <enum>Qt::NoFocus</enum>
  147 + </property>
145 148 <property name="styleSheet">
146 149 <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png);color: rgb(255, 255, 255); }
147 150 QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }
... ... @@ -209,7 +212,7 @@ QPushButton { text-align: left;padding-left:30px;}
209 212 <property name="styleSheet">
210 213 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
211 214 color: rgb(55, 55, 55); }
212   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  215 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
213 216 QPushButton { text-align: center;}
214 217 </string>
215 218 </property>
... ... @@ -244,7 +247,7 @@ QPushButton { text-align: center;}
244 247 <property name="styleSheet">
245 248 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
246 249 color: rgb(55, 55, 55); }
247   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  250 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
248 251 QPushButton { text-align: center;}
249 252 </string>
250 253 </property>
... ... @@ -279,7 +282,7 @@ QPushButton { text-align: center;}
279 282 <property name="styleSheet">
280 283 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
281 284 color: rgb(55, 55, 55); }
282   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  285 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
283 286 QPushButton { text-align: center;}
284 287 </string>
285 288 </property>
... ...
app/gui/oven_control/operationtimemode.cpp
  1 +#include <QKeyEvent>
1 2 #include "operationtimemode.h"
2 3 #include "ui_operationtimemode.h"
3 4 #include "ovenstatics.h"
... ... @@ -96,3 +97,39 @@ void OperationTimeMode::reloadUi(void){
96 97 qDebug() << "Total Time : " <<timetemp;
97 98 }
98 99 }
  100 +
  101 +void OperationTimeMode::keyPressEvent(QKeyEvent *event)
  102 +{
  103 + switch (event->key())
  104 + {
  105 + case 0x01000030: // Turn left
  106 + focusPreviousChild();
  107 + break;
  108 + case 0x01000031: // Push
  109 + break;
  110 + case 0x01000032: // Turn right
  111 + focusNextChild();
  112 + break;
  113 + }
  114 +}
  115 +
  116 +void OperationTimeMode::keyReleaseEvent(QKeyEvent *event)
  117 +{
  118 + switch (event->key())
  119 + {
  120 + case 0x01000030: // Turn left
  121 + focusPreviousChild();
  122 + break;
  123 + case 0x01000031: // Push
  124 + {
  125 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  126 + if(btn != NULL){
  127 + btn->click();
  128 + }
  129 + break;
  130 + }
  131 + case 0x01000032: // Turn right
  132 + focusNextChild();
  133 + break;
  134 + }
  135 +}
... ...
app/gui/oven_control/operationtimemode.h
... ... @@ -15,6 +15,10 @@ public:
15 15 explicit OperationTimeMode(QWidget *parent = 0);
16 16 ~OperationTimeMode();
17 17  
  18 +protected:
  19 + void keyPressEvent(QKeyEvent *event);
  20 + void keyReleaseEvent(QKeyEvent *event);
  21 +
18 22 private slots:
19 23 void on_backButton_clicked();
20 24  
... ...
app/gui/oven_control/operationtimemode.ui
... ... @@ -103,7 +103,7 @@
103 103 </property>
104 104 <property name="styleSheet">
105 105 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
106   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  106 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
107 107 </property>
108 108 <property name="text">
109 109 <string/>
... ... @@ -126,7 +126,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
126 126 </property>
127 127 <property name="styleSheet">
128 128 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); }
129   -QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
  129 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
130 130 </property>
131 131 <property name="text">
132 132 <string/>
... ... @@ -203,6 +203,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }&lt;/str
203 203 <underline>false</underline>
204 204 </font>
205 205 </property>
  206 + <property name="focusPolicy">
  207 + <enum>Qt::NoFocus</enum>
  208 + </property>
206 209 <property name="styleSheet">
207 210 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
208 211 color: rgb(55, 55, 55); }
... ... @@ -259,6 +262,9 @@ QPushButton { text-align: center;}
259 262 <underline>false</underline>
260 263 </font>
261 264 </property>
  265 + <property name="focusPolicy">
  266 + <enum>Qt::NoFocus</enum>
  267 + </property>
262 268 <property name="styleSheet">
263 269 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
264 270 color: rgb(55, 55, 55); }
... ... @@ -294,6 +300,9 @@ QPushButton { text-align: center;}
294 300 <underline>false</underline>
295 301 </font>
296 302 </property>
  303 + <property name="focusPolicy">
  304 + <enum>Qt::NoFocus</enum>
  305 + </property>
297 306 <property name="styleSheet">
298 307 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
299 308 color: rgb(55, 55, 55); }
... ... @@ -329,6 +338,9 @@ QPushButton { text-align: center;}
329 338 <underline>false</underline>
330 339 </font>
331 340 </property>
  341 + <property name="focusPolicy">
  342 + <enum>Qt::NoFocus</enum>
  343 + </property>
332 344 <property name="styleSheet">
333 345 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
334 346 color: rgb(55, 55, 55); }
... ... @@ -364,6 +376,9 @@ QPushButton { text-align: center;}
364 376 <underline>false</underline>
365 377 </font>
366 378 </property>
  379 + <property name="focusPolicy">
  380 + <enum>Qt::NoFocus</enum>
  381 + </property>
367 382 <property name="styleSheet">
368 383 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
369 384 color: rgb(55, 55, 55); }
... ... @@ -399,6 +414,9 @@ QPushButton { text-align: center;}
399 414 <underline>false</underline>
400 415 </font>
401 416 </property>
  417 + <property name="focusPolicy">
  418 + <enum>Qt::NoFocus</enum>
  419 + </property>
402 420 <property name="styleSheet">
403 421 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
404 422 color: rgb(55, 55, 55); }
... ... @@ -434,6 +452,9 @@ QPushButton { text-align: center;}
434 452 <underline>false</underline>
435 453 </font>
436 454 </property>
  455 + <property name="focusPolicy">
  456 + <enum>Qt::NoFocus</enum>
  457 + </property>
437 458 <property name="styleSheet">
438 459 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
439 460 color: rgb(55, 55, 55); }
... ... @@ -469,6 +490,9 @@ QPushButton { text-align: center;}
469 490 <underline>false</underline>
470 491 </font>
471 492 </property>
  493 + <property name="focusPolicy">
  494 + <enum>Qt::NoFocus</enum>
  495 + </property>
472 496 <property name="styleSheet">
473 497 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
474 498 color: rgb(55, 55, 55); }
... ... @@ -504,6 +528,9 @@ QPushButton { text-align: center;}
504 528 <underline>false</underline>
505 529 </font>
506 530 </property>
  531 + <property name="focusPolicy">
  532 + <enum>Qt::NoFocus</enum>
  533 + </property>
507 534 <property name="styleSheet">
508 535 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
509 536 color: rgb(55, 55, 55); }
... ... @@ -539,6 +566,9 @@ QPushButton { text-align: center;}
539 566 <underline>false</underline>
540 567 </font>
541 568 </property>
  569 + <property name="focusPolicy">
  570 + <enum>Qt::NoFocus</enum>
  571 + </property>
542 572 <property name="styleSheet">
543 573 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
544 574 color: rgb(55, 55, 55); }
... ...
app/gui/oven_control/operationtimeparts.cpp
  1 +#include <QKeyEvent>
1 2 #include <qdebug.h>
2 3 #include "operationtimeparts.h"
3 4 #include "ui_operationtimeparts.h"
... ... @@ -113,3 +114,39 @@ void OperationTimeParts::on_btnResets_clicked(int idx){
113 114 }
114 115  
115 116 }
  117 +
  118 +void OperationTimeParts::keyPressEvent(QKeyEvent *event)
  119 +{
  120 + switch (event->key())
  121 + {
  122 + case 0x01000030: // Turn left
  123 + focusPreviousChild();
  124 + break;
  125 + case 0x01000031: // Push
  126 + break;
  127 + case 0x01000032: // Turn right
  128 + focusNextChild();
  129 + break;
  130 + }
  131 +}
  132 +
  133 +void OperationTimeParts::keyReleaseEvent(QKeyEvent *event)
  134 +{
  135 + switch (event->key())
  136 + {
  137 + case 0x01000030: // Turn left
  138 + focusPreviousChild();
  139 + break;
  140 + case 0x01000031: // Push
  141 + {
  142 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  143 + if(btn != NULL){
  144 + btn->click();
  145 + }
  146 + break;
  147 + }
  148 + case 0x01000032: // Turn right
  149 + focusNextChild();
  150 + break;
  151 + }
  152 +}
... ...
app/gui/oven_control/operationtimeparts.h
... ... @@ -28,6 +28,10 @@ private slots:
28 28 void on_btnReset_2_clicked();
29 29 void on_btnResets_clicked(int);
30 30  
  31 +protected:
  32 + void keyPressEvent(QKeyEvent *event);
  33 + void keyReleaseEvent(QKeyEvent *event);
  34 +
31 35 private:
32 36 const uint16_t m_arrPartItemIdxs[OPERATION_TIME_PARTS_MAX_ITEM] = {
33 37 USE_ITEM_door_open,USE_ITEM_dv_open,USE_ITEM_ssv_open,USE_ITEM_qnv_open,USE_ITEM_snv_open,
... ...
app/gui/oven_control/operationtimeparts.ui
... ... @@ -103,7 +103,7 @@
103 103 </property>
104 104 <property name="styleSheet">
105 105 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
106   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  106 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/bottom_bar/back_ov.png); }</string>
107 107 </property>
108 108 <property name="text">
109 109 <string/>
... ... @@ -126,7 +126,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
126 126 </property>
127 127 <property name="styleSheet">
128 128 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); }
129   -QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
  129 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/bottom_bar/help_ov.png); }</string>
130 130 </property>
131 131 <property name="text">
132 132 <string/>
... ... @@ -222,7 +222,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }&lt;/str
222 222 <property name="styleSheet">
223 223 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
224 224 color: rgb(55, 55, 55); }
225   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  225 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
226 226 QPushButton { text-align: center;}
227 227 </string>
228 228 </property>
... ... @@ -509,7 +509,7 @@ QPushButton { text-align: center;}
509 509 <property name="styleSheet">
510 510 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
511 511 color: rgb(55, 55, 55); }
512   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  512 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
513 513 QPushButton { text-align: center;}
514 514 </string>
515 515 </property>
... ... @@ -544,7 +544,7 @@ QPushButton { text-align: center;}
544 544 <property name="styleSheet">
545 545 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
546 546 color: rgb(55, 55, 55); }
547   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  547 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
548 548 QPushButton { text-align: center;}
549 549 </string>
550 550 </property>
... ... @@ -579,7 +579,7 @@ QPushButton { text-align: center;}
579 579 <property name="styleSheet">
580 580 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
581 581 color: rgb(55, 55, 55); }
582   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  582 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
583 583 QPushButton { text-align: center;}
584 584 </string>
585 585 </property>
... ... @@ -614,7 +614,7 @@ QPushButton { text-align: center;}
614 614 <property name="styleSheet">
615 615 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
616 616 color: rgb(55, 55, 55); }
617   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  617 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
618 618 QPushButton { text-align: center;}
619 619 </string>
620 620 </property>
... ... @@ -649,7 +649,7 @@ QPushButton { text-align: center;}
649 649 <property name="styleSheet">
650 650 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
651 651 color: rgb(55, 55, 55); }
652   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  652 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
653 653 QPushButton { text-align: center;}
654 654 </string>
655 655 </property>
... ... @@ -684,7 +684,7 @@ QPushButton { text-align: center;}
684 684 <property name="styleSheet">
685 685 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
686 686 color: rgb(55, 55, 55); }
687   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  687 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/button/379_ov_63.png); }
688 688 QPushButton { text-align: center;}
689 689 </string>
690 690 </property>
... ... @@ -719,7 +719,7 @@ QPushButton { text-align: center;}
719 719 <property name="styleSheet">
720 720 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
721 721 color: rgb(55, 55, 55); }
722   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  722 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
723 723 QPushButton { text-align: center;}
724 724 </string>
725 725 </property>
... ... @@ -754,7 +754,7 @@ QPushButton { text-align: center;}
754 754 <property name="styleSheet">
755 755 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
756 756 color: rgb(55, 55, 55); }
757   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  757 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
758 758 QPushButton { text-align: center;}
759 759 </string>
760 760 </property>
... ... @@ -789,7 +789,7 @@ QPushButton { text-align: center;}
789 789 <property name="styleSheet">
790 790 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
791 791 color: rgb(55, 55, 55); }
792   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  792 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/button/379_ov_63.png); }
793 793 QPushButton { text-align: center;}
794 794 </string>
795 795 </property>
... ...
app/gui/oven_control/realtimemain.cpp
  1 +#include <QKeyEvent>
1 2 #include "realtimemain.h"
2 3 #include "ui_realtimemain.h"
3 4 #include "realtimepartswindow.h"
... ... @@ -40,3 +41,38 @@ void RealtimeMain::on_backButton_clicked()
40 41 {
41 42 close();
42 43 }
  44 +void RealtimeMain::keyPressEvent(QKeyEvent *event)
  45 +{
  46 + switch (event->key())
  47 + {
  48 + case 0x01000030: // Turn left
  49 + focusPreviousChild();
  50 + break;
  51 + case 0x01000031: // Push
  52 + break;
  53 + case 0x01000032: // Turn right
  54 + focusNextChild();
  55 + break;
  56 + }
  57 +}
  58 +
  59 +void RealtimeMain::keyReleaseEvent(QKeyEvent *event)
  60 +{
  61 + switch (event->key())
  62 + {
  63 + case 0x01000030: // Turn left
  64 + focusPreviousChild();
  65 + break;
  66 + case 0x01000031: // Push
  67 + {
  68 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  69 + if(btn != NULL){
  70 + btn->click();
  71 + }
  72 + break;
  73 + }
  74 + case 0x01000032: // Turn right
  75 + focusNextChild();
  76 + break;
  77 + }
  78 +}
... ...
app/gui/oven_control/realtimemain.h
... ... @@ -22,6 +22,10 @@ private slots:
22 22  
23 23 void on_backButton_clicked();
24 24  
  25 +protected:
  26 + void keyPressEvent(QKeyEvent *event);
  27 + void keyReleaseEvent(QKeyEvent *event);
  28 +
25 29 private:
26 30 Ui::RealtimeMain *ui;
27 31 };
... ...
app/gui/oven_control/realtimemain.ui
... ... @@ -102,7 +102,7 @@
102 102 </property>
103 103 <property name="styleSheet">
104 104 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
105   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  105 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
106 106 </property>
107 107 <property name="text">
108 108 <string/>
... ... @@ -142,6 +142,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
142 142 <underline>false</underline>
143 143 </font>
144 144 </property>
  145 + <property name="focusPolicy">
  146 + <enum>Qt::NoFocus</enum>
  147 + </property>
145 148 <property name="styleSheet">
146 149 <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png);color: rgb(255, 255, 255); }
147 150 QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }
... ... @@ -209,7 +212,7 @@ QPushButton { text-align: left;padding-left:30px;}
209 212 <property name="styleSheet">
210 213 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
211 214 color: rgb(55, 55, 55); }
212   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  215 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
213 216 QPushButton { text-align: center;}
214 217 </string>
215 218 </property>
... ... @@ -244,7 +247,7 @@ QPushButton { text-align: center;}
244 247 <property name="styleSheet">
245 248 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
246 249 color: rgb(55, 55, 55); }
247   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  250 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
248 251 QPushButton { text-align: center;}
249 252 </string>
250 253 </property>
... ...
app/gui/oven_control/realtimepartswindow.cpp
  1 +#include <QKeyEvent>
1 2 #include "realtimepartswindow.h"
2 3 #include "ui_realtimepartswindow.h"
3 4 #include "ovenstatics.h"
... ... @@ -122,3 +123,39 @@ void RealtimePartsWindow::reloadUi(void){
122 123 void RealtimePartsWindow::oneSecTimerFired(void){
123 124 reloadUi();
124 125 }
  126 +
  127 +void RealtimePartsWindow::keyPressEvent(QKeyEvent *event)
  128 +{
  129 + switch (event->key())
  130 + {
  131 + case 0x01000030: // Turn left
  132 + focusPreviousChild();
  133 + break;
  134 + case 0x01000031: // Push
  135 + break;
  136 + case 0x01000032: // Turn right
  137 + focusNextChild();
  138 + break;
  139 + }
  140 +}
  141 +
  142 +void RealtimePartsWindow::keyReleaseEvent(QKeyEvent *event)
  143 +{
  144 + switch (event->key())
  145 + {
  146 + case 0x01000030: // Turn left
  147 + focusPreviousChild();
  148 + break;
  149 + case 0x01000031: // Push
  150 + {
  151 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  152 + if(btn != NULL){
  153 + btn->click();
  154 + }
  155 + break;
  156 + }
  157 + case 0x01000032: // Turn right
  158 + focusNextChild();
  159 + break;
  160 + }
  161 +}
... ...
app/gui/oven_control/realtimepartswindow.h
... ... @@ -20,6 +20,10 @@ public:
20 20 explicit RealtimePartsWindow(QWidget *parent = 0);
21 21 ~RealtimePartsWindow();
22 22  
  23 +protected:
  24 + void keyPressEvent(QKeyEvent *event);
  25 + void keyReleaseEvent(QKeyEvent *event);
  26 +
23 27 private slots:
24 28 void on_backButton_clicked();
25 29 void oneSecTimerFired(void);
... ...
app/gui/oven_control/realtimepartswindow.ui
... ... @@ -103,7 +103,7 @@
103 103 </property>
104 104 <property name="styleSheet">
105 105 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
106   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  106 +QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/bottom_bar/back_ov.png); }</string>
107 107 </property>
108 108 <property name="text">
109 109 <string/>
... ... @@ -126,7 +126,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
126 126 </property>
127 127 <property name="styleSheet">
128 128 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); }
129   -QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
  129 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
130 130 </property>
131 131 <property name="text">
132 132 <string/>
... ... @@ -203,6 +203,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }&lt;/str
203 203 <underline>false</underline>
204 204 </font>
205 205 </property>
  206 + <property name="focusPolicy">
  207 + <enum>Qt::NoFocus</enum>
  208 + </property>
206 209 <property name="styleSheet">
207 210 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
208 211 color: rgb(55, 55, 55); }
... ... @@ -259,6 +262,9 @@ QPushButton { text-align: center;}
259 262 <underline>false</underline>
260 263 </font>
261 264 </property>
  265 + <property name="focusPolicy">
  266 + <enum>Qt::NoFocus</enum>
  267 + </property>
262 268 <property name="styleSheet">
263 269 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
264 270 color: rgb(55, 55, 55); }
... ... @@ -294,6 +300,9 @@ QPushButton { text-align: center;}
294 300 <underline>false</underline>
295 301 </font>
296 302 </property>
  303 + <property name="focusPolicy">
  304 + <enum>Qt::NoFocus</enum>
  305 + </property>
297 306 <property name="styleSheet">
298 307 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
299 308 color: rgb(55, 55, 55); }
... ... @@ -329,6 +338,9 @@ QPushButton { text-align: center;}
329 338 <underline>false</underline>
330 339 </font>
331 340 </property>
  341 + <property name="focusPolicy">
  342 + <enum>Qt::NoFocus</enum>
  343 + </property>
332 344 <property name="styleSheet">
333 345 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
334 346 color: rgb(55, 55, 55); }
... ... @@ -364,6 +376,9 @@ QPushButton { text-align: center;}
364 376 <underline>false</underline>
365 377 </font>
366 378 </property>
  379 + <property name="focusPolicy">
  380 + <enum>Qt::NoFocus</enum>
  381 + </property>
367 382 <property name="styleSheet">
368 383 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
369 384 color: rgb(55, 55, 55); }
... ... @@ -399,6 +414,9 @@ QPushButton { text-align: center;}
399 414 <underline>false</underline>
400 415 </font>
401 416 </property>
  417 + <property name="focusPolicy">
  418 + <enum>Qt::NoFocus</enum>
  419 + </property>
402 420 <property name="styleSheet">
403 421 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
404 422 color: rgb(55, 55, 55); }
... ... @@ -434,6 +452,9 @@ QPushButton { text-align: center;}
434 452 <underline>false</underline>
435 453 </font>
436 454 </property>
  455 + <property name="focusPolicy">
  456 + <enum>Qt::NoFocus</enum>
  457 + </property>
437 458 <property name="styleSheet">
438 459 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
439 460 color: rgb(55, 55, 55); }
... ... @@ -469,6 +490,9 @@ QPushButton { text-align: center;}
469 490 <underline>false</underline>
470 491 </font>
471 492 </property>
  493 + <property name="focusPolicy">
  494 + <enum>Qt::NoFocus</enum>
  495 + </property>
472 496 <property name="styleSheet">
473 497 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
474 498 color: rgb(55, 55, 55); }
... ...
app/gui/oven_control/realtimesensorwindow.cpp
  1 +#include <QKeyEvent>
1 2 #include "realtimesensorwindow.h"
2 3 #include "ui_realtimesensorwindow.h"
3 4 #include "ovenstatics.h"
... ... @@ -139,3 +140,40 @@ void RealtimeSensorWindow::reloadUi(void){
139 140 void RealtimeSensorWindow::oneSecTimerFired(void){
140 141 reloadUi();
141 142 }
  143 +
  144 +void RealtimeSensorWindow::keyPressEvent(QKeyEvent *event)
  145 +{
  146 + switch (event->key())
  147 + {
  148 + case 0x01000030: // Turn left
  149 + focusPreviousChild();
  150 + break;
  151 + case 0x01000031: // Push
  152 + break;
  153 + case 0x01000032: // Turn right
  154 + focusNextChild();
  155 + break;
  156 + }
  157 +}
  158 +
  159 +void RealtimeSensorWindow::keyReleaseEvent(QKeyEvent *event)
  160 +{
  161 + switch (event->key())
  162 + {
  163 + case 0x01000030: // Turn left
  164 + focusPreviousChild();
  165 + break;
  166 + case 0x01000031: // Push
  167 + {
  168 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  169 + if(btn != NULL){
  170 + btn->click();
  171 + }
  172 + break;
  173 + }
  174 + case 0x01000032: // Turn right
  175 + focusNextChild();
  176 + break;
  177 + }
  178 +}
  179 +
... ...
app/gui/oven_control/realtimesensorwindow.h
... ... @@ -20,6 +20,10 @@ public:
20 20 explicit RealtimeSensorWindow(QWidget *parent = 0);
21 21 ~RealtimeSensorWindow();
22 22  
  23 +protected:
  24 + void keyPressEvent(QKeyEvent *event);
  25 + void keyReleaseEvent(QKeyEvent *event);
  26 +
23 27 private slots:
24 28 void on_backButton_clicked();
25 29 void oneSecTimerFired(void);
... ...
app/gui/oven_control/realtimesensorwindow.ui
... ... @@ -103,7 +103,7 @@
103 103 </property>
104 104 <property name="styleSheet">
105 105 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
106   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  106 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
107 107 </property>
108 108 <property name="text">
109 109 <string/>
... ... @@ -126,7 +126,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
126 126 </property>
127 127 <property name="styleSheet">
128 128 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/help.png); }
129   -QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
  129 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/help_ov.png); }</string>
130 130 </property>
131 131 <property name="text">
132 132 <string/>
... ... @@ -215,6 +215,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/help_ov.png); }&lt;/str
215 215 <underline>false</underline>
216 216 </font>
217 217 </property>
  218 + <property name="focusPolicy">
  219 + <enum>Qt::NoFocus</enum>
  220 + </property>
218 221 <property name="styleSheet">
219 222 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
220 223 color: rgb(55, 55, 55); }
... ... @@ -271,6 +274,9 @@ QPushButton { text-align: center;}
271 274 <underline>false</underline>
272 275 </font>
273 276 </property>
  277 + <property name="focusPolicy">
  278 + <enum>Qt::NoFocus</enum>
  279 + </property>
274 280 <property name="styleSheet">
275 281 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
276 282 color: rgb(55, 55, 55); }
... ... @@ -306,6 +312,9 @@ QPushButton { text-align: center;}
306 312 <underline>false</underline>
307 313 </font>
308 314 </property>
  315 + <property name="focusPolicy">
  316 + <enum>Qt::NoFocus</enum>
  317 + </property>
309 318 <property name="styleSheet">
310 319 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
311 320 color: rgb(55, 55, 55); }
... ... @@ -341,6 +350,9 @@ QPushButton { text-align: center;}
341 350 <underline>false</underline>
342 351 </font>
343 352 </property>
  353 + <property name="focusPolicy">
  354 + <enum>Qt::NoFocus</enum>
  355 + </property>
344 356 <property name="styleSheet">
345 357 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
346 358 color: rgb(55, 55, 55); }
... ... @@ -376,6 +388,9 @@ QPushButton { text-align: center;}
376 388 <underline>false</underline>
377 389 </font>
378 390 </property>
  391 + <property name="focusPolicy">
  392 + <enum>Qt::NoFocus</enum>
  393 + </property>
379 394 <property name="styleSheet">
380 395 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
381 396 color: rgb(55, 55, 55); }
... ... @@ -411,6 +426,9 @@ QPushButton { text-align: center;}
411 426 <underline>false</underline>
412 427 </font>
413 428 </property>
  429 + <property name="focusPolicy">
  430 + <enum>Qt::NoFocus</enum>
  431 + </property>
414 432 <property name="styleSheet">
415 433 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
416 434 color: rgb(55, 55, 55); }
... ... @@ -446,6 +464,9 @@ QPushButton { text-align: center;}
446 464 <underline>false</underline>
447 465 </font>
448 466 </property>
  467 + <property name="focusPolicy">
  468 + <enum>Qt::NoFocus</enum>
  469 + </property>
449 470 <property name="styleSheet">
450 471 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
451 472 color: rgb(55, 55, 55); }
... ... @@ -481,6 +502,9 @@ QPushButton { text-align: center;}
481 502 <underline>false</underline>
482 503 </font>
483 504 </property>
  505 + <property name="focusPolicy">
  506 + <enum>Qt::NoFocus</enum>
  507 + </property>
484 508 <property name="styleSheet">
485 509 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
486 510 color: rgb(55, 55, 55); }
... ... @@ -707,6 +731,9 @@ QPushButton { text-align: center;}
707 731 <underline>false</underline>
708 732 </font>
709 733 </property>
  734 + <property name="focusPolicy">
  735 + <enum>Qt::NoFocus</enum>
  736 + </property>
710 737 <property name="styleSheet">
711 738 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
712 739 color: rgb(55, 55, 55); }
... ...
app/gui/oven_control/servicehistorymain.cpp
  1 +#include <QKeyEvent>
  2 +#include <QDebug>
1 3 #include "servicehistorymain.h"
2 4 #include "ui_servicehistorymain.h"
3 5 #include "historylistwindow.h"
... ... @@ -54,3 +56,39 @@ void ServiceHistoryMain::on_btnErrorTotal_clicked()
54 56 w->setWindowModality(Qt::WindowModal);
55 57 w->showFullScreen();
56 58 }
  59 +
  60 +void ServiceHistoryMain::keyPressEvent(QKeyEvent *event)
  61 +{
  62 + switch (event->key())
  63 + {
  64 + case 0x01000030: // Turn left
  65 + focusPreviousChild();
  66 + break;
  67 + case 0x01000031: // Push
  68 + break;
  69 + case 0x01000032: // Turn right
  70 + focusNextChild();
  71 + break;
  72 + }
  73 +}
  74 +
  75 +void ServiceHistoryMain::keyReleaseEvent(QKeyEvent *event)
  76 +{
  77 + switch (event->key())
  78 + {
  79 + case 0x01000030: // Turn left
  80 + focusPreviousChild();
  81 + break;
  82 + case 0x01000031: // Push
  83 + {
  84 + QPushButton *btn = qobject_cast<QPushButton*>(focusWidget());
  85 + if(btn != NULL){
  86 + btn->click();
  87 + }
  88 + break;
  89 + }
  90 + case 0x01000032: // Turn right
  91 + focusNextChild();
  92 + break;
  93 + }
  94 +}
... ...
app/gui/oven_control/servicehistorymain.h
... ... @@ -24,6 +24,10 @@ private slots:
24 24  
25 25 void on_btnErrorTotal_clicked();
26 26  
  27 +protected:
  28 + void keyPressEvent(QKeyEvent *event);
  29 + void keyReleaseEvent(QKeyEvent *event);
  30 +
27 31 private:
28 32 Ui::ServiceHistoryMain *ui;
29 33 };
... ...
app/gui/oven_control/servicehistorymain.ui
... ... @@ -102,7 +102,7 @@
102 102 </property>
103 103 <property name="styleSheet">
104 104 <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); }
105   -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
  105 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string>
106 106 </property>
107 107 <property name="text">
108 108 <string/>
... ... @@ -142,6 +142,9 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }&lt;/str
142 142 <underline>false</underline>
143 143 </font>
144 144 </property>
  145 + <property name="focusPolicy">
  146 + <enum>Qt::NoFocus</enum>
  147 + </property>
145 148 <property name="styleSheet">
146 149 <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png);color: rgb(255, 255, 255); }
147 150 QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }
... ... @@ -209,7 +212,7 @@ QPushButton { text-align: left;padding-left:30px;}
209 212 <property name="styleSheet">
210 213 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
211 214 color: rgb(55, 55, 55); }
212   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  215 +QPushButton:pressed, QPushButton:focus{ border-image: url(:/images/button/379_ov_63.png); }
213 216 QPushButton { text-align: center;}
214 217 </string>
215 218 </property>
... ... @@ -244,7 +247,7 @@ QPushButton { text-align: center;}
244 247 <property name="styleSheet">
245 248 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
246 249 color: rgb(55, 55, 55); }
247   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  250 +QPushButton:pressed , QPushButton:focus{ border-image: url(:/images/button/379_ov_63.png); }
248 251 QPushButton { text-align: center;}
249 252 </string>
250 253 </property>
... ... @@ -279,7 +282,7 @@ QPushButton { text-align: center;}
279 282 <property name="styleSheet">
280 283 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
281 284 color: rgb(55, 55, 55); }
282   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  285 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
283 286 QPushButton { text-align: center;}
284 287 </string>
285 288 </property>
... ... @@ -314,7 +317,7 @@ QPushButton { text-align: center;}
314 317 <property name="styleSheet">
315 318 <string notr="true">QPushButton { border-image: url(:/images/button/379_63.png);
316 319 color: rgb(55, 55, 55); }
317   -QPushButton:pressed { border-image: url(:/images/button/379_ov_63.png); }
  320 +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov_63.png); }
318 321 QPushButton { text-align: center;}
319 322 </string>
320 323 </property>
... ...