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

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

Inheritance diagram for Slic3r::GUI::SendMultiMachinePage:
Collaboration diagram for Slic3r::GUI::SendMultiMachinePage:

Public Member Functions

 SendMultiMachinePage (Plater *plater=nullptr)
 ~SendMultiMachinePage ()
void prepare (int plate_idx)
void on_dpi_changed (const wxRect &suggested_rect)
void on_sys_color_changed ()
void refresh_user_device ()
void on_send (wxCommandEvent &event)
bool Show (bool show)
PrintParams request_params (MachineObject *obj)
bool get_ams_mapping_result (std::string &mapping_array_str, std::string &mapping_array_str2, std::string &ams_mapping_info)
wxBoxSizer * create_item_title (wxString title, wxWindow *parent, wxString tooltip)
wxBoxSizer * create_item_checkbox (wxString title, wxWindow *parent, wxString tooltip, int padding_left, std::string param)
wxBoxSizer * create_item_input (wxString str_before, wxString str_after, wxWindow *parent, wxString tooltip, std::string param)
wxBoxSizer * create_item_radiobox (wxString title, wxWindow *parent, wxString tooltip, int groupid, std::string param)
wxPanel * create_page ()
void sync_ams_list ()
void set_default_normal (const ThumbnailData &data)
void set_default ()
void on_rename_enter ()
void check_fcous_state (wxWindow *window)
void check_focus (wxWindow *window)
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 OnSelectRadio (wxMouseEvent &event)
void on_select_radio (std::string param)
bool get_value_radio (std::string param)
void on_set_finish_mapping (wxCommandEvent &evt)
void on_rename_click (wxCommandEvent &event)
void on_timer (wxTimerEvent &event)
void init_timer ()

Private Member Functions

void update_em_unit ()
bool is_new_scale_factor () const
void rescale (const wxRect &suggested_rect)

Private Attributes

std::map< std::string, SendDeviceItem * > m_device_items
wxTimer * m_refresh_timer = nullptr
SortItem m_sort
bool device_name_big { true }
bool device_printable_big { true }
bool device_en_ams_big { true }
Button * m_button_send { nullptr }
wxScrolledWindow * scroll_macine_list { nullptr }
wxBoxSizer * sizer_machine_list { nullptr }
Plater * m_plater { nullptr }
int m_print_plate_idx
bool m_is_canceled { false }
bool m_export_3mf_cancel { false }
AppConfig * app_config
wxPanel * m_main_page { nullptr }
wxScrolledWindow * m_main_scroll { nullptr }
wxBoxSizer * m_sizer_body { nullptr }
wxGridSizer * m_ams_list_sizer { nullptr }
AmsMapingPopup * m_mapping_popup { nullptr }
AmsRadioSelectorList m_radio_group
MaterialHash m_material_list
std::map< std::string, CheckBox * > m_checkbox_map
std::map< std::string, TextInput * > m_input_map
std::vector< FilamentInfo > m_filaments
std::vector< FilamentInfo > m_ams_mapping_result
int m_current_filament_id { 0 }
StateColor btn_bg_enable
wxPanel * m_table_head_panel { nullptr }
wxBoxSizer * m_table_head_sizer { nullptr }
CheckBox * m_select_checkbox { nullptr }
Button * m_printer_name { nullptr }
Button * m_device_status { nullptr }
Button * m_ams { nullptr }
Button * m_refresh_button { nullptr }
wxSimplebook * m_rename_switch_panel { nullptr }
wxPanel * m_rename_normal_panel { nullptr }
wxPanel * m_rename_edit_panel { nullptr }
TextInput * m_rename_input { nullptr }
ScalableButton * m_rename_button { nullptr }
wxBoxSizer * rename_sizer_v { nullptr }
wxBoxSizer * rename_sizer_h { nullptr }
wxStaticText * m_task_name { nullptr }
wxString m_current_project_name
bool m_is_rename_mode { false }
wxPanel * m_title_panel { nullptr }
wxBoxSizer * m_title_sizer { nullptr }
wxBoxSizer * m_text_sizer { nullptr }
wxStaticText * m_stext_time { nullptr }
wxStaticText * m_stext_weight { nullptr }
wxStaticBitmap * timeimg { nullptr }
ScalableBitmap * print_time { nullptr }
wxStaticBitmap * weightimg { nullptr }
ScalableBitmap * print_weight { nullptr }
ThumbnailPanel * m_thumbnail_panel {nullptr}
wxPanel * m_panel_image { nullptr }
wxBoxSizer * m_image_sizer { nullptr }
wxStaticText * m_tip_text { nullptr }
Button * m_button_add { nullptr }
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

◆ SendMultiMachinePage()

Slic3r::GUI::SendMultiMachinePage::SendMultiMachinePage ( Plater * plater = nullptr)
327 : DPIDialog(static_cast<wxWindow*>(wxGetApp().mainframe), wxID_ANY,
328 _L("Send to Multi-device"),
329 wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER)
331{
332#ifdef __WINDOWS__
333 SetDoubleBuffered(true);
334#endif //__WINDOWS__
335
337
338 SetBackgroundColour(*wxWHITE);
339
340 wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL);
341
342 auto line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1), wxTAB_TRAVERSAL);
343 line_top->SetBackgroundColour(wxColour(166, 169, 170));
344 main_sizer->Add(line_top, 0, wxEXPAND, 0);
345 main_sizer->AddSpacer(FromDIP(10));
346
347 m_main_scroll = new ScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL);
348 m_main_scroll->SetBackgroundColour(*wxWHITE);
349 m_main_scroll->SetScrollRate(5, FromDIP(20));
350
351 m_sizer_body = new wxBoxSizer(wxVERTICAL);
353 m_sizer_body->Add(m_main_page, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(38));
354 m_main_scroll->SetSizerAndFit(m_sizer_body);
355 m_main_scroll->Layout();
356 m_main_scroll->Fit();
357 m_main_scroll->Centre(wxBOTH);
358
359 main_sizer->Add(m_main_scroll, 1, wxEXPAND);
360
361 SetSizer(main_sizer);
362 Layout();
363 Fit();
364 Centre(wxBOTH);
365
366 m_mapping_popup = new AmsMapingPopup(m_main_page);
367 Bind(EVT_SET_FINISH_MAPPING, &SendMultiMachinePage::on_set_finish_mapping, this);
368 Bind(wxEVT_LEFT_DOWN, [this](auto& e) {check_fcous_state(this); e.Skip(); });
369 m_main_page->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {check_fcous_state(this); e.Skip(); });
370 m_main_scroll->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {check_fcous_state(this); e.Skip(); });
371
372 init_timer();
373 Bind(wxEVT_TIMER, &SendMultiMachinePage::on_timer, this);
374 wxGetApp().UpdateDlgDarkUI(this);
375}
#define _L(s)
Definition OBJ.cpp:34
void init_timer()
Definition SendMultiMachinePage.cpp:1782
void on_set_finish_mapping(wxCommandEvent &evt)
Definition SendMultiMachinePage.cpp:1074
wxPanel * create_page()
Definition SendMultiMachinePage.cpp:1129
wxScrolledWindow * m_main_scroll
Definition SendMultiMachinePage.hpp:125
wxBoxSizer * m_sizer_body
Definition SendMultiMachinePage.hpp:126
AmsMapingPopup * m_mapping_popup
Definition SendMultiMachinePage.hpp:128
Plater * m_plater
Definition SendMultiMachinePage.hpp:117
wxPanel * m_main_page
Definition SendMultiMachinePage.hpp:124
void check_fcous_state(wxWindow *window)
Definition SendMultiMachinePage.cpp:1757
void on_timer(wxTimerEvent &event)
Definition SendMultiMachinePage.cpp:1787
AppConfig * app_config
Definition SendMultiMachinePage.hpp:122
static Plater * plater()
Definition GUI_Factories.cpp:400
AppConfig * get_app_config()
Definition GUI.cpp:539

References _L, app_config, check_fcous_state(), create_page(), Slic3r::GUI::get_app_config(), init_timer(), m_main_page, m_main_scroll, m_mapping_popup, m_plater, m_sizer_body, on_set_finish_mapping(), on_timer(), and Slic3r::GUI::plater().

Here is the call graph for this function:

◆ ~SendMultiMachinePage()

Slic3r::GUI::SendMultiMachinePage::~SendMultiMachinePage ( )
378{
379 // TODO
380 m_radio_group.DeleteContents(true);
381
382 if (m_refresh_timer)
383 m_refresh_timer->Stop();
384 delete m_refresh_timer;
385}
AmsRadioSelectorList m_radio_group
Definition SendMultiMachinePage.hpp:130
wxTimer * m_refresh_timer
Definition SendMultiMachinePage.hpp:106

References m_radio_group, and m_refresh_timer.

Member Function Documentation

◆ check_fcous_state()

void Slic3r::GUI::SendMultiMachinePage::check_fcous_state ( wxWindow * window)
1758{
1759 check_focus(window);
1760 auto children = window->GetChildren();
1761 for (auto child : children) {
1762 check_fcous_state(child);
1763 }
1764}
void check_focus(wxWindow *window)
Definition SendMultiMachinePage.cpp:1766

References check_fcous_state(), and check_focus().

Referenced by SendMultiMachinePage(), and check_fcous_state().

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

◆ check_focus()

void Slic3r::GUI::SendMultiMachinePage::check_focus ( wxWindow * window)
1767{
1768 if (window == m_rename_input || window == m_rename_input->GetTextCtrl()) {
1770 }
1771}
void on_rename_enter()
Definition SendMultiMachinePage.cpp:1679
TextInput * m_rename_input
Definition SendMultiMachinePage.hpp:154

References m_rename_input, and on_rename_enter().

Referenced by check_fcous_state().

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

◆ create_item_checkbox()

wxBoxSizer * Slic3r::GUI::SendMultiMachinePage::create_item_checkbox ( wxString title,
wxWindow * parent,
wxString tooltip,
int padding_left,
std::string param )
904{
905 wxBoxSizer* m_sizer_checkbox = new wxBoxSizer(wxHORIZONTAL);
906 m_sizer_checkbox->Add(0, 0, 0, wxEXPAND | wxLEFT, 23);
907 auto checkbox = new ::CheckBox(parent);
908
909 checkbox->SetValue((app_config->get("print", param) == "1") ? true : false);
910
911 m_sizer_checkbox->Add(checkbox, 0, wxALIGN_CENTER, 0);
912 m_sizer_checkbox->Add(0, 0, 0, wxEXPAND | wxLEFT, 8);
913
914 auto checkbox_title = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, 0);
915 checkbox_title->SetForegroundColour(SEND_DESIGN_GRAY900_COLOR);
916 checkbox_title->SetFont(::Label::Body_13);
917
918 auto size = checkbox_title->GetTextExtent(title);
919 checkbox_title->SetMinSize(wxSize(size.x + FromDIP(5), -1));
920 checkbox_title->Wrap(-1);
921 m_sizer_checkbox->Add(checkbox_title, 0, wxALIGN_CENTER | wxALL, 3);
922
923 // save
924 checkbox->Bind(wxEVT_TOGGLEBUTTON, [this, checkbox, param](wxCommandEvent& e) {
925 app_config->set_str("print", param, checkbox->GetValue() ? std::string("1") : std::string("0"));
926 app_config->save();
927 e.Skip();
928 });
929
930 checkbox->SetToolTip(tooltip);
931 m_checkbox_map.emplace(param, checkbox);
932 return m_sizer_checkbox;
933}
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
#define SEND_DESIGN_GRAY900_COLOR
Definition SendMultiMachinePage.hpp:46
static wxFont Body_13
Definition Label.hpp:54
std::map< std::string, CheckBox * > m_checkbox_map
Definition SendMultiMachinePage.hpp:132

References app_config, Label::Body_13, m_checkbox_map, SEND_DESIGN_GRAY900_COLOR, and wxStaticText.

Referenced by create_page().

Here is the caller graph for this function:

◆ create_item_input()

