OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::AMSDryCtrWin Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/AMSDryControl.hpp>

Inheritance diagram for Slic3r::GUI::AMSDryCtrWin:
Collaboration diagram for Slic3r::GUI::AMSDryCtrWin:

Public Member Functions

 AMSDryCtrWin (wxWindow *parent)
 ~AMSDryCtrWin ()
void msw_rescale ()
void update (std::shared_ptr< DevFilaSystem > fila_system, MachineObject *obj)
void set_ams_id (const std::string &ams_id)
void EndModal (int retCode) override
float scale_factor () const
float prev_scale_factor () const
void set_scale_factor (float v)
void set_prev_scale_factor (float v)
void set_em_unit (int v)
bool force_rescale () const
int em_unit () const
const wxFont & normal_font () const
void enable_force_rescale ()
int ShowModal ()

Protected Member Functions

void on_dpi_changed (const wxRect &suggested_rect) override
virtual void on_sys_color_changed ()

Private Member Functions

void create ()
wxBoxSizer * create_guide_page_sizer (wxPanel *parent)
wxBoxSizer * create_main_content_section (wxPanel *parent)
wxBoxSizer * create_guide_info_filament (wxPanel *parent)
wxBoxSizer * create_guide_info_section (wxPanel *parent)
wxBoxSizer * create_guide_right_section (wxPanel *parent)
wxBoxSizer * create_main_page_sizer (wxPanel *parent)
wxBoxSizer * create_left_panel (wxPanel *parent)
wxBoxSizer * create_humidity_status_section (wxPanel *parent)
wxBoxSizer * create_description_item (wxPanel *parent, const wxString &title, Label *&dataLabel)
wxBoxSizer * create_status_descriptions_section (wxPanel *parent)
wxBoxSizer * create_right_panel (wxPanel *parent)
wxBoxSizer * create_normal_state_panel (wxPanel *parent)
wxBoxSizer * create_cannot_dry_panel (wxPanel *parent)
wxBoxSizer * create_drying_error_panel (wxPanel *parent)
Button * create_button (wxPanel *parent, const wxString &title, const wxColour &background_color, const wxColour &border_color, const wxColour &text_color)
wxBoxSizer * create_progress_page_sizer (wxPanel *parent)
void OnProgressTimer (wxTimerEvent &event)
void OnClose (wxCloseEvent &event)
void OnShow (wxShowEvent &event)
void OnFilamentSelectionChanged (wxCommandEvent &event)
wxScrolledWindow * create_preview_scrolled_window (wxWindow *parent)
bool check_values_changed (DevAms *dev_ams)
int update_image (DevAmsType type, DevAms::DryStatus status, DevAms::DrySubStatus sub_status, int humidity_percent)
void update_img_description (DevAms::DryStatus status, DevAms::DrySubStatus sub_status)
void update_normal_description (DevAms *dev_ams)
int update_state (DevAms *dev_ams)
int update_dryness_status (DevAms *dev_ams)
int update_ams_change (DevAms *dev_ams)
int update_filament_list (DevAms *dev_ams, MachineObject *obj)
void update_filament_guide_info (DevAms *dev_ams)
void update_normal_state (DevAms *dev_ams)
void update_printer_state (MachineObject *obj)
std::shared_ptr< DevFilaSystem > get_fila_system () const
void start_sending_drying_command ()
void restore_stop_button_if_deadline_passed ()
void restore_unload_button_if_deadline_passed ()
void update_button_size (Button *button)
bool is_dry_status_changed (DevAms *dev_ams)
bool is_dry_ctr_idle (DevAms *dev_ams)
bool is_ams_changed (DevAms *dev_ams)
bool is_dry_ctr_idle ()
bool is_tray_changed (DevAms *dev_ams)
bool is_dry_ctr_err (DevAms *dev_ams)
void update_em_unit ()
bool is_new_scale_factor () const
void rescale (const wxRect &suggested_rect)

Private Attributes

wxSimplebook * m_main_simplebook {nullptr}
wxPanel * m_original_page {nullptr}
ScalableBitmap m_humidity_image
wxStaticBitmap * m_humidity_img {nullptr}
Label * m_image_description {nullptr}
wxStaticBitmap * m_image_description_icon {nullptr}
ScalableBitmap m_description_icon_bitmap
Label * m_humidity_data_label = nullptr
Label * m_temperature_data_label = nullptr
Label * m_time_data_label = nullptr
wxBoxSizer * m_time_descrition_container = nullptr
wxBoxSizer * m_normal_state_sizer {nullptr}
wxBoxSizer * m_cannot_dry_sizer {nullptr}
wxBoxSizer * m_dry_error_sizer {nullptr}
Label * m_cannot_dry_description_label = nullptr
ComboBox * m_trays_combo
std::vector< FilamentBaseInfo > m_tray_ids
wxTextCtrl * m_temperature_input
wxTextCtrl * m_time_input
Label * m_normal_description
Button * m_start_button {nullptr}
Button * m_next_button {nullptr}
Button * m_stop_button {nullptr}
Button * m_back_button {nullptr}
Button * m_unload_button {nullptr}
Label * m_guide_title_label {nullptr}
Label * m_guide_description_label {nullptr}
wxCheckBox * m_rotate_spool_toggle {nullptr}
wxPanel * m_progress_page
ProgressBar * m_progress_gauge
wxTimer * m_progress_timer
std::optional< std::chrono::steady_clock::time_point > m_stop_button_restore_deadline
std::optional< std::chrono::steady_clock::time_point > m_unload_button_restore_deadline
Label * m_progress_title
int m_progress_value
int m_progress_message_index
std::vector< wxString > m_progress_text
wxPanel * m_guide_page {nullptr}
AMSFilamentPanel * m_ams_filament_panel {nullptr}
std::map< std::string, FilamentItemPanel * > m_filament_items
wxStaticBitmap * m_image_placeholder {nullptr}
ScalableBitmap m_guide_image
bool m_is_ams_changed = false
std::weak_ptr< DevFilaSystem > m_fila_system
struct { 
std::string m_ams_id
DevAmsType m_model = DevAmsType::EXT_SPOOL
DevAms::DryStatus m_dry_status = DevAms::DryStatus::Off
DevAms::DrySubStatus m_dry_sub_status = DevAms::DrySubStatus::Off
int m_humidity_percent
int m_temperature
int m_left_dry_time
float m_recommand_dry_temp
} m_ams_info
struct { 
std::unordered_map< std::string, std::string > m_filament_names
std::unordered_map< std::string, std::string > m_filament_type
std::unordered_map< std::string, int > m_dry_temp
std::unordered_map< std::string, int > m_dry_time
} m_dry_setting
struct { 
bool m_is_printing = false
} m_printer_status
float m_scale_factor
int m_em_unit
wxFont m_normal_font
float m_prev_scale_factor
bool m_can_rescale
bool m_force_rescale
int m_new_font_point_size

Detailed Description

Constructor & Destructor Documentation

◆ AMSDryCtrWin()

Slic3r::GUI::AMSDryCtrWin::AMSDryCtrWin ( wxWindow * parent)
300 :DPIDialog(parent, wxID_ANY, _L("AMS Dryness Control"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX)
301{
302 create();
303}
#define _L(s)
Definition OBJ.cpp:34
void create()
Definition AMSDryControl.cpp:1007

References _L, and create().

Referenced by get_fila_system().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~AMSDryCtrWin()

Slic3r::GUI::AMSDryCtrWin::~AMSDryCtrWin ( )
306{
307 if (m_progress_timer) {
308 delete m_progress_timer;
309 }
310}
wxTimer * m_progress_timer
Definition AMSDryControl.hpp:158

References m_progress_timer.

Member Function Documentation

◆ check_values_changed()

bool Slic3r::GUI::AMSDryCtrWin::check_values_changed ( DevAms * dev_ams)
private
1183{
1184 bool changed = false;
1185
1186 if (m_ams_info.m_model != dev_ams->GetAmsType()) {
1187 m_ams_info.m_model = dev_ams->GetAmsType();
1188 changed = true;
1189 }
1190
1191 if (dev_ams->GetDryStatus().has_value() && m_ams_info.m_dry_status != dev_ams->GetDryStatus()) {
1192 m_ams_info.m_dry_status = dev_ams->GetDryStatus().value();
1193 changed = true;
1194 }
1195
1196 if (dev_ams->GetDrySubStatus().has_value() && m_ams_info.m_dry_sub_status != dev_ams->GetDrySubStatus()) {
1197 m_ams_info.m_dry_sub_status = dev_ams->GetDrySubStatus().value();
1198 changed = true;
1199 }
1200
1201 if (m_ams_info.m_humidity_percent != dev_ams->GetHumidityPercent()) {
1202 m_ams_info.m_humidity_percent = dev_ams->GetHumidityPercent();
1203 changed = true;
1204 }
1205
1206 return changed;
1207}
struct Slic3r::GUI::AMSDryCtrWin::@244372013025067335213210377224145272011165172116 m_ams_info

References Slic3r::DevAms::GetAmsType(), Slic3r::DevAms::GetDryStatus(), Slic3r::DevAms::GetDrySubStatus(), Slic3r::DevAms::GetHumidityPercent(), and m_ams_info.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

void Slic3r::GUI::AMSDryCtrWin::create ( )
private
1008{
1009 // set title icon
1010 SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
1011 this->SetDoubleBuffered(true);
1012 std::string icon_path = (boost::format("%1%/images/OrcaSlicerTitle.ico") % resources_dir()).str(); // Orca: app title icon
1013 SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
1014
1015 SetSize(wxSize(FromDIP(700), FromDIP(500)));
1016 SetMinSize(wxSize(FromDIP(700), FromDIP(500)));
1017 SetMaxSize(wxSize(FromDIP(700), FromDIP(500)));
1018
1019 m_main_simplebook = new wxSimplebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
1020
1021 // Create main page
1022 m_original_page = new wxPanel(m_main_simplebook, wxID_ANY);
1023 m_original_page->SetBackgroundColour(*wxWHITE);
1024 wxBoxSizer* main_sizer = create_main_page_sizer(m_original_page);
1025 m_original_page->SetSizer(main_sizer);
1026
1027 m_main_simplebook->AddPage(m_original_page, "Main Page");
1028
1029 m_guide_page = new wxPanel(m_main_simplebook, wxID_ANY);
1030 m_guide_page->SetBackgroundColour(*wxWHITE);
1031 wxBoxSizer* guide_sizer = create_guide_page_sizer(m_guide_page);
1032 m_guide_page->SetSizer(guide_sizer);
1033 m_main_simplebook->AddPage(m_guide_page, "Guide Page");
1034
1035 // Create progress page
1036 m_progress_page = new wxPanel(m_main_simplebook, wxID_ANY);
1037 m_progress_page->SetBackgroundColour(*wxWHITE);
1038 wxBoxSizer* progress_sizer = create_progress_page_sizer(m_progress_page);
1039 m_progress_page->SetSizer(progress_sizer);
1040 m_main_simplebook->AddPage(m_progress_page, "Progress Page");
1041
1042 m_progress_timer = new wxTimer(this, wxID_ANY);
1043 Bind(wxEVT_TIMER, &AMSDryCtrWin::OnProgressTimer, this, m_progress_timer->GetId());
1044
1045 Bind(wxEVT_CLOSE_WINDOW, &AMSDryCtrWin::OnClose, this);
1046
1047 wxBoxSizer* top_level_sizer = new wxBoxSizer(wxVERTICAL);
1048 top_level_sizer->Add(m_main_simplebook, 1, wxEXPAND | wxALL, FromDIP(10));
1049
1050 Bind(wxEVT_SHOW, &AMSDryCtrWin::OnShow, this);
1051
1052 SetSizer(top_level_sizer);
1053 Layout();
1054 Refresh();
1055 wxGetApp().UpdateDlgDarkUI(this);
1056}
void OnShow(wxShowEvent &event)
Definition AMSDryControl.cpp:936
void OnProgressTimer(wxTimerEvent &event)
Definition AMSDryControl.cpp:864
wxSimplebook * m_main_simplebook
Definition AMSDryControl.hpp:116
wxPanel * m_progress_page
Definition AMSDryControl.hpp:156
wxBoxSizer * create_guide_page_sizer(wxPanel *parent)
Definition AMSDryControl.cpp:807
wxPanel * m_original_page
Definition AMSDryControl.hpp:117
wxBoxSizer * create_main_page_sizer(wxPanel *parent)
Definition AMSDryControl.cpp:685
wxBoxSizer * create_progress_page_sizer(wxPanel *parent)
Definition AMSDryControl.cpp:986
void OnClose(wxCloseEvent &event)
Definition AMSDryControl.cpp:945
wxPanel * m_guide_page
Definition AMSDryControl.hpp:176
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
std::string encode_path(const char *src)
Definition utils.cpp:1382
const std::string & resources_dir()
Definition utils.cpp:296

References create_guide_page_sizer(), create_main_page_sizer(), create_progress_page_sizer(), StateColor::darkModeColorFor(), Slic3r::encode_path(), m_guide_page, m_main_simplebook, m_original_page, m_progress_page, m_progress_timer, OnClose(), OnProgressTimer(), OnShow(), and Slic3r::resources_dir().

Referenced by AMSDryCtrWin().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_button()

Button * Slic3r::GUI::AMSDryCtrWin::create_button ( wxPanel * parent,
const wxString & title,
const wxColour & background_color,
const wxColour & border_color,
const wxColour & text_color )
private
415{
416 Button* button = new Button(parent, title);
417
418 // Create state colors for background
419 StateColor bg_color(
420 std::pair<wxColour, int>(AMS_CONTROL_DISABLE_COLOUR, StateColor::Disabled),
421 std::pair<wxColour, int>(background_color.ChangeLightness(80), StateColor::Pressed),
422 std::pair<wxColour, int>(background_color.ChangeLightness(120), StateColor::Hovered),
423 std::pair<wxColour, int>(background_color, StateColor::Normal)
424 );
425
426 // Create state colors for border
427 StateColor bd_color(
428 std::pair<wxColour, int>(AMS_CONTROL_WHITE_COLOUR, StateColor::Disabled),
429 std::pair<wxColour, int>(border_color, StateColor::Enabled)
430 );
431
432 button->SetBackgroundColor(bg_color);
433 button->SetBorderColor(bd_color);
434 button->SetTextColor(text_color);
435 button->SetFont(Label::Body_14);
436
437 // Auto-size button based on text content with padding
438 wxSize best_size = button->GetBestSize();
439 int padding_width = FromDIP(4);
440 int padding_height = FromDIP(2);
441 wxSize final_size(best_size.GetWidth() + padding_width, best_size.GetHeight() + padding_height);
442 button->SetMinSize(final_size);
443
444 return button;
445}
#define AMS_CONTROL_WHITE_COLOUR
Definition AMSItem.hpp:42
#define AMS_CONTROL_DISABLE_COLOUR
Definition AMSItem.hpp:40
const wxColour text_color(107, 107, 107)
static wxFont Body_14
Definition Label.hpp:53
@ Hovered
Definition StateColor.hpp:20
@ Normal
Definition StateColor.hpp:16
@ Disabled
Definition StateColor.hpp:22
@ Pressed
Definition StateColor.hpp:21
@ Enabled
Definition StateColor.hpp:17
wxColour bg_color()
Definition SpeedDialDialog.cpp:69
bool button(const IconManager::Icon &activ, const IconManager::Icon &hover, const IconManager::Icon &disable, bool disabled)
Use icon as button with 3 states activ hover and disabled.
Definition IconManager.cpp:418

References AMS_CONTROL_DISABLE_COLOUR, AMS_CONTROL_WHITE_COLOUR, Label::Body_14, Slic3r::GUI::button(), StateColor::Disabled, StateColor::Enabled, StateColor::Hovered, StateColor::Normal, StateColor::Pressed, and text_color().

Referenced by create_cannot_dry_panel(), create_guide_right_section(), and create_normal_state_panel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_cannot_dry_panel()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_cannot_dry_panel ( wxPanel * parent)
private
585{
586 wxBoxSizer* abnormal_sizer = new wxBoxSizer(wxVERTICAL);
587
588 Label* description_label = new Label(parent, _L("Unable to dry temporarily due to ..."));
589 description_label->SetForegroundColour(*wxBLACK);
590 description_label->SetFont(Label::Head_16);
591 description_label->Wrap(FromDIP(300));
592 abnormal_sizer->Add(description_label, 0, wxALIGN_CENTER_VERTICAL, FromDIP(10));
593
594 // Add a description label for the abnormal state
595 m_cannot_dry_description_label = new Label(parent, (""));
596 m_cannot_dry_description_label->SetForegroundColour(*wxBLACK);
598 m_cannot_dry_description_label->Wrap(FromDIP(250)); // Wrap text to fit within panel
599
600 abnormal_sizer->Add(m_cannot_dry_description_label, 0, wxALIGN_CENTER_VERTICAL, FromDIP(10));
601
602 // Unload button shown only when ConsumableAtAmsOutlet reason is active
604 parent,
605 _L("Unload"),
606 AMS_CONTROL_BRAND_COLOUR, // Background color - light gray
607 AMS_CONTROL_BRAND_COLOUR, // Border color - gray
608 *wxWHITE // Text color - white
609 );
610
611 m_unload_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& event) {
612 auto fila_system = get_fila_system();
613 if (!fila_system) {
614 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::unload_button: Invalid FilaSystem Pointer";
615 return;
616 }
617
618 MachineObject* obj = fila_system->GetOwner();
619 if (!obj) {
620 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::unload_button: Invalid MachineObject Pointer";
621 return;
622 }
623
624 obj->command_ams_change_filament(false, m_ams_info.m_ams_id, "255");
625
626 m_unload_button->Disable();
628 m_unload_button_restore_deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5);
629 });
630
631 m_unload_button->Show(false);
632 abnormal_sizer->Add(m_unload_button, 0, wxALL, FromDIP(5));
633
634 return abnormal_sizer;
635}
#define AMS_CONTROL_BRAND_COLOUR
Definition AMSItem.hpp:36
static wxFont Head_16
Definition Label.hpp:43
void Wrap(int width)
Definition Label.cpp:366
Button * m_unload_button
Definition AMSDryControl.hpp:148
Button * create_button(wxPanel *parent, const wxString &title, const wxColour &background_color, const wxColour &border_color, const wxColour &text_color)
Definition AMSDryControl.cpp:413
Label * m_cannot_dry_description_label
Definition AMSDryControl.hpp:136
std::optional< std::chrono::steady_clock::time_point > m_unload_button_restore_deadline
Definition AMSDryControl.hpp:161
std::shared_ptr< DevFilaSystem > get_fila_system() const
Definition AMSDryControl.cpp:1785

