Commit 07441dbd38f5f2b55e7f6e06a146569cb874d3ef
1 parent
56b97b93d1
Exists in
master
and in
2 other branches
엔코더 관련 디자인 변경 대비
Showing
12 changed files
with
220 additions
and
56 deletions
Show diff stats
app/gui/oven_control/autocookcheckconfigwindow.cpp
| @@ -136,6 +136,12 @@ void AutoCookCheckConfigWindow::setupUi() | @@ -136,6 +136,12 @@ void AutoCookCheckConfigWindow::setupUi() | ||
| 136 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); | 136 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); |
| 137 | ui->selectCookButton->setText(cook.name); | 137 | ui->selectCookButton->setText(cook.name); |
| 138 | 138 | ||
| 139 | + QString styleSheet("\ | ||
| 140 | +QPushButton { image: url(%1); }\ | ||
| 141 | +QPushButton:pressed,\ | ||
| 142 | +QPushButton:focus { image: url(%2); }\ | ||
| 143 | +QPushButton:checked { image: url(%3); }"); | ||
| 144 | + | ||
| 139 | for (int idx = 0; idx < 5; idx++) | 145 | for (int idx = 0; idx < 5; idx++) |
| 140 | { | 146 | { |
| 141 | ConfigWidget cw = configWidgets.at(idx); | 147 | ConfigWidget cw = configWidgets.at(idx); |
| @@ -151,19 +157,16 @@ void AutoCookCheckConfigWindow::setupUi() | @@ -151,19 +157,16 @@ void AutoCookCheckConfigWindow::setupUi() | ||
| 151 | } | 157 | } |
| 152 | else | 158 | else |
| 153 | { | 159 | { |
| 154 | - ConfigWidget cw = configWidgets.at(idx); | ||
| 155 | cw.button->show(); | 160 | cw.button->show(); |
| 156 | cw.minimum->show(); | 161 | cw.minimum->show(); |
| 157 | cw.maximum->show(); | 162 | cw.maximum->show(); |
| 158 | cw.current->show(); | 163 | cw.current->show(); |
| 159 | cw.slider->show(); | 164 | cw.slider->show(); |
| 160 | 165 | ||
| 161 | - cw.button->setStyleSheet( | ||
| 162 | - "QPushButton { image: url(" | ||
| 163 | - + Define::icon(config.type) | ||
| 164 | - + ") } QPushButton:pressed, QPushButton:focus { image: url(" | ||
| 165 | - + Define::iconOverlay(config.type) | ||
| 166 | - + ") }"); | 166 | + cw.button->setStyleSheet(styleSheet |
| 167 | + .arg(Define::icon(config.type)) | ||
| 168 | + .arg(Define::iconOverlay(config.type)) | ||
| 169 | + .arg(Define::iconActiveted(config.type))); | ||
| 167 | 170 | ||
| 168 | cw.minimum->setText(Define::minimum(config.type)); | 171 | cw.minimum->setText(Define::minimum(config.type)); |
| 169 | cw.maximum->setText(Define::maximum(config.type)); | 172 | cw.maximum->setText(Define::maximum(config.type)); |
app/gui/oven_control/autocookconfigwindow.cpp
| @@ -66,7 +66,10 @@ AutoCookConfigWindow::AutoCookConfigWindow(QWidget *parent, Cook cook) : | @@ -66,7 +66,10 @@ AutoCookConfigWindow::AutoCookConfigWindow(QWidget *parent, Cook cook) : | ||
| 66 | }); | 66 | }); |
| 67 | 67 | ||
| 68 | foreach (Slider *s, findChildren<Slider *>()) | 68 | foreach (Slider *s, findChildren<Slider *>()) |
| 69 | + { | ||
| 70 | + connect(s, SIGNAL(sliderPressed()), SLOT(updateView())); | ||
| 69 | connect(s, SIGNAL(sliderMoved(int)), SLOT(updateConfig())); | 71 | connect(s, SIGNAL(sliderMoved(int)), SLOT(updateConfig())); |
| 72 | + } | ||
| 70 | 73 | ||
| 71 | setupUi(); | 74 | setupUi(); |
| 72 | 75 | ||
| @@ -226,12 +229,19 @@ void AutoCookConfigWindow::setupUi() | @@ -226,12 +229,19 @@ void AutoCookConfigWindow::setupUi() | ||
| 226 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); | 229 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); |
| 227 | ui->selectCookButton->setText(cook.name); | 230 | ui->selectCookButton->setText(cook.name); |
| 228 | 231 | ||
| 232 | + QString styleSheet("\ | ||
| 233 | +QPushButton { image: url(%1); }\ | ||
| 234 | +QPushButton:pressed,\ | ||
| 235 | +QPushButton:focus { image: url(%2); }\ | ||
| 236 | +QPushButton:checked { image: url(%3); }"); | ||
| 237 | + | ||
| 229 | for (int idx = 0; idx < 5; idx++) | 238 | for (int idx = 0; idx < 5; idx++) |
| 230 | { | 239 | { |
| 240 | + ConfigWidget cw = configWidgets.at(idx); | ||
| 241 | + | ||
| 231 | CookConfig config = cook.configs[idx]; | 242 | CookConfig config = cook.configs[idx]; |
| 232 | if (config.type == Define::ConfigNotUsed) | 243 | if (config.type == Define::ConfigNotUsed) |
| 233 | { | 244 | { |
| 234 | - ConfigWidget cw = configWidgets.at(idx); | ||
| 235 | cw.button->hide(); | 245 | cw.button->hide(); |
| 236 | cw.minimum->hide(); | 246 | cw.minimum->hide(); |
| 237 | cw.maximum->hide(); | 247 | cw.maximum->hide(); |
| @@ -240,19 +250,16 @@ void AutoCookConfigWindow::setupUi() | @@ -240,19 +250,16 @@ void AutoCookConfigWindow::setupUi() | ||
| 240 | } | 250 | } |
| 241 | else | 251 | else |
| 242 | { | 252 | { |
| 243 | - ConfigWidget cw = configWidgets.at(idx); | ||
| 244 | cw.button->show(); | 253 | cw.button->show(); |
| 245 | cw.minimum->show(); | 254 | cw.minimum->show(); |
| 246 | cw.maximum->show(); | 255 | cw.maximum->show(); |
| 247 | cw.current->show(); | 256 | cw.current->show(); |
| 248 | cw.slider->show(); | 257 | cw.slider->show(); |
| 249 | 258 | ||
| 250 | - cw.button->setStyleSheet( | ||
| 251 | - "QPushButton { image: url(" | ||
| 252 | - + Define::icon(config.type) | ||
| 253 | - + ") } QPushButton:pressed, QPushButton:focus { image: url(" | ||
| 254 | - + Define::iconOverlay(config.type) | ||
| 255 | - + ") }"); | 259 | + cw.button->setStyleSheet(styleSheet |
| 260 | + .arg(Define::icon(config.type)) | ||
| 261 | + .arg(Define::iconOverlay(config.type)) | ||
| 262 | + .arg(Define::iconActiveted(config.type))); | ||
| 256 | 263 | ||
| 257 | cw.minimum->setText(Define::minimum(config.type)); | 264 | cw.minimum->setText(Define::minimum(config.type)); |
| 258 | cw.maximum->setText(Define::maximum(config.type)); | 265 | cw.maximum->setText(Define::maximum(config.type)); |
| @@ -311,6 +318,13 @@ void AutoCookConfigWindow::updateView() | @@ -311,6 +318,13 @@ void AutoCookConfigWindow::updateView() | ||
| 311 | break; | 318 | break; |
| 312 | } | 319 | } |
| 313 | } | 320 | } |
| 321 | + | ||
| 322 | + QWidget *focused = focusWidget(); | ||
| 323 | + ui->configButton_1->setChecked(focused == ui->configSlider_1); | ||
| 324 | + ui->configButton_2->setChecked(focused == ui->configSlider_2); | ||
| 325 | + ui->configButton_3->setChecked(focused == ui->configSlider_3); | ||
| 326 | + ui->configButton_4->setChecked(focused == ui->configSlider_4); | ||
| 327 | + ui->configButton_5->setChecked(focused == ui->configSlider_5); | ||
| 314 | } | 328 | } |
| 315 | 329 | ||
| 316 | void AutoCookConfigWindow::updateConfig() | 330 | void AutoCookConfigWindow::updateConfig() |
| @@ -391,26 +405,31 @@ void AutoCookConfigWindow::on_washButton_clicked() | @@ -391,26 +405,31 @@ void AutoCookConfigWindow::on_washButton_clicked() | ||
| 391 | void AutoCookConfigWindow::on_configButton_1_clicked() | 405 | void AutoCookConfigWindow::on_configButton_1_clicked() |
| 392 | { | 406 | { |
| 393 | ui->configSlider_1->setFocus(); | 407 | ui->configSlider_1->setFocus(); |
| 408 | + updateView(); | ||
| 394 | } | 409 | } |
| 395 | 410 | ||
| 396 | void AutoCookConfigWindow::on_configButton_2_clicked() | 411 | void AutoCookConfigWindow::on_configButton_2_clicked() |
| 397 | { | 412 | { |
| 398 | ui->configSlider_2->setFocus(); | 413 | ui->configSlider_2->setFocus(); |
| 414 | + updateView(); | ||
| 399 | } | 415 | } |
| 400 | 416 | ||
| 401 | void AutoCookConfigWindow::on_configButton_3_clicked() | 417 | void AutoCookConfigWindow::on_configButton_3_clicked() |
| 402 | { | 418 | { |
| 403 | ui->configSlider_3->setFocus(); | 419 | ui->configSlider_3->setFocus(); |
| 420 | + updateView(); | ||
| 404 | } | 421 | } |
| 405 | 422 | ||
| 406 | void AutoCookConfigWindow::on_configButton_4_clicked() | 423 | void AutoCookConfigWindow::on_configButton_4_clicked() |
| 407 | { | 424 | { |
| 408 | ui->configSlider_4->setFocus(); | 425 | ui->configSlider_4->setFocus(); |
| 426 | + updateView(); | ||
| 409 | } | 427 | } |
| 410 | 428 | ||
| 411 | void AutoCookConfigWindow::on_configButton_5_clicked() | 429 | void AutoCookConfigWindow::on_configButton_5_clicked() |
| 412 | { | 430 | { |
| 413 | ui->configSlider_5->setFocus(); | 431 | ui->configSlider_5->setFocus(); |
| 432 | + updateView(); | ||
| 414 | } | 433 | } |
| 415 | 434 | ||
| 416 | void AutoCookConfigWindow::on_selectCookButton_clicked() | 435 | void AutoCookConfigWindow::on_selectCookButton_clicked() |
app/gui/oven_control/autocookconfigwindow.ui
| @@ -689,6 +689,9 @@ border-image: url(:/images/button/152_ov.png); | @@ -689,6 +689,9 @@ border-image: url(:/images/button/152_ov.png); | ||
| 689 | <property name="text"> | 689 | <property name="text"> |
| 690 | <string/> | 690 | <string/> |
| 691 | </property> | 691 | </property> |
| 692 | + <property name="checkable"> | ||
| 693 | + <bool>true</bool> | ||
| 694 | + </property> | ||
| 692 | <property name="style" stdset="0"> | 695 | <property name="style" stdset="0"> |
| 693 | <string notr="true">icon</string> | 696 | <string notr="true">icon</string> |
| 694 | </property> | 697 | </property> |
| @@ -705,6 +708,9 @@ border-image: url(:/images/button/152_ov.png); | @@ -705,6 +708,9 @@ border-image: url(:/images/button/152_ov.png); | ||
| 705 | <property name="text"> | 708 | <property name="text"> |
| 706 | <string/> | 709 | <string/> |
| 707 | </property> | 710 | </property> |
| 711 | + <property name="checkable"> | ||
| 712 | + <bool>true</bool> | ||
| 713 | + </property> | ||
| 708 | <property name="style" stdset="0"> | 714 | <property name="style" stdset="0"> |
| 709 | <string notr="true">icon</string> | 715 | <string notr="true">icon</string> |
| 710 | </property> | 716 | </property> |
| @@ -971,6 +977,9 @@ border-image: url(:/images/button/152_ov.png); | @@ -971,6 +977,9 @@ border-image: url(:/images/button/152_ov.png); | ||
| 971 | <property name="text"> | 977 | <property name="text"> |
| 972 | <string/> | 978 | <string/> |
| 973 | </property> | 979 | </property> |
| 980 | + <property name="checkable"> | ||
| 981 | + <bool>true</bool> | ||
| 982 | + </property> | ||
| 974 | <property name="style" stdset="0"> | 983 | <property name="style" stdset="0"> |
| 975 | <string notr="true">icon</string> | 984 | <string notr="true">icon</string> |
| 976 | </property> | 985 | </property> |
| @@ -1258,6 +1267,9 @@ border-image: url(:/images/button/152_ov.png); | @@ -1258,6 +1267,9 @@ border-image: url(:/images/button/152_ov.png); | ||
| 1258 | <property name="text"> | 1267 | <property name="text"> |
| 1259 | <string/> | 1268 | <string/> |
| 1260 | </property> | 1269 | </property> |
| 1270 | + <property name="checkable"> | ||
| 1271 | + <bool>true</bool> | ||
| 1272 | + </property> | ||
| 1261 | <property name="style" stdset="0"> | 1273 | <property name="style" stdset="0"> |
| 1262 | <string notr="true">icon</string> | 1274 | <string notr="true">icon</string> |
| 1263 | </property> | 1275 | </property> |
| @@ -1338,6 +1350,9 @@ border-image: url(:/images/button/152_ov.png); | @@ -1338,6 +1350,9 @@ border-image: url(:/images/button/152_ov.png); | ||
| 1338 | <property name="text"> | 1350 | <property name="text"> |
| 1339 | <string/> | 1351 | <string/> |
| 1340 | </property> | 1352 | </property> |
| 1353 | + <property name="checkable"> | ||
| 1354 | + <bool>true</bool> | ||
| 1355 | + </property> | ||
| 1341 | <property name="style" stdset="0"> | 1356 | <property name="style" stdset="0"> |
| 1342 | <string notr="true">icon</string> | 1357 | <string notr="true">icon</string> |
| 1343 | </property> | 1358 | </property> |
app/gui/oven_control/autocooksettingwidget.cpp
| @@ -80,6 +80,12 @@ void AutoCookSettingWidget::setupUi(Cook cook) | @@ -80,6 +80,12 @@ void AutoCookSettingWidget::setupUi(Cook cook) | ||
| 80 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); | 80 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); |
| 81 | ui->selectCookButton->setText(cook.name); | 81 | ui->selectCookButton->setText(cook.name); |
| 82 | 82 | ||
| 83 | + QString styleSheet("\ | ||
| 84 | +QPushButton { image: url(%1); }\ | ||
| 85 | +QPushButton:pressed,\ | ||
| 86 | +QPushButton:focus { image: url(%2); }\ | ||
| 87 | +QPushButton:checked { image: url(%3); }"); | ||
| 88 | + | ||
| 83 | for (int idx = 0; idx < 5; idx++) | 89 | for (int idx = 0; idx < 5; idx++) |
| 84 | { | 90 | { |
| 85 | ConfigWidget cw = configWidgets.at(idx); | 91 | ConfigWidget cw = configWidgets.at(idx); |
| @@ -95,10 +101,10 @@ void AutoCookSettingWidget::setupUi(Cook cook) | @@ -95,10 +101,10 @@ void AutoCookSettingWidget::setupUi(Cook cook) | ||
| 95 | } | 101 | } |
| 96 | else | 102 | else |
| 97 | { | 103 | { |
| 98 | - cw.button->setStyleSheet( | ||
| 99 | - QString("QPushButton { image: url(%1); } QPushButton:pressed { image: url(%2); }") | ||
| 100 | - .arg(Define::icon(config.type)) | ||
| 101 | - .arg(Define::iconOverlay(config.type))); | 104 | + cw.button->setStyleSheet(styleSheet |
| 105 | + .arg(Define::icon(config.type)) | ||
| 106 | + .arg(Define::iconOverlay(config.type)) | ||
| 107 | + .arg(Define::iconActiveted(config.type))); | ||
| 102 | 108 | ||
| 103 | cw.minimum->setText(Define::minimum(config.type)); | 109 | cw.minimum->setText(Define::minimum(config.type)); |
| 104 | cw.maximum->setText(Define::maximum(config.type)); | 110 | cw.maximum->setText(Define::maximum(config.type)); |
app/gui/oven_control/burnertestwindow.ui
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | <property name="geometry"> | 52 | <property name="geometry"> |
| 53 | <rect> | 53 | <rect> |
| 54 | <x>780</x> | 54 | <x>780</x> |
| 55 | - <y>250</y> | 55 | + <y>230</y> |
| 56 | <width>101</width> | 56 | <width>101</width> |
| 57 | <height>90</height> | 57 | <height>90</height> |
| 58 | </rect> | 58 | </rect> |
| @@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
| 62 | <property name="geometry"> | 62 | <property name="geometry"> |
| 63 | <rect> | 63 | <rect> |
| 64 | <x>780</x> | 64 | <x>780</x> |
| 65 | - <y>180</y> | 65 | + <y>160</y> |
| 66 | <width>108</width> | 66 | <width>108</width> |
| 67 | <height>67</height> | 67 | <height>67</height> |
| 68 | </rect> | 68 | </rect> |
app/gui/oven_control/define.cpp
| @@ -248,6 +248,41 @@ QString Define::iconOverlay(Define::CookConfigType type) | @@ -248,6 +248,41 @@ QString Define::iconOverlay(Define::CookConfigType type) | ||
| 248 | } | 248 | } |
| 249 | } | 249 | } |
| 250 | 250 | ||
| 251 | +QString Define::iconActiveted(Define::CookConfigType type) | ||
| 252 | +{ | ||
| 253 | + switch (type) | ||
| 254 | + { | ||
| 255 | + case Brightness: | ||
| 256 | + return ":/images/slider_icon/gau_icon_01_ov.png"; | ||
| 257 | + case BurnDegree: | ||
| 258 | + return ":/images/slider_icon/gau_icon_02_ov.png"; | ||
| 259 | + case SoftBoilDegree: | ||
| 260 | + return ":/images/slider_icon/gau_icon_03_ov.png"; | ||
| 261 | + case PieceSize: | ||
| 262 | + return ":/images/slider_icon/gau_icon_04_ov.png"; | ||
| 263 | + case CrispyDegree: | ||
| 264 | + return ":/images/slider_icon/gau_icon_05_ov.png"; | ||
| 265 | + case MoistDegree: | ||
| 266 | + return ":/images/slider_icon/Gau_icon_06_ov.png"; | ||
| 267 | + case Thickness: | ||
| 268 | + return ":/images/slider_icon/Gau_icon_07_ov.png"; | ||
| 269 | + case Humidity: | ||
| 270 | + return ":/images/slider_icon/humidity_ov.png"; | ||
| 271 | + case Temperature: | ||
| 272 | + return ":/images/slider_icon/temp_ov.png"; | ||
| 273 | + case Time: | ||
| 274 | + return ":/images/slider_icon/time_ov.png"; | ||
| 275 | + case CoreTemperature: | ||
| 276 | + return ":/images/slider_icon/core_temp_ov.png"; | ||
| 277 | + case Thermometer: | ||
| 278 | + return ":/images/slider_icon/thermometer_ov.png"; | ||
| 279 | + case InvalidConfig: | ||
| 280 | + case ConfigNotUsed: | ||
| 281 | + default: | ||
| 282 | + return ""; | ||
| 283 | + } | ||
| 284 | +} | ||
| 285 | + | ||
| 251 | QString Define::minimum(Define::CookConfigType type) | 286 | QString Define::minimum(Define::CookConfigType type) |
| 252 | { | 287 | { |
| 253 | switch (type) | 288 | switch (type) |
app/gui/oven_control/define.h
| @@ -40,6 +40,7 @@ namespace Define | @@ -40,6 +40,7 @@ namespace Define | ||
| 40 | CookConfigType identifyConfigType(QString type); | 40 | CookConfigType identifyConfigType(QString type); |
| 41 | QString icon(CookConfigType type); | 41 | QString icon(CookConfigType type); |
| 42 | QString iconOverlay(CookConfigType type); | 42 | QString iconOverlay(CookConfigType type); |
| 43 | + QString iconActiveted(CookConfigType type); | ||
| 43 | QString minimum(CookConfigType type); | 44 | QString minimum(CookConfigType type); |
| 44 | QString maximum(CookConfigType type); | 45 | QString maximum(CookConfigType type); |
| 45 | 46 |
app/gui/oven_control/manualcookwindow.cpp
| @@ -375,13 +375,7 @@ void ManualCookWindow::updateView() | @@ -375,13 +375,7 @@ void ManualCookWindow::updateView() | ||
| 375 | if (cooking != lastViewCooking) | 375 | if (cooking != lastViewCooking) |
| 376 | { | 376 | { |
| 377 | lastViewCooking = cooking; | 377 | lastViewCooking = cooking; |
| 378 | - | ||
| 379 | - if (cooking) | ||
| 380 | - ui->runStopButton->setStyleSheet( | ||
| 381 | - "border-image: url(:/images/manual_button/stop.png)"); | ||
| 382 | - else | ||
| 383 | - ui->runStopButton->setStyleSheet( | ||
| 384 | - "border-image: url(:/images/manual_button/run.png)"); | 378 | + ui->runStopButton->setChecked(cooking); |
| 385 | } | 379 | } |
| 386 | 380 | ||
| 387 | if (showFrontButtons) | 381 | if (showFrontButtons) |
| @@ -460,6 +454,8 @@ void ManualCookWindow::updateView() | @@ -460,6 +454,8 @@ void ManualCookWindow::updateView() | ||
| 460 | } | 454 | } |
| 461 | } | 455 | } |
| 462 | 456 | ||
| 457 | + ui->repeatButton->setChecked(repeat); | ||
| 458 | + | ||
| 463 | if (oven->paused() && !oven->cooldown() && oven->door()) | 459 | if (oven->paused() && !oven->cooldown() && oven->door()) |
| 464 | ui->upperStack->setCurrentIndex(1); | 460 | ui->upperStack->setCurrentIndex(1); |
| 465 | else | 461 | else |
| @@ -501,16 +497,14 @@ void ManualCookWindow::onOvenUpdated(Oven *oven) | @@ -501,16 +497,14 @@ void ManualCookWindow::onOvenUpdated(Oven *oven) | ||
| 501 | { | 497 | { |
| 502 | repeat = false; | 498 | repeat = false; |
| 503 | 499 | ||
| 504 | - ui->repeatButton->setStyleSheet("\ | ||
| 505 | -QPushButton { background-image: url(:/images/manual_button/repeat.png); }\ | ||
| 506 | -QPushButton:pressed { background-image: url(:/images/manual_button/repeat_ov.png); }"); | ||
| 507 | - | ||
| 508 | oven->setMode(repeatSetting.mode); | 500 | oven->setMode(repeatSetting.mode); |
| 509 | oven->setHumidity(repeatSetting.humidity); | 501 | oven->setHumidity(repeatSetting.humidity); |
| 510 | oven->setTemp(repeatSetting.temp); | 502 | oven->setTemp(repeatSetting.temp); |
| 511 | oven->setTime(repeatSetting.time); | 503 | oven->setTime(repeatSetting.time); |
| 512 | oven->setInterTempEnabled(repeatSetting.coreTempEnabled); | 504 | oven->setInterTempEnabled(repeatSetting.coreTempEnabled); |
| 513 | oven->setInterTemp(repeatSetting.coreTemp); | 505 | oven->setInterTemp(repeatSetting.coreTemp); |
| 506 | + | ||
| 507 | + updateView(); | ||
| 514 | } | 508 | } |
| 515 | else if (lastCheckedCooking && !oven->cooking()){ | 509 | else if (lastCheckedCooking && !oven->cooking()){ |
| 516 | if ((oven->interTempEnabled() && oven->currentInterTemp() >= oven->interTemp()) | 510 | if ((oven->interTempEnabled() && oven->currentInterTemp() >= oven->interTemp()) |
| @@ -951,16 +945,13 @@ void ManualCookWindow::on_repeatButton_clicked() | @@ -951,16 +945,13 @@ void ManualCookWindow::on_repeatButton_clicked() | ||
| 951 | if (repeat) | 945 | if (repeat) |
| 952 | { | 946 | { |
| 953 | repeat = false; | 947 | repeat = false; |
| 954 | - ui->repeatButton->setStyleSheet("\ | ||
| 955 | -QPushButton { background-image: url(:/images/manual_button/repeat.png); }\ | ||
| 956 | -QPushButton:pressed { background-image: url(:/images/manual_button/repeat_ov.png); }"); | 948 | + updateView(); |
| 957 | } | 949 | } |
| 958 | else | 950 | else |
| 959 | { | 951 | { |
| 960 | repeat = true; | 952 | repeat = true; |
| 961 | - ui->repeatButton->setStyleSheet("\ | ||
| 962 | -QPushButton { background-image: url(:/images/manual_button/repeat_ov.png); }\ | ||
| 963 | -QPushButton:pressed { background-image: url(:/images/manual_button/repeat.png); }"); | 953 | + updateView(); |
| 954 | + | ||
| 964 | repeatSetting.mode = oven->mode(); | 955 | repeatSetting.mode = oven->mode(); |
| 965 | repeatSetting.humidity = oven->humidity(); | 956 | repeatSetting.humidity = oven->humidity(); |
| 966 | repeatSetting.temp= oven->temp(); | 957 | repeatSetting.temp= oven->temp(); |
app/gui/oven_control/manualcookwindow.ui
| @@ -523,7 +523,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/h | @@ -523,7 +523,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/h | ||
| 523 | </property> | 523 | </property> |
| 524 | <property name="styleSheet"> | 524 | <property name="styleSheet"> |
| 525 | <string notr="true">QPushButton { image: url(:/images/slider_icon/temp.png); } | 525 | <string notr="true">QPushButton { image: url(:/images/slider_icon/temp.png); } |
| 526 | -QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/images/slider_icon/temp_ov.png); }</string> | 526 | +QPushButton:pressed, |
| 527 | +QPushButton:focus { image: url(:/images/slider_icon/temp_ov.png); } | ||
| 528 | +QPushButton:checked { image: url(:/images/slider_icon/temp_ov.png); }</string> | ||
| 527 | </property> | 529 | </property> |
| 528 | <property name="checkable"> | 530 | <property name="checkable"> |
| 529 | <bool>true</bool> | 531 | <bool>true</bool> |
| @@ -733,7 +735,9 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/image | @@ -733,7 +735,9 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/image | ||
| 733 | </property> | 735 | </property> |
| 734 | <property name="styleSheet"> | 736 | <property name="styleSheet"> |
| 735 | <string notr="true">QPushButton { image: url(:/images/slider_icon/humidity.png); } | 737 | <string notr="true">QPushButton { image: url(:/images/slider_icon/humidity.png); } |
| 736 | -QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/images/slider_icon/humidity_ov.png); }</string> | 738 | +QPushButton:pressed, |
| 739 | +QPushButton:focus { image: url(:/images/slider_icon/humidity_ov.png); } | ||
| 740 | +QPushButton:checked { image: url(:/images/slider_icon/humidity_ov.png); }</string> | ||
| 737 | </property> | 741 | </property> |
| 738 | <property name="checkable"> | 742 | <property name="checkable"> |
| 739 | <bool>true</bool> | 743 | <bool>true</bool> |
| @@ -774,7 +778,9 @@ QPushButton:pressed, QPushButton:focus { image: url(:/images/slider_icon/core_te | @@ -774,7 +778,9 @@ QPushButton:pressed, QPushButton:focus { image: url(:/images/slider_icon/core_te | ||
| 774 | </property> | 778 | </property> |
| 775 | <property name="styleSheet"> | 779 | <property name="styleSheet"> |
| 776 | <string notr="true">QPushButton { image: url(:/images/slider_icon/time.png); } | 780 | <string notr="true">QPushButton { image: url(:/images/slider_icon/time.png); } |
| 777 | -QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/images/slider_icon/time_ov.png); }</string> | 781 | +QPushButton:pressed, |
| 782 | +QPushButton:focus { image: url(:/images/slider_icon/time_ov.png); } | ||
| 783 | +QPushButton:checked { image: url(:/images/slider_icon/time_ov.png); }</string> | ||
| 778 | </property> | 784 | </property> |
| 779 | <property name="checkable"> | 785 | <property name="checkable"> |
| 780 | <bool>true</bool> | 786 | <bool>true</bool> |
| @@ -919,11 +925,23 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/image | @@ -919,11 +925,23 @@ QPushButton:pressed, QPushButton:checked, QPushButton:focus { image: url(:/image | ||
| 919 | </rect> | 925 | </rect> |
| 920 | </property> | 926 | </property> |
| 921 | <property name="styleSheet"> | 927 | <property name="styleSheet"> |
| 922 | - <string notr="true">QPushButton { border-image: url(:/images/manual_button/run.png); }</string> | 928 | + <string notr="true">QPushButton |
| 929 | +{ border-image: url(:/images/manual_button/run.png); } | ||
| 930 | +QPushButton:pressed, | ||
| 931 | +QPushButton:focus | ||
| 932 | +{ border-image: url(:/images/manual_button/run.png); } | ||
| 933 | +QPushButton:checked | ||
| 934 | +{ border-image: url(:/images/manual_button/stop.png); } | ||
| 935 | +QPushButton:checked:pressed, | ||
| 936 | +QPushButton:checked:focus | ||
| 937 | +{ border-image: url(:/images/manual_button/stop.png); }</string> | ||
| 923 | </property> | 938 | </property> |
| 924 | <property name="text"> | 939 | <property name="text"> |
| 925 | <string/> | 940 | <string/> |
| 926 | </property> | 941 | </property> |
| 942 | + <property name="checkable"> | ||
| 943 | + <bool>true</bool> | ||
| 944 | + </property> | ||
| 927 | </widget> | 945 | </widget> |
| 928 | <widget class="Slider" name="tempSlider" native="true"> | 946 | <widget class="Slider" name="tempSlider" native="true"> |
| 929 | <property name="geometry"> | 947 | <property name="geometry"> |
| @@ -1100,8 +1118,16 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_b | @@ -1100,8 +1118,16 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_b | ||
| 1100 | </rect> | 1118 | </rect> |
| 1101 | </property> | 1119 | </property> |
| 1102 | <property name="styleSheet"> | 1120 | <property name="styleSheet"> |
| 1103 | - <string notr="true">QPushButton, QPushButton:checked:pressed { background-image: url(:/images/manual_button/damper_close.png); } | ||
| 1104 | -QPushButton:checked, QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_button/damper_open.png); }</string> | 1121 | + <string notr="true">QPushButton |
| 1122 | +{ background-image: url(:/images/manual_button/damper_close.png); } | ||
| 1123 | +QPushButton:pressed, | ||
| 1124 | +QPushButton:focus | ||
| 1125 | +{ background-image: url(:/images/manual_button/damper_close.png); } | ||
| 1126 | +QPushButton:checked | ||
| 1127 | +{ background-image: url(:/images/manual_button/damper_open.png); } | ||
| 1128 | +QPushButton:checked:pressed, | ||
| 1129 | +QPushButton:checked:focus | ||
| 1130 | +{ background-image: url(:/images/manual_button/damper_open.png); }</string> | ||
| 1105 | </property> | 1131 | </property> |
| 1106 | <property name="checkable"> | 1132 | <property name="checkable"> |
| 1107 | <bool>true</bool> | 1133 | <bool>true</bool> |
| @@ -1120,8 +1146,16 @@ QPushButton:checked, QPushButton:pressed, QPushButton:focus { background-image: | @@ -1120,8 +1146,16 @@ QPushButton:checked, QPushButton:pressed, QPushButton:focus { background-image: | ||
| 1120 | </rect> | 1146 | </rect> |
| 1121 | </property> | 1147 | </property> |
| 1122 | <property name="styleSheet"> | 1148 | <property name="styleSheet"> |
| 1123 | - <string notr="true">QPushButton { background-image: url(:/images/manual_button/repeat.png); } | ||
| 1124 | -QPushButton:pressed, QPushButton:checked, QPushButton:focus { background-image: url(:/images/manual_button/repeat_ov.png); }</string> | 1149 | + <string notr="true">QPushButton |
| 1150 | +{ background-image: url(:/images/manual_button/repeat.png); } | ||
| 1151 | +QPushButton:pressed, | ||
| 1152 | +QPushButton:focus | ||
| 1153 | +{ background-image: url(:/images/manual_button/repeat_ov.png); } | ||
| 1154 | +QPushButton:checked | ||
| 1155 | +{ background-image: url(:/images/manual_button/repeat_ov.png); } | ||
| 1156 | +QPushButton:checked:pressed, | ||
| 1157 | +QPushButton:checked:focus | ||
| 1158 | +{ background-image: url(:/images/manual_button/repeat_ov.png); }</string> | ||
| 1125 | </property> | 1159 | </property> |
| 1126 | <property name="checkable"> | 1160 | <property name="checkable"> |
| 1127 | <bool>true</bool> | 1161 | <bool>true</bool> |
| @@ -1157,8 +1191,16 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_b | @@ -1157,8 +1191,16 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_b | ||
| 1157 | </rect> | 1191 | </rect> |
| 1158 | </property> | 1192 | </property> |
| 1159 | <property name="styleSheet"> | 1193 | <property name="styleSheet"> |
| 1160 | - <string notr="true">QPushButton, QPushButton:checked:pressed { background-image: url(:/images/manual_button/side_nozzle_close.png); } | ||
| 1161 | -QPushButton:checked, QPushButton:pressed, QPushButton:focus { background-image: url(:/images/manual_button/side_nozzle_open.png); }</string> | 1194 | + <string notr="true">QPushButton |
| 1195 | +{ background-image: url(:/images/manual_button/side_nozzle_close.png); } | ||
| 1196 | +QPushButton:pressed, | ||
| 1197 | +QPushButton:focus | ||
| 1198 | +{ background-image: url(:/images/manual_button/side_nozzle_close.png); } | ||
| 1199 | +QPushButton:checked | ||
| 1200 | +{ background-image: url(:/images/manual_button/side_nozzle_open.png); } | ||
| 1201 | +QPushButton:checked:pressed, | ||
| 1202 | +QPushButton:checked:focus | ||
| 1203 | +{ background-image: url(:/images/manual_button/side_nozzle_open.png); }</string> | ||
| 1162 | </property> | 1204 | </property> |
| 1163 | <property name="checkable"> | 1205 | <property name="checkable"> |
| 1164 | <bool>true</bool> | 1206 | <bool>true</bool> |
app/gui/oven_control/operationtimeheat.ui
| @@ -52,6 +52,26 @@ | @@ -52,6 +52,26 @@ | ||
| 52 | </rect> | 52 | </rect> |
| 53 | </property> | 53 | </property> |
| 54 | </widget> | 54 | </widget> |
| 55 | + <widget class="DemoIcon" name="label_2"> | ||
| 56 | + <property name="geometry"> | ||
| 57 | + <rect> | ||
| 58 | + <x>780</x> | ||
| 59 | + <y>230</y> | ||
| 60 | + <width>101</width> | ||
| 61 | + <height>90</height> | ||
| 62 | + </rect> | ||
| 63 | + </property> | ||
| 64 | + </widget> | ||
| 65 | + <widget class="HalfEnergyIcon" name="label_3"> | ||
| 66 | + <property name="geometry"> | ||
| 67 | + <rect> | ||
| 68 | + <x>780</x> | ||
| 69 | + <y>160</y> | ||
| 70 | + <width>108</width> | ||
| 71 | + <height>67</height> | ||
| 72 | + </rect> | ||
| 73 | + </property> | ||
| 74 | + </widget> | ||
| 55 | </widget> | 75 | </widget> |
| 56 | <widget class="QWidget" name="page_2"/> | 76 | <widget class="QWidget" name="page_2"/> |
| 57 | </widget> | 77 | </widget> |
| @@ -364,6 +384,16 @@ QPushButton { text-align: center;} | @@ -364,6 +384,16 @@ QPushButton { text-align: center;} | ||
| 364 | <extends>QLabel</extends> | 384 | <extends>QLabel</extends> |
| 365 | <header>washwarnicon.h</header> | 385 | <header>washwarnicon.h</header> |
| 366 | </customwidget> | 386 | </customwidget> |
| 387 | + <customwidget> | ||
| 388 | + <class>DemoIcon</class> | ||
| 389 | + <extends>QLabel</extends> | ||
| 390 | + <header>demoicon.h</header> | ||
| 391 | + </customwidget> | ||
| 392 | + <customwidget> | ||
| 393 | + <class>HalfEnergyIcon</class> | ||
| 394 | + <extends>QLabel</extends> | ||
| 395 | + <header>halfenergyicon.h</header> | ||
| 396 | + </customwidget> | ||
| 367 | </customwidgets> | 397 | </customwidgets> |
| 368 | <resources/> | 398 | <resources/> |
| 369 | <connections/> | 399 | <connections/> |
app/gui/oven_control/programmingautoconfigwindow.cpp
| @@ -62,6 +62,9 @@ ProgrammingAutoConfigWindow::ProgrammingAutoConfigWindow(QWidget *parent, Cook c | @@ -62,6 +62,9 @@ ProgrammingAutoConfigWindow::ProgrammingAutoConfigWindow(QWidget *parent, Cook c | ||
| 62 | 62 | ||
| 63 | setupUi(); | 63 | setupUi(); |
| 64 | 64 | ||
| 65 | + foreach (Slider *s, findChildren<Slider *>()) | ||
| 66 | + connect(s, SIGNAL(sliderPressed()), SLOT(updateView())); | ||
| 67 | + | ||
| 65 | afterThreeSecsTimer.setSingleShot(true); | 68 | afterThreeSecsTimer.setSingleShot(true); |
| 66 | afterThreeSecsTimer.setInterval(3000); | 69 | afterThreeSecsTimer.setInterval(3000); |
| 67 | connect(&afterThreeSecsTimer, SIGNAL(timeout()), SLOT(afterThreeSecs())); | 70 | connect(&afterThreeSecsTimer, SIGNAL(timeout()), SLOT(afterThreeSecs())); |
| @@ -180,12 +183,19 @@ void ProgrammingAutoConfigWindow::setupUi() | @@ -180,12 +183,19 @@ void ProgrammingAutoConfigWindow::setupUi() | ||
| 180 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); | 183 | ui->cookTypeIcon->setPixmap(Define::icon(cook.type)); |
| 181 | ui->selectCookButton->setText(cook.name); | 184 | ui->selectCookButton->setText(cook.name); |
| 182 | 185 | ||
| 186 | + QString styleSheet("\ | ||
| 187 | +QPushButton { image: url(%1); }\ | ||
| 188 | +QPushButton:pressed,\ | ||
| 189 | +QPushButton:focus { image: url(%2); }\ | ||
| 190 | +QPushButton:checked { image: url(%3); }"); | ||
| 191 | + | ||
| 183 | for (int idx = 0; idx < 5; idx++) | 192 | for (int idx = 0; idx < 5; idx++) |
| 184 | { | 193 | { |
| 194 | + ConfigWidget cw = configWidgets.at(idx); | ||
| 195 | + | ||
| 185 | CookConfig config = cook.configs[idx]; | 196 | CookConfig config = cook.configs[idx]; |
| 186 | if (config.type == Define::ConfigNotUsed) | 197 | if (config.type == Define::ConfigNotUsed) |
| 187 | { | 198 | { |
| 188 | - ConfigWidget cw = configWidgets.at(idx); | ||
| 189 | cw.button->hide(); | 199 | cw.button->hide(); |
| 190 | cw.minimum->hide(); | 200 | cw.minimum->hide(); |
| 191 | cw.maximum->hide(); | 201 | cw.maximum->hide(); |
| @@ -194,13 +204,10 @@ void ProgrammingAutoConfigWindow::setupUi() | @@ -194,13 +204,10 @@ void ProgrammingAutoConfigWindow::setupUi() | ||
| 194 | } | 204 | } |
| 195 | else | 205 | else |
| 196 | { | 206 | { |
| 197 | - ConfigWidget cw = configWidgets.at(idx); | ||
| 198 | - cw.button->setStyleSheet( | ||
| 199 | - "QPushButton { image: url(" | ||
| 200 | - + Define::icon(config.type) | ||
| 201 | - + ") } QPushButton::pressed, QPushButton:focus { image: url(" | ||
| 202 | - + Define::iconOverlay(config.type) | ||
| 203 | - + ") }"); | 207 | + cw.button->setStyleSheet(styleSheet |
| 208 | + .arg(Define::icon(config.type)) | ||
| 209 | + .arg(Define::iconOverlay(config.type)) | ||
| 210 | + .arg(Define::iconActiveted(config.type))); | ||
| 204 | 211 | ||
| 205 | cw.minimum->setText(Define::minimum(config.type)); | 212 | cw.minimum->setText(Define::minimum(config.type)); |
| 206 | cw.maximum->setText(Define::maximum(config.type)); | 213 | cw.maximum->setText(Define::maximum(config.type)); |
app/gui/oven_control/programmingautoconfigwindow.ui
| @@ -583,6 +583,9 @@ border-image: url(:/images/button/288_ov.png); | @@ -583,6 +583,9 @@ border-image: url(:/images/button/288_ov.png); | ||
| 583 | <property name="text"> | 583 | <property name="text"> |
| 584 | <string/> | 584 | <string/> |
| 585 | </property> | 585 | </property> |
| 586 | + <property name="checkable"> | ||
| 587 | + <bool>true</bool> | ||
| 588 | + </property> | ||
| 586 | <property name="style" stdset="0"> | 589 | <property name="style" stdset="0"> |
| 587 | <string notr="true">icon</string> | 590 | <string notr="true">icon</string> |
| 588 | </property> | 591 | </property> |
| @@ -661,6 +664,9 @@ border-image: url(:/images/button/288_ov.png); | @@ -661,6 +664,9 @@ border-image: url(:/images/button/288_ov.png); | ||
| 661 | <property name="text"> | 664 | <property name="text"> |
| 662 | <string/> | 665 | <string/> |
| 663 | </property> | 666 | </property> |
| 667 | + <property name="checkable"> | ||
| 668 | + <bool>true</bool> | ||
| 669 | + </property> | ||
| 664 | <property name="style" stdset="0"> | 670 | <property name="style" stdset="0"> |
| 665 | <string notr="true">icon</string> | 671 | <string notr="true">icon</string> |
| 666 | </property> | 672 | </property> |
| @@ -1033,6 +1039,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | @@ -1033,6 +1039,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | ||
| 1033 | <property name="text"> | 1039 | <property name="text"> |
| 1034 | <string/> | 1040 | <string/> |
| 1035 | </property> | 1041 | </property> |
| 1042 | + <property name="checkable"> | ||
| 1043 | + <bool>true</bool> | ||
| 1044 | + </property> | ||
| 1036 | <property name="style" stdset="0"> | 1045 | <property name="style" stdset="0"> |
| 1037 | <string notr="true">icon</string> | 1046 | <string notr="true">icon</string> |
| 1038 | </property> | 1047 | </property> |
| @@ -1173,6 +1182,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | @@ -1173,6 +1182,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | ||
| 1173 | <property name="text"> | 1182 | <property name="text"> |
| 1174 | <string/> | 1183 | <string/> |
| 1175 | </property> | 1184 | </property> |
| 1185 | + <property name="checkable"> | ||
| 1186 | + <bool>true</bool> | ||
| 1187 | + </property> | ||
| 1176 | <property name="style" stdset="0"> | 1188 | <property name="style" stdset="0"> |
| 1177 | <string notr="true">icon</string> | 1189 | <string notr="true">icon</string> |
| 1178 | </property> | 1190 | </property> |
| @@ -1189,6 +1201,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | @@ -1189,6 +1201,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/c | ||
| 1189 | <property name="text"> | 1201 | <property name="text"> |
| 1190 | <string/> | 1202 | <string/> |
| 1191 | </property> | 1203 | </property> |
| 1204 | + <property name="checkable"> | ||
| 1205 | + <bool>true</bool> | ||
| 1206 | + </property> | ||
| 1192 | <property name="style" stdset="0"> | 1207 | <property name="style" stdset="0"> |
| 1193 | <string notr="true">icon</string> | 1208 | <string notr="true">icon</string> |
| 1194 | </property> | 1209 | </property> |