wxBoxSizer * Slic3r::GUI::SendMultiMachinePage::create_item_input ( wxString str_before,
wxString str_after,
wxWindow * parent,
wxString tooltip,
std::string param )
936{
937 wxBoxSizer* sizer_input = new wxBoxSizer(wxHORIZONTAL);
938 auto input_title = new wxStaticText(parent, wxID_ANY, str_before);
939 input_title->SetForegroundColour(SEND_DESIGN_GRAY900_COLOR);
940 input_title->SetFont(::Label::Body_13);
941 input_title->SetToolTip(tooltip);
942 input_title->Wrap(-1);
943
944 auto input = new ::TextInput(parent, wxEmptyString, wxEmptyString, wxEmptyString, wxDefaultPosition, SEND_DESIGN_INPUT_SIZE, wxTE_PROCESS_ENTER);
945 StateColor input_bg(std::pair<wxColour, int>(wxColour("#F0F0F1"), StateColor::Disabled), std::pair<wxColour, int>(*wxWHITE, StateColor::Enabled));
946 input->SetBackgroundColor(input_bg);
947 input->GetTextCtrl()->SetValue(app_config->get(param));
948 wxTextValidator validator(wxFILTER_DIGITS);
949 input->GetTextCtrl()->SetValidator(validator);
950
951 auto second_title = new wxStaticText(parent, wxID_ANY, str_after, wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END);
952 second_title->SetForegroundColour(SEND_DESIGN_GRAY900_COLOR);
953 second_title->SetFont(::Label::Body_13);
954 second_title->SetToolTip(tooltip);
955 second_title->Wrap(-1);
956
957 sizer_input->Add(0, 0, 0, wxEXPAND | wxLEFT, 23);
958 sizer_input->Add(input_title, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3);
959 sizer_input->Add(input, 0, wxALIGN_CENTER_VERTICAL, 0);
960 sizer_input->Add(0, 0, 0, wxEXPAND | wxLEFT, 3);
961 sizer_input->Add(second_title, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3);
962
963 input->GetTextCtrl()->Bind(wxEVT_TEXT_ENTER, [this, param, input](wxCommandEvent& e) {
964 auto value = input->GetTextCtrl()->GetValue();
965 app_config->set(param, std::string(value.mb_str()));
966 app_config->save();
967 e.Skip();
968 });
969
970 input->GetTextCtrl()->Bind(wxEVT_KILL_FOCUS, [this, param, input](wxFocusEvent& e) {
971 auto value = input->GetTextCtrl()->GetValue();
972 app_config->set(param, std::string(value.mb_str()));
973 app_config->save();
974 e.Skip();
975 });
976
977 m_input_map.emplace(param, input);
978 return sizer_input;
979}
#define SEND_DESIGN_INPUT_SIZE
Definition SendMultiMachinePage.hpp:53
std::map< std::string, TextInput * > m_input_map
Definition SendMultiMachinePage.hpp:133
@ Disabled
Definition StateColor.hpp:22
@ Enabled
Definition StateColor.hpp:17

References app_config, Label::Body_13, StateColor::Disabled, StateColor::Enabled, m_input_map, SEND_DESIGN_GRAY900_COLOR, SEND_DESIGN_INPUT_SIZE, and wxStaticText.

Referenced by create_page().

Here is the caller graph for this function:

◆ create_item_radiobox()

wxBoxSizer * Slic3r::GUI::SendMultiMachinePage::create_item_radiobox ( wxString title,
wxWindow * parent,
wxString tooltip,
int groupid,
std::string param )
982{
983 wxBoxSizer* radiobox_sizer = new wxBoxSizer(wxHORIZONTAL);
984
985 RadioBox* radiobox = new RadioBox(parent);
986 radiobox->SetBackgroundColour(wxColour(248, 248, 248));
987 radiobox->Bind(wxEVT_LEFT_DOWN, &SendMultiMachinePage::OnSelectRadio, this);
988
989 AmsRadioSelector* rs = new AmsRadioSelector;
990 rs->m_groupid = groupid;
991 rs->m_param_name = param;
992 rs->m_radiobox = radiobox;
993 rs->m_selected = false;
994 m_radio_group.Append(rs);
995
996 wxStaticText* text = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize);
997 radiobox_sizer->Add(radiobox, 0, wxLEFT, FromDIP(23));
998 radiobox_sizer->Add(text, 0, wxLEFT, FromDIP(10));
999 radiobox->SetToolTip(tooltip);
1000 text->SetToolTip(tooltip);
1001 return radiobox_sizer;
1002}
void OnSelectRadio(wxMouseEvent &event)
Definition SendMultiMachinePage.cpp:1004

References Slic3r::GUI::AmsRadioSelector::m_groupid, Slic3r::GUI::AmsRadioSelector::m_param_name, m_radio_group, Slic3r::GUI::AmsRadioSelector::m_radiobox, Slic3r::GUI::AmsRadioSelector::m_selected, OnSelectRadio(), and wxStaticText.

Referenced by create_page().

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

◆ create_item_title()

wxBoxSizer * Slic3r::GUI::SendMultiMachinePage::create_item_title ( wxString title,
wxWindow * parent,
wxString tooltip )
882{
883 wxBoxSizer* m_sizer_title = new wxBoxSizer(wxHORIZONTAL);
884
885 auto m_title = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, 0);
886 m_title->SetForegroundColour(SEND_DESIGN_GRAY800_COLOR);
887 m_title->SetFont(::Label::Head_13);
888 m_title->Wrap(-1);
889 m_title->SetToolTip(tooltip);
890
891 auto m_line = new wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(-1, 1), wxTAB_TRAVERSAL);
892 m_line->SetBackgroundColour(SEND_DESIGN_GRAY400_COLOR);
893
894 m_sizer_title->Add(m_title, 0, wxALIGN_CENTER | wxALL, 3);
895 m_sizer_title->Add(0, 0, 0, wxLEFT, 9);
896 wxBoxSizer* sizer_line = new wxBoxSizer(wxVERTICAL);
897 sizer_line->Add(m_line, 0, wxEXPAND, 0);
898 m_sizer_title->Add(sizer_line, 1, wxALIGN_CENTER, 0);
899
900 return m_sizer_title;
901}
#define SEND_DESIGN_GRAY800_COLOR
Definition SendMultiMachinePage.hpp:47
#define SEND_DESIGN_GRAY400_COLOR
Definition SendMultiMachinePage.hpp:49
static wxFont Head_13
Definition Label.hpp:46

References Label::Head_13, SEND_DESIGN_GRAY400_COLOR, SEND_DESIGN_GRAY800_COLOR, and wxStaticText.

Referenced by create_page().

Here is the caller graph for this function:

◆ create_page()

