#ifndef COOKHISTORY_H #define COOKHISTORY_H #include #include "cook.h" struct ManualCookSetting { Define::Mode mode; int humidity; int temp; int time; bool coreTempEnabled; int coreTemp; int fan; }; struct ManualCookRecord { ManualCookSetting setting; QDateTime cookedTime; }; struct AutoCookSetting { Define::CookType type; QString name; QString root; int configs[5]; }; struct AutoCookRecord { AutoCookSetting setting; int count; }; struct CookRecord { QString name; int id; enum Type { Manual, Auto } type; ManualCookRecord manualRecord; AutoCookRecord autoRecord; }; namespace CookHistory { void record(ManualCookSetting cook); void record(AutoCookSetting cook); int addFavorite(ManualCookSetting cook, QString name); int addFavorite(AutoCookSetting cook, QString name); void removeMostCooked(CookRecord record); void removeRecent(CookRecord record); void removeFavorite(CookRecord record); QList listMostCooked(); QList listRecents(); QList listFavorites(); QPixmap render(CookRecord record); void start(CookRecord record, QWidget *parent = 0); } #endif // COOKHISTORY_H