References _L, AMS_CONTROL_BRAND_COLOUR, Label::Body_14, Slic3r::MachineObject::command_ams_change_filament(), create_button(), get_fila_system(), Label::Head_16, m_ams_info, m_cannot_dry_description_label, m_unload_button, m_unload_button_restore_deadline, and Label::Wrap().

Referenced by create_right_panel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_description_item()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_description_item ( wxPanel * parent,
const wxString & title,
Label *& dataLabel )
private
355{
356 wxBoxSizer* item_sizer = new wxBoxSizer(wxVERTICAL);
357
358 Label* titleLabel = new Label(parent, title);
359 titleLabel->SetForegroundColour(*wxBLACK);
360 titleLabel->SetFont(Label::Body_16);
361
362 dataLabel = new Label(parent, wxT("--"));
363 dataLabel->SetForegroundColour(*wxBLACK);
364 dataLabel->SetFont(Label::Body_14);
365
366 item_sizer->AddStretchSpacer();
367 item_sizer->Add(titleLabel, 0, wxALIGN_CENTER | wxALL, FromDIP(2));
368 item_sizer->Add(dataLabel, 0, wxALIGN_CENTER | wxALL, FromDIP(2));
369 item_sizer->AddStretchSpacer();
370
371 return item_sizer;
372}
static wxFont Body_16
Definition Label.hpp:51

References Label::Body_14, and Label::Body_16.

Referenced by create_status_descriptions_section().

Here is the caller graph for this function:

◆ create_drying_error_panel()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_drying_error_panel ( wxPanel * parent)
private
638{
639 wxBoxSizer* err_sizer = new wxBoxSizer(wxVERTICAL);
640 Label* description_label = new Label(parent, _L("Drying Error"));
641 description_label->SetForegroundColour(*wxRED);
642 description_label->SetFont(Label::Body_14); // Wrap text to fit within panel
643 err_sizer->Add(description_label, 0, wxALIGN_CENTER_VERTICAL, FromDIP(10));
644
645 Label* additional_description_label = new Label(parent, _L("Please check the Assistant for troubleshooting"));
646 additional_description_label->SetForegroundColour(*wxBLACK);
647 additional_description_label->SetFont(Label::Body_14); // Wrap text to fit within panel
648 err_sizer->Add(additional_description_label, 0, wxALIGN_CENTER_VERTICAL, FromDIP(10));
649
650 return err_sizer;
651}

References _L, and Label::Body_14.

Referenced by create_right_panel().

Here is the caller graph for this function:

◆ create_guide_info_filament()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_guide_info_filament ( wxPanel * parent)
private
696{
697 wxBoxSizer* filament_section = new wxBoxSizer(wxHORIZONTAL);
698
699 m_ams_filament_panel = new AMSFilamentPanel(parent, "");
700
701 filament_section->Add(m_ams_filament_panel, 0, wxEXPAND | wxALL | wxALIGN_CENTER_HORIZONTAL, FromDIP(5));
702
703 return filament_section;
704}
AMSFilamentPanel * m_ams_filament_panel
Definition AMSDryControl.hpp:177

References m_ams_filament_panel.

Referenced by create_guide_info_section().

Here is the caller graph for this function:

◆ create_guide_info_section()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_guide_info_section ( wxPanel * parent)
private
707{
708 wxBoxSizer* info_section = new wxBoxSizer(wxVERTICAL);
709
710 // Part 1: Title
711 m_guide_title_label = new Label(parent, _L("Please remove and store the filament (as shown)."));
712 m_guide_title_label->SetForegroundColour(*wxBLACK);
714 info_section->Add(m_guide_title_label, 0, wxEXPAND | wxALL, FromDIP(5));
715
716 // Part 2: Description
717 m_guide_description_label = new Label(parent, _L("The AMS can rotate the filament which is properly stored, providing better drying results."));
718 m_guide_description_label->SetForegroundColour(*wxBLACK);
720 m_guide_description_label->Wrap(FromDIP(300)); // Wrap text to fit within panel
721 info_section->Add(m_guide_description_label, 0, wxEXPAND | wxALL, FromDIP(5));
722
723 // Part 3: filament panel
724 wxBoxSizer* fila_section = create_guide_info_filament(parent);
725 info_section->Add(fila_section, 0, wxEXPAND | wxALL, FromDIP(5));
726
727 // Part 4: Circular toggle with description
728 wxBoxSizer* toggle_section = new wxBoxSizer(wxHORIZONTAL);
729
730 m_rotate_spool_toggle = new wxCheckBox(parent, wxID_ANY, "");
731 m_rotate_spool_toggle->SetValue(false);
732
733 m_rotate_spool_toggle->Bind(wxEVT_CHECKBOX, [](wxCommandEvent& event) {
734 bool is_checked = event.IsChecked();
735 // Add toggle behavior logic here
736 });
737
738 toggle_section->Add(m_rotate_spool_toggle, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(10));
739
740 // Toggle description
741 Label* toggle_description = new Label(parent, _L("Rotate spool when drying"), LB_AUTO_WRAP);
742 toggle_description->SetForegroundColour(*wxBLACK);
743 toggle_description->SetFont(Label::Body_12);
744 toggle_section->Add(toggle_description, 1, wxALIGN_CENTER_VERTICAL | wxEXPAND, 0);
745
746 info_section->Add(toggle_section, 0, wxEXPAND | wxALL, FromDIP(5));
747
748 return info_section;
749}
#define LB_AUTO_WRAP
Definition Label.hpp:12
static wxFont Head_18
Definition Label.hpp:42
static wxFont Body_12
Definition Label.hpp:55
Label * m_guide_title_label
Definition AMSDryControl.hpp:151
wxBoxSizer * create_guide_info_filament(wxPanel *parent)
Definition AMSDryControl.cpp:695
wxCheckBox * m_rotate_spool_toggle
Definition AMSDryControl.hpp:154
Label * m_guide_description_label
Definition AMSDryControl.hpp:152

References _L, Label::Body_12, Label::Body_14, create_guide_info_filament(), Label::Head_18, LB_AUTO_WRAP, m_guide_description_label, m_guide_title_label, and m_rotate_spool_toggle.

Referenced by create_guide_page_sizer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_guide_page_sizer()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_guide_page_sizer ( wxPanel * parent)
private
808{
809 wxBoxSizer* guide_sizer = new wxBoxSizer(wxHORIZONTAL);
810
811 wxBoxSizer* info_section = create_guide_info_section(parent);
812 guide_sizer->Add(info_section, 1, wxEXPAND | wxALL, FromDIP(10));
813
814 wxBoxSizer* right_section = create_guide_right_section(parent);
815 guide_sizer->Add(right_section, 0, wxEXPAND | wxALL, FromDIP(10));
816
817 return guide_sizer;
818}
wxBoxSizer * create_guide_right_section(wxPanel *parent)
Definition AMSDryControl.cpp:751
wxBoxSizer * create_guide_info_section(wxPanel *parent)
Definition AMSDryControl.cpp:706

References create_guide_info_section(), and create_guide_right_section().

Referenced by create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_guide_right_section()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_guide_right_section ( wxPanel * parent)
private
752{
753 wxBoxSizer* right_section = new wxBoxSizer(wxVERTICAL);
754
755 // Upper part: Image section
756 m_image_placeholder = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap);
757 m_guide_image = ScalableBitmap(parent, "dev_ams_dry_ctr_filament_in_chamber", 256);
758 m_image_placeholder->SetBitmap(m_guide_image.bmp());
759
760 wxBoxSizer* image_container = new wxBoxSizer(wxHORIZONTAL);
761 image_container->AddStretchSpacer(1);
762 image_container->Add(m_image_placeholder, 0, wxALL, FromDIP(5));
763
764 right_section->Add(image_container, 0, wxEXPAND | wxALL, FromDIP(5));
765
766 wxBoxSizer* buttons_container = new wxBoxSizer(wxHORIZONTAL);
767 buttons_container->AddStretchSpacer(1);
768
770 parent,
771 wxString::FromUTF8(_u8L_CONTEXT(L_CONTEXT("Back", "amsdrying"), "amsdrying")),
772 wxColour("#F8F8F8"), // Background color - light gray
773 wxColour("#D0D0D0"), // Border color - gray
774 *wxBLACK // Text color - black
775 );
776
777 m_back_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& event) {
778 m_main_simplebook->SetSelection(0);
779 });
780
781 buttons_container->Add(m_back_button, 0, wxALL, FromDIP(5));
782
784 parent,
785 _L("Start"),
786 AMS_CONTROL_BRAND_COLOUR, // Background color - green
787 AMS_CONTROL_BRAND_COLOUR, // Border color - green
788 wxColour("#FFFFFE") // Text color - white
789 );
790
791 m_start_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& event) {
792 m_main_simplebook->SetSelection(2);
793 m_progress_gauge->SetValue(0);
794
795 m_progress_timer->Start(70);
798 });
799
800 buttons_container->Add(m_start_button, 0, wxALL, FromDIP(5));
801
802 right_section->Add(buttons_container, 0, wxEXPAND | wxALL, FromDIP(5));
803
804 return right_section;
805}
#define L_CONTEXT(s, context)
Definition DesignOffer.hpp:17
wxStaticBitmap * m_image_placeholder
Definition AMSDryControl.hpp:179
Button * m_back_button
Definition AMSDryControl.hpp:147
ScalableBitmap m_guide_image
Definition AMSDryControl.hpp:180
ProgressBar * m_progress_gauge
Definition AMSDryControl.hpp:157
int m_progress_value
Definition AMSDryControl.hpp:164
Button * m_start_button
Definition AMSDryControl.hpp:144
void start_sending_drying_command()
Definition AMSDryControl.cpp:820
#define _u8L_CONTEXT(s, ctx)
Definition I18N.hpp:16

References _L, _u8L_CONTEXT, AMS_CONTROL_BRAND_COLOUR, create_button(), L_CONTEXT, m_back_button, m_guide_image, m_image_placeholder, m_main_simplebook, m_progress_gauge, m_progress_timer, m_progress_value, m_start_button, and start_sending_drying_command().

Referenced by create_guide_page_sizer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_humidity_status_section()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_humidity_status_section ( wxPanel * parent)
private
325{
326 wxBoxSizer* image_sizer = new wxBoxSizer(wxVERTICAL);
327
328 m_humidity_img = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap);
329 image_sizer->Add(m_humidity_img, 1, wxALIGN_CENTER_HORIZONTAL, 0);
330
331 m_humidity_img->SetBitmap(wxNullBitmap);
332
333 // Create a horizontal sizer for description and icon
334 wxBoxSizer* desc_sizer = new wxBoxSizer(wxHORIZONTAL);
335
336 m_image_description_icon = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap);
337 m_image_description_icon->SetBackgroundColour(*wxWHITE);
338 m_image_description_icon->SetMinSize(wxSize(FromDIP(20), FromDIP(20)));
339 m_image_description_icon->SetMaxSize(wxSize(FromDIP(20), FromDIP(20)));
340 m_image_description_icon->Show(false);
341 desc_sizer->Add(m_image_description_icon, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(5));
342
343 m_image_description = new Label(parent, _L("Idle"));
345 m_image_description->SetForegroundColour(*wxBLACK);
346 m_image_description->SetBackgroundColour(*wxWHITE);
347 desc_sizer->Add(m_image_description, 0, wxALIGN_CENTER_VERTICAL);
348
349 image_sizer->Add(desc_sizer, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
350
351 return image_sizer;
352}
static wxFont Head_14
Definition Label.hpp:45
wxStaticBitmap * m_image_description_icon
Definition AMSDryControl.hpp:124
wxStaticBitmap * m_humidity_img
Definition AMSDryControl.hpp:122
Label * m_image_description
Definition AMSDryControl.hpp:123

