mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 03:42:05 +00:00
FIX:fixed the display issue of multiple AMS
jira:[for ams] Change-Id: Icb8ce708b0e65870d627dfbe8932e012fc36c6f9 (cherry picked from commit 2cdfc21b93e37b92deabb3ab8e7b39de2578f0b2) (cherry picked from commit afbf3cf1976623c9a443f3471ec7ddcfb737d031)
This commit is contained in:
@@ -17,99 +17,124 @@
|
||||
|
||||
namespace Slic3r { namespace GUI {
|
||||
|
||||
//Previous definitions
|
||||
class uiAmsPercentHumidityDryPopup;
|
||||
|
||||
class AMSControl : public wxSimplebook
|
||||
{
|
||||
public:
|
||||
AMSControl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize);
|
||||
~AMSControl();
|
||||
|
||||
void on_retry();
|
||||
void init_scaled_buttons();
|
||||
|
||||
protected:
|
||||
std::string m_current_ams;
|
||||
std::string m_current_show_ams;
|
||||
std::string m_current_slot_left;
|
||||
std::string m_current_slot_right;
|
||||
std::string m_current_show_ams_left;
|
||||
std::string m_current_show_ams_right;
|
||||
std::map<std::string, int> m_ams_selection;
|
||||
|
||||
std::map<std::string, AMSPreview*> m_ams_preview_list;
|
||||
|
||||
std::vector<AMSinfo> m_ams_info;
|
||||
std::map<std::string, AmsItem*> m_ams_item_list;
|
||||
std::map<std::string, AmsItem*> m_ams_generic_item_list;
|
||||
std::map<std::string, AmsItem*> m_ams_extra_item_list;
|
||||
std::vector<AMSinfo> m_ext_info;
|
||||
std::map<std::string, AmsItem*> m_ams_item_list;
|
||||
std::map<std::string, AMSExtImage*> m_ext_image_list;
|
||||
|
||||
ExtderData m_extder_data;
|
||||
std::string m_dev_id;
|
||||
std::vector<std::vector<std::string>> m_item_ids{ {}, {} };
|
||||
std::vector<std::pair<string, string>> pair_id;
|
||||
|
||||
AMSextruder *m_extruder{nullptr};
|
||||
AMSRoadDownPart* m_down_road{ nullptr };
|
||||
|
||||
/*items*/
|
||||
wxBoxSizer* m_sizer_ams_items{nullptr};
|
||||
wxWindow* m_panel_prv_left {nullptr};
|
||||
wxWindow* m_panel_prv_right{nullptr};
|
||||
wxBoxSizer* m_sizer_prv_left{nullptr};
|
||||
wxBoxSizer* m_sizer_prv_right{nullptr};
|
||||
|
||||
/*ams */
|
||||
wxBoxSizer *m_sizer_ams_body{nullptr};
|
||||
wxBoxSizer* m_sizer_ams_area_left{nullptr};
|
||||
wxBoxSizer* m_sizer_ams_area_right{nullptr};
|
||||
wxBoxSizer* m_sizer_down_road{ nullptr };
|
||||
|
||||
/*option*/
|
||||
wxBoxSizer *m_sizer_ams_option{nullptr};
|
||||
wxBoxSizer* m_sizer_option_left{nullptr};
|
||||
wxBoxSizer* m_sizer_option_mid{nullptr};
|
||||
wxBoxSizer* m_sizer_option_right{nullptr};
|
||||
|
||||
|
||||
AmsIntroducePopup m_ams_introduce_popup;
|
||||
|
||||
wxSimplebook *m_simplebook_right = {nullptr};
|
||||
wxSimplebook *m_simplebook_calibration = {nullptr};
|
||||
wxSimplebook *m_simplebook_amsprvs = {nullptr};
|
||||
wxSimplebook *m_simplebook_ams = {nullptr};
|
||||
wxSimplebook* m_simplebook_generic_ams = {nullptr};
|
||||
wxSimplebook* m_simplebook_extra_ams = {nullptr};
|
||||
//wxSimplebook *m_simplebook_right{nullptr};
|
||||
wxSimplebook *m_simplebook_ams_left{nullptr};
|
||||
wxSimplebook *m_simplebook_ams_right{ nullptr };
|
||||
wxSimplebook *m_simplebook_bottom{nullptr};
|
||||
wxPanel *m_panel_down_road{ nullptr };
|
||||
int m_left_page_index = 0;
|
||||
int m_right_page_index = 0;
|
||||
|
||||
wxSimplebook *m_simplebook_bottom = {nullptr};
|
||||
|
||||
wxStaticText *m_tip_right_top = {nullptr};
|
||||
Label *m_tip_load_info = {nullptr};
|
||||
wxStaticText *m_text_calibration_percent = {nullptr};
|
||||
wxWindow * m_none_ams_panel = {nullptr};
|
||||
wxWindow* m_panel_prv = {nullptr};
|
||||
wxWindow * m_amswin = {nullptr};
|
||||
wxBoxSizer* m_vams_sizer = {nullptr};
|
||||
wxBoxSizer* m_sizer_vams_tips = {nullptr};
|
||||
wxStaticText *m_tip_right_top{nullptr};
|
||||
Label *m_tip_load_info{nullptr};
|
||||
wxWindow * m_amswin{nullptr};
|
||||
wxBoxSizer* m_vams_sizer{nullptr};
|
||||
wxBoxSizer* m_sizer_vams_tips{nullptr};
|
||||
|
||||
Label* m_ams_backup_tip = {nullptr};
|
||||
Label* m_ams_tip = {nullptr};
|
||||
Label* m_ams_tip {nullptr};
|
||||
|
||||
Caninfo m_vams_info;
|
||||
StaticBox* m_panel_virtual = {nullptr};
|
||||
AMSLib* m_vams_lib = {nullptr};
|
||||
AMSRoad* m_vams_road = {nullptr};
|
||||
AMSVirtualRoad* m_vams_extra_road = {nullptr};
|
||||
StaticBox* m_panel_virtual {nullptr};
|
||||
AMSLib* m_vams_lib {nullptr};
|
||||
AMSRoad* m_vams_road {nullptr};
|
||||
AMSVirtualRoad* m_vams_extra_road {nullptr};
|
||||
|
||||
StaticBox * m_panel_can = {nullptr};
|
||||
wxBoxSizer* m_sizer_prv = {nullptr};
|
||||
wxBoxSizer *m_sizer_cans = {nullptr};
|
||||
wxBoxSizer *m_sizer_right_tip = {nullptr};
|
||||
wxBoxSizer* m_sizer_ams_tips = {nullptr};
|
||||
|
||||
::StepIndicator *m_filament_load_step = {nullptr};
|
||||
::StepIndicator *m_filament_unload_step = {nullptr};
|
||||
::StepIndicator *m_filament_vt_load_step = {nullptr};
|
||||
|
||||
Button *m_button_extruder_feed = {nullptr};
|
||||
Button *m_button_extruder_back = {nullptr};
|
||||
wxStaticBitmap* m_button_ams_setting = {nullptr};
|
||||
wxStaticBitmap* m_img_ams_backup = {nullptr};
|
||||
wxStaticBitmap* m_img_amsmapping_tip = {nullptr};
|
||||
wxStaticBitmap* m_img_vams_tip = {nullptr};
|
||||
|
||||
wxBoxSizer *m_sizer_right_tip {nullptr};
|
||||
wxBoxSizer* m_sizer_ams_tips {nullptr};
|
||||
|
||||
::StepIndicator *m_filament_load_step {nullptr};
|
||||
::StepIndicator *m_filament_unload_step {nullptr};
|
||||
::StepIndicator *m_filament_vt_load_step {nullptr};
|
||||
|
||||
Button *m_button_extruder_feed {nullptr};
|
||||
Button *m_button_extruder_back {nullptr};
|
||||
Button *m_button_auto_refill{ nullptr };
|
||||
wxStaticBitmap* m_button_ams_setting {nullptr};
|
||||
wxStaticBitmap* m_img_ams_backup {nullptr};
|
||||
wxStaticBitmap* m_img_amsmapping_tip {nullptr};
|
||||
wxStaticBitmap* m_img_vams_tip {nullptr};
|
||||
ScalableBitmap m_button_ams_setting_normal;
|
||||
ScalableBitmap m_button_ams_setting_hover;
|
||||
ScalableBitmap m_button_ams_setting_press;
|
||||
Button *m_button_guide = {nullptr};
|
||||
Button *m_button_retry = {nullptr};
|
||||
wxWindow* m_button_area = {nullptr};
|
||||
Button *m_button_guide {nullptr};
|
||||
Button *m_button_retry {nullptr};
|
||||
|
||||
wxHyperlinkCtrl *m_hyperlink = {nullptr};
|
||||
AmsHumidityTipPopup m_Humidity_tip_popup;
|
||||
uiAmsPercentHumidityDryPopup* m_percent_humidity_dry_popup;
|
||||
|
||||
std::string m_last_ams_id;
|
||||
std::string m_last_tray_id;
|
||||
std::string m_last_ams_id = "";
|
||||
std::string m_last_tray_id = "";
|
||||
|
||||
public:
|
||||
std::string GetCurentAms();
|
||||
std::string GetCurentShowAms();
|
||||
std::string GetCurentShowAms(AMSPanelPos pos = AMSPanelPos::RIGHT_PANEL);
|
||||
std::string GetCurrentCan(std::string amsid);
|
||||
bool IsAmsInRightPanel(std::string ams_id);
|
||||
wxColour GetCanColour(std::string amsid, std::string canid);
|
||||
void createAms(wxSimplebook* parent, int& idx, AMSinfo info, AMSPanelPos pos);
|
||||
void createAmsPanel(wxSimplebook* parent, int& idx, std::vector<AMSinfo>infos, AMSPanelPos pos);
|
||||
AMSRoadShowMode findFirstMode(AMSPanelPos pos);
|
||||
|
||||
AMSModel m_ams_model{AMSModel::EXT_AMS};
|
||||
AMSModel m_ext_model{AMSModel::EXT_AMS};
|
||||
AMSModel m_is_none_ams_mode{AMSModel::EXT_AMS};
|
||||
bool m_single_nozzle_no_ams = { true };
|
||||
|
||||
void SetAmsModel(AMSModel mode, AMSModel ext_mode) {m_ams_model = mode; m_ext_model = ext_mode;};
|
||||
void AmsSelectedSwitch(wxCommandEvent& event);
|
||||
@@ -119,33 +144,36 @@ public:
|
||||
void EnterGenericAMSMode();
|
||||
void EnterExtraAMSMode();
|
||||
|
||||
void EnterCalibrationMode(bool read_to_calibration);
|
||||
void ExitcClibrationMode();
|
||||
|
||||
void SetClibrationpercent(int percent);
|
||||
void SetClibrationLink(wxString link);
|
||||
|
||||
void PlayRridLoading(wxString amsid, wxString canid);
|
||||
void StopRridLoading(wxString amsid, wxString canid);
|
||||
|
||||
void SetFilamentStep(int item_idx, FilamentStepType f_type);
|
||||
void ShowFilamentTip(bool hasams = true);
|
||||
|
||||
void UpdateStepCtrl(bool is_extrusion_exist);
|
||||
void UpdatePassRoad(string ams_id, AMSPassRoadType type, AMSPassRoadSTEP step);
|
||||
void CreateAms();
|
||||
void CreateAmsDoubleNozzle();
|
||||
void CreateAmsSingleNozzle();
|
||||
void ClearAms();
|
||||
void UpdateAms(std::vector<AMSinfo> info, bool is_reset = true);
|
||||
void AddAms(AMSinfo info);
|
||||
void AddAmsPreview(AMSinfo info);
|
||||
void AddExtraAms(AMSinfo info);
|
||||
void SetExtruder(bool on_off, bool is_vams, std::string ams_now, wxColour col);
|
||||
void UpdateAms(std::vector<AMSinfo> ams_info, std::vector<AMSinfo> ext_info, ExtderData data, std::string dev_id, bool is_reset = true, bool test = false);
|
||||
std::vector<AMSinfo> GenerateSimulateData();
|
||||
|
||||
void AddAms(AMSinfo info, AMSPanelPos pos = AMSPanelPos::LEFT_PANEL);
|
||||
//void AddExtAms(int ams_id);
|
||||
void AddAmsPreview(AMSinfo info, AMSModel type);
|
||||
//void AddExtraAms(AMSinfo info);
|
||||
|
||||
void AddAms(std::vector<AMSinfo>single_info, AMSPanelPos pos = AMSPanelPos::LEFT_PANEL);
|
||||
void AddAmsPreview(std::vector<AMSinfo>single_info, AMSPanelPos pos);
|
||||
//void AddExtraAms(std::vector<AMSinfo>single_info);
|
||||
void SetExtruder(bool on_off, std::string ams_id, std::string slot_id);
|
||||
void SetAmsStep(std::string ams_id, std::string canid, AMSPassRoadType type, AMSPassRoadSTEP step);
|
||||
void SwitchAms(std::string ams_id);
|
||||
|
||||
void msw_rescale();
|
||||
void on_filament_load(wxCommandEvent &event);
|
||||
void on_filament_unload(wxCommandEvent &event);
|
||||
void auto_refill(wxCommandEvent& event);
|
||||
void on_ams_setting_click(wxMouseEvent &event);
|
||||
void on_extrusion_cali(wxCommandEvent &event);
|
||||
void on_ams_setting_click(wxCommandEvent &event);
|
||||
@@ -164,6 +192,7 @@ public:
|
||||
void post_event(wxEvent&& event);
|
||||
|
||||
virtual bool Enable(bool enable = true);
|
||||
void parse_object(MachineObject* obj);
|
||||
|
||||
public:
|
||||
std::string m_current_select;
|
||||
|
||||
Reference in New Issue
Block a user