NEW: refresh task thumbnail with brokenimg

Change-Id: I39393a43c681ba954f9d3975b35df4551b314ef2
This commit is contained in:
tao.jin 2022-11-29 21:05:26 +08:00 committed by Lane.Wei
parent 75ddeb7572
commit 6133ceac20
3 changed files with 42 additions and 5 deletions

View file

@ -68,6 +68,7 @@ class StatusBasePanel : public wxScrolledWindow
protected:
wxBitmap m_item_placeholder;
ScalableBitmap m_thumbnail_placeholder;
ScalableBitmap m_thumbnail_brokenimg;
ScalableBitmap m_thumbnail_sdcard;
wxBitmap m_bitmap_item_prediction;
wxBitmap m_bitmap_item_cost;
@ -329,6 +330,7 @@ protected:
void on_nozzle_fan_switch(wxCommandEvent &event);
void on_thumbnail_enter(wxMouseEvent &event);
void on_thumbnail_leave(wxMouseEvent &event);
void refresh_thumbnail_webrequest(wxMouseEvent& event);
void on_switch_vcamera(wxMouseEvent &event);
void on_camera_enter(wxMouseEvent &event);
void on_camera_leave(wxMouseEvent& event);
@ -374,6 +376,14 @@ public:
const wxString &name = wxEmptyString);
~StatusPanel();
enum ThumbnailState {
PLACE_HOLDER = 0,
BROKEN_IMG = 1,
TASK_THUMBNAIL = 2,
SDCARD_THUMBNAIL = 3,
STATE_COUNT = 4
};
MachineObject *obj {nullptr};
BBLSubTask * last_subtask{nullptr};
std::string last_profile_id;
@ -385,6 +395,7 @@ public:
long last_reading_bits { -1 };
long last_ams_version { -1 };
enum ThumbnailState task_thumbnail_state {ThumbnailState::PLACE_HOLDER};
std::vector<int> last_stage_list_info;
bool is_stage_list_info_changed(MachineObject* obj);