#include "define.h" Define::ConfigType Define::identifyConfigType(QString type) { if (type == "brightness") return Brightness; else if (type == "cookinglevel") return BurnDegree; else if (type == "boiledlevel") return SoftBoilDegree; else if (type == "size") return PieceSize; else if (type == "crispy1") return CrispyDegree; else if (type == "moisten1") return MoistDegree; else if (type == "thickness") return Thickness; else if (type == "humidity") return Humidity; else if (type == "temperature") return Temperature; else if (type == "cookingtime") return Time; else if (type == "coretemperature") return CoreTemperature; else if (type == "coretemperaturesensor") return Thermometer; else return InvalidConfig; } Define::StepType Define::identifyStepType(QString type) { if (type == "preheat") return Preheat; else if (type == "load") // return Load; else if (type == "therometer") // return PutThermometer; else if (type == "cut") // return Cut; else if (type == "pour") // return Pour; else if (type == "bake") return Bake; else if (type == "dry") return Dry; else if (type == "ferment") return Ferment; else if (type == "steaming") return BlowSteam; else if (type == "cooldown") return CoolDown; else if (type == "steam") return Steam; else if (type == "roasting") return Roast; else if (type == "boil") return Boil; else if (type == "thicken") return Thicken; else if (type == "warmup") return WarmUp; else if (type == "crispy2") return MakeCrispy; else if (type == "finish") return Finish; else if (type == "damp") return Damp; else if (type == "defer") return Defer; else if (type == "grill") return Grill; else if (type == "end") return End; else if (type == "burn") return Burn; else if (type == "fry") return Fry; else if (type == "heatup") return HeatUp; else if (type == "ripen") return Ripen; else if (type == "ripenkeep") return RipenKeep; else if (type == "boilsteadily") return BoilSteadily; else if (type == "cookgratin") return CookGratin; else if (type == "brown") return Brown; else if (type == "simmer") return Simmer; else if (type == "moisten2") return Moisten; else return Invalid; } Define::StepClass Define::classify(Define::StepType type) { switch (type) { case Invalid: return InvalidClass; case Preheat: return PreheatClass; case PutThermometer: case Load: case Cut: case Pour: return DoorClass; case Bake: case Dry: case Ferment: case BlowSteam: case CoolDown: case Steam: case Roast: case Boil: case Thicken: case WarmUp: case MakeCrispy: case Finish: case Damp: case Defer: case Grill: case End: case Burn: case Fry: case HeatUp: case Ripen: case RipenKeep: case BoilSteadily: case CookGratin: case Brown: case Simmer: case Moisten: return CookClass; } return InvalidClass; } Define::Mode Define::identifyMode(QString mode) { if (mode == "combi") return CombiMode; else if (mode == "dry") return DryMode; else if (mode == "steam") return SteamMode; else return InvalidMode; } QString Define::icon(Define::CookType type) { switch (type) { case Poultry: return ":/images/cook_type/poultry_ov.png"; case Meat: return ":/images/cook_type/meat_ov.png"; case Fish: return ":/images/cook_type/fish_ov.png"; case Desert: return ":/images/cook_type/desert_ov.png"; case Vegetable: return ":/images/cook_type/vegetable_ov.png"; case Bread: return ":/images/cook_type/bread_ov.png"; case Etc: return ":/images/cook_type/etc_ov.png"; default: return ""; } } QString Define::icon(Define::ConfigType type) { switch (type) { case Brightness: return ":/images/slider_icon/gau_icon_01.png"; case BurnDegree: return ":/images/slider_icon/gau_icon_02.png"; case SoftBoilDegree: return ":/images/slider_icon/gau_icon_03.png"; case PieceSize: return ":/images/slider_icon/gau_icon_04.png"; case CrispyDegree: return ":/images/slider_icon/gau_icon_05.png"; case MoistDegree: return ":/images/slider_icon/gau_icon_06.png"; case Thickness: return ":/images/slider_icon/gau_icon_07.png"; case Humidity: return ":/images/slider_icon/humidity.png"; case Temperature: return ":/images/slider_icon/temp.png"; case Time: return ":/images/slider_icon/time.png"; case CoreTemperature: return ":/images/slider_icon/core_temp_enabled.png"; case Thermometer: return ":/images/slider_icon/thermometer_enabled.png"; case InvalidConfig: case ConfigNotUsed: default: return ""; } } QString Define::iconOverlay(Define::ConfigType type) { switch (type) { case Brightness: return ":/images/slider_icon/gau_icon_01_ov.png"; case BurnDegree: return ":/images/slider_icon/gau_icon_02_ov.png"; case SoftBoilDegree: return ":/images/slider_icon/gau_icon_03_ov.png"; case PieceSize: return ":/images/slider_icon/gau_icon_04_ov.png"; case CrispyDegree: return ":/images/slider_icon/gau_icon_05_ov.png"; case MoistDegree: return ":/images/slider_icon/gau_icon_06_ov.png"; case Thickness: return ":/images/slider_icon/gau_icon_07_ov.png"; case Humidity: return ":/images/slider_icon/humidity_ov.png"; case Temperature: return ":/images/slider_icon/temp_ov.png"; case Time: return ":/images/slider_icon/time_ov.png"; case CoreTemperature: return ":/images/slider_icon/core_temp_ov.png"; case Thermometer: return ":/images/slider_icon/thermometer_ov.png"; case InvalidConfig: case ConfigNotUsed: default: return ""; } } QString Define::minimum(Define::ConfigType type) { switch (type) { case Brightness: return "연한색"; case BurnDegree: return "중간익힘"; case SoftBoilDegree: return "반숙"; case PieceSize: return "작은조각"; case CrispyDegree: return "연한색"; case MoistDegree: return "촉촉하게"; case Thickness: return "얇음"; case Humidity: return "건조함"; case Temperature: return "약"; case Time: return "단시간"; case CoreTemperature: return "따뜻함"; case Thermometer: return "있음"; case InvalidConfig: case ConfigNotUsed: default: return ""; } } QString Define::maximum(Define::ConfigType type) { switch (type) { case Brightness: return "진한색"; case BurnDegree: return "완전익힘"; case SoftBoilDegree: return "완숙"; case PieceSize: return "큰조각"; case CrispyDegree: return "진한색"; case MoistDegree: return "완전익힘"; case Thickness: return "두꺼움"; case Humidity: return "습윤"; case Temperature: return "강"; case Time: return "장시간"; case CoreTemperature: return "뜨거움"; case Thermometer: return "없음"; case InvalidConfig: case ConfigNotUsed: default: return ""; } } QString Define::icon(Define::StepType type) { switch (type) { case Roast: case Grill: return ":/images/cook_step_type/sys_icon_01.png"; case Boil: case BoilSteadily: case HeatUp: case Thicken: case WarmUp: case Simmer: return ":/images/cook_step_type/sys_icon_02.png"; case End: return ":/images/cook_step_type/sys_icon_03.png"; case MakeCrispy: case Brown: case BlowSteam: case Damp: return ":/images/cook_step_type/sys_icon_04.png"; case Preheat: case Finish: return ":/images/cook_step_type/sys_icon_05.png"; case Burn: case CookGratin: return ":/images/cook_step_type/sys_icon_06.png"; case CoolDown: return ":/images/cook_step_type/sys_icon_07.png"; case Defer: case RipenKeep: return ":/images/cook_step_type/sys_icon_08.png"; case Bake: return ":/images/cook_step_type/sys_icon_09.png"; case Fry: case Steam: return ":/images/cook_step_type/sys_icon_10.png"; case Ripen: case Ferment: case Moisten: return ":/images/cook_step_type/sys_icon_11.png"; case Dry: return ":/images/cook_step_type/sys_icon_12.png"; default: return ""; } } QString Define::name(Define::StepType type) { switch (type) { case Preheat: return "예열"; case PutThermometer: return "중심 온도계 삽입"; case Load: return "식재료 적재"; case Cut: return "자르기"; case Pour: return "물 붓기"; case Bake: return "베이킹"; case Dry: return "건조"; case Ferment: return "발효"; case BlowSteam: return "스팀 쏘이기"; case CoolDown: return "식히기"; case Steam: return "찌기"; case Roast: return "로스팅"; case Boil: return "끓이기"; case Thicken: return "걸쭉하게 만들기"; case WarmUp: return "데우기"; case MakeCrispy: return "바삭하게 만들기"; case Finish: return "피니싱"; case Damp: return "습윤하게 만들기"; case Defer: return "보류"; case Grill: return "그릴"; case End: return "종료"; case Burn: return "그을리기"; case Fry: return "기름에 재빨리 볶기"; case HeatUp: return "온도 높이기"; case Ripen: return "숙성"; case RipenKeep: return "숙성 & 보존"; case BoilSteadily: return "뭉근하게 끓이기"; case CookGratin: return "그라탱 요리"; case Brown: return "브라우닝"; case Simmer: return "약한 불로 끓이기"; case Moisten: return "촉촉하게"; default: return ""; } } Define::Process Define::identifyProcess(QString type) { if (type == "again") return CookAgain; else if (type == "crispy3") return MakeCrisper; else if (type == "heatreserve") return KeepWarm; else return InvalidProcess; } QString Define::icon(Define::Process type) { switch (type) { case CookAgain: return ":/images/auto_button/option_btn_01.png"; case MakeCrisper: return ":/images/auto_button/option_btn_01.png"; case KeepWarm: return ":/images/auto_button/option_btn_01.png"; default: return ":/images/button/152.png"; } } QString Define::iconOverlay(Define::Process type) { switch (type) { case CookAgain: return ":/images/auto_button/option_btn_01_ov.png"; case MakeCrisper: return ":/images/auto_button/option_btn_01_ov.png"; case KeepWarm: return ":/images/auto_button/option_btn_01_ov.png"; default: return ":/images/button/152_ov.png"; } } QString Define::name(Define::Process type) { switch (type) { case CookAgain: return "새로운 재료 넣기"; case MakeCrisper: return "바삭함 주기"; case KeepWarm: return "보온 유지"; default: return ""; } }