Commit 152857553867cce413be0980273a940e834ac0f8
1 parent
6d5da5fca8
Exists in
master
and in
2 other branches
파일 위치 변경
Showing
6 changed files
with
17 additions
and
64 deletions
Show diff stats
app/app-prime-modbus/include/dirtylevel.cpp
| @@ -1,51 +0,0 @@ | @@ -1,51 +0,0 @@ | ||
| 1 | -#include "dirtylevel.h" | ||
| 2 | - | ||
| 3 | -#include <QDateTime> | ||
| 4 | - | ||
| 5 | -namespace { | ||
| 6 | -QDateTime cookStartTime; | ||
| 7 | -qint64 cookingTime; | ||
| 8 | -int cookingCount; | ||
| 9 | -} | ||
| 10 | - | ||
| 11 | - | ||
| 12 | -void DirtyLevel::cookStart() | ||
| 13 | -{ | ||
| 14 | - cookStartTime = QDateTime.currentDateTime(); | ||
| 15 | - cookingCount++; | ||
| 16 | -} | ||
| 17 | - | ||
| 18 | -void DirtyLevel::cookEnd() | ||
| 19 | -{ | ||
| 20 | - cookingTime += cookStartTime.secsTo(QDateTime.currentDateTime()); | ||
| 21 | -} | ||
| 22 | - | ||
| 23 | -int DirtyLevel::dirty() | ||
| 24 | -{ | ||
| 25 | - if (cookingCount < 1) | ||
| 26 | - return 0; | ||
| 27 | - if (cookingTime < 1 * 3600) | ||
| 28 | - return 1; | ||
| 29 | - if (cookingTime < 3 * 3600) | ||
| 30 | - return 2; | ||
| 31 | - if (cookingTime < 5 * 3600) | ||
| 32 | - return 3; | ||
| 33 | - if (cookingTime < 7 * 3600) | ||
| 34 | - return 4; | ||
| 35 | - return 5; | ||
| 36 | -} | ||
| 37 | - | ||
| 38 | -int DirtyLevel::state() | ||
| 39 | -{ | ||
| 40 | - if (cookingCount < 1) | ||
| 41 | - return 0; | ||
| 42 | - if (cookingCount < 4) | ||
| 43 | - return 1; | ||
| 44 | - if (cookingCount < 7) | ||
| 45 | - return 2; | ||
| 46 | - if (cookingCount < 10) | ||
| 47 | - return 3; | ||
| 48 | - if (cookingCount < 13) | ||
| 49 | - return 4; | ||
| 50 | - return 5; | ||
| 51 | -} |
app/app-prime-modbus/include/dirtylevel.h
app/gui/oven_control/images/not_recognized/config_service/108_wash_icon.png
2.21 KB
app/gui/oven_control/images/symbol/wash.png
2.21 KB
app/gui/oven_control/washwarnicon.cpp
app/gui/oven_control/washwarnicon.h