References _L, Label::Head_14, m_humidity_img, m_image_description, and m_image_description_icon.

Referenced by create_left_panel().

Here is the caller graph for this function:

◆ create_left_panel()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_left_panel ( wxPanel * parent)
private
401{
402 wxBoxSizer* left_sizer = new wxBoxSizer(wxVERTICAL);
403
404 wxBoxSizer* image_section = create_humidity_status_section(parent);
405 left_sizer->Add(image_section, 1, wxEXPAND | wxALL, FromDIP(5));
406
407 wxBoxSizer* descriptions_section = create_status_descriptions_section(parent);
408 left_sizer->Add(descriptions_section, 0, wxEXPAND | wxALL, FromDIP(20));
409
410 return left_sizer;
411}
wxBoxSizer * create_status_descriptions_section(wxPanel *parent)
Definition AMSDryControl.cpp:374
wxBoxSizer * create_humidity_status_section(wxPanel *parent)
Definition AMSDryControl.cpp:324

References create_humidity_status_section(), and create_status_descriptions_section().

Referenced by create_main_content_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_main_content_section()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_main_content_section ( wxPanel * parent)
private
671{
672 wxBoxSizer* content_sizer = new wxBoxSizer(wxHORIZONTAL);
673
674 wxBoxSizer* left_panel = create_left_panel(parent);
675 content_sizer->Add(left_panel, 2, wxALIGN_CENTER_VERTICAL | wxALL, FromDIP(5));
676 left_panel->SetMinSize(wxSize(FromDIP(250), -1));
677
678 wxBoxSizer* right_panel = create_right_panel(parent);
679 content_sizer->Add(right_panel, 1, wxALIGN_CENTER_VERTICAL | wxALL, FromDIP(5));
680 right_panel->SetMinSize(wxSize(FromDIP(250), -1));
681
682 return content_sizer;
683}
wxBoxSizer * create_right_panel(wxPanel *parent)
Definition AMSDryControl.cpp:653
wxBoxSizer * create_left_panel(wxPanel *parent)
Definition AMSDryControl.cpp:400

References create_left_panel(), and create_right_panel().

Referenced by create_main_page_sizer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_main_page_sizer()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_main_page_sizer ( wxPanel * parent)
private
686{
687 wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
688
689 wxBoxSizer* content_section = create_main_content_section(parent);
690 main_sizer->Add(content_section, 1, wxEXPAND | wxALL, FromDIP(5));
691
692 return main_sizer;
693}
wxBoxSizer * create_main_content_section(wxPanel *parent)
Definition AMSDryControl.cpp:670

References create_main_content_section().

Referenced by create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_normal_state_panel()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_normal_state_panel ( wxPanel * parent)
private
448{
449 wxBoxSizer* normal_state_sizer = new wxBoxSizer(wxVERTICAL);
450
451 Label* description_label = new Label(parent, _L("Filament Drying Settings"));
452 description_label->SetForegroundColour(*wxBLACK);
453 description_label->SetFont(Label::Head_14);
454 normal_state_sizer->Add(description_label, 0, wxALL, FromDIP(5));
455
456 // Part 2: ComboBox for material selection
457 wxBoxSizer* combo_sizer = new wxBoxSizer(wxHORIZONTAL);
458 m_trays_combo = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(-1, FromDIP(26)), 0, nullptr, wxCB_READONLY);
460
461 combo_sizer->Add(m_trays_combo, 1, wxEXPAND);
462 normal_state_sizer->Add(combo_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
463
464 m_trays_combo->Bind(wxEVT_COMBOBOX, &AMSDryCtrWin::OnFilamentSelectionChanged, this);
465
466 // part 3 time and temperature
467 // Temperature part
468 wxBoxSizer* temp_sizer = new wxBoxSizer(wxHORIZONTAL);
469 m_temperature_input = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxSize(FromDIP(80), -1));
470 m_temperature_input->SetMaxLength(3); // Limit to 3 digits
471
472 m_temperature_input->Bind(wxEVT_CHAR, [](wxKeyEvent& event) {
473 int keycode = event.GetKeyCode();
474 if (keycode >= '0' && keycode <= '9') {
475 event.Skip();
476 } else if (keycode == WXK_BACK || keycode == WXK_DELETE || keycode == WXK_LEFT || keycode == WXK_RIGHT) {
477 event.Skip();
478 }
479 });
480
481 m_temperature_input->Bind(wxEVT_TEXT, [this](wxCommandEvent&) {
482 m_next_button->Disable();
483 m_start_button->Disable();
484 });
485
486 m_temperature_input->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
487 m_temperature_input->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
488
489 Label* temp_unit_label = new Label(parent, wxString::FromUTF8(u8"\u2103" /* °C */));
490 temp_unit_label->SetForegroundColour(*wxBLACK);
491 temp_sizer->Add(m_temperature_input, 1, wxRIGHT, FromDIP(1));
492 temp_sizer->Add(temp_unit_label, 0, wxALIGN_CENTER_VERTICAL);
493
494 // Time part
495 wxBoxSizer* time_sizer = new wxBoxSizer(wxHORIZONTAL);
496 m_time_input = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, wxSize(FromDIP(100), -1));
497 m_time_input->SetMaxLength(3); // Limit to 3 digits
498
499 m_time_input->Bind(wxEVT_CHAR, [](wxKeyEvent& event) {
500 int keycode = event.GetKeyCode();
501 if (keycode >= '0' && keycode <= '9') {
502 event.Skip();
503 } else if (keycode == WXK_BACK || keycode == WXK_DELETE || keycode == WXK_LEFT || keycode == WXK_RIGHT) {
504 event.Skip();
505 }
506 });
507
508 m_time_input->Bind(wxEVT_TEXT, [this](wxCommandEvent&) {
509 m_next_button->Disable();
510 m_start_button->Disable();
511 });
512
513 m_time_input->SetBackgroundColour(StateColor::darkModeColorFor(*wxWHITE));
514 m_time_input->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
515
516 Label* time_unit_label = new Label(parent, _L_CONTEXT("H", "Hours unit"));
517 time_unit_label->SetForegroundColour(*wxBLACK);
518 time_sizer->Add(m_time_input, 1, wxRIGHT, FromDIP(1));
519 time_sizer->Add(time_unit_label, 0, wxALIGN_CENTER_VERTICAL);
520
521 wxBoxSizer* input_sizer = new wxBoxSizer(wxHORIZONTAL);
522 input_sizer->Add(temp_sizer, 1, wxRIGHT, FromDIP(10));
523 input_sizer->Add(time_sizer, 1, 0);
524 normal_state_sizer->Add(input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
525
526 // Part 4: Abnormal description/message area
527 m_normal_description = new Label(parent, "");
528 m_normal_description->SetForegroundColour(wxColour("#F09A17"));
530 normal_state_sizer->Add(m_normal_description, 0, wxALL, FromDIP(5));
531
532 // Part 5: Start button
534 parent,
535 _L("Start"),
536 AMS_CONTROL_BRAND_COLOUR, // Background color - green
537 AMS_CONTROL_BRAND_COLOUR, // Border color - green
538 wxColour("#FFFFFE") // Text color - white
539 );
540
541 m_next_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& event) {
542 m_main_simplebook->SetSelection(1);
543 });
544
545 normal_state_sizer->Add(m_next_button, 0, wxALL, FromDIP(5));
546 m_next_button->Disable();
547
549 parent,
550 _L("Stop"),
551 wxColour(255, 0, 0), // Background color - red
552 wxColour(255, 0, 0), // Border color - red
553 wxColour("#FFFFFE") // Text color - white
554 );
555
556 m_stop_button->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent& event) {
557 auto fila_system = get_fila_system();
558 if (!fila_system) {
559 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::start_sending_drying_command: Invalid FilaSystem Pointer";
560 return;
561 }
562
563 fila_system->CtrlAmsStopDrying(std::stoi(m_ams_info.m_ams_id));
564 // Temporarily show stopping state, then restore after 2 seconds
565 if (m_stop_button) {
566 m_stop_button->SetLabel(_L("Stopping"));
567 update_button_size(m_stop_button); // Adjust button size for longer text
568 m_stop_button->Disable();
569 m_stop_button->Layout();
570 m_stop_button->GetParent()->Layout(); // Relayout parent container
571 m_stop_button->Refresh();
572
574 m_stop_button_restore_deadline = std::chrono::steady_clock::now() + std::chrono::seconds(2);
575 }
576 });
577
578 m_stop_button->Show(false);
579 normal_state_sizer->Add(m_stop_button, 0, wxALL, FromDIP(5));
580
581 return normal_state_sizer;
582}
Button * m_stop_button
Definition AMSDryControl.hpp:146
wxTextCtrl * m_temperature_input
Definition AMSDryControl.hpp:141
ComboBox * m_trays_combo
Definition AMSDryControl.hpp:139
wxTextCtrl * m_time_input
Definition AMSDryControl.hpp:142
void update_button_size(Button *button)
Definition AMSDryControl.cpp:921
void OnFilamentSelectionChanged(wxCommandEvent &event)
Definition AMSDryControl.cpp:1324
std::optional< std::chrono::steady_clock::time_point > m_stop_button_restore_deadline
Definition AMSDryControl.hpp:160
Label * m_normal_description
Definition AMSDryControl.hpp:143
Button * m_next_button
Definition AMSDryControl.hpp:145
#define _L_CONTEXT(s, ctx)
Definition I18N.hpp:15

References _L, _L_CONTEXT, AMS_CONTROL_BRAND_COLOUR, Label::Body_12, Label::Body_14, create_button(), StateColor::darkModeColorFor(), get_fila_system(), Label::Head_14, m_ams_info, m_main_simplebook, m_next_button, m_normal_description, m_start_button, m_stop_button, m_stop_button_restore_deadline, m_temperature_input, m_time_input, m_trays_combo, OnFilamentSelectionChanged(), and update_button_size().

Referenced by create_right_panel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_preview_scrolled_window()

wxScrolledWindow * Slic3r::GUI::AMSDryCtrWin::create_preview_scrolled_window ( wxWindow * parent)
private
314{
315 wxScrolledWindow* panel = new wxScrolledWindow(parent, wxID_ANY);
316 panel->SetScrollRate(10, 0);
317 panel->SetSize(AMS_ITEMS_PANEL_SIZE);
318 panel->SetMinSize(AMS_ITEMS_PANEL_SIZE);
319 panel->SetBackgroundColour(AMS_CONTROL_DEF_BLOCK_BK_COLOUR);
320
321 return panel;
322}
#define AMS_ITEMS_PANEL_SIZE
Definition AMSItem.hpp:176
#define AMS_CONTROL_DEF_BLOCK_BK_COLOUR
Definition AMSItem.hpp:44

References AMS_CONTROL_DEF_BLOCK_BK_COLOUR, and AMS_ITEMS_PANEL_SIZE.

◆ create_progress_page_sizer()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_progress_page_sizer ( wxPanel * parent)
private
987{
988 wxBoxSizer* progress_sizer = new wxBoxSizer(wxVERTICAL);
989
990 m_progress_title = new Label(parent, m_progress_text[0]);
991 m_progress_title->SetForegroundColour(*wxBLACK);
993
994 progress_sizer->Add(0, 0, 1, wxEXPAND, 0); // Spacer
995 progress_sizer->Add(m_progress_title, 0, wxALIGN_CENTER | wxALL, FromDIP(30));
996
997 m_progress_gauge = new ProgressBar(parent, wxID_ANY, 100, wxDefaultPosition, wxSize(FromDIP(300), FromDIP(8)));
998 m_progress_gauge->SetValue(0);
999 m_progress_gauge->SetHeight(FromDIP(8));
1000
1001 progress_sizer->Add(m_progress_gauge, 0, wxALIGN_CENTER | wxALL, FromDIP(10));
1002 progress_sizer->Add(0, 0, 1, wxEXPAND, 0);
1003
1004 return progress_sizer;
1005}
std::vector< wxString > m_progress_text
Definition AMSDryControl.hpp:166
Label * m_progress_title
Definition AMSDryControl.hpp:163
@ ProgressBar
Definition NotificationManager.hpp:112

References Label::Body_16, m_progress_gauge, m_progress_text, m_progress_title, and Slic3r::GUI::ProgressBar.

Referenced by create().

Here is the caller graph for this function:

◆ create_right_panel()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_right_panel ( wxPanel * parent)
private
654{
655 wxBoxSizer* right_sizer = new wxBoxSizer(wxHORIZONTAL);
656
660
661 right_sizer->Add(m_normal_state_sizer, 1, wxEXPAND);
662 right_sizer->Add(m_cannot_dry_sizer, 1, wxEXPAND);
663
664 m_cannot_dry_sizer->Show(false);
665 m_dry_error_sizer->Show(false);
666
667 return right_sizer;
668}
wxBoxSizer * create_cannot_dry_panel(wxPanel *parent)
Definition AMSDryControl.cpp:584
wxBoxSizer * m_cannot_dry_sizer
Definition AMSDryControl.hpp:134
wxBoxSizer * create_normal_state_panel(wxPanel *parent)
Definition AMSDryControl.cpp:447
wxBoxSizer * m_dry_error_sizer
Definition AMSDryControl.hpp:135
wxBoxSizer * create_drying_error_panel(wxPanel *parent)
Definition AMSDryControl.cpp:637
wxBoxSizer * m_normal_state_sizer
Definition AMSDryControl.hpp:133

References create_cannot_dry_panel(), create_drying_error_panel(), create_normal_state_panel(), m_cannot_dry_sizer, m_dry_error_sizer, and m_normal_state_sizer.

Referenced by create_main_content_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_status_descriptions_section()