wxPanel * Slic3r::GUI::SendMultiMachinePage::create_page ( )
1130{
1131 auto main_page = new wxPanel(m_main_scroll, wxID_ANY, wxDefaultPosition, wxDefaultSize);
1132 main_page->SetBackgroundColour(*wxWHITE);
1133 wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
1134
1135 // add title
1136 m_title_panel = new wxPanel(main_page, wxID_ANY, wxDefaultPosition, wxDefaultSize);
1137 m_title_panel->SetBackgroundColour(*wxWHITE);
1138 m_title_sizer = new wxBoxSizer(wxHORIZONTAL);
1139
1140 m_rename_switch_panel = new wxSimplebook(m_title_panel);
1141 m_rename_switch_panel->SetMinSize(wxSize(FromDIP(240), FromDIP(25)));
1142 m_rename_switch_panel->SetMaxSize(wxSize(FromDIP(240), FromDIP(25)));
1143
1144 m_rename_normal_panel = new wxPanel(m_rename_switch_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
1145 m_rename_normal_panel->SetBackgroundColour(*wxWHITE);
1146 rename_sizer_v = new wxBoxSizer(wxVERTICAL);
1147 rename_sizer_h = new wxBoxSizer(wxHORIZONTAL);
1148
1149 m_task_name = new wxStaticText(m_rename_normal_panel, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END | wxALIGN_CENTRE);
1150 m_task_name->SetFont(::Label::Body_13);
1151 m_task_name->SetMinSize(wxSize(FromDIP(200), -1));
1152 m_task_name->SetMaxSize(wxSize(FromDIP(200), -1));
1153 m_rename_button = new ScalableButton(m_rename_normal_panel, wxID_ANY, "ams_editable");
1154 m_rename_button->SetBackgroundColour(*wxWHITE);
1155 rename_sizer_h->Add(m_task_name, 0, wxALIGN_CENTER, 0);
1156 rename_sizer_h->Add(m_rename_button, 0, wxALIGN_CENTER, 0);
1157 rename_sizer_v->Add(rename_sizer_h, 1, wxALIGN_CENTER, 0);
1159 m_rename_normal_panel->Layout();
1161
1162 //rename edit
1163 m_rename_edit_panel = new wxPanel(m_rename_switch_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
1164 m_rename_edit_panel->SetBackgroundColour(*wxWHITE);
1165 auto rename_edit_sizer_v = new wxBoxSizer(wxVERTICAL);
1166
1167 m_rename_input = new ::TextInput(m_rename_edit_panel, wxEmptyString, wxEmptyString, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
1168 m_rename_input->GetTextCtrl()->SetFont(::Label::Body_13);
1169 m_rename_input->SetSize(wxSize(FromDIP(220), FromDIP(24)));
1170 m_rename_input->SetMinSize(wxSize(FromDIP(220), FromDIP(24)));
1171 m_rename_input->SetMaxSize(wxSize(FromDIP(220), FromDIP(24)));
1172 m_rename_input->Bind(wxEVT_TEXT_ENTER, [this](auto& e) {on_rename_enter(); });
1173 m_rename_input->Bind(wxEVT_KILL_FOCUS, [this](auto& e) {
1174 if (!m_rename_input->HasFocus() && !m_task_name->HasFocus())
1176 else
1177 e.Skip(); });
1178 rename_edit_sizer_v->Add(m_rename_input, 1, wxALIGN_CENTER, 0);
1179
1180 m_rename_edit_panel->SetSizer(rename_edit_sizer_v);
1181 m_rename_edit_panel->Layout();
1182 rename_edit_sizer_v->Fit(m_rename_edit_panel);
1183
1184 m_rename_button->Bind(wxEVT_BUTTON, &SendMultiMachinePage::on_rename_click, this);
1185 m_rename_switch_panel->AddPage(m_rename_normal_panel, wxEmptyString, true);
1186 m_rename_switch_panel->AddPage(m_rename_edit_panel, wxEmptyString, false);
1187 Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
1188 if (e.GetKeyCode() == WXK_ESCAPE) {
1189 if (m_rename_switch_panel->GetSelection() == 0) {
1190 e.Skip();
1191 }
1192 else {
1193 m_rename_switch_panel->SetSelection(0);
1195 m_rename_normal_panel->Layout();
1196 }
1197 }
1198 else {
1199 e.Skip();
1200 }
1201 });
1202
1203 m_text_sizer = new wxBoxSizer(wxVERTICAL);
1204 m_text_sizer->Add(m_rename_switch_panel, 0, wxALIGN_CENTER_HORIZONTAL, 0);
1205
1206 m_panel_image = new wxPanel(m_title_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
1207 m_image_sizer = new wxBoxSizer(wxHORIZONTAL);
1208 m_thumbnail_panel = new ThumbnailPanel(m_panel_image);
1210 m_thumbnail_panel->SetMinSize(wxSize(THUMBNAIL_SIZE, THUMBNAIL_SIZE));
1211 m_thumbnail_panel->SetMaxSize(wxSize(THUMBNAIL_SIZE, THUMBNAIL_SIZE));
1212 m_thumbnail_panel->SetBackgroundColour(*wxRED);
1213 m_image_sizer->Add(m_thumbnail_panel, 0, wxALIGN_CENTER, 0);
1214 m_panel_image->SetSizer(m_image_sizer);
1215 m_panel_image->Layout();
1216 m_title_sizer->Add(m_panel_image, 0, wxLEFT, 0);
1217
1218 wxBoxSizer* m_sizer_basic = new wxBoxSizer(wxHORIZONTAL);
1219 wxBoxSizer* m_sizer_basic_time = new wxBoxSizer(wxHORIZONTAL);
1220 wxBoxSizer* m_sizer_basic_weight = new wxBoxSizer(wxHORIZONTAL);
1221
1222 print_time = new ScalableBitmap(m_title_panel, "print-time", 18);
1223 timeimg = new wxStaticBitmap(m_title_panel, wxID_ANY, print_time->bmp(), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)), 0);
1224 m_sizer_basic_time->Add(timeimg, 1, wxEXPAND | wxALL, FromDIP(5));
1225 m_stext_time = new wxStaticText(m_title_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT);
1226 m_sizer_basic_time->Add(m_stext_time, 0, wxALL, FromDIP(5));
1227 m_sizer_basic->Add(m_sizer_basic_time, 0, wxALIGN_CENTER, 0);
1228 m_sizer_basic->Add(0, 0, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
1229
1230 print_weight = new ScalableBitmap(m_title_panel, "print-weight", 18);
1231 weightimg = new wxStaticBitmap(m_title_panel, wxID_ANY, print_weight->bmp(), wxDefaultPosition, wxSize(FromDIP(18), FromDIP(18)), 0);
1232 m_sizer_basic_weight->Add(weightimg, 1, wxEXPAND | wxALL, FromDIP(5));
1233 m_stext_weight = new wxStaticText(m_title_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
1234 m_sizer_basic_weight->Add(m_stext_weight, 0, wxALL, FromDIP(5));
1235 m_sizer_basic->Add(m_sizer_basic_weight, 0, wxALIGN_CENTER, 0);
1236
1237 m_text_sizer->Add(m_sizer_basic, wxALIGN_CENTER, 0);
1238 m_title_sizer->Add(m_text_sizer, 0, wxALIGN_CENTER_VERTICAL, 0);
1239 m_title_panel->SetSizer(m_title_sizer);
1240 m_title_panel->Layout();
1241 sizer->Add(m_title_panel, 0, wxALIGN_CENTER_HORIZONTAL, 0);
1242
1243 // add filament
1244 wxBoxSizer* title_filament = create_item_title(_L("Filament"), main_page, "");
1245 wxBoxSizer* radio_sizer = new wxBoxSizer(wxHORIZONTAL);
1246 wxBoxSizer* use_external_sizer = create_item_radiobox(_L("Use External Spool"), main_page, "", 0, "use_external");
1247 wxBoxSizer* use_ams_sizer = create_item_radiobox(_L("Use AMS"), main_page, "", 0, "use_ams");
1248 radio_sizer->Add(use_external_sizer, 0, wxLeft, FromDIP(20));
1249 radio_sizer->Add(use_ams_sizer, 0, wxLeft, FromDIP(5));
1250 sizer->Add(title_filament, 0, wxEXPAND, 0);
1251 sizer->Add(radio_sizer, 0, wxLEFT, FromDIP(20));
1252 sizer->AddSpacer(FromDIP(5));
1253 on_select_radio("use_external");
1254
1255 // add ams item
1256 m_ams_list_sizer = new wxGridSizer(0, 4, 0, FromDIP(5));
1257
1258 sizer->Add(m_ams_list_sizer, 0, wxLEFT, FromDIP(25));
1259 sizer->AddSpacer(FromDIP(10));
1260
1261 // select printer
1262 wxBoxSizer* title_select_printer = create_item_title(_L("Select Printers"), main_page, "");
1263
1264 // add table head
1265 StateColor head_bg(
1266 std::pair<wxColour, int>(TABLE_HEAD_PRESSED_COLOUR, StateColor::Pressed),
1267 std::pair<wxColour, int>(TABLE_HEAR_NORMAL_COLOUR, StateColor::Normal)
1268 );
1269
1270 m_table_head_panel = new wxPanel(main_page, wxID_ANY, wxDefaultPosition, wxDefaultSize);
1271 m_table_head_panel->SetMinSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), -1));
1272 m_table_head_panel->SetMaxSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), -1));
1273 m_table_head_panel->SetBackgroundColour(TABLE_HEAR_NORMAL_COLOUR);
1274 m_table_head_sizer = new wxBoxSizer(wxHORIZONTAL);
1275
1276 m_select_checkbox = new CheckBox(m_table_head_panel, wxID_ANY);
1277 m_table_head_sizer->AddSpacer(FromDIP(SEND_LEFT_PADDING_LEFT));
1278 m_table_head_sizer->Add(m_select_checkbox, 0, wxALIGN_CENTER_VERTICAL, 0);
1279
1280 m_select_checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
1281 if (m_select_checkbox->GetValue()) {
1282 for (auto it = m_device_items.begin(); it != m_device_items.end(); it++) {
1283
1284 if (it->second->state_printable <= 2) {
1285 it->second->selected();
1286 }
1287 }
1288 }
1289 else {
1290 for (auto it = m_device_items.begin(); it != m_device_items.end(); it++) {
1291 it->second->unselected();
1292 }
1293 }
1294 Refresh(false);
1295 e.Skip();
1296 });
1297
1298 m_printer_name = new Button(m_table_head_panel, _L("Device Name"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
1299 m_printer_name->SetBackgroundColor(head_bg);
1300 m_printer_name->SetCornerRadius(0);
1302 m_printer_name->SetMinSize(wxSize(FromDIP(SEND_LEFT_DEV_NAME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1303 m_printer_name->SetMaxSize(wxSize(FromDIP(SEND_LEFT_DEV_NAME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1304 m_printer_name->SetCenter(false);
1305 m_printer_name->Bind(wxEVT_ENTER_WINDOW, [&](wxMouseEvent& evt) {
1306 SetCursor(wxCURSOR_HAND);
1307 });
1308 m_printer_name->Bind(wxEVT_LEAVE_WINDOW, [&](wxMouseEvent& evt) {
1309 SetCursor(wxCURSOR_ARROW);
1310 });
1311 m_printer_name->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
1314 this->refresh_user_device();
1315 });
1316
1317 m_table_head_sizer->Add( 0, 0, 0, wxLEFT, FromDIP(10) );
1318 m_table_head_sizer->Add(m_printer_name, 0, wxALIGN_CENTER_VERTICAL, 0);
1319
1320 m_device_status = new Button(m_table_head_panel, _L("Device Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE);
1321 m_device_status->SetBackgroundColor(head_bg);
1323 m_device_status->SetCornerRadius(0);
1324 m_device_status->SetMinSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1325 m_device_status->SetMaxSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1326 m_device_status->SetCenter(false);
1327 m_device_status->Bind(wxEVT_ENTER_WINDOW, [&](wxMouseEvent& evt) {
1328 SetCursor(wxCURSOR_HAND);
1329 });
1330 m_device_status->Bind(wxEVT_LEAVE_WINDOW, [&](wxMouseEvent& evt) {
1331 SetCursor(wxCURSOR_ARROW);
1332 });
1333 m_device_status->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
1336 this->refresh_user_device();
1337 evt.Skip();
1338 });
1339 m_table_head_sizer->Add(m_device_status, 0, wxALIGN_CENTER_VERTICAL, 0);
1340
1341 /*m_task_status = new Button(m_table_head_panel, _L("Task Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SIZE);
1342 m_task_status->SetBackgroundColor(head_bg);
1343 m_task_status->SetFont(TABLE_HEAD_FONT);
1344 m_task_status->SetCornerRadius(0);
1345 m_task_status->SetMinSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(DEVICE_ITEM_MAX_HEIGHT)));
1346 m_task_status->SetMaxSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(DEVICE_ITEM_MAX_HEIGHT)));
1347 m_task_status->SetCenter(false);
1348 m_task_status->Bind(wxEVT_ENTER_WINDOW, [&](wxMouseEvent& evt) {
1349 SetCursor(wxCURSOR_HAND);
1350 });
1351 m_task_status->Bind(wxEVT_LEAVE_WINDOW, [&](wxMouseEvent& evt) {
1352 SetCursor(wxCURSOR_ARROW);
1353 });
1354 m_task_status->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
1355 device_printable_big = !device_printable_big;
1356 this->m_sort.set_role(SortItem::SortRule::SR_PRINTABLE, device_printable_big);
1357 this->refresh_user_device();
1358 evt.Skip();
1359 });*/
1360
1361 //m_table_head_sizer->Add(m_task_status, 0, wxALIGN_CENTER_VERTICAL, 0);
1362
1363 m_ams = new Button(m_table_head_panel, _L("AMS Status"), "toolbar_double_directional_arrow", wxNO_BORDER, ICON_SINGLE_SIZE, false);
1364 m_ams->SetBackgroundColor(head_bg);
1365 m_ams->SetCornerRadius(0);
1366 m_ams->SetFont(TABLE_HEAD_FONT);
1367 m_ams->SetMinSize(wxSize(FromDIP(TASK_LEFT_SEND_TIME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1368 m_ams->SetMaxSize(wxSize(FromDIP(TASK_LEFT_SEND_TIME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1369 m_ams->SetCenter(false);
1370 m_ams->Bind(wxEVT_ENTER_WINDOW, [&](wxMouseEvent& evt) {
1371 SetCursor(wxCURSOR_HAND);
1372 });
1373 m_ams->Bind(wxEVT_LEAVE_WINDOW, [&](wxMouseEvent& evt) {
1374 SetCursor(wxCURSOR_ARROW);
1375 });
1376 m_ams->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
1379 this->refresh_user_device();
1380 evt.Skip();
1381 });
1382 m_table_head_sizer->Add(m_ams, 0, wxALIGN_CENTER_VERTICAL, 0);
1383
1384 m_refresh_button = new Button(m_table_head_panel, "", "mall_control_refresh", wxNO_BORDER, ICON_SINGLE_SIZE, false);
1385 m_refresh_button->SetBackgroundColor(head_bg);
1386 m_refresh_button->SetCornerRadius(0);
1388 m_refresh_button->SetMinSize(wxSize(FromDIP(50), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1389 m_refresh_button->SetMaxSize(wxSize(FromDIP(50), FromDIP(SEND_ITEM_MAX_HEIGHT)));
1390 m_refresh_button->Bind(wxEVT_ENTER_WINDOW, [&](wxMouseEvent& evt) {
1391 SetCursor(wxCURSOR_HAND);
1392 });
1393 m_refresh_button->Bind(wxEVT_LEAVE_WINDOW, [&](wxMouseEvent& evt) {
1394 SetCursor(wxCURSOR_ARROW);
1395 });
1396 m_refresh_button->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent& evt) {
1397 this->refresh_user_device();
1398 evt.Skip();
1399 });
1400 m_table_head_sizer->Add(m_refresh_button, 0, wxALIGN_CENTER_VERTICAL, 0);
1401
1403 m_table_head_panel->Layout();
1404
1405 m_tip_text = new wxStaticText(main_page, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER);
1406 m_tip_text->SetMinSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), -1));
1407 m_tip_text->SetMaxSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), -1));
1408 m_tip_text->SetLabel(_L("Please select the devices you would like to manage here (up to 6 devices)"));
1409 m_tip_text->SetForegroundColour(SEND_DESIGN_GRAY800_COLOR);
1410 m_tip_text->SetFont(::Label::Head_20);
1411 m_tip_text->Wrap(-1);
1412
1413 m_button_add = new Button(main_page, _L("Add"));
1415 m_button_add->Bind(wxEVT_BUTTON, [this](wxCommandEvent& evt) {
1416 MultiMachinePickPage dlg;
1417 dlg.ShowModal();
1419 evt.Skip();
1420 });
1421
1422 scroll_macine_list = new wxScrolledWindow(main_page, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(800), FromDIP(300)), wxHSCROLL | wxVSCROLL);
1423 scroll_macine_list->SetBackgroundColour(*wxWHITE);
1424 scroll_macine_list->SetScrollRate(5, FromDIP(SEND_ITEM_MAX_HEIGHT));
1425 scroll_macine_list->SetMinSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), 10 * FromDIP(SEND_ITEM_MAX_HEIGHT)));
1426 scroll_macine_list->SetMaxSize(wxSize(FromDIP(DEVICE_ITEM_MAX_WIDTH), 10 * FromDIP(SEND_ITEM_MAX_HEIGHT)));
1427
1428 sizer_machine_list = new wxBoxSizer(wxVERTICAL);
1430 scroll_macine_list->Layout();
1431
1432 sizer->Add(title_select_printer, 0, wxEXPAND, 0);
1433 sizer->Add(m_table_head_panel, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(40));
1434 sizer->Add(m_tip_text, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP, FromDIP(100));
1435 sizer->Add(m_button_add, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP, FromDIP(20));
1436 sizer->Add(scroll_macine_list, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(40));
1437 sizer->AddSpacer(FromDIP(10));
1438
1439 // add printing options
1440 wxBoxSizer* title_print_option = create_item_title(_L("Printing Options"), main_page, "");
1441 wxBoxSizer* item_bed_level = create_item_checkbox(_L("Bed leveling"), main_page, "", 50, "bed_leveling");
1442 wxBoxSizer* item_timelapse = create_item_checkbox(_L("Timelapse"), main_page, "", 50, "timelapse");
1443 wxBoxSizer* item_flow_dy_ca = create_item_checkbox(_L("Flow Dynamic Calibration"), main_page, "", 50, "flow_cali");
1444 sizer->Add(title_print_option, 0, wxEXPAND, 0);
1445 wxBoxSizer* options_sizer_v = new wxBoxSizer(wxHORIZONTAL);
1446 options_sizer_v->Add(item_bed_level, 0, wxLEFT, 0);
1447 options_sizer_v->Add(item_timelapse, 0, wxLEFT, FromDIP(100));
1448 sizer->Add(options_sizer_v, 0, wxLEFT, FromDIP(20));
1449 sizer->Add(item_flow_dy_ca, 0, wxLEFT, FromDIP(20));
1450 sizer->AddSpacer(FromDIP(10));
1451
1452 // add send option
1453 wxBoxSizer* title_send_option = create_item_title(_L("Send Options"), main_page, "");
1454 wxBoxSizer* max_printer_send = create_item_input(_L("Send to"), _L("printers at the same time. (It depends on how many devices can undergo heating at the same time.)"), main_page, "", "max_send");
1455 wxBoxSizer* delay_time = create_item_input(_L("Wait"), _L("minute each batch. (It depends on how long it takes to complete heating.)"), main_page, "", "sending_interval");
1456 sizer->Add(title_send_option, 0, wxEXPAND, 0);
1457 sizer->Add(max_printer_send, 0, wxLEFT, FromDIP(20));
1458 sizer->AddSpacer(FromDIP(3));
1459 sizer->Add(delay_time, 0, wxLEFT, FromDIP(20));
1460 sizer->AddSpacer(FromDIP(10));
1461
1462 // add send button
1463 m_button_send = new Button(main_page, _L("Send"));
1465 m_button_send->Bind(wxEVT_BUTTON, &SendMultiMachinePage::on_send, this);
1466 //m_button_send->Disable();
1467 //m_button_send->SetBackgroundColor(wxColour(0x90, 0x90, 0x90));
1468 //m_button_send->SetBorderColor(wxColour(0x90, 0x90, 0x90));
1469 sizer->Add(m_button_send, 0, wxALIGN_CENTER, 0);
1470
1471 main_page->SetSizer(sizer);
1472 main_page->Layout();
1473 main_page->Fit();
1474 return main_page;
1475}
@ Confirm
Definition Button.hpp:25
@ Choice
Definition Button.hpp:33
@ Window
Definition Button.hpp:32
#define ICON_SINGLE_SIZE
Definition GUI_Utils.hpp:50
#define TABLE_HEAR_NORMAL_COLOUR
Definition MultiMachine.hpp:22
#define TABLE_HEAD_PRESSED_COLOUR
Definition MultiMachine.hpp:23
#define TABLE_HEAD_FONT
Definition MultiMachine.hpp:26
#define SEND_ITEM_MAX_HEIGHT
Definition MultiMachine.hpp:19
#define DEVICE_ITEM_MAX_WIDTH
Definition MultiMachine.hpp:18
#define TASK_LEFT_SEND_TIME
Definition MultiTaskManagerPage.hpp:38
#define SEND_LEFT_DEV_NAME
Definition SendMultiMachinePage.hpp:41
#define SEND_LEFT_PADDING_LEFT
Definition SendMultiMachinePage.hpp:39
#define SEND_LEFT_DEV_STATUS
Definition SendMultiMachinePage.hpp:42
static wxFont Head_20
Definition Label.hpp:41
wxStaticBitmap * timeimg
Definition SendMultiMachinePage.hpp:168
Button * m_button_send
Definition SendMultiMachinePage.hpp:114
wxPanel * m_rename_normal_panel
Definition SendMultiMachinePage.hpp:152
ScalableBitmap * print_weight
Definition SendMultiMachinePage.hpp:171
wxBoxSizer * create_item_radiobox(wxString title, wxWindow *parent, wxString tooltip, int groupid, std::string param)
Definition SendMultiMachinePage.cpp:981
ScalableButton * m_rename_button
Definition SendMultiMachinePage.hpp:155
ThumbnailPanel * m_thumbnail_panel
Definition SendMultiMachinePage.hpp:172
wxPanel * m_table_head_panel
Definition SendMultiMachinePage.hpp:141
wxSimplebook * m_rename_switch_panel
Definition SendMultiMachinePage.hpp:151
wxStaticText * m_stext_time
Definition SendMultiMachinePage.hpp:166
std::map< std::string, SendDeviceItem * > m_device_items
Definition SendMultiMachinePage.hpp:104
wxBoxSizer * create_item_title(wxString title, wxWindow *parent, wxString tooltip)
Definition SendMultiMachinePage.cpp:881
Button * m_device_status
Definition SendMultiMachinePage.hpp:145
bool device_name_big
Definition SendMultiMachinePage.hpp:110
wxPanel * m_panel_image
Definition SendMultiMachinePage.hpp:173
CheckBox * m_select_checkbox
Definition SendMultiMachinePage.hpp:143
wxStaticBitmap * weightimg
Definition SendMultiMachinePage.hpp:170
wxGridSizer * m_ams_list_sizer
Definition SendMultiMachinePage.hpp:127
wxBoxSizer * rename_sizer_h
Definition SendMultiMachinePage.hpp:157
wxPanel * m_title_panel
Definition SendMultiMachinePage.hpp:163
void on_select_radio(std::string param)
Definition SendMultiMachinePage.cpp:1041
wxBoxSizer * sizer_machine_list
Definition SendMultiMachinePage.hpp:116
wxScrolledWindow * scroll_macine_list
Definition SendMultiMachinePage.hpp:115
void on_send(wxCommandEvent &event)
Definition SendMultiMachinePage.cpp:763
bool device_printable_big
Definition SendMultiMachinePage.hpp:111
Button * m_printer_name
Definition SendMultiMachinePage.hpp:144
wxStaticText * m_tip_text
Definition SendMultiMachinePage.hpp:177
wxStaticText * m_task_name
Definition SendMultiMachinePage.hpp:158
wxString m_current_project_name
Definition SendMultiMachinePage.hpp:159
wxBoxSizer * m_image_sizer
Definition SendMultiMachinePage.hpp:174
void refresh_user_device()
Definition SendMultiMachinePage.cpp:432
wxBoxSizer * create_item_checkbox(wxString title, wxWindow *parent, wxString tooltip, int padding_left, std::string param)
Definition SendMultiMachinePage.cpp:903
SortItem m_sort
Definition SendMultiMachinePage.hpp:109
wxBoxSizer * create_item_input(wxString str_before, wxString str_after, wxWindow *parent, wxString tooltip, std::string param)
Definition SendMultiMachinePage.cpp:935
wxStaticText * m_stext_weight
Definition SendMultiMachinePage.hpp:167
wxBoxSizer * rename_sizer_v
Definition SendMultiMachinePage.hpp:156
void on_rename_click(wxCommandEvent &event)
Definition SendMultiMachinePage.cpp:1773
wxBoxSizer * m_title_sizer
Definition SendMultiMachinePage.hpp:164
wxBoxSizer * m_text_sizer
Definition SendMultiMachinePage.hpp:165
Button * m_button_add
Definition SendMultiMachinePage.hpp:178
bool device_en_ams_big
Definition SendMultiMachinePage.hpp:112
ScalableBitmap * print_time
Definition SendMultiMachinePage.hpp:169
wxPanel * m_rename_edit_panel
Definition SendMultiMachinePage.hpp:153
Button * m_refresh_button
Definition SendMultiMachinePage.hpp:148
wxBoxSizer * m_table_head_sizer
Definition SendMultiMachinePage.hpp:142
Button * m_ams
Definition SendMultiMachinePage.hpp:147
@ Normal
Definition StateColor.hpp:16
@ Pressed
Definition StateColor.hpp:21
wxMouseEvent
Definition CameraPopup.cpp:47
static std::vector< Vec2d > THUMBNAIL_SIZE
Definition ThumbnailData.hpp:14
@ SR_DEV_NAME
Definition MultiMachine.hpp:88
@ SR_PRINTABLE
Definition MultiMachine.hpp:90
@ SR_EN_AMS
Definition MultiMachine.hpp:91

