#include "define.h" Define::CookConfigType 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::CookConfigType 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::CookConfigType 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::CookConfigType type) { switch (type) { case Brightness: return QObject::tr("연한색"); case BurnDegree: return QObject::tr("중간익힘"); case SoftBoilDegree: return QObject::tr("반숙"); case PieceSize: return QObject::tr("작은조각"); case CrispyDegree: return QObject::tr("연한색"); case MoistDegree: return QObject::tr("촉촉하게"); case Thickness: return QObject::tr("얇음"); case Humidity: return QObject::tr("건조함"); case Temperature: return QObject::tr("약"); case Time: return QObject::tr("단시간"); case CoreTemperature: return QObject::tr("따뜻함"); case Thermometer: return QObject::tr("있음"); case InvalidConfig: case ConfigNotUsed: default: return ""; } } QString Define::maximum(Define::CookConfigType type) { switch (type) { case Brightness: return QObject::tr("진한색"); case BurnDegree: return QObject::tr("완전익힘"); case SoftBoilDegree: return QObject::tr("완숙"); case PieceSize: return QObject::tr("큰조각"); case CrispyDegree: return QObject::tr("진한색"); case MoistDegree: return QObject::tr("완전익힘"); case Thickness: return QObject::tr("두꺼움"); case Humidity: return QObject::tr("습윤"); case Temperature: return QObject::tr("강"); case Time: return QObject::tr("장시간"); case CoreTemperature: return QObject::tr("뜨거움"); case Thermometer: return QObject::tr("없음"); 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 QObject::tr("예열"); case PutThermometer: return QObject::tr("중심 온도계 삽입"); case Load: return QObject::tr("식재료 적재"); case Cut: return QObject::tr("자르기"); case Pour: return QObject::tr("물 붓기"); case Bake: return QObject::tr("베이킹"); case Dry: return QObject::tr("건조"); case Ferment: return QObject::tr("발효"); case BlowSteam: return QObject::tr("스팀 쏘이기"); case CoolDown: return QObject::tr("식히기"); case Steam: return QObject::tr("찌기"); case Roast: return QObject::tr("로스팅"); case Boil: return QObject::tr("끓이기"); case Thicken: return QObject::tr("걸쭉하게 만들기"); case WarmUp: return QObject::tr("데우기"); case MakeCrispy: return QObject::tr("바삭하게 만들기"); case Finish: return QObject::tr("피니싱"); case Damp: return QObject::tr("습윤하게 만들기"); case Defer: return QObject::tr("보류"); case Grill: return QObject::tr("그릴"); case End: return QObject::tr("종료"); case Burn: return QObject::tr("그을리기"); case Fry: return QObject::tr("기름에 재빨리 볶기"); case HeatUp: return QObject::tr("온도 높이기"); case Ripen: return QObject::tr("숙성"); case RipenKeep: return QObject::tr("숙성 & 보존"); case BoilSteadily: return QObject::tr("뭉근하게 끓이기"); case CookGratin: return QObject::tr("그라탱 요리"); case Brown: return QObject::tr( "브라우닝"); case Simmer: return QObject::tr("약한 불로 끓이기"); case Moisten: return QObject::tr("촉촉하게"); 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 QObject::tr("새로운 재료 넣기"); case MakeCrisper: return QObject::tr("바삭함 주기"); case KeepWarm: return QObject::tr("보온 유지"); default: return ""; } }