wxBoxSizer * Slic3r::GUI::AMSDryCtrWin::create_status_descriptions_section ( wxPanel * parent)
private
375{
376 wxBoxSizer* desc_sizer = new wxBoxSizer(wxHORIZONTAL);
377
378 wxBoxSizer* hum_desc_sizer = create_description_item(parent, _L("Humidity"), m_humidity_data_label);
379 desc_sizer->Add(hum_desc_sizer, 1, wxEXPAND, FromDIP(1));
380
381 wxStaticLine* vert_separator = new wxStaticLine(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
382 desc_sizer->Add(vert_separator, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(5));
383
384 wxBoxSizer* temp_desc_sizer = create_description_item(parent, _L("Temperature"), m_temperature_data_label);
385 desc_sizer->Add(temp_desc_sizer, 1, wxEXPAND, FromDIP(1));
386
387 m_time_descrition_container = new wxBoxSizer(wxHORIZONTAL);
388 wxStaticLine* vert_separator2 = new wxStaticLine(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
389 m_time_descrition_container->Add(vert_separator2, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(5));
390
391 wxBoxSizer* time_desc_sizer = create_description_item(parent, _L("Left Time"), m_time_data_label);
392 m_time_descrition_container->Add(time_desc_sizer, 1, wxEXPAND, FromDIP(1));
393
394 desc_sizer->Add(m_time_descrition_container, 1, wxEXPAND, 0);
395 // m_time_descrition_container->Show(false);
396
397 return desc_sizer;
398}
Label * m_humidity_data_label
Definition AMSDryControl.hpp:127
Label * m_time_data_label
Definition AMSDryControl.hpp:129
wxBoxSizer * create_description_item(wxPanel *parent, const wxString &title, Label *&dataLabel)
Definition AMSDryControl.cpp:354
wxBoxSizer * m_time_descrition_container
Definition AMSDryControl.hpp:130
Label * m_temperature_data_label
Definition AMSDryControl.hpp:128

References _L, create_description_item(), m_humidity_data_label, m_temperature_data_label, m_time_data_label, and m_time_descrition_container.

Referenced by create_left_panel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ em_unit()

int Slic3r::GUI::DPIAware< wxDialog >::em_unit ( ) const
inlineinherited
203{ return m_em_unit; }
Definition GUI_Utils.hpp:107

Referenced by Slic3r::GUI::AuxiliaryDialog::AuxiliaryDialog(), Slic3r::GUI::CopyrightsDialog::CopyrightsDialog(), Slic3r::GUI::DesignTextDialog::DesignTextDialog(), Slic3r::GUI::EditGCodeDialog::EditGCodeDialog(), Slic3r::GUI::FileArchiveDialog::FileArchiveDialog(), Slic3r::GUI::MsgNoUpdates::MsgNoUpdates(), Slic3r::GUI::MsgUpdateForced::MsgUpdateForced(), Slic3r::GUI::OAuthDialog::OAuthDialog(), Slic3r::GUI::ParamsDialog::ParamsDialog(), Slic3r::GUI::PhysicalPrinterDialog::PhysicalPrinterDialog(), Slic3r::GUI::SettingsDialog::SettingsDialog(), anonymous_namespace{3DPrinterOS.cpp}::TokenAuthDialog::TokenAuthDialog(), anonymous_namespace{3DPrinterOS.cpp}::UploadOptionsDialog::UploadOptionsDialog(), Slic3r::GUI::PublishSettingsDialog::add_row_ui(), Slic3r::GUI::DiffPresetDialog::complete_dialog_creation(), Slic3r::GUI::DiffPresetDialog::create_edit_sizer(), Slic3r::GUI::DiffPresetDialog::create_presets_sizer(), Slic3r::GUI::DiffPresetDialog::create_tree(), Slic3r::GUI::ElegooPrintHostSendDialog::init(), Slic3r::GUI::FlashforgePrintHostSendDialog::init(), Slic3r::GUI::PrintHostSendDialog::init(), Slic3r::GUI::AboutDialog::on_dpi_changed(), Slic3r::GUI::AuxiliaryDialog::on_dpi_changed(), Slic3r::GUI::BedShapeDialog::on_dpi_changed(), Slic3r::GUI::ConfigWizard::on_dpi_changed(), Slic3r::GUI::CopyrightsDialog::on_dpi_changed(), Slic3r::GUI::DiffPresetDialog::on_dpi_changed(), Slic3r::GUI::EditGCodeDialog::on_dpi_changed(), Slic3r::GUI::FileArchiveDialog::on_dpi_changed(), Slic3r::GUI::OAuthDialog::on_dpi_changed(), Slic3r::GUI::ObjectTableDialog::on_dpi_changed(), Slic3r::GUI::ParamsDialog::on_dpi_changed(), Slic3r::GUI::PhysicalPrinterDialog::on_dpi_changed(), Slic3r::GUI::PrintHostQueueDialog::on_dpi_changed(), Slic3r::GUI::PurgeModeDialog::on_dpi_changed(), Slic3r::GUI::SavePresetDialog::on_dpi_changed(), Slic3r::GUI::SendSystemInfoDialog::on_dpi_changed(), Slic3r::GUI::SettingsDialog::on_dpi_changed(), and Slic3r::GUI::UnsavedChangesDialog::on_dpi_changed().

Here is the caller graph for this function:

◆ enable_force_rescale()

void Slic3r::GUI::DPIAware< wxDialog >::enable_force_rescale ( )
inlineinherited
206{ m_force_rescale = true; }

◆ EndModal()

void Slic3r::GUI::DPIDialog::EndModal ( int retCode)
inlineoverrideinherited
306 {
307 if (!dialogStack.empty() && dialogStack.front() != this) {
308 // This is a bug in wxWidgets
309 // when the dialog is not top modal dialog, EndModal() just hide dialog without quit
310 // the modal event loop. And the modal event loop blocks us from bottom widgets.
311 // Solution: let user click it manually or close outside. FIXME
312 BOOST_LOG_TRIVIAL(warning) << "DPIAware::EndModal Error: dialogStack is not empty, but top dialog is not this one. retCode=" << retCode;
313 return;
314 }
315
316 return wxDialog::EndModal(retCode);
317 }
std::deque< wxDialog * > dialogStack
Definition GUI_Utils.cpp:549

References Slic3r::GUI::dialogStack.

Referenced by Slic3r::GUI::CloneDialog::CloneDialog(), Slic3r::GUI::ConfigWizard::ConfigWizard(), Slic3r::GUI::CreatePresetSuccessfulDialog::CreatePresetSuccessfulDialog(), Slic3r::GUI::DeleteConfirmDialog::DeleteConfirmDialog(), Slic3r::GUI::DesignVariableDialog::DesignVariableDialog(), Slic3r::GUI::anonymous_namespace{PrintHostDialogs.cpp}::FlashforgeSlotDialog::FlashforgeSlotDialog(), Slic3r::GUI::GuideFrame::GuideFrame(), Slic3r::GUI::InputIpAddressDialog::InputIpAddressDialog(), Slic3r::GUI::ManualNozzleCountDialog::ManualNozzleCountDialog(), Slic3r::GUI::MsgUpdateConfig::MsgUpdateConfig(), Slic3r::GUI::MsgUpdateForced::MsgUpdateForced(), Slic3r::GUI::MultiChoiceDialog::MultiChoiceDialog(), Slic3r::GUI::NetworkErrorDialog::NetworkErrorDialog(), Slic3r::GUI::NetworkPluginRestartDialog::NetworkPluginRestartDialog(), Slic3r::GUI::PartSkipConfirmDialog::PartSkipConfirmDialog(), Slic3r::GUI::PhysicalPrinterDialog::PhysicalPrinterDialog(), Slic3r::GUI::PlateNameEditDialog::PlateNameEditDialog(), Slic3r::GUI::PlateSettingsDialog::PlateSettingsDialog(), Slic3r::GUI::PublishSettingsDialog::PublishSettingsDialog(), Slic3r::GUI::SelectMachineDialog::SelectMachineDialog(), Slic3r::GUI::SendFailedConfirm::SendFailedConfirm(), Slic3r::GUI::SendSystemInfoDialog::SendSystemInfoDialog(), Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), Slic3r::GUI::SingleChoiceDialog::SingleChoiceDialog(), StepMeshDialog::StepMeshDialog(), Slic3r::GUI::SyncAmsInfoDialog::SyncAmsInfoDialog(), anonymous_namespace{3DPrinterOS.cpp}::TokenAuthDialog::TokenAuthDialog(), Slic3r::GUI::UpdatePluginDialog::UpdatePluginDialog(), Slic3r::GUI::UpdateVersionDialog::UpdateVersionDialog(), Slic3r::GUI::wgtDeviceNozzleRackUpgradeDlg::wgtDeviceNozzleRackUpgradeDlg(), Slic3r::GUI::SavePresetDialog::accept(), Slic3r::GUI::MsgDialog::add_button(), Slic3r::GUI::TipsDialog::add_button(), Slic3r::GUI::FilamentPickerDialog::BindEvents(), Slic3r::GUI::PluginPickerDialog::build_capability_ui(), Slic3r::GUI::BedShapeDialog::build_dialog(), Slic3r::GUI::PluginPickerDialog::build_ui(), Slic3r::GUI::UnsavedChangesDialog::close(), Slic3r::GUI::FileArchiveDialog::create_btn_sizer(), Slic3r::GUI::ColorDecomposeDialog::create_button_panel(), Slic3r::GUI::MixedFilamentDialog::create_button_panel(), Slic3r::GUI::CreateFilamentPresetDialog::create_dialog_buttons(), Slic3r::GUI::CreatePresetForPrinterDialog::create_dialog_buttons(), Slic3r::GUI::EditFilamentPresetDialog::create_dialog_buttons(), Slic3r::GUI::ExportConfigsDialog::create_dialog_buttons(), Slic3r::GUI::PreferencesDialog::create_item_language_combobox(), Slic3r::GUI::PreferencesDialog::create_item_region_combobox(), Slic3r::GUI::PreferencesDialog::create_items(), Slic3r::GUI::CreatePrinterPresetDialog::create_page1_dialog_buttons(), Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons(), Slic3r::GUI::ExportConfigsDialog::data_init(), Slic3r::GUI::WebDialog::destroy_silently(), Slic3r::GUI::EditFilamentPresetDialog::edit_preset(), Slic3r::GUI::ConnectPrinterDialog::end_modal(), Slic3r::GUI::PrintHostSendDialog::EndModal(), Slic3r::GUI::ColorPickerDialog::finish(), Slic3r::GUI::WebDialog::finish(), Slic3r::GUI::Newer3mfVersionDialog::get_btn_sizer(), Slic3r::GUI::ScoreDialog::get_button_sizer(), Slic3r::GUI::WebViewHostDialog::handle_common_script_command(), Slic3r::GUI::ExportPresetBundleDialog::InitExportData(), Slic3r::GUI::SelectMachineDialog::navigate_to_timelapse_page(), Slic3r::GUI::BindMachineDialog::on_bind_success(), Slic3r::GUI::ConnectPrinterDialog::on_button_confirm(), Slic3r::GUI::RecenterDialog::on_button_confirm(), Slic3r::GUI::BindMachineDialog::on_cancel(), Slic3r::GUI::EditCalibrationHistoryDialog::on_cancel(), Slic3r::GUI::InputIpAddressDialog::on_cancel(), Slic3r::GUI::NewCalibrationHistoryDialog::on_cancel(), Slic3r::GUI::OAuthDialog::on_cancel(), Slic3r::GUI::PingCodeBindDialog::on_cancel(), Slic3r::GUI::SelectMachineDialog::on_cancel(), Slic3r::GUI::SendToPrinterDialog::on_cancel(), Slic3r::GUI::SyncAmsInfoDialog::on_cancel(), Slic3r::GUI::UnBindMachineDialog::on_cancel(), Slic3r::GUI::WebDialog::on_close_window(), Slic3r::GUI::NetworkPluginDownloadDialog::on_dont_ask(), Slic3r::GUI::NetworkPluginDownloadDialog::on_download(), Slic3r::GUI::EditDevNameDialog::on_edit_name(), Slic3r::GUI::ConfirmBeforeSendDialog::on_hide(), Slic3r::GUI::PrivacyUpdateDialog::on_hide(), Slic3r::GUI::ShortcutCaptureDialog::on_key(), Slic3r::GUI::TextureImportDialog::on_ok_clicked(), Slic3r::GUI::FileArchiveDialog::on_open_button(), Slic3r::GUI::NetworkPluginDownloadDialog::on_remind_later(), Slic3r::GUI::ProjectDropDialog::on_select_cancel(), Slic3r::GUI::SavePresetDialog::on_select_cancel(), Slic3r::GUI::ProjectDropDialog::on_select_ok(), Slic3r::GUI::SendMultiMachinePage::on_send(), Slic3r::GUI::NetworkPluginDownloadDialog::on_skip(), Slic3r::GUI::TextureImportDialog::on_skip_clicked(), Slic3r::GUI::NetworkPluginDownloadDialog::on_skip_version(), Slic3r::GUI::Cornering_Test_Dlg::on_start(), Slic3r::GUI::FlowRateCalibrationDialog::on_start(), Slic3r::GUI::Input_Shaping_Damp_Test_Dlg::on_start(), Slic3r::GUI::Input_Shaping_Freq_Test_Dlg::on_start(), Slic3r::GUI::MaxVolumetricSpeed_Test_Dlg::on_start(), Slic3r::GUI::PA_Calibration_Dlg::on_start(), Slic3r::GUI::Retraction_Test_Dlg::on_start(), Slic3r::GUI::Temp_Calibration_Dlg::on_start(), Slic3r::GUI::VFA_Test_Dlg::on_start(), Slic3r::GUI::CalibrationDialog::on_start_calibration(), Slic3r::GUI::UnBindMachineDialog::on_unbind_printer(), Slic3r::GUI::PartSkipDialog::OnApplyDialog(), anonymous_namespace{3DPrinterOS.cpp}::TokenAuthDialog::OnCancel(), Slic3r::GUI::AboutDialog::onCloseDialog(), Slic3r::GUI::CopyrightsDialog::onCloseDialog(), Slic3r::GUI::MultiNozzleSyncDialog::OnRackStatusReadingFinished(), Slic3r::GUI::GuideFrame::OnScriptMessage(), Slic3r::GUI::InputIpAddressDialog::OnTimer(), Slic3r::GUI::KBShortcutsDialog::open_mouse_preferences(), Slic3r::GUI::TroubleshootDialog::PackAll(), Slic3r::GUI::TroubleshootDialog::RebuildSystemProfiles(), Slic3r::GUI::SpeedDialWebDialog::run_action(), Slic3r::GUI::OAuthDialog::Show(), Slic3r::GUI::MultiNozzleSyncDialog::UpdateButton(), and Slic3r::GUI::CreatePrinterPresetDialog::validate_input_valid().

◆ force_rescale()

bool Slic3r::GUI::DPIAware< wxDialog >::force_rescale ( ) const
inlineinherited
201{ return m_force_rescale; }

◆ get_fila_system()

std::shared_ptr< DevFilaSystem > Slic3r::GUI::AMSDryCtrWin::get_fila_system ( ) const
private
1786{
1787 std::shared_ptr<DevFilaSystem> fila_system = m_fila_system.lock();
1788 if (!fila_system) {
1789 const_cast<AMSDryCtrWin*>(this)->Close();
1790 }
1791 return fila_system;
1792}
std::weak_ptr< DevFilaSystem > m_fila_system
Definition AMSDryControl.hpp:184
AMSDryCtrWin(wxWindow *parent)
Definition AMSDryControl.cpp:299

References AMSDryCtrWin(), and m_fila_system.

Referenced by create_cannot_dry_panel(), create_normal_state_panel(), OnFilamentSelectionChanged(), and start_sending_drying_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_ams_changed()

bool Slic3r::GUI::AMSDryCtrWin::is_ams_changed ( DevAms * dev_ams)
private
1846{
1847 return m_ams_info.m_ams_id != dev_ams->GetAmsId() || m_is_ams_changed;
1848}
bool m_is_ams_changed
Definition AMSDryControl.hpp:183

References Slic3r::DevAms::GetAmsId(), m_ams_info, and m_is_ams_changed.

Referenced by update_ams_change(), and update_filament_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_dry_ctr_err()

bool Slic3r::GUI::AMSDryCtrWin::is_dry_ctr_err ( DevAms * dev_ams)
private
1876{
1877 if (!dev_ams->GetDryStatus().has_value() || !dev_ams->GetDrySubStatus().has_value()) {
1878 return false;
1879 }
1880
1881 return dev_ams->GetDryStatus().value() == DevAms::DryStatus::Error;
1882}
@ Error
Definition DevFilaSystem.h:166

References Slic3r::DevAms::Error, Slic3r::DevAms::GetDryStatus(), and Slic3r::DevAms::GetDrySubStatus().

Referenced by update_normal_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_dry_ctr_idle() [1/2]

bool Slic3r::GUI::AMSDryCtrWin::is_dry_ctr_idle ( )
private
1871{
1872 return m_ams_info.m_dry_status == DevAms::DryStatus::Off || m_ams_info.m_dry_status == DevAms::DryStatus::Cooling;
1873}
@ Cooling
Definition DevFilaSystem.h:164
@ Off
Definition DevFilaSystem.h:161

References Slic3r::DevAms::Cooling, m_ams_info, and Slic3r::DevAms::Off.

Referenced by OnProgressTimer(), update_dryness_status(), update_filament_list(), and update_normal_state().

Here is the caller graph for this function:

◆ is_dry_ctr_idle() [2/2]

bool Slic3r::GUI::AMSDryCtrWin::is_dry_ctr_idle ( DevAms * dev_ams)
private
1861{
1862 if (!dev_ams->GetDryStatus().has_value() || !dev_ams->GetDrySubStatus().has_value()) {
1863 return true;
1864 }
1865
1866 return dev_ams->GetDryStatus().value() == DevAms::DryStatus::Off
1867 || dev_ams->GetDryStatus().value() == DevAms::DryStatus::Cooling;
1868}

References Slic3r::DevAms::Cooling, Slic3r::DevAms::GetDryStatus(), Slic3r::DevAms::GetDrySubStatus(), and Slic3r::DevAms::Off.

Here is the call graph for this function:

◆ is_dry_status_changed()

bool Slic3r::GUI::AMSDryCtrWin::is_dry_status_changed ( DevAms * dev_ams)
private
1851{
1852 if (!dev_ams->GetDryStatus().has_value() || !dev_ams->GetDrySubStatus().has_value()) {
1853 return true;
1854 }
1855
1856 return dev_ams->GetDryStatus().value() != m_ams_info.m_dry_status
1857 || dev_ams->GetDrySubStatus().value() != m_ams_info.m_dry_sub_status;
1858}

References Slic3r::DevAms::GetDryStatus(), Slic3r::DevAms::GetDrySubStatus(), and m_ams_info.

Referenced by update_dryness_status().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_new_scale_factor()

bool Slic3r::GUI::DPIAware< wxDialog >::is_new_scale_factor ( ) const
inlineprivateinherited
262{ return fabs(m_scale_factor - m_prev_scale_factor) > 0.001; }

◆ is_tray_changed()

bool Slic3r::GUI::AMSDryCtrWin::is_tray_changed ( DevAms * dev_ams)
private
1526{
1527 return false;
1528}

◆ msw_rescale()

void Slic3r::GUI::AMSDryCtrWin::msw_rescale ( )
1064{
1065 if (!IsShown()) {
1066 return;
1067 }
1068
1069 if (m_ams_filament_panel) {m_ams_filament_panel->msw_rescale();}
1070 if (m_trays_combo) {m_trays_combo->Rescale(); m_trays_combo->Layout(); m_trays_combo->SetFont(Label::Body_14), m_trays_combo->Refresh();}
1071 if (m_humidity_img && m_humidity_image.bmp().IsOk()) {m_humidity_image.msw_rescale(); m_humidity_img->SetBitmap(m_humidity_image.bmp());}
1072 if (m_image_placeholder && m_guide_image.bmp().IsOk()) {m_guide_image.msw_rescale();m_image_placeholder->SetBitmap(m_guide_image.bmp());}
1074
1075 // Rescale and update button sizes based on text content
1076 if (m_next_button) {
1077 m_next_button->Rescale();
1079 m_next_button->Layout();
1080 m_next_button->Refresh();
1081 }
1082 if (m_stop_button) {
1083 m_stop_button->Rescale();
1085 m_stop_button->Layout();
1086 m_stop_button->Refresh();
1087 }
1088 if (m_start_button) {
1089 m_start_button->Rescale();
1091 m_start_button->Layout();
1092 m_start_button->Refresh();
1093 }
1094 if (m_back_button) {
1095 m_back_button->Rescale();
1097 m_back_button->Layout();
1098 m_back_button->Refresh();
1099 }
1100 if (m_unload_button) {
1101 m_unload_button->Rescale();
1103 m_unload_button->Layout();
1104 m_unload_button->Refresh();
1105 }
1106
1107 if (m_guide_page) {m_guide_page->Layout();}
1108 if (m_original_page) {m_original_page->Layout();}
1109
1110 Fit();
1111 Layout();
1112 Refresh();
1113}
ScalableBitmap m_humidity_image
Definition AMSDryControl.hpp:121
ScalableBitmap m_description_icon_bitmap
Definition AMSDryControl.hpp:125

References Label::Body_14, m_ams_filament_panel, m_back_button, m_description_icon_bitmap, m_guide_image, m_guide_page, m_humidity_image, m_humidity_img, m_image_description_icon, m_image_placeholder, m_next_button, m_original_page, m_start_button, m_stop_button, m_trays_combo, m_unload_button, and update_button_size().

Referenced by on_dpi_changed(), and OnShow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normal_font()

◆ on_dpi_changed()

void Slic3r::GUI::AMSDryCtrWin::on_dpi_changed ( const wxRect & suggested_rect)
overrideprotectedvirtual

Implements Slic3r::GUI::DPIAware< wxDialog >.

1059{
1060 msw_rescale();
1061}
void msw_rescale()
Definition AMSDryControl.cpp:1063

References msw_rescale().

Here is the call graph for this function:

◆ on_sys_color_changed()

◆ OnClose()

void Slic3r::GUI::AMSDryCtrWin::OnClose ( wxCloseEvent & event)
private
946{
947 if (m_progress_timer && m_progress_timer->IsRunning()) {
948 m_progress_timer->Stop();
949 }
950
951 if (m_progress_gauge) {
952 m_progress_gauge->SetValue(0);
953 }
954
957
958 if (m_main_simplebook) {
959 m_main_simplebook->SetSelection(0);
960 }
961
962 if (m_progress_title && !m_progress_text.empty()) {
963 m_progress_title->SetLabel(m_progress_text[0]);
964 }
965
966 // Clean up and restore stop button state
967 if (m_stop_button) {
968 m_stop_button->SetLabel(_L("Stop"));
969 update_button_size(m_stop_button); // Adjust button size back to original
970 m_stop_button->Enable();
971 m_stop_button->Layout();
972 m_stop_button->GetParent()->Layout();
973 m_stop_button->Refresh();
974 }
976
977 // Clean up unload button state
978 if (m_unload_button) {
979 m_unload_button->Enable();
980 }
982
983 event.Skip();
984}
int m_progress_message_index
Definition AMSDryControl.hpp:165

References _L, m_main_simplebook, m_progress_gauge, m_progress_message_index, m_progress_text, m_progress_timer, m_progress_title, m_progress_value, m_stop_button, m_stop_button_restore_deadline, m_unload_button, m_unload_button_restore_deadline, and update_button_size().

Referenced by create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFilamentSelectionChanged()

void Slic3r::GUI::AMSDryCtrWin::OnFilamentSelectionChanged ( wxCommandEvent & event)
private
1325{
1326 int selectionIndex = event.GetSelection();
1327 wxString selectedFilament = event.GetString();
1328
1329 auto fila_system = get_fila_system();
1330 if (!fila_system) {
1331 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::OnFilamentSelectionChanged: Invalid FilaSystem Pointer";
1332 return;
1333 }
1334
1335 DevAms* dev_ams = fila_system->GetAmsById(m_ams_info.m_ams_id);
1336 if (!dev_ams) {
1337 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::OnFilamentSelectionChanged: Invalid AMS id";
1338 return;
1339 }
1340
1341 std::optional<Slic3r::DevFilamentDryingPreset> preset = DevUtilBackend::GetFilamentDryingPreset(m_tray_ids[selectionIndex].filament_id);
1342 if (preset.has_value()) {
1343 DevFilamentDryingPreset info = preset.value();
1344 if (m_printer_status.m_is_printing) {
1345 m_temperature_input->SetValue(std::to_string(static_cast<int>(info.filament_dev_ams_drying_temperature_on_print[dev_ams->GetAmsType()])));
1346 m_time_input->SetValue(std::to_string(static_cast<int>(info.filament_dev_ams_drying_time_on_print[dev_ams->GetAmsType()])));
1347 } else {
1348 m_temperature_input->SetValue(std::to_string(static_cast<int>(info.filament_dev_ams_drying_temperature_on_idle[dev_ams->GetAmsType()])));
1349 m_time_input->SetValue(std::to_string(static_cast<int>(info.filament_dev_ams_drying_time_on_idle[dev_ams->GetAmsType()])));
1350 }
1351 }
1352
1354}
static std::optional< DevFilamentDryingPreset > GetFilamentDryingPreset(const std::string &fila_id)
Definition DevUtilBackend.cpp:78
std::vector< FilamentBaseInfo > m_tray_ids
Definition AMSDryControl.hpp:140
void update_filament_guide_info(DevAms *dev_ams)
Definition AMSDryControl.cpp:1530
struct Slic3r::GUI::AMSDryCtrWin::@062246001126255107030246002112167251104347146021 m_printer_status

References Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_temperature_on_idle, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_temperature_on_print, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_time_on_idle, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_time_on_print, get_fila_system(), Slic3r::DevAms::GetAmsType(), Slic3r::DevUtilBackend::GetFilamentDryingPreset(), m_ams_info, m_printer_status, m_temperature_input, m_time_input, m_tray_ids, and update_filament_guide_info().

Referenced by create_normal_state_panel(), and update_filament_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnProgressTimer()

void Slic3r::GUI::AMSDryCtrWin::OnProgressTimer ( wxTimerEvent & event)
private
865{
866 m_progress_value += 1;
867
868 if (m_progress_value <= 100)
870
871 if (m_progress_value == 1) { // First tick, reset message index
873 if (!m_progress_text.empty()) {
874 m_progress_title->SetLabel(m_progress_text[0]);
875 }
876 }
877 else if (m_progress_value % 15 == 0) { // Approximately every second
881 m_progress_title->Refresh();
882 }
883 }
884
885 if (m_progress_value >= 100 && !is_dry_ctr_idle()) {
887 m_progress_timer->Stop();
888 m_main_simplebook->SetSelection(0);
889 }
890}
bool is_dry_ctr_idle()
Definition AMSDryControl.cpp:1870