References _L, Label::Body_13, Choice, Confirm, create_item_checkbox(), create_item_input(), create_item_radiobox(), create_item_title(), device_en_ams_big, DEVICE_ITEM_MAX_WIDTH, device_name_big, device_printable_big, Label::Head_20, ICON_SINGLE_SIZE, m_ams, m_ams_list_sizer, m_button_add, m_button_send, m_current_project_name, m_device_items, m_device_status, m_image_sizer, m_main_scroll, m_panel_image, m_printer_name, m_refresh_button, m_rename_button, m_rename_edit_panel, m_rename_input, m_rename_normal_panel, m_rename_switch_panel, m_select_checkbox, m_sort, m_stext_time, m_stext_weight, m_table_head_panel, m_table_head_sizer, m_task_name, m_text_sizer, m_thumbnail_panel, m_tip_text, m_title_panel, m_title_sizer, StateColor::Normal, on_rename_click(), on_rename_enter(), on_select_radio(), on_send(), StateColor::Pressed, print_time, print_weight, refresh_user_device(), rename_sizer_h, rename_sizer_v, scroll_macine_list, SEND_DESIGN_GRAY800_COLOR, SEND_ITEM_MAX_HEIGHT, SEND_LEFT_DEV_NAME, SEND_LEFT_DEV_STATUS, SEND_LEFT_PADDING_LEFT, Slic3r::GUI::DPIAware< P >::ShowModal(), sizer_machine_list, Slic3r::GUI::SortItem::SR_DEV_NAME, Slic3r::GUI::SortItem::SR_EN_AMS, Slic3r::GUI::SortItem::SR_PRINTABLE, TABLE_HEAD_FONT, TABLE_HEAD_PRESSED_COLOUR, TABLE_HEAR_NORMAL_COLOUR, TASK_LEFT_SEND_TIME, Slic3r::THUMBNAIL_SIZE, timeimg, weightimg, Window, Slic3r::GUI::wxMouseEvent, and wxStaticText.

Referenced by SendMultiMachinePage().

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_ams_mapping_result()

bool Slic3r::GUI::SendMultiMachinePage::get_ams_mapping_result ( std::string & mapping_array_str,
std::string & mapping_array_str2,
std::string & ams_mapping_info )
678{
679 if (m_ams_mapping_result.empty()) return false;
680
681 bool valid_mapping_result = true;
682 int invalid_count = 0;
683 for (int i = 0; i < m_ams_mapping_result.size(); i++) {
684 if (m_ams_mapping_result[i].tray_id == -1) {
685 valid_mapping_result = false;
686 invalid_count++;
687 }
688 }
689
690 if (invalid_count == m_ams_mapping_result.size()) {
691 return false;
692 } else {
693 json mapping_v0_json = json::array();
694 json mapping_v1_json = json::array();
695 json mapping_info_json = json::array();
696
697 /* get filament maps */
698 std::vector<int> filament_maps;
699 Plater * plater = wxGetApp().plater();
700 if (plater) {
701 PartPlate *curr_plate = plater->get_partplate_list().get_curr_plate();
702 if (curr_plate) {
703 filament_maps = curr_plate->get_filament_maps();
704 } else {
705 BOOST_LOG_TRIVIAL(error) << "get_ams_mapping_result, curr_plate is nullptr";
706 }
707 } else {
708 BOOST_LOG_TRIVIAL(error) << "get_ams_mapping_result, plater is nullptr";
709 }
710
711 for (int i = 0; i < wxGetApp().preset_bundle->filament_presets.size(); i++) {
712 int tray_id = -1;
713 json mapping_item_v1;
714 mapping_item_v1["ams_id"] = 0xff;
715 mapping_item_v1["slot_id"] = 0xff;
716 json mapping_item;
717 mapping_item["ams"] = tray_id;
718 mapping_item["targetColor"] = "";
719 mapping_item["filamentId"] = "";
720 mapping_item["filamentType"] = "";
721 for (int k = 0; k < m_ams_mapping_result.size(); k++) {
722 if (m_ams_mapping_result[k].id == i) {
723 tray_id = m_ams_mapping_result[k].tray_id;
724 mapping_item["ams"] = tray_id;
725 mapping_item["filamentType"] = m_filaments[k].type;
726 if (i >= 0 && i < wxGetApp().preset_bundle->filament_presets.size()) {
727 auto it = wxGetApp().preset_bundle->filaments.find_preset(wxGetApp().preset_bundle->filament_presets[i]);
728 if (it != nullptr) { mapping_item["filamentId"] = it->filament_id; }
729 }
730 /* nozzle id */
731 mapping_item["nozzleId"] = 0;
732
733 // convert #RRGGBB to RRGGBBAA
734 mapping_item["sourceColor"] = m_filaments[k].color;
735 mapping_item["targetColor"] = m_ams_mapping_result[k].color;
736 if (tray_id == VIRTUAL_TRAY_MAIN_ID || tray_id == VIRTUAL_TRAY_DEPUTY_ID) { tray_id = -1; }
737
738 /*new ams mapping data*/
739 try {
740 if (m_ams_mapping_result[k].ams_id.empty() || m_ams_mapping_result[k].slot_id.empty()) { // invalid case
741 mapping_item_v1["ams_id"] = VIRTUAL_TRAY_MAIN_ID;
742 mapping_item_v1["slot_id"] = VIRTUAL_TRAY_MAIN_ID;
743 } else {
744 mapping_item_v1["ams_id"] = std::stoi(m_ams_mapping_result[k].ams_id);
745 mapping_item_v1["slot_id"] = std::stoi(m_ams_mapping_result[k].slot_id);
746 }
747 } catch (...) {}
748 }
749 }
750 mapping_v0_json.push_back(tray_id);
751 mapping_v1_json.push_back(mapping_item_v1);
752 mapping_info_json.push_back(mapping_item);
753 }
754
755 mapping_array_str = mapping_v0_json.dump();
756 mapping_array_str2 = mapping_v1_json.dump();
757 ams_mapping_info = mapping_info_json.dump();
758 return valid_mapping_result;
759 }
760 return true;
761}
#define VIRTUAL_TRAY_DEPUTY_ID
Definition DevDefs.h:90
#define VIRTUAL_TRAY_MAIN_ID
Definition DevDefs.h:89
PartPlate * get_curr_plate()
Definition PartPlate.hpp:962
PartPlateList & get_partplate_list()
Definition Plater.cpp:22578
std::vector< FilamentInfo > m_ams_mapping_result
Definition SendMultiMachinePage.hpp:135
std::vector< FilamentInfo > m_filaments
Definition SendMultiMachinePage.hpp:134
@ Plater
Definition Shortcuts.hpp:21
nlohmann::json json
Definition AssembleList.cpp:42

References Slic3r::GUI::PartPlate::get_filament_maps(), m_ams_mapping_result, m_filaments, Slic3r::GUI::plater(), VIRTUAL_TRAY_DEPUTY_ID, and VIRTUAL_TRAY_MAIN_ID.

Referenced by request_params().

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

◆ get_value_radio()

bool Slic3r::GUI::SendMultiMachinePage::get_value_radio ( std::string param)
protected
1062{
1063 AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
1064 auto groupid = 0;
1065 while (node) {
1066 AmsRadioSelector* rs = node->GetData();
1067 if (rs->m_groupid == groupid && rs->m_param_name == param)
1068 return rs->m_radiobox->GetValue();
1069 node = node->GetNext();
1070 }
1071 return false;
1072}

References Slic3r::GUI::AmsRadioSelector::m_groupid, Slic3r::GUI::AmsRadioSelector::m_param_name, m_radio_group, and Slic3r::GUI::AmsRadioSelector::m_radiobox.

Referenced by sync_ams_list().

Here is the caller graph for this function:

◆ init_timer()

void Slic3r::GUI::SendMultiMachinePage::init_timer ( )
protected
1783{
1784 m_refresh_timer = new wxTimer();
1785}

References m_refresh_timer.

Referenced by SendMultiMachinePage().

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; }

◆ normal_font()

◆ on_dpi_changed()

void Slic3r::GUI::SendMultiMachinePage::on_dpi_changed ( const wxRect & suggested_rect)
virtual

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

394{
395 m_select_checkbox->Rescale();
396 m_printer_name->Rescale();
397 m_printer_name->SetMinSize(wxSize(FromDIP(SEND_LEFT_DEV_NAME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
398 m_printer_name->SetMaxSize(wxSize(FromDIP(SEND_LEFT_DEV_NAME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
399 m_device_status->Rescale();
400 m_device_status->SetMinSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(SEND_ITEM_MAX_HEIGHT)));
401 m_device_status->SetMaxSize(wxSize(FromDIP(SEND_LEFT_DEV_STATUS), FromDIP(SEND_ITEM_MAX_HEIGHT)));
402 m_ams->Rescale();
403 m_ams->SetMinSize(wxSize(FromDIP(TASK_LEFT_SEND_TIME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
404 m_ams->SetMaxSize(wxSize(FromDIP(TASK_LEFT_SEND_TIME), FromDIP(SEND_ITEM_MAX_HEIGHT)));
405 m_refresh_button->Rescale();
406 m_refresh_button->SetMinSize(wxSize(FromDIP(50), FromDIP(SEND_ITEM_MAX_HEIGHT)));
407 m_refresh_button->SetMaxSize(wxSize(FromDIP(50), FromDIP(SEND_ITEM_MAX_HEIGHT)));
408 m_rename_button->msw_rescale();
409 print_time->msw_rescale();
410 print_weight->msw_rescale();
411 timeimg->SetBitmap(print_time->bmp());
412 weightimg->SetBitmap(print_weight->bmp());
413 m_button_add->Rescale(); // ORCA no need to re set size
414 m_button_send->Rescale(); // ORCA no need to re set size
415
416 for (auto it = m_device_items.begin(); it != m_device_items.end(); ++it) {
417 it->second->Refresh();
418 }
419
420 if (m_mapping_popup) { m_mapping_popup->msw_rescale();}
421
422 Fit();
423 Layout();
424 Refresh();
425}

References m_ams, m_button_add, m_button_send, m_device_items, m_device_status, m_mapping_popup, m_printer_name, m_refresh_button, m_rename_button, m_select_checkbox, print_time, print_weight, SEND_ITEM_MAX_HEIGHT, SEND_LEFT_DEV_NAME, SEND_LEFT_DEV_STATUS, TASK_LEFT_SEND_TIME, timeimg, and weightimg.

◆ on_rename_click()

void Slic3r::GUI::SendMultiMachinePage::on_rename_click ( wxCommandEvent & event)
protected
1774{
1775 m_is_rename_mode = true;
1776 m_rename_input->GetTextCtrl()->SetValue(m_current_project_name);
1777 m_rename_switch_panel->SetSelection(1);
1778 m_rename_input->GetTextCtrl()->SetFocus();
1779 m_rename_input->GetTextCtrl()->SetInsertionPointEnd();
1780}
bool m_is_rename_mode
Definition SendMultiMachinePage.hpp:160

References m_current_project_name, m_is_rename_mode, m_rename_input, and m_rename_switch_panel.

Referenced by create_page().

Here is the caller graph for this function:

◆ on_rename_enter()

void Slic3r::GUI::SendMultiMachinePage::on_rename_enter ( )
1680{
1681 if (m_is_rename_mode == false) {
1682 return;
1683 }
1684 else {
1685 m_is_rename_mode = false;
1686 }
1687
1688 auto new_file_name = m_rename_input->GetTextCtrl()->GetValue();
1689 wxString temp;
1690 int num = 0;
1691 for (auto t : new_file_name) {
1692 if (t == wxString::FromUTF8("\x20")) {
1693 num++;
1694 if (num == 1) temp += t;
1695 }
1696 else {
1697 num = 0;
1698 temp += t;
1699 }
1700 }
1701 new_file_name = temp;
1702 auto m_valid_type = Valid;
1703 wxString info_line;
1704
1705 const char* unusable_symbols = "<>[]:/\\|?*\"";
1706
1707 const std::string unusable_suffix = PresetCollection::get_suffix_modified(); //"(modified)";
1708 for (size_t i = 0; i < std::strlen(unusable_symbols); i++) {
1709 if (new_file_name.find_first_of(unusable_symbols[i]) != std::string::npos) {
1710 info_line = _L("Name is invalid;") + "\n" + _L("illegal characters:") + " " + unusable_symbols;
1711 m_valid_type = NoValid;
1712 break;
1713 }
1714 }
1715
1716 if (m_valid_type == Valid && new_file_name.find(unusable_suffix) != std::string::npos) {
1717 info_line = _L("Name is invalid;") + "\n" + _L("illegal suffix:") + "\n\t" + from_u8(PresetCollection::get_suffix_modified());
1718 m_valid_type = NoValid;
1719 }
1720
1721 if (m_valid_type == Valid && new_file_name.empty()) {
1722 info_line = _L("The name field is not allowed to be empty.");
1723 m_valid_type = NoValid;
1724 }
1725
1726 if (m_valid_type == Valid && new_file_name.find_first_of(' ') == 0) {
1727 info_line = _L("The name is not allowed to start with a space.");
1728 m_valid_type = NoValid;
1729 }
1730
1731 if (m_valid_type == Valid && new_file_name.find_last_of(' ') == new_file_name.length() - 1) {
1732 info_line = _L("The name is not allowed to end with a space.");
1733 m_valid_type = NoValid;
1734 }
1735
1736 if (m_valid_type == Valid && new_file_name.size() >= 100) {
1737 info_line = _L("The name length exceeds the limit.");
1738 m_valid_type = NoValid;
1739 }
1740
1741 if (m_valid_type != Valid) {
1742 MessageDialog msg_wingow(nullptr, info_line, "", wxICON_WARNING | wxOK);
1743 if (msg_wingow.ShowModal() == wxID_OK) {
1744 m_rename_switch_panel->SetSelection(0);
1746 m_rename_normal_panel->Layout();
1747 return;
1748 }
1749 }
1750
1751 m_current_project_name = new_file_name;
1752 m_rename_switch_panel->SetSelection(0);
1753 m_task_name->SetLabelText(m_current_project_name);
1754 m_rename_normal_panel->Layout();
1755}
@ NoValid
Definition Auxiliary.hpp:87
@ Valid
Definition Auxiliary.hpp:87
static const std::string & get_suffix_modified()
Definition Preset.cpp:3766
wxString from_u8(const std::string &str)
Definition GUI.cpp:544

References _L, Slic3r::GUI::from_u8(), Slic3r::PresetCollection::get_suffix_modified(), m_current_project_name, m_is_rename_mode, m_rename_input, m_rename_normal_panel, m_rename_switch_panel, m_task_name, NoValid, Slic3r::GUI::DPIAware< P >::ShowModal(), and Valid.

Referenced by check_focus(), and create_page().

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

◆ on_select_radio()

void Slic3r::GUI::SendMultiMachinePage::on_select_radio ( std::string param)
protected
1042{
1043 AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
1044 auto groupid = 0;
1045
1046 while (node) {
1047 AmsRadioSelector* rs = node->GetData();
1048 if (rs->m_param_name == param) groupid = rs->m_groupid;
1049 node = node->GetNext();
1050 }
1051
1052 node = m_radio_group.GetFirst();
1053 while (node) {
1054 AmsRadioSelector* rs = node->GetData();
1055 if (rs->m_groupid == groupid && rs->m_param_name == param) rs->m_radiobox->SetValue(true);
1056 if (rs->m_groupid == groupid && rs->m_param_name != param) rs->m_radiobox->SetValue(false);
1057 node = node->GetNext();
1058 }
1059}

References Slic3r::GUI::AmsRadioSelector::m_groupid, Slic3r::GUI::AmsRadioSelector::m_param_name, m_radio_group, Slic3r::GUI::AmsRadioSelector::m_radiobox, and Slic3r::GUI::RadioBox::SetValue().

Referenced by create_page().

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

◆ on_send()

void Slic3r::GUI::SendMultiMachinePage::on_send ( wxCommandEvent & event)
764{
765 event.Skip();
766 BOOST_LOG_TRIVIAL(info) << "SendMultiMachinePage: on_send";
767
768 int result = m_plater->send_gcode(m_print_plate_idx, [this](int export_stage, int current, int total, bool& cancel) {
769 if (m_is_canceled) return;
770 bool cancelled = false;
771 wxString msg = _L("Preparing print job");
772 //m_status_bar->update_status(msg, cancelled, 10, true);
773 //m_export_3mf_cancel = cancel = cancelled;
774 });
775
777 BOOST_LOG_TRIVIAL(info) << "print_job: m_export_3mf_cancel or m_is_canceled";
778 //m_status_bar->set_status_text(task_canceled_text);
779 return;
780 }
781
782 if (result < 0) {
783 wxString msg = _L("Abnormal print file data. Please slice again");
784 //m_status_bar->set_status_text(msg);
785 return;
786 }
787
788 // export config 3mf if needed
789 result = m_plater->export_config_3mf(m_print_plate_idx);
790 if (result < 0) {
791 BOOST_LOG_TRIVIAL(info) << "export_config_3mf failed, result = " << result;
792 return;
793 }
794
796 BOOST_LOG_TRIVIAL(info) << "print_job: m_export_3mf_cancel or m_is_canceled";
797 //m_status_bar->set_status_text(task_canceled_text);
798 return;
799 }
800
801
802 std::vector<PrintParams> print_params;
803
804 for (auto it = m_device_items.begin(); it != m_device_items.end(); ++it) {
805 auto obj = it->second->get_obj();
806
807 if (obj && obj->is_online() && !obj->can_abort() && !obj->is_in_upgrading() && it->second->get_state_selected() == 1 && it->second->state_printable <= 2) {
808
809 if (!wxGetApp().is_blocking_printing(obj)) {
810 PrintParams params = request_params(obj);
811 print_params.push_back(params);
812 }
813 }
814 }
815
816
817 if (print_params.size() <= 0) {
818 MessageDialog msg_wingow(nullptr, _L("There is no device available to send printing."), "", wxICON_WARNING | wxOK);
819 msg_wingow.ShowModal();
820 return;
821 }
822
823 if (wxGetApp().getTaskManager()) {
824 TaskSettings settings;
825
826 try
827 {
828 if (app_config->get("sending_interval").empty()) {
829 app_config->set("sending_interval", "1");
830 app_config->save();
831 }
832
833 if ( app_config->get("max_send").empty()) {
834 app_config->set("max_send", "10");
835 app_config->save();
836 }
837
838
839 settings.sending_interval = std::stoi(app_config->get("sending_interval")) * 60;
840 settings.max_sending_at_same_time = std::stoi(app_config->get("max_send"));
841
842 if (settings.max_sending_at_same_time <= 0) {
843 MessageDialog msg_wingow(nullptr, _L("The number of printers in use simultaneously cannot be equal to 0."), "", wxICON_WARNING | wxOK);
844 msg_wingow.ShowModal();
845 return;
846 }
847
848
849
850 wxGetApp().getTaskManager()->start_print(print_params, &settings);
851 }
852 catch (...)
853 {}
854 }
855 //jump to info
856 EndModal(wxCLOSE);
857 wxGetApp().mainframe->jump_to_multipage();
858}
void EndModal(int retCode) override
Definition GUI_Utils.hpp:305
int m_print_plate_idx
Definition SendMultiMachinePage.hpp:119
bool m_is_canceled
Definition SendMultiMachinePage.hpp:120
bool m_export_3mf_cancel
Definition SendMultiMachinePage.hpp:121
PrintParams request_params(MachineObject *obj)
Definition SendMultiMachinePage.cpp:511

References _L, app_config, Slic3r::GUI::DPIDialog::EndModal(), m_device_items, m_export_3mf_cancel, m_is_canceled, m_plater, m_print_plate_idx, Slic3r::TaskSettings::max_sending_at_same_time, request_params(), Slic3r::TaskSettings::sending_interval, and Slic3r::GUI::DPIAware< P >::ShowModal().

Referenced by create_page().

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

◆ on_set_finish_mapping()

void Slic3r::GUI::SendMultiMachinePage::on_set_finish_mapping ( wxCommandEvent & evt)
protected
1075{
1076 auto selection_data = evt.GetString();
1077 auto selection_data_arr = wxSplit(selection_data, '|');
1078
1079 BOOST_LOG_TRIVIAL(info) << "The ams mapping selection result: data is " << selection_data;
1080
1081 if (selection_data_arr.size() == 8) {
1082 auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
1083 int old_filament_id = (int)wxAtoi(selection_data_arr[5]);
1084
1085 int ctype = 0;
1086 std::vector<wxColour> material_cols;
1087 std::vector<std::string> tray_cols;
1088 for (auto mapping_item : m_mapping_popup->m_mapping_item_list) {
1089 if (mapping_item->m_tray_data.id == evt.GetInt()) {
1090 ctype = mapping_item->m_tray_data.ctype;
1091 material_cols = mapping_item->m_tray_data.material_cols;
1092 for (auto col : mapping_item->m_tray_data.material_cols) {
1093 wxString color = wxString::Format("#%02X%02X%02X%02X", col.Red(), col.Green(), col.Blue(), col.Alpha());
1094 tray_cols.push_back(color.ToStdString());
1095 }
1096 break;
1097 }
1098 }
1099
1100 for (auto i = 0; i < m_ams_mapping_result.size(); i++) {
1101 if (m_ams_mapping_result[i].id == wxAtoi(selection_data_arr[5])) {
1102 m_ams_mapping_result[i].tray_id = evt.GetInt();
1103 auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
1104 wxString color = wxString::Format("#%02X%02X%02X%02X", ams_colour.Red(), ams_colour.Green(), ams_colour.Blue(), ams_colour.Alpha());
1105 m_ams_mapping_result[i].color = color.ToStdString();
1106 m_ams_mapping_result[i].ctype = ctype;
1107 m_ams_mapping_result[i].colors = tray_cols;
1108
1109 m_ams_mapping_result[i].ams_id = selection_data_arr[6].ToStdString();
1110 m_ams_mapping_result[i].slot_id = selection_data_arr[7].ToStdString();
1111 }
1112 BOOST_LOG_TRIVIAL(trace) << "The ams mapping result: id is " << m_ams_mapping_result[i].id << "tray_id is " << m_ams_mapping_result[i].tray_id;
1113 }
1114
1115 MaterialHash::iterator iter = m_material_list.begin();
1116 while (iter != m_material_list.end()) {
1117 Material* item = iter->second;
1118 MaterialItem* m = item->item;
1119 if (item->id == m_current_filament_id) {
1120 auto ams_colour = wxColour(wxAtoi(selection_data_arr[0]), wxAtoi(selection_data_arr[1]), wxAtoi(selection_data_arr[2]), wxAtoi(selection_data_arr[3]));
1121 m->set_ams_info(ams_colour, selection_data_arr[4], ctype, material_cols);
1122 }
1123 iter++;
1124 }
1125
1126 }
1127}
int m_current_filament_id
Definition SendMultiMachinePage.hpp:136
MaterialHash m_material_list
Definition SendMultiMachinePage.hpp:131
void trace(unsigned int level, const char *message)
Definition utils.cpp:247

References Slic3r::GUI::Material::id, Slic3r::GUI::Material::item, m_ams_mapping_result, m_current_filament_id, m_mapping_popup, m_material_list, Slic3r::GUI::MaterialItem::set_ams_info(), and Slic3r::trace().

Referenced by SendMultiMachinePage().

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

◆ on_sys_color_changed()

void Slic3r::GUI::SendMultiMachinePage::on_sys_color_changed ( )
virtual

Reimplemented from Slic3r::GUI::DPIAware< wxDialog >.

428{
429
430}

◆ on_timer()

void Slic3r::GUI::SendMultiMachinePage::on_timer ( wxTimerEvent & event)
protected
1788{
1789 for (auto it = m_device_items.begin(); it != m_device_items.end(); it++) {
1790 it->second->sync_state();
1791 it->second->Refresh();
1792 }
1793}

References m_device_items.

Referenced by SendMultiMachinePage().

Here is the caller graph for this function:

◆ OnSelectRadio()

void Slic3r::GUI::SendMultiMachinePage::OnSelectRadio ( wxMouseEvent & event)
protected
1005{
1006 AmsRadioSelectorList::compatibility_iterator node = m_radio_group.GetFirst();
1007 auto groupid = 0;
1008
1009 //while (node) {
1010 // AmsRadioSelector* rs = node->GetData();
1011 // if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
1012 // node = node->GetNext();
1013 //}
1014
1015 node = m_radio_group.GetFirst();
1016 while (node) {
1017 AmsRadioSelector *rs = node->GetData();
1018 if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) {
1019 rs->m_radiobox->SetValue(true);
1020 if (rs->m_param_name == "use_external") {
1021 MaterialHash::iterator iter = m_material_list.begin();
1022 while (iter != m_material_list.end()) {
1023 Material * item = iter->second;
1024 MaterialItem *m = item->item;
1025 if (item->id == m_current_filament_id) { m->set_ams_info(wxColour("#CECECE"), _L("Ext"), 0, std::vector<wxColour>()); }
1026 iter++;
1027 }
1028 } else if (rs->m_param_name == "use_ams") {
1030 wxCommandEvent event(EVT_SET_FINISH_MAPPING);
1031 event.SetInt(0);
1032 event.SetString("206|206|206|255|A1|1|0|0");
1033 wxPostEvent(this, event);
1034 }
1035 }
1036 if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
1037 node = node->GetNext();
1038 }
1039}

References _L, Slic3r::GUI::Material::id, Slic3r::GUI::Material::item, m_current_filament_id, Slic3r::GUI::AmsRadioSelector::m_groupid, m_material_list, Slic3r::GUI::AmsRadioSelector::m_param_name, m_radio_group, Slic3r::GUI::AmsRadioSelector::m_radiobox, Slic3r::GUI::MaterialItem::set_ams_info(), Slic3r::GUI::RadioBox::SetValue(), and Slic3r::GUI::wxMouseEvent.

Referenced by create_item_radiobox().

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

◆ prepare()

void Slic3r::GUI::SendMultiMachinePage::prepare ( int plate_idx)
388{
389 // TODO
390 m_print_plate_idx = plate_idx;
391}

References m_print_plate_idx.

◆ prev_scale_factor()

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

◆ refresh_user_device()

void Slic3r::GUI::SendMultiMachinePage::refresh_user_device ( )
433{
434 sizer_machine_list->Clear(false);
435 Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
436 if (!dev) {
437 for (auto it = m_device_items.begin(); it != m_device_items.end(); it++) {
438 wxWindow* child = it->second;
439 child->Destroy();
440 }
441 return;
442 }
443
444 auto all_machine = dev->get_my_cloud_machine_list();
445 auto user_machine = std::map<std::string, MachineObject*>();
446
447 //selected machine
448 for (int i = 0; i < PICK_DEVICE_MAX; i++) {
449 auto dev_id = app_config->get("multi_devices", std::to_string(i));
450
451 if (all_machine.count(dev_id) > 0) {
452 user_machine[dev_id] = all_machine[dev_id];
453 }
454 }
455
456
457 auto task_manager = wxGetApp().getTaskManager();
458
459 std::vector<std::string> subscribe_list;
460 std::vector<SendDeviceItem*> dev_temp;
461
462 for (auto it = user_machine.begin(); it != user_machine.end(); ++it) {
463 SendDeviceItem* di = new SendDeviceItem(scroll_macine_list, it->second);
464 if (m_device_items.find(it->first) != m_device_items.end()) {
465 auto item = m_device_items[it->first];
466 if (item->state_selected == 1 && di->state_printable <= 2)
467 di->state_selected = item->state_selected;
468 item->Destroy();
469 }
470 m_device_items[it->first] = di;
471
472 //update state
473 if (task_manager) {
474 m_device_items[it->first]->state_local_task = task_manager->query_task_state(it->first);
475 }
476
477 dev_temp.push_back(m_device_items[it->first]);
478 subscribe_list.push_back(it->first);
479 }
480
481 dev->subscribe_device_list(subscribe_list);
482
484 this->device_printable_big = false;
486 }
487 std::sort(dev_temp.begin(), dev_temp.end(), m_sort.get_call_back());
488
489 for (auto i = 0; i < dev_temp.size(); ++i) {
490 sizer_machine_list->Add(dev_temp[i], 0, wxALL | wxEXPAND, 0);
491 }
492
493 // maintenance dev_items
494 auto it = m_device_items.begin();
495 while (it != m_device_items.end()) {
496 if (user_machine.find(it->first) != user_machine.end()) {
497 ++it;
498 }
499 else {
500 it->second->Destroy();
501 it = m_device_items.erase(it);
502 }
503 }
504 m_tip_text->Show(m_device_items.empty());
505 m_button_add->Show(m_device_items.empty());
506 sizer_machine_list->Layout();
507 Layout();
508 Fit();
509}
#define PICK_DEVICE_MAX
Definition MultiMachinePage.hpp:34
void subscribe_device_list(std::vector< std::string > dev_list)
Definition DevManager.cpp:794
std::map< std::string, MachineObject * > get_my_cloud_machine_list(const std::string &agent_id="")
Definition DevManager.cpp:856
@ SR_DEV_STATE
Definition MultiMachine.hpp:92
@ SR_None
Definition MultiMachine.hpp:87

References app_config, device_printable_big, Slic3r::DeviceManager::get_my_cloud_machine_list(), m_button_add, m_device_items, m_sort, m_tip_text, PICK_DEVICE_MAX, scroll_macine_list, sizer_machine_list, Slic3r::GUI::SortItem::SR_DEV_STATE, Slic3r::GUI::SortItem::SR_None, Slic3r::GUI::DeviceItem::state_printable, Slic3r::GUI::DeviceItem::state_selected, and Slic3r::DeviceManager::subscribe_device_list().

Referenced by create_page(), and Show().

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

◆ request_params()

PrintParams Slic3r::GUI::SendMultiMachinePage::request_params ( MachineObject * obj)
512{
513 PrintParams params;
514
515 //get all setting
516 bool bed_leveling = app_config->get("print", "bed_leveling") == "1" ? true : false;
517 bool flow_cali = app_config->get("print", "flow_cali") == "1" ? true : false;
518 bool timelapse = app_config->get("print", "timelapse") == "1" ? true : false;
519 auto use_ams = false;
520
521 auto groupid = 0;
522
523 for (auto it = m_radio_group.begin(); it != m_radio_group.end(); ++it) {
524 AmsRadioSelector* rs = *it;
525 if (rs->m_param_name == "use_ams" && rs->m_radiobox->GetValue()) {
526 use_ams = true;
527 }
528
529 if (rs->m_param_name == "use_extra" && rs->m_radiobox->GetValue()) {
530 use_ams = false;
531 }
532 }
533
534 //use ams
535
536
537 PrintPrepareData job_data;
538 m_plater->get_print_job_data(&job_data);
539
540 std::string temp_file = Slic3r::resources_dir() + "/check_access_code.txt";
541 auto check_access_code_path = temp_file.c_str();
542 BOOST_LOG_TRIVIAL(trace) << "sned_job: check_access_code_path = " << check_access_code_path;
543 job_data._temp_path = fs::path(check_access_code_path);
544
545 int curr_plate_idx;
546 if (job_data.plate_idx >= 0)
547 curr_plate_idx = job_data.plate_idx + 1;
548 else if (job_data.plate_idx == PLATE_CURRENT_IDX)
549 curr_plate_idx = m_plater->get_partplate_list().get_curr_plate_index() + 1;
550 else if (job_data.plate_idx == PLATE_ALL_IDX)
551 curr_plate_idx = m_plater->get_partplate_list().get_curr_plate_index() + 1;
552 else
553 curr_plate_idx = m_plater->get_partplate_list().get_curr_plate_index() + 1;
554
555 params.dev_ip = obj->get_dev_ip();
556 params.dev_id = obj->get_dev_id();
557 params.dev_name = obj->get_dev_name();
558 params.ftp_folder = obj->get_ftp_folder();
559 params.connection_type = obj->connection_type();
560 params.print_type = "from_normal";
561 params.filename = job_data._3mf_path.string();
562 params.config_filename = job_data._3mf_config_path.string();
563 params.plate_index = curr_plate_idx;
564 params.task_bed_leveling = bed_leveling;
565 params.task_flow_cali = flow_cali;
566 params.task_vibration_cali = false;
567 params.task_layer_inspect = true;
568 params.task_record_timelapse = timelapse;
569
570 if (use_ams) {
571 std::string ams_array;
572 std::string ams_array2;
573 std::string mapping_info;
574 get_ams_mapping_result(ams_array, ams_array2, mapping_info);
575 params.ams_mapping = ams_array;
576 params.ams_mapping2 = ams_array2;
577 params.ams_mapping_info = mapping_info;
578 }
579 else {
580 std::string temp;
581 std::string ams_array;
582 std::string ams_array2;
583 std::string mapping_info;
584
585 // change to old version
586 for(auto &info : m_ams_mapping_result){
587 info.tray_id = VIRTUAL_TRAY_DEPUTY_ID;
588 info.ams_id = VIRTUAL_AMS_DEPUTY_ID_STR;
589 info.slot_id = "0";
590 }
591 get_ams_mapping_result(ams_array, temp, mapping_info);
592
593 // change to new version
594 for(auto &info : m_ams_mapping_result){
595 info.tray_id = VIRTUAL_TRAY_DEPUTY_ID;
596 info.ams_id = VIRTUAL_AMS_MAIN_ID_STR;
597 info.slot_id = "0";
598 }
599 temp.clear();
600 mapping_info.clear();
601 get_ams_mapping_result(temp, ams_array2, mapping_info);
602
603 // restore
604 for(auto &info : m_ams_mapping_result){
605 info.tray_id = 0;
606 info.ams_id = "";
607 info.slot_id = "";
608 }
609
610 params.ams_mapping = ams_array;
611 params.ams_mapping2 = ams_array2;
612 params.ams_mapping_info = mapping_info;
613 }
614
615 params.connection_type = obj->connection_type();
616 params.task_use_ams = use_ams;
617
618 PartPlate* curr_plate = m_plater->get_partplate_list().get_curr_plate();
619 if (curr_plate) {
620 params.task_bed_type = bed_type_to_gcode_string( curr_plate->get_bed_type(true));
621 }
622
623 wxString filename;
624 if (m_current_project_name.IsEmpty()) {
625 filename = m_plater->get_export_gcode_filename("", true, m_print_plate_idx == PLATE_ALL_IDX ? true : false);
626 }
627 else {
628 filename = m_current_project_name;
629 }
630
631 if (m_print_plate_idx == PLATE_ALL_IDX && filename.empty()) {
632 filename = _L("Untitled");
633 }
634
635 if (filename.empty()) {
636 filename = m_plater->get_export_gcode_filename("", true);
637 if (filename.empty()) filename = _L("Untitled");
638 }
639
640 if (params.preset_name.empty()) { params.preset_name = wxString::Format("%s_plate_%d", filename, m_print_plate_idx).ToStdString(); }
641 if (params.project_name.empty()) { params.project_name = filename.ToUTF8(); }
642
643
644
645 // check access code and ip address
646 if (obj->connection_type() == "lan") {
647 /*params.dev_id = m_dev_id;
648 params.project_name = "verify_job";
649 params.filename = job_data._temp_path.string();
650 params.connection_type = this->connection_type;
651
652 result = m_agent->start_send_gcode_to_sdcard(params, nullptr, nullptr, nullptr);
653 if (result != 0) {
654 BOOST_LOG_TRIVIAL(error) << "access code is invalid";
655 m_enter_ip_address_fun_fail();
656 m_job_finished = true;
657 return;
658 }
659
660 params.project_name = "";
661 params.filename = "";*/
662 }
663 else {
664 if (params.dev_ip.empty())
665 params.comments = "no_ip";
666 else if (obj->is_support_cloud_print_only)
667 params.comments = "low_version";
668 else if (obj->GetStorage()->get_sdcard_state() == DevStorage::SdcardState::NO_SDCARD)
669 params.comments = "no_sdcard";
670 else if (params.password.empty())
671 params.comments = "no_password";
672 }
673
674 return params;
675}
#define VIRTUAL_AMS_DEPUTY_ID_STR
Definition DevDefs.h:93
#define VIRTUAL_AMS_MAIN_ID_STR
Definition DevDefs.h:92
#define PLATE_ALL_IDX
Definition PartPlate.hpp:57
#define PLATE_CURRENT_IDX
Definition PartPlate.hpp:56
@ NO_SDCARD
Definition DevStorage.h:18
bool get_ams_mapping_result(std::string &mapping_array_str, std::string &mapping_array_str2, std::string &ams_mapping_info)
Definition SendMultiMachinePage.cpp:677
static std::string bed_type_to_gcode_string(const BedType type)
Definition PrintConfig.hpp:701
const std::string & resources_dir()
Definition utils.cpp:296

References Slic3r::GUI::PrintPrepareData::_3mf_config_path, Slic3r::GUI::PrintPrepareData::_3mf_path, _L, Slic3r::GUI::PrintPrepareData::_temp_path, Slic3r::PrintParams::ams_mapping, Slic3r::PrintParams::ams_mapping2, Slic3r::PrintParams::ams_mapping_info, app_config, Slic3r::bed_type_to_gcode_string(), Slic3r::PrintParams::comments, Slic3r::PrintParams::config_filename, Slic3r::MachineObject::connection_type(), Slic3r::PrintParams::connection_type, Slic3r::PrintParams::dev_id, Slic3r::PrintParams::dev_ip, Slic3r::PrintParams::dev_name, Slic3r::PrintParams::filename, Slic3r::PrintParams::ftp_folder, get_ams_mapping_result(), Slic3r::GUI::PartPlate::get_bed_type(), Slic3r::MachineObject::get_dev_id(), Slic3r::MachineObject::get_dev_ip(), Slic3r::MachineObject::get_dev_name(), Slic3r::MachineObject::get_ftp_folder(), Slic3r::DevStorage::get_sdcard_state(), Slic3r::MachineObject::GetStorage(), Slic3r::MachineObject::is_support_cloud_print_only, m_ams_mapping_result, m_current_project_name, Slic3r::GUI::AmsRadioSelector::m_param_name, m_plater, m_print_plate_idx, m_radio_group, Slic3r::GUI::AmsRadioSelector::m_radiobox, Slic3r::DevStorage::NO_SDCARD, Slic3r::PrintParams::password, PLATE_ALL_IDX, PLATE_CURRENT_IDX, Slic3r::GUI::PrintPrepareData::plate_idx, Slic3r::PrintParams::plate_index, Slic3r::PrintParams::preset_name, Slic3r::PrintParams::print_type, Slic3r::PrintParams::project_name, Slic3r::resources_dir(), Slic3r::PrintParams::task_bed_leveling, Slic3r::PrintParams::task_bed_type, Slic3r::PrintParams::task_flow_cali, Slic3r::PrintParams::task_layer_inspect, Slic3r::PrintParams::task_record_timelapse, Slic3r::PrintParams::task_use_ams, Slic3r::PrintParams::task_vibration_cali, Slic3r::trace(), VIRTUAL_AMS_DEPUTY_ID_STR, VIRTUAL_AMS_MAIN_ID_STR, and VIRTUAL_TRAY_DEPUTY_ID.

Referenced by on_send().

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

◆ 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

◆ scale_factor()

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

◆ set_default()

void Slic3r::GUI::SendMultiMachinePage::set_default ( )
1641{
1642 wxString filename = m_plater->get_export_gcode_filename("", true, m_print_plate_idx == PLATE_ALL_IDX ? true : false);
1643 if (m_print_plate_idx == PLATE_ALL_IDX && filename.empty()) {
1644 filename = _L("Untitled");
1645 }
1646
1647 if (filename.empty()) {
1648 filename = m_plater->get_export_gcode_filename("", true);
1649 if (filename.empty()) filename = _L("Untitled");
1650 }
1651
1652 fs::path filename_path(filename.c_str());
1653 std::string file_name = filename_path.filename().string();
1654 if (from_u8(file_name).find(_L("Untitled")) != wxString::npos) {
1655 PartPlate* part_plate = m_plater->get_partplate_list().get_plate(m_print_plate_idx);
1656 if (part_plate) {
1657 if (std::vector<ModelObject*> objects = part_plate->get_objects_on_this_plate(); objects.size() > 0) {
1658 file_name = objects[0]->name;
1659 for (int i = 1; i < objects.size(); i++) {
1660 file_name += (" + " + objects[i]->name);
1661 }
1662 }
1663 if (file_name.size() > 100) {
1664 file_name = file_name.substr(0, 97) + "...";
1665 }
1666 }
1667 }
1668
1669 m_current_project_name = wxString::FromUTF8(file_name);
1670 //unsupported character filter
1671 m_current_project_name = from_u8(filter_characters(m_current_project_name.ToUTF8().data(), "<>[]:/\\|?*\""));
1672
1674
1675 sync_ams_list();
1676 set_default_normal(m_plater->get_partplate_list().get_curr_plate()->thumbnail_data);
1677}
void sync_ams_list()
Definition SendMultiMachinePage.cpp:1477
void set_default_normal(const ThumbnailData &data)
Definition SendMultiMachinePage.cpp:1600
std::string filter_characters(const std::string &str, const std::string &filterChars)
Definition Utils.hpp:768
RaycastManager::TrItems::iterator find(RaycastManager::TrItems &items, const RaycastManager::TrKey &key)
Definition RaycastManager.cpp:298

References _L, Slic3r::filter_characters(), Slic3r::GUI::from_u8(), Slic3r::GUI::PartPlate::get_objects_on_this_plate(), m_current_project_name, m_plater, m_print_plate_idx, m_task_name, PLATE_ALL_IDX, set_default_normal(), and sync_ams_list().

Referenced by Show().

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

◆ set_default_normal()

void Slic3r::GUI::SendMultiMachinePage::set_default_normal ( const ThumbnailData & data)
1601{
1602 if (data.is_valid()) {
1603 wxImage image(data.width, data.height);
1604 image.InitAlpha();
1605 for (unsigned int r = 0; r < data.height; ++r) {
1606 unsigned int rr = (data.height - 1 - r) * data.width;
1607 for (unsigned int c = 0; c < data.width; ++c) {
1608 unsigned char* px = (unsigned char*)data.pixels.data() + 4 * (rr + c);
1609 image.SetRGB((int)c, (int)r, px[0], px[1], px[2]);
1610 image.SetAlpha((int)c, (int)r, px[3]);
1611 }
1612 }
1613 image = image.Rescale(THUMBNAIL_SIZE, THUMBNAIL_SIZE);
1614 m_thumbnail_panel->set_thumbnail(image);
1615 }
1616
1617 m_main_scroll->Layout();
1618 m_main_scroll->Fit();
1619
1620 // basic info
1621 auto aprint_stats = m_plater->get_partplate_list().get_current_fff_print().print_statistics();
1622 wxString time;
1623 PartPlate* plate = m_plater->get_partplate_list().get_curr_plate();
1624 if (plate) {
1625 if (plate->get_slice_result()) { time = wxString::Format("%s", short_time(get_time_dhms(plate->get_slice_result()->print_statistics.modes[0].time))); }
1626 }
1627
1628 char weight[64];
1629 if (wxGetApp().app_config->get("use_inches") == "1") {
1630 ::sprintf(weight, " %.2f oz", aprint_stats.total_weight * 0.035274);
1631 }
1632 else {
1633 ::sprintf(weight, " %.2f g", aprint_stats.total_weight);
1634 }
1635
1636 m_stext_time->SetLabel(time);
1637 m_stext_weight->SetLabel(weight);
1638}
int64_t px(const Point &pt)
Definition ClipperUtils.cpp:207
std::string short_time(const std::string &time)
Definition Utils.hpp:563
std::string get_time_dhms(float time_in_secs)
Definition Utils.hpp:609

References app_config, Slic3r::GUI::PartPlate::get_slice_result(), Slic3r::get_time_dhms(), Slic3r::ThumbnailData::height, Slic3r::ThumbnailData::is_valid(), m_main_scroll, m_plater, m_stext_time, m_stext_weight, m_thumbnail_panel, Slic3r::PrintEstimatedStatistics::modes, Slic3r::ThumbnailData::pixels, Slic3r::GCodeProcessorResult::print_statistics, Slic3r::short_time(), Slic3r::THUMBNAIL_SIZE, and Slic3r::ThumbnailData::width.

Referenced by set_default().

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

◆ 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; }

◆ Show()

bool Slic3r::GUI::SendMultiMachinePage::Show ( bool show)
861{
862 if (show) {
864 set_default();
865
866 m_refresh_timer->Stop();
867 m_refresh_timer->SetOwner(this);
868 m_refresh_timer->Start(4000);
869 wxPostEvent(this, wxTimerEvent(*m_refresh_timer));
870 }
871 else {
872 m_refresh_timer->Stop();
873 Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
874 if (dev) {
875 dev->subscribe_device_list(std::vector<std::string>());
876 }
877 }
878 return wxDialog::Show(show);
879}
void set_default()
Definition SendMultiMachinePage.cpp:1640

References m_refresh_timer, refresh_user_device(), set_default(), and Slic3r::DeviceManager::subscribe_device_list().

Here is the call graph for this function:

◆ ShowModal()

◆ sync_ams_list()

void Slic3r::GUI::SendMultiMachinePage::sync_ams_list ( )
1478{
1479 // for black list
1480 std::vector<std::string> materials;
1481 std::vector<std::string> brands;
1482 std::vector<std::string> display_materials;
1483 std::vector<std::string> m_filaments_id;
1484 auto preset_bundle = wxGetApp().preset_bundle;
1485
1486 for (auto filament_name : preset_bundle->filament_presets) {
1487 for (int f_index = 0; f_index < preset_bundle->filaments.size(); f_index++) {
1488 PresetCollection* filament_presets = &wxGetApp().preset_bundle->filaments;
1489 Preset* preset = &filament_presets->preset(f_index);
1490
1491 if (preset && filament_name.compare(preset->name) == 0) {
1492 std::string display_filament_type;
1493 std::string filament_type = preset->config.get_filament_type(display_filament_type);
1494 std::string m_filament_id = preset->filament_id;
1495 display_materials.push_back(display_filament_type);
1496 materials.push_back(filament_type);
1497 m_filaments_id.push_back(m_filament_id);
1498
1499 std::string m_vendor_name = "";
1500 auto vendor = dynamic_cast<ConfigOptionStrings*>(preset->config.option("filament_vendor"));
1501 if (vendor && (vendor->values.size() > 0)) {
1502 std::string vendor_name = vendor->values[0];
1503 m_vendor_name = vendor_name;
1504 }
1505 brands.push_back(m_vendor_name);
1506 }
1507 }
1508 }
1509
1510 auto extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_used_filaments();
1511 BitmapCache bmcache;
1512 MaterialHash::iterator iter = m_material_list.begin();
1513 while (iter != m_material_list.end()) {
1514 int id = iter->first;
1515 Material* item = iter->second;
1516 item->item->Destroy();
1517 delete item;
1518 iter++;
1519 }
1520
1521 m_ams_list_sizer->Clear();
1522 m_material_list.clear();
1523 m_filaments.clear();
1524 m_ams_mapping_result.clear();
1525
1526 for (auto i = 0; i < extruders.size(); i++) {
1527 auto extruder = extruders[i] - 1;
1528 auto colour = wxGetApp().preset_bundle->project_config.opt_string("filament_colour", (unsigned int)extruder);
1529 unsigned char rgb[4];
1530 bmcache.parse_color4(colour, rgb);
1531
1532 auto colour_rgb = wxColour((int)rgb[0], (int)rgb[1], (int)rgb[2], (int)rgb[3]);
1533 if (extruder >= materials.size() || extruder < 0 || extruder >= display_materials.size()) continue;
1534
1535 MaterialItem* item = new MaterialItem(m_main_page, colour_rgb, _L(display_materials[extruder]));
1536 //item->set_ams_info(wxColour("#CECECE"), "A1", 0, std::vector<wxColour>());
1537 item->set_ams_info(wxColour("#CECECE"), _L("Ext"), 0, std::vector<wxColour>());
1538 m_ams_list_sizer->Add(item, 0, wxALL, FromDIP(4));
1539
1540 item->Bind(wxEVT_LEFT_UP, [materials](wxMouseEvent& e) {});
1541 item->Bind(wxEVT_LEFT_DOWN, [this, item, materials, extruder](wxMouseEvent& e) {
1542 MaterialHash::iterator iter = m_material_list.begin();
1543 while (iter != m_material_list.end()) {
1544 int id = iter->first;
1545 Material* item = iter->second;
1546 MaterialItem* m = item->item;
1547 m->on_normal();
1548 iter++;
1549 }
1550
1551 m_current_filament_id = extruder;
1552 item->on_selected();
1553
1554 auto mouse_pos = ClientToScreen(e.GetPosition());
1555 wxPoint rect = item->ClientToScreen(wxPoint(0, 0));
1556
1557 // update ams data
1558 if (get_value_radio("use_ams")) {
1559 if (m_mapping_popup->IsShown()) return;
1560 wxPoint pos = item->ClientToScreen(wxPoint(0, 0));
1561 pos.y += item->GetRect().height;
1562 m_mapping_popup->Move(pos);
1563 m_mapping_popup->set_send_win(this);
1564 m_mapping_popup->set_parent_item(item);
1565 m_mapping_popup->set_current_filament_id(extruder);
1566 m_mapping_popup->set_tag_texture(materials[extruder]);
1567 m_mapping_popup->update_ams_data_multi_machines();
1568 m_mapping_popup->Popup();
1569 }
1570 });
1571
1572 Material* material_item = new Material();
1573 material_item->id = extruder;
1574 material_item->item = item;
1575 m_material_list[i] = material_item;
1576
1577 // build for ams mapping
1578 if (extruder < materials.size() && extruder >= 0) {
1579 FilamentInfo info;
1580 info.id = extruder;
1581 info.tray_id = 0;
1582 info.type = materials[extruder];
1583 info.brand = brands[extruder];
1584 info.filament_id = m_filaments_id[extruder];
1585 //info.color = wxString::Format("#%02X%02X%02X%02X", colour_rgb.Red(), colour_rgb.Green(), colour_rgb.Blue(), colour_rgb.Alpha()).ToStdString();
1586 info.color = "#CECECEFF";
1587 m_filaments.push_back(info);
1588 m_ams_mapping_result.push_back(info);
1589 }
1590 }
1591
1592 if (extruders.size() <= 8) {
1593 m_ams_list_sizer->SetCols(extruders.size());
1594 }
1595 else {
1596 m_ams_list_sizer->SetCols(8);
1597 }
1598}
bool get_value_radio(std::string param)
Definition SendMultiMachinePage.cpp:1061
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
zaa_minimize_perimeter_height filament_type((ConfigOptionBools, filament_soluble))((ConfigOptionStrings
@ Preset
Definition calib.hpp:39

References _L, Slic3r::FilamentGroupUtils::FilamentInfo::color, Slic3r::Preset::config, Slic3r::Preset::filament_id, Slic3r::filament_type(), Slic3r::DynamicPrintConfig::get_filament_type(), get_value_radio(), Slic3r::GUI::Material::id, Slic3r::GUI::Material::item, m_ams_list_sizer, m_ams_mapping_result, m_current_filament_id, m_filaments, m_main_page, m_mapping_popup, m_material_list, Slic3r::Preset::name, Slic3r::GUI::MaterialItem::on_normal(), Slic3r::GUI::MaterialItem::on_selected(), Slic3r::ConfigBase::option(), Slic3r::GUI::BitmapCache::parse_color4(), Slic3r::PresetCollection::preset(), Slic3r::GUI::MaterialItem::set_ams_info(), Slic3r::FilamentGroupUtils::FilamentInfo::type, and Slic3r::GUI::wxMouseEvent.

Referenced by set_default().

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 }

Member Data Documentation

◆ app_config

◆ btn_bg_enable

StateColor Slic3r::GUI::SendMultiMachinePage::btn_bg_enable
private

◆ device_en_ams_big

bool Slic3r::GUI::SendMultiMachinePage::device_en_ams_big { true }
private
112{ true };

Referenced by create_page().

◆ device_name_big

bool Slic3r::GUI::SendMultiMachinePage::device_name_big { true }
private
110{ true };

Referenced by create_page().

◆ device_printable_big

bool Slic3r::GUI::SendMultiMachinePage::device_printable_big { true }
private
111{ true };

Referenced by create_page(), and refresh_user_device().

◆ m_ams

Button* Slic3r::GUI::SendMultiMachinePage::m_ams { nullptr }
private
147{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_ams_list_sizer

wxGridSizer* Slic3r::GUI::SendMultiMachinePage::m_ams_list_sizer { nullptr }
private
127{ nullptr };

Referenced by create_page(), and sync_ams_list().

◆ m_ams_mapping_result

std::vector<FilamentInfo> Slic3r::GUI::SendMultiMachinePage::m_ams_mapping_result
private

◆ m_button_add

Button* Slic3r::GUI::SendMultiMachinePage::m_button_add { nullptr }
private
178{ nullptr };

Referenced by create_page(), on_dpi_changed(), and refresh_user_device().

◆ m_button_send

Button* Slic3r::GUI::SendMultiMachinePage::m_button_send { nullptr }
private
114{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_can_rescale

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

◆ m_checkbox_map

std::map<std::string, CheckBox*> Slic3r::GUI::SendMultiMachinePage::m_checkbox_map
private

Referenced by create_item_checkbox().

◆ m_current_filament_id

int Slic3r::GUI::SendMultiMachinePage::m_current_filament_id { 0 }
private

◆ m_current_project_name

wxString Slic3r::GUI::SendMultiMachinePage::m_current_project_name
private

◆ m_device_items

std::map<std::string, SendDeviceItem*> Slic3r::GUI::SendMultiMachinePage::m_device_items
private

◆ m_device_status

Button* Slic3r::GUI::SendMultiMachinePage::m_device_status { nullptr }
private
145{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_em_unit

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

◆ m_export_3mf_cancel

bool Slic3r::GUI::SendMultiMachinePage::m_export_3mf_cancel { false }
private
121{ false };

Referenced by on_send().

◆ m_filaments

std::vector<FilamentInfo> Slic3r::GUI::SendMultiMachinePage::m_filaments
private

◆ m_force_rescale

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

◆ m_image_sizer

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::m_image_sizer { nullptr }
private
174{ nullptr };

Referenced by create_page().

◆ m_input_map

std::map<std::string, TextInput*> Slic3r::GUI::SendMultiMachinePage::m_input_map
private

Referenced by create_item_input().

◆ m_is_canceled

bool Slic3r::GUI::SendMultiMachinePage::m_is_canceled { false }
private
120{ false };

Referenced by on_send().

◆ m_is_rename_mode

bool Slic3r::GUI::SendMultiMachinePage::m_is_rename_mode { false }
private
160{ false };

Referenced by on_rename_click(), and on_rename_enter().

◆ m_main_page

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_main_page { nullptr }
private
124{ nullptr };

Referenced by SendMultiMachinePage(), and sync_ams_list().

◆ m_main_scroll

wxScrolledWindow* Slic3r::GUI::SendMultiMachinePage::m_main_scroll { nullptr }
private
125{ nullptr };

Referenced by SendMultiMachinePage(), create_page(), and set_default_normal().

◆ m_mapping_popup

AmsMapingPopup* Slic3r::GUI::SendMultiMachinePage::m_mapping_popup { nullptr }
private

◆ m_material_list

MaterialHash Slic3r::GUI::SendMultiMachinePage::m_material_list
private

◆ m_new_font_point_size

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

◆ m_normal_font

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

◆ m_panel_image

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_panel_image { nullptr }
private
173{ nullptr };

Referenced by create_page().

◆ m_plater

Plater* Slic3r::GUI::SendMultiMachinePage::m_plater { nullptr }
private

◆ m_prev_scale_factor

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

◆ m_print_plate_idx

int Slic3r::GUI::SendMultiMachinePage::m_print_plate_idx
private

◆ m_printer_name

Button* Slic3r::GUI::SendMultiMachinePage::m_printer_name { nullptr }
private
144{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_radio_group

AmsRadioSelectorList Slic3r::GUI::SendMultiMachinePage::m_radio_group
private

◆ m_refresh_button

Button* Slic3r::GUI::SendMultiMachinePage::m_refresh_button { nullptr }
private
148{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_refresh_timer

wxTimer* Slic3r::GUI::SendMultiMachinePage::m_refresh_timer = nullptr
private

◆ m_rename_button

ScalableButton* Slic3r::GUI::SendMultiMachinePage::m_rename_button { nullptr }
private
155{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_rename_edit_panel

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_rename_edit_panel { nullptr }
private
153{ nullptr };

Referenced by create_page().

◆ m_rename_input

TextInput* Slic3r::GUI::SendMultiMachinePage::m_rename_input { nullptr }
private
154{ nullptr };

Referenced by check_focus(), create_page(), on_rename_click(), and on_rename_enter().

◆ m_rename_normal_panel

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_rename_normal_panel { nullptr }
private
152{ nullptr };

Referenced by create_page(), and on_rename_enter().

◆ m_rename_switch_panel

wxSimplebook* Slic3r::GUI::SendMultiMachinePage::m_rename_switch_panel { nullptr }
private
151{ nullptr };

Referenced by create_page(), on_rename_click(), and on_rename_enter().

◆ m_scale_factor

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

◆ m_select_checkbox

CheckBox* Slic3r::GUI::SendMultiMachinePage::m_select_checkbox { nullptr }
private
143{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ m_sizer_body

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::m_sizer_body { nullptr }
private
126{ nullptr };

Referenced by SendMultiMachinePage().

◆ m_sort

SortItem Slic3r::GUI::SendMultiMachinePage::m_sort
private

Referenced by create_page(), and refresh_user_device().

◆ m_stext_time

wxStaticText* Slic3r::GUI::SendMultiMachinePage::m_stext_time { nullptr }
private
166{ nullptr };

Referenced by create_page(), and set_default_normal().

◆ m_stext_weight

wxStaticText* Slic3r::GUI::SendMultiMachinePage::m_stext_weight { nullptr }
private
167{ nullptr };

Referenced by create_page(), and set_default_normal().

◆ m_table_head_panel

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_table_head_panel { nullptr }
private
141{ nullptr };

Referenced by create_page().

◆ m_table_head_sizer

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::m_table_head_sizer { nullptr }
private
142{ nullptr };

Referenced by create_page().

◆ m_task_name

wxStaticText* Slic3r::GUI::SendMultiMachinePage::m_task_name { nullptr }
private
158{ nullptr };

Referenced by create_page(), on_rename_enter(), and set_default().

◆ m_text_sizer

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::m_text_sizer { nullptr }
private
165{ nullptr };

Referenced by create_page().

◆ m_thumbnail_panel

ThumbnailPanel* Slic3r::GUI::SendMultiMachinePage::m_thumbnail_panel {nullptr}
private
172{nullptr};

Referenced by create_page(), and set_default_normal().

◆ m_tip_text

wxStaticText* Slic3r::GUI::SendMultiMachinePage::m_tip_text { nullptr }
private
177{ nullptr };

Referenced by create_page(), and refresh_user_device().

◆ m_title_panel

wxPanel* Slic3r::GUI::SendMultiMachinePage::m_title_panel { nullptr }
private
163{ nullptr };

Referenced by create_page().

◆ m_title_sizer

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::m_title_sizer { nullptr }
private
164{ nullptr };

Referenced by create_page().

◆ print_time

ScalableBitmap* Slic3r::GUI::SendMultiMachinePage::print_time { nullptr }
private
169{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ print_weight

ScalableBitmap* Slic3r::GUI::SendMultiMachinePage::print_weight { nullptr }
private
171{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ rename_sizer_h

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::rename_sizer_h { nullptr }
private
157{ nullptr };

Referenced by create_page().

◆ rename_sizer_v

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::rename_sizer_v { nullptr }
private
156{ nullptr };

Referenced by create_page().

◆ scroll_macine_list

wxScrolledWindow* Slic3r::GUI::SendMultiMachinePage::scroll_macine_list { nullptr }
private
115{ nullptr };

Referenced by create_page(), and refresh_user_device().

◆ sizer_machine_list

wxBoxSizer* Slic3r::GUI::SendMultiMachinePage::sizer_machine_list { nullptr }
private
116{ nullptr };

Referenced by create_page(), and refresh_user_device().

◆ timeimg

wxStaticBitmap* Slic3r::GUI::SendMultiMachinePage::timeimg { nullptr }
private
168{ nullptr };

Referenced by create_page(), and on_dpi_changed().

◆ weightimg

wxStaticBitmap* Slic3r::GUI::SendMultiMachinePage::weightimg { nullptr }
private
170{ nullptr };

Referenced by create_page(), and on_dpi_changed().


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