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