References is_dry_ctr_idle(), m_main_simplebook, m_progress_gauge, m_progress_message_index, m_progress_text, m_progress_timer, m_progress_title, and m_progress_value.

Referenced by create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnShow()

void Slic3r::GUI::AMSDryCtrWin::OnShow ( wxShowEvent & event)
private
937{
938 if (event.IsShown()) {
939 wxGetApp().UpdateDlgDarkUI(this);
940 msw_rescale();
941 }
942 event.Skip();
943}

References msw_rescale().

Referenced by create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prev_scale_factor()

float Slic3r::GUI::DPIAware< wxDialog >::prev_scale_factor ( ) const
inlineinherited
196{ return m_prev_scale_factor; }

◆ rescale()

void Slic3r::GUI::DPIAware< wxDialog >::rescale ( const wxRect & suggested_rect)
inlineprivateinherited
265 {
266 this->Freeze();
267
268 m_force_rescale = false;
269
270 // set normal application font as a current window font
271 m_normal_font = this->GetFont();
272
274
275 // rescale missed controls sizes and images
277
278 this->Layout();
279 this->Thaw();
280
281 // reset previous scale factor from current scale factor value
283 }
virtual void on_dpi_changed(const wxRect &suggested_rect)=0
void update_em_unit()
Definition GUI_Utils.hpp:249

◆ restore_stop_button_if_deadline_passed()

void Slic3r::GUI::AMSDryCtrWin::restore_stop_button_if_deadline_passed ( )
private
893{
894 if (m_stop_button_restore_deadline.has_value()) {
895 if (std::chrono::steady_clock::now() >= m_stop_button_restore_deadline.value()) {
896 if (m_stop_button) {
897 m_stop_button->SetLabel(_L("Stop"));
898 update_button_size(m_stop_button); // Adjust button size back to original
899 m_stop_button->Enable();
900 m_stop_button->Layout();
901 m_stop_button->GetParent()->Layout();
902 m_stop_button->Refresh();
903 }
905 }
906 }
907}

References _L, m_stop_button, m_stop_button_restore_deadline, and update_button_size().

Referenced by update_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_unload_button_if_deadline_passed()

void Slic3r::GUI::AMSDryCtrWin::restore_unload_button_if_deadline_passed ( )
private
910{
911 if (m_unload_button_restore_deadline.has_value()) {
912 if (std::chrono::steady_clock::now() >= m_unload_button_restore_deadline.value()) {
913 if (m_unload_button) {
914 m_unload_button->Enable();
915 }
917 }
918 }
919}

References m_unload_button, and m_unload_button_restore_deadline.

Referenced by update_state().

Here is the caller graph for this function:

◆ scale_factor()

float Slic3r::GUI::DPIAware< wxDialog >::scale_factor ( ) const
inlineinherited
195{ return m_scale_factor; }

◆ set_ams_id()

void Slic3r::GUI::AMSDryCtrWin::set_ams_id ( const std::string & ams_id)
1116{
1117 m_ams_info.m_ams_id = ams_id;
1118 m_is_ams_changed = true;
1119}

References m_ams_info, and m_is_ams_changed.

◆ set_em_unit()

void Slic3r::GUI::DPIAware< wxDialog >::set_em_unit ( int v)
inlineinherited
200{ m_em_unit = v; }

◆ set_prev_scale_factor()

void Slic3r::GUI::DPIAware< wxDialog >::set_prev_scale_factor ( float v)
inlineinherited

◆ set_scale_factor()

void Slic3r::GUI::DPIAware< wxDialog >::set_scale_factor ( float v)
inlineinherited
198{ m_scale_factor = v; }

◆ ShowModal()

◆ start_sending_drying_command()

void Slic3r::GUI::AMSDryCtrWin::start_sending_drying_command ( )
private
821{
822 auto fila_system = get_fila_system();
823 if (!fila_system) {
824 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::start_sending_drying_command: Invalid FilaSystem Pointer";
825 return;
826 }
827
828 if (m_temperature_input->GetValue().IsEmpty() || m_time_input->GetValue().IsEmpty()) {
829 // Show error message to user
830 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::start_sending_drying_command: Time or temperature is empty";
831 return;
832 }
833
834 long temperature, time;
835 if (!m_temperature_input->GetValue().ToLong(&temperature) ||
836 !m_time_input->GetValue().ToLong(&time)) {
837 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::start_sending_drying_command: Failed to convert temperature or time";
838 return;
839 }
840
841 int tray_index;
842 tray_index = m_trays_combo->GetSelection();
843 if (m_tray_ids.empty() || tray_index < 0 || tray_index >= m_tray_ids.size()) {
844 BOOST_LOG_TRIVIAL(warning) << "AMSDryCtrWin::start_sending_drying_command: Invalid tray_index " << tray_index
845 << ", m_tray_ids.size=" << m_tray_ids.size();
846 return;
847 }
848
849 int cooling_temp = 50;
850 std::optional<DevFilamentDryingPreset> preset = DevUtilBackend::GetFilamentDryingPreset(m_tray_ids[tray_index].filament_id);
851 if (preset.has_value()) {
852 cooling_temp = static_cast<int>(preset.value().filament_dev_drying_softening_temperature);
853 }
854
855 fila_system->CtrlAmsStartDryingHour(std::stoi(m_ams_info.m_ams_id), m_tray_ids[tray_index].filament_type,
856 temperature, time, m_rotate_spool_toggle->GetValue(), cooling_temp, false);
857
858 m_dry_setting.m_filament_names[m_ams_info.m_ams_id] = m_tray_ids[tray_index].filament_name;
859 m_dry_setting.m_filament_type[m_ams_info.m_ams_id] = m_tray_ids[tray_index].filament_type;
860 m_dry_setting.m_dry_temp[m_ams_info.m_ams_id] = temperature;
861 m_dry_setting.m_dry_time[m_ams_info.m_ams_id] = time;
862}
struct Slic3r::GUI::AMSDryCtrWin::@173306150027305116076145343147024044372346037112 m_dry_setting
zaa_minimize_perimeter_height filament_dev_drying_softening_temperature((ConfigOptionFloats, filament_dev_drying_cooling_temperature))) PRINT_CONFIG_CLASS_DERIVED_DEFINE(PrintConfig

References Slic3r::filament_dev_drying_softening_temperature(), get_fila_system(), Slic3r::DevUtilBackend::GetFilamentDryingPreset(), m_ams_info, m_dry_setting, m_rotate_spool_toggle, m_temperature_input, m_time_input, m_tray_ids, and m_trays_combo.

Referenced by create_guide_right_section().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void Slic3r::GUI::AMSDryCtrWin::update ( std::shared_ptr< DevFilaSystem > fila_system,
MachineObject * obj )
1801{
1802 if (!fila_system || !obj) {
1803 return;
1804 }
1805
1807 m_fila_system = fila_system;
1808
1809 DevAms* dev_ams = fila_system->GetAmsById(m_ams_info.m_ams_id);
1810 if (!dev_ams) {
1811 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::update: Invalid AMS id";
1812 m_ams_info.m_ams_id = "";
1813 Close();
1814 return;
1815 }
1816
1817 if (!dev_ams->IsSupportRemoteDry(fila_system->GetOwner())) {
1818 BOOST_LOG_TRIVIAL(info) << "AMSDryCtrWin::update: Selected AMS does not support remote drying";
1819 Close();
1820 return;
1821 }
1822
1823
1824 update_ams_change(dev_ams);
1825
1826 update_image(dev_ams->GetAmsType(),
1827 dev_ams->GetDryStatus().has_value()? dev_ams->GetDryStatus().value(): DevAms::DryStatus::Off,
1828 dev_ams->GetDrySubStatus().has_value()? dev_ams->GetDrySubStatus().value(): DevAms::DrySubStatus::Off,
1829 dev_ams->GetHumidityPercent());
1830
1831 update_state(dev_ams);
1832 update_dryness_status(dev_ams);
1833
1834 update_filament_list(dev_ams, obj);
1836
1837 m_is_ams_changed = false;
1838
1839 check_values_changed(dev_ams);
1840
1841 Layout();
1842 Refresh();
1843}
@ Off
Definition DevFilaSystem.h:173
void update_printer_state(MachineObject *obj)
Definition AMSDryControl.cpp:1794
int update_dryness_status(DevAms *dev_ams)
Definition AMSDryControl.cpp:1489
int update_state(DevAms *dev_ams)
Definition AMSDryControl.cpp:1441
int update_filament_list(DevAms *dev_ams, MachineObject *obj)
Definition AMSDryControl.cpp:1606
bool check_values_changed(DevAms *dev_ams)
Definition AMSDryControl.cpp:1182
int update_image(DevAmsType type, DevAms::DryStatus status, DevAms::DrySubStatus sub_status, int humidity_percent)
Definition AMSDryControl.cpp:1155
int update_ams_change(DevAms *dev_ams)
Definition AMSDryControl.cpp:1471

References check_values_changed(), Slic3r::DevAms::GetAmsType(), Slic3r::DevAms::GetDryStatus(), Slic3r::DevAms::GetDrySubStatus(), Slic3r::DevAms::GetHumidityPercent(), Slic3r::DevAms::IsSupportRemoteDry(), m_ams_info, m_fila_system, m_is_ams_changed, Slic3r::DevAms::Off, update_ams_change(), update_dryness_status(), update_filament_guide_info(), update_filament_list(), update_image(), update_printer_state(), and update_state().

Here is the call graph for this function:

◆ update_ams_change()

int Slic3r::GUI::AMSDryCtrWin::update_ams_change ( DevAms * dev_ams)
private
1472{
1473 if (!is_ams_changed(dev_ams)) {
1474 return 0;
1475 }
1476
1477 m_ams_info.m_ams_id = dev_ams->GetAmsId();
1478 if (dev_ams->GetAmsType() == DevAmsType::N3F) {
1479 m_temperature_input->SetHint("45-65" + wxString::FromUTF8(u8"\u2103" /* °C */));
1480 } else if (dev_ams->GetAmsType() == DevAmsType::N3S) {
1481 m_temperature_input->SetHint("45-85" + wxString::FromUTF8(u8"\u2103" /* °C */));
1482 }
1483
1484 m_time_input->SetHint("1-24 h");
1485
1486 return 0;
1487}
bool is_ams_changed(DevAms *dev_ams)
Definition AMSDryControl.cpp:1845
@ N3F
Definition DevDefs.h:62
@ N3S
Definition DevDefs.h:63

References Slic3r::DevAms::GetAmsId(), Slic3r::DevAms::GetAmsType(), is_ams_changed(), m_ams_info, m_temperature_input, m_time_input, Slic3r::N3F, and Slic3r::N3S.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_button_size()

void Slic3r::GUI::AMSDryCtrWin::update_button_size ( Button * button)
private
922{
923 if (!button) return;
924
925 // Reset MinSize first to avoid accumulation of size
926 button->SetMinSize(wxSize(-1, -1));
927
928 // Recalculate button size based on current text and DPI settings
929 wxSize best_size = button->GetBestSize();
930 int padding_width = FromDIP(4);
931 int padding_height = FromDIP(2);
932 wxSize final_size(best_size.GetWidth() + padding_width, best_size.GetHeight() + padding_height);
933 button->SetMinSize(final_size);
934}

References Slic3r::GUI::button().

Referenced by create_normal_state_panel(), msw_rescale(), OnClose(), and restore_stop_button_if_deadline_passed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_dryness_status()

int Slic3r::GUI::AMSDryCtrWin::update_dryness_status ( DevAms * dev_ams)
private
1490{
1491 int updated = 0;
1492
1493 if (m_ams_info.m_humidity_percent != dev_ams->GetHumidityPercent()) {
1494 updated += 1;
1495 m_ams_info.m_humidity_percent = dev_ams->GetHumidityPercent();
1496 m_humidity_data_label->SetLabel(std::to_string(m_ams_info.m_humidity_percent) + "%");
1497 }
1498
1499 if (m_ams_info.m_temperature != dev_ams->GetCurrentTemperature()) {
1500 updated += 1;
1501 m_ams_info.m_temperature = dev_ams->GetCurrentTemperature();
1502 m_temperature_data_label->SetLabel(std::to_string(m_ams_info.m_temperature) + wxString::FromUTF8(u8"\u2103" /* °C */));
1503 }
1504
1505 if (is_dry_ctr_idle(dev_ams)) {
1506 m_time_descrition_container->Show(false);
1507 m_original_page->Layout();
1508 } else {
1509 if (is_dry_status_changed(dev_ams)) {
1510 m_time_descrition_container->Show(true);
1511 m_original_page->Layout();
1512 }
1513
1514 if (m_ams_info.m_left_dry_time != dev_ams->GetLeftDryTime()) {
1515 updated += 1;
1516 m_ams_info.m_left_dry_time = dev_ams->GetLeftDryTime();
1517 m_time_data_label->SetLabel(wxString::Format("%02d : %02d",
1518 m_ams_info.m_left_dry_time / 60, m_ams_info.m_left_dry_time % 60));
1519 }
1520 }
1521
1522 return updated;
1523}
bool is_dry_status_changed(DevAms *dev_ams)
Definition AMSDryControl.cpp:1850

References Slic3r::DevAms::GetCurrentTemperature(), Slic3r::DevAms::GetHumidityPercent(), Slic3r::DevAms::GetLeftDryTime(), is_dry_ctr_idle(), is_dry_status_changed(), m_ams_info, m_humidity_data_label, m_original_page, m_temperature_data_label, m_time_data_label, and m_time_descrition_container.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_em_unit()

void Slic3r::GUI::DPIAware< wxDialog >::update_em_unit ( )
inlineprivateinherited
250 {
251 // Linux specific issue : get_dpi_for_window(this) still doesn't responce to the Display's scale in new wxWidgets(3.1.3).
252 // So, calculate the m_em_unit value from the font size, as before
253#if !defined(__WXGTK__)
255#else
256 // initialize default width_unit according to the width of the one symbol ("m") of the currently active font of this window.
257 m_em_unit = std::max<size_t>(10, this->GetTextExtent("m").x - 1);
258#endif // __WXGTK__
259 }

◆ update_filament_guide_info()

void Slic3r::GUI::AMSDryCtrWin::update_filament_guide_info ( DevAms * dev_ams)
private
1531{
1532 if (!IsShown()) {
1533 return;
1534 }
1535
1536 m_guide_page->Freeze();
1537 m_ams_filament_panel->Clear();
1538 m_ams_filament_panel->SetAmsName(dev_ams->GetDisplayName());
1539
1540 // Get the temperature input value
1541 long input_temp = 0;
1542 bool valid_temp = !m_temperature_input->GetValue().IsEmpty() &&
1543 m_temperature_input->GetValue().ToLong(&input_temp);
1544 bool can_start = true;
1545
1546 // "GFA00" is Bambu's PLA id; GetFilamentDryingPreset is keyed by our OF ids.
1547 auto* agent = wxGetApp().getAgent();
1548 const std::string pla_filament_id = agent ? agent->to_orca_filament_id("GFA00") : std::string("GFA00");
1549
1550 int slot_count = 0, empty_count = 0;
1551 for (auto& tray_pair : dev_ams->GetTrays()) {
1552 if (!tray_pair.second) {
1553 continue;
1554 }
1555 ++slot_count;
1556 if (!tray_pair.second->is_exists) {
1557 m_ams_filament_panel->AddFilamentItem("/", "dev_ams_dry_ctr_enable");
1558 ++empty_count;
1559 continue;
1560 }
1561 auto preset_opt = tray_pair.second->get_ams_drying_preset();
1562 wxString filament_type = tray_pair.second->get_display_filament_type();
1563 DevFilamentDryingPreset preset;
1564 if (filament_type.IsEmpty()) {
1565 auto fallback_preset = DevUtilBackend::GetFilamentDryingPreset(pla_filament_id);
1566 if (!fallback_preset) continue; // no PLA preset (e.g. the id map is missing): skip, don't throw
1567 preset = fallback_preset.value();
1568 filament_type = "?";
1569 } else if (preset_opt.has_value()) {
1570 preset = preset_opt.value();
1571 } else {
1572 auto fallback_preset = DevUtilBackend::GetFilamentDryingPreset(pla_filament_id);
1573 if (!fallback_preset) continue;
1574 preset = fallback_preset.value();
1575 }
1576 std::string icon_path = "dev_ams_dry_ctr_enable";
1577 int distortion_temp = static_cast<int>(preset.filament_dev_ams_drying_heat_distortion_temperature);
1578 if (valid_temp && distortion_temp < input_temp) {
1579 icon_path = "dev_ams_dry_ctr_disable";
1580 can_start = false;
1581 }
1582 m_ams_filament_panel->AddFilamentItem(filament_type, icon_path);
1583 }
1584 if (slot_count == 0) {
1585 can_start = false;
1586 }
1587
1588 if (can_start) {
1589 m_guide_title_label->SetLabel(_L("For better drying results, remove the filament and allow it to rotate."));
1590 m_guide_description_label->SetLabel(_L("The AMS will automatically rotate the stored filament slots to enhance the drying performance.") +
1591 "\n" + _L("Alternatively, you can dry the filament without removing it.") +
1592 "\n" + "*" + _L("Unknown filaments will be treated as PLA."));
1593 m_guide_description_label->Wrap(FromDIP(300));
1594 } else {
1595 m_guide_title_label->SetLabel(_L("Please store the filament marked with an exclamation mark."));
1596 m_guide_description_label->SetLabel(_L("Filament left in the feeder during drying may soften because the drying temperature exceeds the softening point of materials like PLA and TPU.") +
1597 "\n" + "*" + _L("Unknown filaments will be treated as PLA."));
1598 m_guide_description_label->Wrap(FromDIP(300));
1599 }
1600
1601 m_start_button->Enable(can_start);
1602 m_guide_page->Layout();
1603 m_guide_page->Thaw();
1604}
zaa_minimize_perimeter_height filament_type((ConfigOptionBools, filament_soluble))((ConfigOptionStrings

References _L, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_heat_distortion_temperature, Slic3r::filament_type(), Slic3r::DevAms::GetDisplayName(), Slic3r::DevUtilBackend::GetFilamentDryingPreset(), Slic3r::DevAms::GetTrays(), m_ams_filament_panel, m_guide_description_label, m_guide_page, m_guide_title_label, m_start_button, and m_temperature_input.

Referenced by OnFilamentSelectionChanged(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_filament_list()

int Slic3r::GUI::AMSDryCtrWin::update_filament_list ( DevAms * dev_ams,
MachineObject * obj )
private
1607{
1608 const bool ams_changed = is_ams_changed(dev_ams);
1609 bool rebuilt_filament_list = false;
1610
1611 // Build `m_tray_ids` and the combobox items from the preset bundle.
1612 // This list is also used as a lookup table in non-idle state (type -> name),
1613 // so it must be available even when the combobox is disabled.
1614 auto rebuild_filament_list = [&]() -> bool {
1615 m_trays_combo->Clear();
1616 m_tray_ids.clear();
1617
1618 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
1619 if (!preset_bundle || !obj) {
1620 return false;
1621 }
1622
1623 std::set<std::string> filament_id_set;
1624 auto & filaments = preset_bundle->filaments;
1625
1626 // Get nozzle diameter using the same method as AMSMaterialsSetting::Popup
1627 std::ostringstream stream;
1628 int extruder_id = obj->GetFilaSystem()->GetExtruderIdByAmsId(m_ams_info.m_ams_id);
1629 if (!obj->GetExtderSystem()->GetExtderById(extruder_id)) {
1630 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " get extruder id failed";
1631 extruder_id = 0;
1632 }
1633 stream << std::fixed << std::setprecision(1) << obj->GetExtderSystem()->GetNozzleDiameter(extruder_id);
1634 std::string nozzle_diameter_str = stream.str();
1635
1636 for (Preset *filament_it : preset_bundle->get_filament_presets_for_machine(
1637 DevPrinterConfigUtil::get_printer_display_name(obj->printer_type), nozzle_diameter_str, obj->is_support_user_preset)) {
1638 if (!filament_id_set.insert(filament_it->filament_id).second)
1639 continue;
1640 const std::string filament_alias = filaments.get_preset_alias(*filament_it, true);
1641 if (filament_alias.empty())
1642 continue;
1643 auto opt_info = preset_bundle->get_filament_by_filament_id(filament_it->filament_id);
1644 if (!opt_info.has_value())
1645 continue;
1646
1647 opt_info->filament_name = filament_alias;
1648 m_tray_ids.push_back(std::move(*opt_info));
1649 m_trays_combo->Append(wxString::FromUTF8(filament_alias));
1650 }
1651
1652 if (m_tray_ids.empty()) {
1653 BOOST_LOG_TRIVIAL(warning) << "AMSDryCtrWin::update_filament_list: No valid filaments found";
1654 return false;
1655 }
1656
1657 return true;
1658 };
1659
1660 if (ams_changed || m_tray_ids.empty() || m_trays_combo->GetCount() == 0) {
1661 // Disable start button during rebuild
1662 if (m_start_button) {
1663 m_start_button->Disable();
1664 }
1665
1666 rebuilt_filament_list = rebuild_filament_list();
1667 }
1668
1669 if (!is_dry_ctr_idle(dev_ams)) {
1670 const std::string& ams_id = dev_ams->GetAmsId();
1671 const auto settings_opt = dev_ams->GetDrySettings();
1672
1673 // Set the combobox display label by the filament "type" string.
1674 // Priority: last saved selection for this AMS (if the type matches) -> fallback to current `m_tray_ids`.
1675 auto set_filament_label_by_type = [&](const std::string& filament_type) {
1676 if (filament_type.empty()) {
1677 return;
1678 }
1679
1680 auto it_name = m_dry_setting.m_filament_names.find(ams_id);
1681 auto it_type = m_dry_setting.m_filament_type.find(ams_id);
1682 if (it_name != m_dry_setting.m_filament_names.end() && it_type != m_dry_setting.m_filament_type.end()
1683 && it_type->second == filament_type) {
1684 m_trays_combo->SetLabel(wxString::FromUTF8(it_name->second));
1685 return;
1686 }
1687
1688 const auto it = std::find_if(m_tray_ids.begin(), m_tray_ids.end(), [&](const FilamentBaseInfo& tray) {
1689 return tray.filament_type == filament_type;
1690 });
1691 if (it != m_tray_ids.end()) {
1692 m_trays_combo->SetLabel(wxString::FromUTF8(it->filament_name));
1693 }
1694 };
1695
1696 if (settings_opt.has_value()) {
1697 const auto& settings = settings_opt.value();
1698 m_temperature_input->SetValue(std::to_string(settings.dry_temp));
1699 m_time_input->SetValue(std::to_string(settings.dry_hour));
1700 set_filament_label_by_type(settings.dry_filament);
1701 } else {
1702 auto it_name = m_dry_setting.m_filament_names.find(ams_id);
1703 if (it_name != m_dry_setting.m_filament_names.end()) {
1704 m_trays_combo->SetLabel(wxString::FromUTF8(it_name->second));
1705 m_temperature_input->SetValue(std::to_string(m_dry_setting.m_dry_temp[ams_id]));
1706 m_time_input->SetValue(std::to_string(m_dry_setting.m_dry_time[ams_id]));
1707 }
1708 }
1709
1710 return 0;
1711 }
1712
1713 // Idle state: avoid re-selecting / firing selection change unless the list was rebuilt.
1714 if (!rebuilt_filament_list && !ams_changed && is_dry_ctr_idle()) {
1715 return 0;
1716 }
1717
1718 if (m_tray_ids.empty()) {
1719 return 0;
1720 }
1721
1722 // Select recommended drying temperature and default filament
1723 float min_dry_temp = std::numeric_limits<float>::max();
1724 auto* agent = wxGetApp().getAgent();
1725 std::string default_filament_id = agent ? agent->to_orca_filament_id("GFA00") : std::string("GFA00"); // compared against m_tray_ids[i].filament_id (our OF ids) below
1726 bool has_ready = false;
1727 const auto fallback_preset = DevUtilBackend::GetFilamentDryingPreset(default_filament_id);
1728 for (const auto& tray_pair : dev_ams->GetTrays()) {
1729 if (!tray_pair.second || !tray_pair.second->is_tray_info_ready()) continue;
1730 has_ready = true;
1731 wxString filament_type = tray_pair.second->get_display_filament_type();
1732 Slic3r::DevFilamentDryingPreset preset;
1733 if (filament_type.IsEmpty()) {
1734 // no filament type, is PLA
1735 if (!fallback_preset) continue;
1736 preset = fallback_preset.value();
1737 } else {
1738 auto preset_opt = tray_pair.second->get_ams_drying_preset();
1739 if (preset_opt.has_value()) {
1740 preset = preset_opt.value();
1741 } else {
1742 // no preset,is PLA
1743 if (!fallback_preset) continue;
1744 preset = fallback_preset.value();
1745 }
1746 }
1747 float cur_temp = m_printer_status.m_is_printing
1748 ? std::min({preset.filament_dev_ams_drying_temperature_on_print[dev_ams->GetAmsType()],
1750 : preset.filament_dev_ams_drying_temperature_on_idle[dev_ams->GetAmsType()];
1751 if (cur_temp < min_dry_temp) {
1752 min_dry_temp = cur_temp;
1753 default_filament_id = preset.filament_id;
1754 }
1755 }
1756 // if no tray is ready, use PLA as default
1757 if (!has_ready) {
1758 if (fallback_preset.has_value()) {
1759 Slic3r::DevFilamentDryingPreset preset = fallback_preset.value();
1760 float cur_temp = m_printer_status.m_is_printing
1761 ? std::min({preset.filament_dev_ams_drying_temperature_on_print[dev_ams->GetAmsType()],
1763 : preset.filament_dev_ams_drying_temperature_on_idle[dev_ams->GetAmsType()];
1764 min_dry_temp = cur_temp;
1765 default_filament_id = preset.filament_id;
1766 }
1767 }
1768 m_ams_info.m_recommand_dry_temp = min_dry_temp;
1769
1770 // Set default selection
1771 unsigned int default_index = 0;
1772 for (unsigned int i = 0; i < m_tray_ids.size(); i++) {
1773 if (m_tray_ids[i].filament_id == default_filament_id) {
1774 default_index = i;
1775 break;
1776 }
1777 }
1778 m_trays_combo->SetSelection(default_index);
1779 wxCommandEvent evt(wxEVT_COMBOBOX, m_trays_combo->GetId());
1780 evt.SetInt(default_index);
1782 return 1;
1783}
static std::string get_printer_display_name(const std::string &type_str)
Definition DevConfigUtil.h:71
float filament_dev_drying_softening_temperature
Definition DevFilaSystem.h:432
std::string filament_id
Definition DevFilaSystem.h:424
@ Preset
Definition calib.hpp:39
float filament_dev_ams_drying_heat_distortion_temperature
Definition DevFilaSystem.h:433
std::unordered_map< DevAmsType, float > filament_dev_ams_drying_temperature_on_print
Definition DevFilaSystem.h:430

References Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_heat_distortion_temperature, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_temperature_on_idle, Slic3r::DevFilamentDryingPreset::filament_dev_ams_drying_temperature_on_print, Slic3r::DevFilamentDryingPreset::filament_dev_drying_softening_temperature, Slic3r::DevFilamentDryingPreset::filament_id, Slic3r::filament_type(), Slic3r::PresetBundle::filaments, Slic3r::PresetBundle::get_filament_by_filament_id(), Slic3r::PresetBundle::get_filament_presets_for_machine(), Slic3r::DevPrinterConfigUtil::get_printer_display_name(), Slic3r::DevAms::GetAmsId(), Slic3r::DevAms::GetAmsType(), Slic3r::DevAms::GetDrySettings(), Slic3r::DevExtderSystem::GetExtderById(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::DevUtilBackend::GetFilamentDryingPreset(), Slic3r::MachineObject::GetFilaSystem(), Slic3r::DevExtderSystem::GetNozzleDiameter(), Slic3r::DevAms::GetTrays(), is_ams_changed(), is_dry_ctr_idle(), Slic3r::MachineObject::is_support_user_preset, m_ams_info, m_dry_setting, m_printer_status, m_start_button, m_temperature_input, m_time_input, m_tray_ids, m_trays_combo, OnFilamentSelectionChanged(), and Slic3r::MachineObject::printer_type.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_image()

int Slic3r::GUI::AMSDryCtrWin::update_image ( DevAmsType type,
DevAms::DryStatus status,
DevAms::DrySubStatus sub_status,
int humidity_percent )
private
1156{
1157 if (model == m_ams_info.m_model && status == m_ams_info.m_dry_status
1158 && sub_status == m_ams_info.m_dry_sub_status && humidity_percent == m_ams_info.m_humidity_percent) {
1159 return 0;
1160 }
1161
1162 std::string img_path;
1163
1164 if (status == DevAms::DryStatus::Off && sub_status == DevAms::DrySubStatus::Off) {
1165 img_path = get_humidity_level_img_path(humidity_percent);
1166 } else {
1167 img_path = get_dry_status_img_path(model, status, sub_status);
1168 }
1169
1170 if (img_path.empty()) {
1171 return 0;
1172 }
1173
1174 m_humidity_image = ScalableBitmap(this, img_path, AMS_DRY_STATUS_IMAGE_SIZE);
1175 m_humidity_img->SetBitmap(m_humidity_image.bmp());
1176
1177 update_img_description(status, sub_status);
1178
1179 return 1;
1180}
void update_img_description(DevAms::DryStatus status, DevAms::DrySubStatus sub_status)
Definition AMSDryControl.cpp:1121
const int AMS_DRY_STATUS_IMAGE_SIZE
Definition AMSDryControl.cpp:57
static std::string get_dry_status_img_path(DevAmsType type, DevAms::DryStatus status, DevAms::DrySubStatus sub_status)
Definition AMSDryControl.cpp:84
static std::string get_humidity_level_img_path(int humidity_percent)
Definition AMSDryControl.cpp:59

References Slic3r::GUI::AMS_DRY_STATUS_IMAGE_SIZE, Slic3r::GUI::get_dry_status_img_path(), Slic3r::GUI::get_humidity_level_img_path(), m_ams_info, m_humidity_image, m_humidity_img, Slic3r::DevAms::Off, and update_img_description().

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_img_description()

void Slic3r::GUI::AMSDryCtrWin::update_img_description ( DevAms::DryStatus status,
DevAms::DrySubStatus sub_status )
private
1122{
1123 if (status == DevAms::DryStatus::Off || status == DevAms::DryStatus::Cooling) {
1124 m_image_description->SetLabel(_L("Idle"));
1125 m_image_description_icon->Show(false);
1126 return;
1127 }
1128
1129 // Determine label text for non-idle states
1130 wxString label_text;
1131 if (status == DevAms::DryStatus::Error) {
1132 label_text = _L("Drying");
1133 } else if (sub_status == DevAms::DrySubStatus::Heating) {
1134 label_text = _L("Drying-Heating");
1135 } else if (sub_status == DevAms::DrySubStatus::Dehumidify) {
1136 label_text = _L("Drying-Dehumidifying");
1137 } else {
1138 m_image_description_icon->Show(false);
1139 return;
1140 }
1141
1142 m_image_description->SetLabel(label_text);
1143
1144 try {
1145 m_description_icon_bitmap = ScalableBitmap(this, "dev_ams_dry_ctr_heating_icon", 20);
1146 m_description_icon_bitmap.msw_rescale();
1148 m_image_description_icon->Show(true);
1149 } catch (Exception&) {
1150 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Error loading drying icon";
1151 m_image_description_icon->Show(false);
1152 }
1153}
@ Heating
Definition DevFilaSystem.h:174
@ Dehumidify
Definition DevFilaSystem.h:175

References _L, Slic3r::DevAms::Cooling, Slic3r::DevAms::Dehumidify, Slic3r::DevAms::Error, Slic3r::DevAms::Heating, m_description_icon_bitmap, m_image_description, m_image_description_icon, and Slic3r::DevAms::Off.

Referenced by update_image().

Here is the caller graph for this function:

◆ update_normal_description()

void Slic3r::GUI::AMSDryCtrWin::update_normal_description ( DevAms * dev_ams)
private
1210{
1211 if (m_tray_ids.empty() || m_trays_combo->GetSelection() >= m_tray_ids.size()) { return; }
1212
1213 FilamentBaseInfo info = m_tray_ids[m_trays_combo->GetSelection()];
1214 wxString warning_text;
1215 bool can_enable_button = true;
1216 long temp_val = 0, time_val = 0;
1217 m_temperature_input->GetValue().ToLong(&temp_val);
1218 m_time_input->GetValue().ToLong(&time_val);
1219 std::optional<Slic3r::DevFilamentDryingPreset> preset = DevUtilBackend::GetFilamentDryingPreset(info.filament_id);
1220 auto total_dry = preset.has_value() ? preset.value().ams_limitations : std::unordered_set<DevAmsType>();
1221
1222 struct AmsTempLimit { DevAmsType type; int min_temp; int max_temp; const char* name; };
1223 static const AmsTempLimit ams_limits[] = {
1224 { DevAmsType::N3F, 45, 65, "AMS2" },
1225 { DevAmsType::N3S, 45, 85, "AMS-S" }
1226 };
1227
1228 for (const auto& lim : ams_limits) {
1229 if (dev_ams->GetAmsType() == lim.type) {
1230 if (temp_val > lim.max_temp) {
1231 wxString msg = wxString::Format(_L("%s maximum drying temperature is %d\u2103." /* °C */), wxString(lim.name), lim.max_temp);
1232 warning_text += msg + "\n";
1233 can_enable_button = false;
1234 } else if (temp_val < lim.min_temp) {
1235 wxString msg = wxString::Format(_L("%s minimum drying temperature is %d\u2103." /* °C */), wxString(lim.name), lim.min_temp);
1236 warning_text += msg + "\n";
1237 can_enable_button = false;
1238 }
1239 if (total_dry.find(lim.type) == total_dry.end()) {
1240 warning_text += _L("This filament may not be completely dried.") + "\n\n";
1241 }
1242 break;
1243 }
1244 }
1245
1246 if (m_printer_status.m_is_printing && temp_val > m_ams_info.m_recommand_dry_temp) {
1247 warning_text += _L("This AMS is currently printing. To ensure print quality, the drying temperature cannot exceed the recommended drying temperature.") + "\n";
1248 can_enable_button = false;
1249 } else if (preset.has_value()) {
1250 // Only check heat distortion temperature when AMS has filament inserted;
1251 // empty AMS only needs to respect the device hardware temperature limit.
1252 bool has_filament_inserted = false;
1253 for (const auto& tray_pair : dev_ams->GetTrays()) {
1254 if (tray_pair.second && tray_pair.second->is_exists) {
1255 has_filament_inserted = true;
1256 break;
1257 }
1258 }
1259 if (has_filament_inserted) {
1260 auto limit_temperature = preset.value().filament_dev_ams_drying_heat_distortion_temperature;
1261 if (temp_val > limit_temperature) {
1262 warning_text += _L("The temperature shall not exceed the filament's heat distortion temperature") + "(" +
1263 wxString::Format(wxT("%d"), static_cast<int>(limit_temperature)) + wxString::FromUTF8(u8"\u2103" /* °C */) + ")\n";
1264 can_enable_button = false;
1265 }
1266 }
1267 }
1268
1269 if (time_val < 1) {
1270 warning_text += _L("Minimum time value cannot be less than 1.") + "\n";
1271 can_enable_button = false;
1272 } else if (time_val > 24) {
1273 warning_text += _L("Maximum time value cannot be greater than 24.") + "\n";
1274 can_enable_button = false;
1275 }
1276
1277 m_next_button->Enable(can_enable_button);
1279 m_normal_description->Wrap(FromDIP(250));
1280 m_normal_description->GetParent()->Layout();
1281}
static const std::string warning_text
Definition GLGizmoMeshBoolean.cpp:44
DevAmsType
Definition DevDefs.h:58

References _L, Slic3r::FilamentBaseInfo::filament_id, Slic3r::DevAms::GetAmsType(), Slic3r::DevUtilBackend::GetFilamentDryingPreset(), Slic3r::DevAms::GetTrays(), m_ams_info, m_next_button, m_normal_description, m_printer_status, m_temperature_input, m_time_input, m_tray_ids, m_trays_combo, Slic3r::N3F, Slic3r::N3S, and Slic3r::GUI::warning_text.

Referenced by update_normal_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_normal_state()

void Slic3r::GUI::AMSDryCtrWin::update_normal_state ( DevAms * dev_ams)
private
1284{
1285 if (is_dry_ctr_idle(dev_ams)) {
1286 m_next_button->Show(true);
1287 m_normal_description->Show(true);
1288 m_trays_combo->Enable();
1289 m_temperature_input->SetEditable(true);
1290 m_time_input->SetEditable(true);
1291
1292 m_stop_button->Hide();
1293 m_dry_error_sizer->Show(false);
1294 } else if (is_dry_ctr_err(dev_ams)) {
1295 m_dry_error_sizer->Show(true);
1296 m_next_button->Hide();
1297 m_normal_description->Hide();
1298
1299 m_trays_combo->Hide();
1300 m_temperature_input->Hide();
1301 m_time_input->Hide();
1302 m_stop_button->Show(true);
1303 } else {
1304 m_next_button->Hide();
1305 m_normal_description->Hide();
1306
1307 m_trays_combo->Disable();
1308 m_temperature_input->SetEditable(false);
1309 m_time_input->SetEditable(false);
1310 m_stop_button->Show(true);
1311 m_dry_error_sizer->Show(false);
1312 }
1313
1314 if (m_temperature_input->GetValue().IsEmpty() || m_time_input->GetValue().IsEmpty()) {
1315 m_next_button->Disable();
1316 m_start_button->Disable();
1317 } else {
1318 m_next_button->Enable();
1319 }
1320
1322}
void update_normal_description(DevAms *dev_ams)
Definition AMSDryControl.cpp:1209
bool is_dry_ctr_err(DevAms *dev_ams)
Definition AMSDryControl.cpp:1875

References is_dry_ctr_err(), is_dry_ctr_idle(), m_dry_error_sizer, m_next_button, m_normal_description, m_start_button, m_stop_button, m_temperature_input, m_time_input, m_trays_combo, and update_normal_description().

Referenced by update_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_printer_state()

void Slic3r::GUI::AMSDryCtrWin::update_printer_state ( MachineObject * obj)
private
1795{
1796 m_printer_status.m_is_printing = obj->is_in_printing()
1797 && obj->GetExtderSystem()->GetCurrentAmsId() == m_ams_info.m_ams_id;
1798}

References Slic3r::DevExtderSystem::GetCurrentAmsId(), Slic3r::MachineObject::GetExtderSystem(), Slic3r::MachineObject::is_in_printing(), m_ams_info, and m_printer_status.

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_state()

int Slic3r::GUI::AMSDryCtrWin::update_state ( DevAms * dev_ams)
private
1442{
1443 std::vector<DevAms::CannotDryReason> cannot_reasons = dev_ams->GetCannotDryReason().has_value()?
1444 dev_ams->GetCannotDryReason().value(): std::vector<DevAms::CannotDryReason>();
1445
1446 if (cannot_reasons.size() == 0 ||
1447 (cannot_reasons.size() == 1 && cannot_reasons[0] == DevAms::CannotDryReason::DryingInProgress)) {
1448 m_normal_state_sizer->Show(true);
1449 m_cannot_dry_sizer->Show(false);
1450 m_unload_button->Show(false);
1451 update_normal_state(dev_ams);
1452 } else if (cannot_reasons.size() > 0) {
1453 m_normal_state_sizer->Show(false);
1454 m_cannot_dry_sizer->Show(true);
1455
1457 m_cannot_dry_description_label->Wrap(FromDIP(300));
1458
1459 // Show unload button when ConsumableAtAmsOutlet reason is present
1460 bool has_consumable_at_outlet = std::find(cannot_reasons.begin(), cannot_reasons.end(),
1461 DevAms::CannotDryReason::ConsumableAtAmsOutlet) != cannot_reasons.end();
1462 m_unload_button->Show(has_consumable_at_outlet);
1463 }
1464
1467
1468 return 1;
1469}
@ DryingInProgress
Definition DevFilaSystem.h:192
@ ConsumableAtAmsOutlet
Definition DevFilaSystem.h:189
void restore_stop_button_if_deadline_passed()
Definition AMSDryControl.cpp:892
void update_normal_state(DevAms *dev_ams)
Definition AMSDryControl.cpp:1283
void restore_unload_button_if_deadline_passed()
Definition AMSDryControl.cpp:909
wxString organize_cannot_reasons_text(std::vector< DevAms::CannotDryReason > &reasons)
Definition AMSDryControl.cpp:1404

References Slic3r::DevAms::ConsumableAtAmsOutlet, Slic3r::DevAms::DryingInProgress, Slic3r::DevAms::GetCannotDryReason(), m_cannot_dry_description_label, m_cannot_dry_sizer, m_normal_state_sizer, m_unload_button, Slic3r::GUI::organize_cannot_reasons_text(), restore_stop_button_if_deadline_passed(), restore_unload_button_if_deadline_passed(), and update_normal_state().

Referenced by update().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_ams_filament_panel

AMSFilamentPanel* Slic3r::GUI::AMSDryCtrWin::m_ams_filament_panel {nullptr}
private

◆ [struct]

◆ m_back_button

Button* Slic3r::GUI::AMSDryCtrWin::m_back_button {nullptr}
private
147{nullptr};

Referenced by create_guide_right_section(), and msw_rescale().

◆ m_can_rescale

bool Slic3r::GUI::DPIAware< wxDialog >::m_can_rescale
privateinherited
235{ true };

◆ m_cannot_dry_description_label

Label* Slic3r::GUI::AMSDryCtrWin::m_cannot_dry_description_label = nullptr
private

◆ m_cannot_dry_sizer

wxBoxSizer* Slic3r::GUI::AMSDryCtrWin::m_cannot_dry_sizer {nullptr}
private
134{nullptr};

Referenced by create_right_panel(), and update_state().

◆ m_description_icon_bitmap

ScalableBitmap Slic3r::GUI::AMSDryCtrWin::m_description_icon_bitmap
private

◆ m_dry_error_sizer

wxBoxSizer* Slic3r::GUI::AMSDryCtrWin::m_dry_error_sizer {nullptr}
private
135{nullptr};

Referenced by create_right_panel(), and update_normal_state().

◆ [struct]

struct { ... } Slic3r::GUI::AMSDryCtrWin::m_dry_setting

◆ m_em_unit

int Slic3r::GUI::DPIAware< wxDialog >::m_em_unit
privateinherited

◆ m_fila_system

std::weak_ptr<DevFilaSystem> Slic3r::GUI::AMSDryCtrWin::m_fila_system
private

Referenced by get_fila_system(), and update().

◆ m_filament_items

std::map<std::string, FilamentItemPanel*> Slic3r::GUI::AMSDryCtrWin::m_filament_items
private

◆ m_force_rescale

bool Slic3r::GUI::DPIAware< wxDialog >::m_force_rescale
privateinherited
236{ false };

◆ m_guide_description_label

Label* Slic3r::GUI::AMSDryCtrWin::m_guide_description_label {nullptr}
private
152{nullptr};

Referenced by create_guide_info_section(), and update_filament_guide_info().

◆ m_guide_image

ScalableBitmap Slic3r::GUI::AMSDryCtrWin::m_guide_image
private

◆ m_guide_page

wxPanel* Slic3r::GUI::AMSDryCtrWin::m_guide_page {nullptr}
private
176{nullptr};

Referenced by create(), msw_rescale(), and update_filament_guide_info().

◆ m_guide_title_label

Label* Slic3r::GUI::AMSDryCtrWin::m_guide_title_label {nullptr}
private
151{nullptr};

Referenced by create_guide_info_section(), and update_filament_guide_info().

◆ m_humidity_data_label

Label* Slic3r::GUI::AMSDryCtrWin::m_humidity_data_label = nullptr
private

◆ m_humidity_image

ScalableBitmap Slic3r::GUI::AMSDryCtrWin::m_humidity_image
private

Referenced by msw_rescale(), and update_image().

◆ m_humidity_img

wxStaticBitmap* Slic3r::GUI::AMSDryCtrWin::m_humidity_img {nullptr}
private

◆ m_image_description

Label* Slic3r::GUI::AMSDryCtrWin::m_image_description {nullptr}
private

◆ m_image_description_icon

wxStaticBitmap* Slic3r::GUI::AMSDryCtrWin::m_image_description_icon {nullptr}
private

◆ m_image_placeholder

wxStaticBitmap* Slic3r::GUI::AMSDryCtrWin::m_image_placeholder {nullptr}
private
179{nullptr};

Referenced by create_guide_right_section(), and msw_rescale().

◆ m_is_ams_changed

bool Slic3r::GUI::AMSDryCtrWin::m_is_ams_changed = false
private

Referenced by is_ams_changed(), set_ams_id(), and update().

◆ m_main_simplebook

wxSimplebook* Slic3r::GUI::AMSDryCtrWin::m_main_simplebook {nullptr}
private

◆ m_new_font_point_size

int Slic3r::GUI::DPIAware< wxDialog >::m_new_font_point_size
privateinherited

◆ m_next_button

Button* Slic3r::GUI::AMSDryCtrWin::m_next_button {nullptr}
private

◆ m_normal_description

Label* Slic3r::GUI::AMSDryCtrWin::m_normal_description
private

◆ m_normal_font

wxFont Slic3r::GUI::DPIAware< wxDialog >::m_normal_font
privateinherited

◆ m_normal_state_sizer

wxBoxSizer* Slic3r::GUI::AMSDryCtrWin::m_normal_state_sizer {nullptr}
private
133{nullptr};

Referenced by create_right_panel(), and update_state().

◆ m_original_page

wxPanel* Slic3r::GUI::AMSDryCtrWin::m_original_page {nullptr}
private
117{nullptr};

Referenced by create(), msw_rescale(), and update_dryness_status().

◆ m_prev_scale_factor

float Slic3r::GUI::DPIAware< wxDialog >::m_prev_scale_factor
privateinherited

◆ [struct]

struct { ... } Slic3r::GUI::AMSDryCtrWin::m_printer_status

◆ m_progress_gauge

ProgressBar* Slic3r::GUI::AMSDryCtrWin::m_progress_gauge
private

◆ m_progress_message_index

int Slic3r::GUI::AMSDryCtrWin::m_progress_message_index
private

Referenced by OnClose(), and OnProgressTimer().

◆ m_progress_page

wxPanel* Slic3r::GUI::AMSDryCtrWin::m_progress_page
private

Referenced by create().

◆ m_progress_text

std::vector<wxString> Slic3r::GUI::AMSDryCtrWin::m_progress_text
private
Initial value:
= {
_L("Starting: Checking adapter connection"),
_L("Starting: Checking filament status"),
_L("Starting: Checking drying presets"),
_L("Starting: Checking filament location"),
_L("Starting: Checking air intake"),
}
166 {
167 _L("Starting: Checking adapter connection"),
168 _L("Starting: Checking filament status"),
169 _L("Starting: Checking drying presets"),
170 _L("Starting: Checking filament location"),
171 _L("Starting: Checking air intake"),
172 _L("Starting: Checking air vent")
173 };

Referenced by create_progress_page_sizer(), OnClose(), and OnProgressTimer().

◆ m_progress_timer

wxTimer* Slic3r::GUI::AMSDryCtrWin::m_progress_timer
private

◆ m_progress_title

Label* Slic3r::GUI::AMSDryCtrWin::m_progress_title
private

◆ m_progress_value

int Slic3r::GUI::AMSDryCtrWin::m_progress_value
private

◆ m_rotate_spool_toggle

wxCheckBox* Slic3r::GUI::AMSDryCtrWin::m_rotate_spool_toggle {nullptr}
private

◆ m_scale_factor

float Slic3r::GUI::DPIAware< wxDialog >::m_scale_factor
privateinherited

◆ m_start_button

◆ m_stop_button

Button* Slic3r::GUI::AMSDryCtrWin::m_stop_button {nullptr}
private

◆ m_stop_button_restore_deadline

std::optional<std::chrono::steady_clock::time_point> Slic3r::GUI::AMSDryCtrWin::m_stop_button_restore_deadline
private

◆ m_temperature_data_label

Label* Slic3r::GUI::AMSDryCtrWin::m_temperature_data_label = nullptr
private

◆ m_temperature_input

◆ m_time_data_label

Label* Slic3r::GUI::AMSDryCtrWin::m_time_data_label = nullptr
private

◆ m_time_descrition_container

wxBoxSizer* Slic3r::GUI::AMSDryCtrWin::m_time_descrition_container = nullptr
private

◆ m_time_input

◆ m_tray_ids

std::vector<FilamentBaseInfo> Slic3r::GUI::AMSDryCtrWin::m_tray_ids
private

◆ m_trays_combo

◆ m_unload_button

Button* Slic3r::GUI::AMSDryCtrWin::m_unload_button {nullptr}
private

◆ m_unload_button_restore_deadline

std::optional<std::chrono::steady_clock::time_point> Slic3r::GUI::AMSDryCtrWin::m_unload_button_restore_deadline
private

The documentation for this class was generated from the following files: