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

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

Inheritance diagram for Slic3r::GUI::CreatePrinterPresetDialog:
Collaboration diagram for Slic3r::GUI::CreatePrinterPresetDialog:

Classes

struct  CreatePrinterType

Public Member Functions

 CreatePrinterPresetDialog (wxWindow *parent)
 ~CreatePrinterPresetDialog ()
void EndModal (int retCode) override
float scale_factor () const
float prev_scale_factor () const
void set_scale_factor (float v)
void set_prev_scale_factor (float v)
void set_em_unit (int v)
bool force_rescale () const
int em_unit () const
const wxFont & normal_font () const
void enable_force_rescale ()
int ShowModal ()

Protected Member Functions

void on_dpi_changed (const wxRect &suggested_rect) override
wxBoxSizer * create_step_switch_item ()
void create_printer_page1 (wxWindow *parent)
wxBoxSizer * create_type_item (wxWindow *parent)
wxBoxSizer * create_printer_item (wxWindow *parent)
wxBoxSizer * create_nozzle_diameter_item (wxWindow *parent)
wxBoxSizer * create_bed_shape_item (wxWindow *parent)
wxBoxSizer * create_bed_size_item (wxWindow *parent)
wxBoxSizer * create_origin_item (wxWindow *parent)
wxBoxSizer * create_hot_bed_stl_item (wxWindow *parent)
wxBoxSizer * create_hot_bed_svg_item (wxWindow *parent)
wxBoxSizer * create_max_print_height_item (wxWindow *parent)
wxWindow * create_page1_dialog_buttons (wxWindow *parent)
void create_printer_page2 (wxWindow *parent)
wxBoxSizer * create_printer_preset_item (wxWindow *parent)
wxBoxSizer * create_presets_item (wxWindow *parent)
wxBoxSizer * create_presets_template_item (wxWindow *parent)
wxWindow * create_page2_dialog_buttons (wxWindow *parent)
void show_page1 ()
void show_page2 ()
bool data_init ()
void on_select_printer_model (wxCommandEvent &e)
void set_current_visible_printer ()
void select_curr_radiobox (std::vector< std::pair< RadioBox *, wxString > > &radiobox_list, int btn_idx)
void select_all_preset_template (std::vector< std::pair<::CheckBox *, Preset * > > &preset_templates)
void deselect_all_preset_template (std::vector< std::pair<::CheckBox *, Preset * > > &preset_templates)
void update_presets_list (bool jast_template=false)
void on_preset_model_value_change (wxCommandEvent &e)
void clear_preset_combobox ()
bool save_printable_area_config (Preset *preset)
bool check_printable_area ()
bool validate_input_valid ()
void load_texture ()
void load_model_stl ()
bool load_system_and_user_presets_with_curr_model (PresetBundle &temp_preset_bundle, bool just_template=false)
void generate_process_presets_data (std::vector< Preset const * > presets, std::string nozzle)
void update_preset_list_size ()
std::string get_printer_vendor () const
std::string get_printer_model () const
std::string get_nozzle_diameter () const
std::string get_custom_printer_model () const
std::string get_custom_printer_name () const
wxArrayString printer_preset_sort_with_nozzle_diameter (const VendorProfile &vendor_profile, float nozzle_diameter)
wxBoxSizer * create_radio_item (wxString title, wxWindow *parent, wxString tooltip, std::vector< std::pair< RadioBox *, wxString > > &radiobox_list)
wxString curr_create_preset_type () const
wxString curr_create_printer_type () const
virtual void on_sys_color_changed ()

Private Member Functions

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

Private Attributes

CreatePrinterType m_create_type
std::vector< std::pair< RadioBox *, wxString > > m_create_type_btns
std::vector< std::pair< RadioBox *, wxString > > m_create_presets_btns
std::vector< std::pair<::CheckBox *, Preset * > > m_filament_preset
std::vector< std::pair<::CheckBox *, Preset * > > m_process_preset
std::unordered_map< std::string, std::shared_ptr< Preset > > m_printer_name_to_preset
VendorProfile m_printer_preset_vendor_selected
Slic3r::VendorProfile::PrinterModel m_printer_preset_model_selected
bool rewritten = false
Preset * m_printer_preset = nullptr
wxStaticBitmap * m_step_1 = nullptr
wxStaticBitmap * m_step_2 = nullptr
Button * m_button_bed_stl = nullptr
Button * m_button_bed_svg = nullptr
wxScrolledWindow * m_page1 = nullptr
wxPanel * m_page2 = nullptr
wxScrolledWindow * m_scrolled_preset_window = nullptr
wxBoxSizer * m_scrooled_preset_sizer = nullptr
ComboBox * m_select_vendor = nullptr
ComboBox * m_select_model = nullptr
ComboBox * m_select_printer = nullptr
::CheckBox * m_can_not_find_vendor_combox = nullptr
::CheckBox * m_can_not_find_nozzle_checkbox = nullptr
wxStaticText * m_can_not_find_vendor_text = nullptr
wxTextCtrl * m_custom_vendor_text_ctrl = nullptr
wxTextCtrl * m_custom_model_text_ctrl = nullptr
wxTextCtrl * m_custom_nozzle_diameter_ctrl = nullptr
ComboBox * m_nozzle_diameter = nullptr
ComboBox * m_printer_vendor = nullptr
ComboBox * m_printer_model = nullptr
TextInput * m_bed_size_x_input = nullptr
TextInput * m_bed_size_y_input = nullptr
TextInput * m_bed_origin_x_input = nullptr
TextInput * m_bed_origin_y_input = nullptr
TextInput * m_print_height_input = nullptr
wxGridSizer * m_filament_preset_template_sizer = nullptr
wxGridSizer * m_process_preset_template_sizer = nullptr
wxPanel * m_filament_preset_panel = nullptr
wxPanel * m_process_preset_panel = nullptr
wxPanel * m_preset_template_panel = nullptr
wxBoxSizer * m_filament_sizer = nullptr
wxPanel * m_printer_info_panel = nullptr
wxBoxSizer * m_page1_sizer = nullptr
wxBoxSizer * m_printer_info_sizer = nullptr
wxBoxSizer * m_page2_sizer = nullptr
wxStaticText * m_upload_stl_tip_text = nullptr
wxStaticText * m_upload_svg_tip_text = nullptr
std::string m_custom_texture
std::string m_custom_model
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


Class Documentation

◆ Slic3r::GUI::CreatePrinterPresetDialog::CreatePrinterType

struct Slic3r::GUI::CreatePrinterPresetDialog::CreatePrinterType
Class Members
wxString base_curr_printer
wxString base_template
wxString create_nozzle
wxString create_printer

Constructor & Destructor Documentation

◆ CreatePrinterPresetDialog()

Slic3r::GUI::CreatePrinterPresetDialog::CreatePrinterPresetDialog ( wxWindow * parent)
1638: DPIDialog(parent ? parent : nullptr, wxID_ANY, _L("Create Printer/Nozzle"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxCENTER)
1639{
1640 m_create_type.create_printer = _L("Create Printer");
1641 m_create_type.create_nozzle = _L("Create Nozzle for Existing Printer");
1642 m_create_type.base_template = _L("Create from Template");
1643 m_create_type.base_curr_printer = _L("Create Based on Current Printer");
1644 this->SetBackgroundColour(*wxWHITE);
1645 SetSizeHints(wxDefaultSize, wxDefaultSize);
1646
1647 wxBoxSizer *m_main_sizer = new wxBoxSizer(wxVERTICAL);
1648 // top line
1649 auto m_line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 2), wxTAB_TRAVERSAL);
1650 m_line_top->SetBackgroundColour(wxColour(0xA6, 0xa9, 0xAA));
1651 m_main_sizer->Add(m_line_top, 0, wxEXPAND, 0);
1652 m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(5));
1653 m_main_sizer->Add(create_step_switch_item(), 0, wxEXPAND | wxALL, FromDIP(5));
1654
1655 wxBoxSizer *page_sizer = new wxBoxSizer(wxHORIZONTAL);
1656
1657 m_page1 = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
1658 m_page1->SetBackgroundColour(*wxWHITE);
1659 m_page1->SetScrollRate(5, FromDIP(20));
1660 m_page2 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize); m_page2->SetBackgroundColour(*wxWHITE);
1661
1664 m_page2->Hide();
1665
1666 page_sizer->Add(m_page1, 1, wxEXPAND, 0);
1667 page_sizer->Add(m_page2, 1, wxEXPAND, 0);
1668 m_main_sizer->Add(page_sizer, 0, wxEXPAND | wxRIGHT | wxLEFT, FromDIP(5)); // ORCA use equal border for both sides
1671
1672 m_main_sizer->Add(0, 0, 0, wxTOP, FromDIP(10));
1673
1674 this->SetSizer(m_main_sizer);
1675
1676 Layout();
1677 Fit();
1678
1679 wxSize screen_size = wxGetDisplaySize();
1680 int dialogX = (screen_size.GetWidth() - GetSize().GetWidth()) / 2;
1681 int dialogY = (screen_size.GetHeight() - GetSize().GetHeight()) / 2;
1682 SetPosition(wxPoint(dialogX, dialogY));
1683
1684 wxGetApp().UpdateDlgDarkUI(this);
1685}
#define _L(s)
Definition OBJ.cpp:34
std::vector< std::pair< RadioBox *, wxString > > m_create_type_btns
Definition CreatePresetsDialog.hpp:177
void create_printer_page1(wxWindow *parent)
Definition CreatePresetsDialog.cpp:1737
wxBoxSizer * create_step_switch_item()
Definition CreatePresetsDialog.cpp:1700
wxScrolledWindow * m_page1
Definition CreatePresetsDialog.hpp:190
wxPanel * m_page2
Definition CreatePresetsDialog.hpp:191
void create_printer_page2(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2635
CreatePrinterType m_create_type
Definition CreatePresetsDialog.hpp:176
std::vector< std::pair< RadioBox *, wxString > > m_create_presets_btns
Definition CreatePresetsDialog.hpp:178
void select_curr_radiobox(std::vector< std::pair< RadioBox *, wxString > > &radiobox_list, int btn_idx)
Definition CreatePresetsDialog.cpp:2569

References CreatePrinterPresetDialog(), _L, create_printer_page1(), create_printer_page2(), create_step_switch_item(), m_create_presets_btns, m_create_type, m_create_type_btns, m_page1, m_page2, and select_curr_radiobox().

Referenced by CreatePrinterPresetDialog().

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

◆ ~CreatePrinterPresetDialog()

Slic3r::GUI::CreatePrinterPresetDialog::~CreatePrinterPresetDialog ( )
1688{
1690 if (m_printer_preset) {
1691 delete m_printer_preset;
1692 m_printer_preset = nullptr;
1693 }
1694}
Preset * m_printer_preset
Definition CreatePresetsDialog.hpp:185
void clear_preset_combobox()
Definition CreatePresetsDialog.cpp:3288

References clear_preset_combobox(), and m_printer_preset.

Here is the call graph for this function:

Member Function Documentation

◆ check_printable_area()

bool Slic3r::GUI::CreatePrinterPresetDialog::check_printable_area ( )
protected
3359 {
3360 double x = 0;
3361 m_bed_size_x_input->GetTextCtrl()->GetValue().ToDouble(&x);
3362 double y = 0;
3363 m_bed_size_y_input->GetTextCtrl()->GetValue().ToDouble(&y);
3364 double dx = 0;
3365 m_bed_origin_x_input->GetTextCtrl()->GetValue().ToDouble(&dx);
3366 double dy = 0;
3367 m_bed_origin_y_input->GetTextCtrl()->GetValue().ToDouble(&dy);
3368 // range check begin
3369 if (x == 0 || y == 0) {
3370 return false;
3371 }
3372 double x0 = 0.0;
3373 double y0 = 0.0;
3374 double x1 = x;
3375 double y1 = y;
3376 if (dx >= x || dy >= y) {
3377 return false;
3378 }
3379 return true;
3380}
TextInput * m_bed_size_y_input
Definition CreatePresetsDialog.hpp:207
TextInput * m_bed_origin_x_input
Definition CreatePresetsDialog.hpp:208
TextInput * m_bed_origin_y_input
Definition CreatePresetsDialog.hpp:209
TextInput * m_bed_size_x_input
Definition CreatePresetsDialog.hpp:206

References m_bed_origin_x_input, m_bed_origin_y_input, m_bed_size_x_input, and m_bed_size_y_input.

Referenced by validate_input_valid().

Here is the caller graph for this function:

◆ clear_preset_combobox()

void Slic3r::GUI::CreatePrinterPresetDialog::clear_preset_combobox ( )
protected
3289{
3290 for (std::pair<::CheckBox *, Preset *> preset : m_filament_preset) {
3291 if (preset.second) {
3292 delete preset.second;
3293 preset.second = nullptr;
3294 }
3295 }
3296 m_filament_preset.clear();
3298
3299 for (std::pair<::CheckBox *, Preset *> preset : m_process_preset) {
3300 if (preset.second) {
3301 delete preset.second;
3302 preset.second = nullptr;
3303 }
3304 }
3305 m_process_preset.clear();
3307}
std::vector< std::pair<::CheckBox *, Preset * > > m_process_preset
Definition CreatePresetsDialog.hpp:180
wxGridSizer * m_process_preset_template_sizer
Definition CreatePresetsDialog.hpp:212
wxGridSizer * m_filament_preset_template_sizer
Definition CreatePresetsDialog.hpp:211
std::vector< std::pair<::CheckBox *, Preset * > > m_filament_preset
Definition CreatePresetsDialog.hpp:179

References m_filament_preset, m_filament_preset_template_sizer, m_process_preset, and m_process_preset_template_sizer.

Referenced by ~CreatePrinterPresetDialog(), and update_presets_list().

Here is the caller graph for this function:

◆ create_bed_shape_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_bed_shape_item ( wxWindow * parent)
protected
2006{
2007 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2008
2009 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2010 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Bed Shape"), wxDefaultPosition, wxDefaultSize);
2011 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2012 optionSizer->SetMinSize(OPTION_SIZE);
2013 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2014
2015 wxBoxSizer * bed_shape_sizer = new wxBoxSizer(wxVERTICAL);
2016 wxStaticText *static_bed_shape_text = new wxStaticText(parent, wxID_ANY, _L("Rectangle"), wxDefaultPosition, wxDefaultSize);
2017 bed_shape_sizer->Add(static_bed_shape_text, 0, wxEXPAND | wxALL, 0);
2018 horizontal_sizer->Add(bed_shape_sizer, 0, wxEXPAND | wxALL, FromDIP(10));
2019
2020 return horizontal_sizer;
2021}
#define OPTION_SIZE
Definition CreatePresetsDialog.cpp:80
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30

References _L, OPTION_SIZE, and wxStaticText.

Referenced by create_printer_page1().

Here is the caller graph for this function:

◆ create_bed_size_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_bed_size_item ( wxWindow * parent)
protected
2024{
2025 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2026
2027 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2028 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Printable Space"), wxDefaultPosition, wxDefaultSize);
2029 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2030 optionSizer->SetMinSize(OPTION_SIZE);
2031 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2032
2033 wxBoxSizer * length_sizer = new wxBoxSizer(wxVERTICAL);
2034 // ORCA use icon on input box to match style with other Point fields
2035 horizontal_sizer->Add(length_sizer, 0, wxEXPAND | wxLEFT | wxTOP, FromDIP(10));
2036 wxBoxSizer *length_input_sizer = new wxBoxSizer(wxVERTICAL);
2037 m_bed_size_x_input = new TextInput(parent, "200", _L("mm"), "inputbox_x", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
2038 wxTextValidator validator(wxFILTER_DIGITS);
2039 m_bed_size_x_input->GetTextCtrl()->SetValidator(validator);
2040 length_input_sizer->Add(m_bed_size_x_input, 0, wxEXPAND | wxLEFT, FromDIP(5));
2041 horizontal_sizer->Add(length_input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
2042
2043 wxBoxSizer * width_sizer = new wxBoxSizer(wxVERTICAL);
2044 // ORCA use icon on input box to match style with other Point fields
2045 horizontal_sizer->Add(width_sizer, 0, wxEXPAND | wxLEFT | wxTOP, FromDIP(10));
2046 wxBoxSizer *width_input_sizer = new wxBoxSizer(wxVERTICAL);
2047 m_bed_size_y_input = new TextInput(parent, "200", _L("mm"), "inputbox_y", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
2048 m_bed_size_y_input->GetTextCtrl()->SetValidator(validator);
2049 width_input_sizer->Add(m_bed_size_y_input, 0, wxEXPAND | wxALL, 0);
2050 horizontal_sizer->Add(width_input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
2051
2052 return horizontal_sizer;
2053
2054}
#define PRINTER_SPACE_SIZE
Definition CreatePresetsDialog.cpp:85

References _L, m_bed_size_x_input, m_bed_size_y_input, OPTION_SIZE, PRINTER_SPACE_SIZE, and wxStaticText.

Referenced by create_printer_page1().

Here is the caller graph for this function:

◆ create_hot_bed_stl_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_hot_bed_stl_item ( wxWindow * parent)
protected
2089{
2090 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2091
2092 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2093 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Hot Bed STL"), wxDefaultPosition, wxDefaultSize);
2094 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2095 optionSizer->SetMinSize(OPTION_SIZE);
2096 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2097
2098 wxBoxSizer *hot_bed_stl_sizer = new wxBoxSizer(wxVERTICAL);
2099
2100 m_button_bed_stl = new Button(parent, _L("Load..."));
2102 m_button_bed_stl->Bind(wxEVT_BUTTON, ([this](wxCommandEvent& e) { load_model_stl(); }));
2103
2104 hot_bed_stl_sizer->Add(m_button_bed_stl, 0, wxEXPAND | wxALL, 0);
2105
2106 horizontal_sizer->Add(hot_bed_stl_sizer, 0, wxEXPAND | wxLEFT, FromDIP(10));
2107
2108 m_upload_stl_tip_text = new wxStaticText(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize);
2109 m_upload_stl_tip_text->SetLabelText(_L("Empty"));
2110 horizontal_sizer->Add(m_upload_stl_tip_text, 0, wxEXPAND | wxALL, FromDIP(10));
2111 return horizontal_sizer;
2112}
@ Regular
Definition Button.hpp:24
@ Parameter
Definition Button.hpp:34
Button * m_button_bed_stl
Definition CreatePresetsDialog.hpp:188
void load_model_stl()
Definition CreatePresetsDialog.cpp:2204
wxStaticText * m_upload_stl_tip_text
Definition CreatePresetsDialog.hpp:221

References _L, load_model_stl(), m_button_bed_stl, m_upload_stl_tip_text, OPTION_SIZE, Parameter, Regular, and wxStaticText.

Referenced by create_printer_page1().

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

◆ create_hot_bed_svg_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_hot_bed_svg_item ( wxWindow * parent)
protected
2115{
2116 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2117
2118 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2119 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Hot Bed SVG"), wxDefaultPosition, wxDefaultSize);
2120 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2121 optionSizer->SetMinSize(OPTION_SIZE);
2122 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2123
2124 wxBoxSizer *hot_bed_stl_sizer = new wxBoxSizer(wxVERTICAL);
2125
2126 m_button_bed_svg = new Button(parent, _L("Load..."));
2128 m_button_bed_svg->Bind(wxEVT_BUTTON, ([this](wxCommandEvent &e) { load_texture(); }));
2129
2130 hot_bed_stl_sizer->Add(m_button_bed_svg, 0, wxEXPAND | wxALL, 0);
2131
2132 horizontal_sizer->Add(hot_bed_stl_sizer, 0, wxEXPAND | wxLEFT, FromDIP(10));
2133
2134 m_upload_svg_tip_text = new wxStaticText(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize);
2135 m_upload_svg_tip_text->SetLabelText(_L("Empty"));
2136 horizontal_sizer->Add(m_upload_svg_tip_text, 0, wxEXPAND | wxALL, FromDIP(10));
2137 return horizontal_sizer;
2138}
wxStaticText * m_upload_svg_tip_text
Definition CreatePresetsDialog.hpp:222
void load_texture()
Definition CreatePresetsDialog.cpp:2175
Button * m_button_bed_svg
Definition CreatePresetsDialog.hpp:189

References _L, load_texture(), m_button_bed_svg, m_upload_svg_tip_text, OPTION_SIZE, Parameter, Regular, and wxStaticText.

Referenced by create_printer_page1().

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

◆ create_max_print_height_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_max_print_height_item ( wxWindow * parent)
protected
2141{
2142 wxBoxSizer * horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2143
2144 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2145 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Max Print Height"), wxDefaultPosition, wxDefaultSize);
2146 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2147 optionSizer->SetMinSize(OPTION_SIZE);
2148 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2149
2150 wxBoxSizer *hight_input_sizer = new wxBoxSizer(wxVERTICAL);
2151 m_print_height_input = new TextInput(parent, "200", _L("mm"), wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER); // Use same alignment with all other input boxes
2152 wxTextValidator validator(wxFILTER_DIGITS);
2153 m_print_height_input->GetTextCtrl()->SetValidator(validator);
2154 hight_input_sizer->Add(m_print_height_input, 0, wxEXPAND | wxLEFT, FromDIP(5));
2155 horizontal_sizer->Add(hight_input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
2156
2157 return horizontal_sizer;
2158}
TextInput * m_print_height_input
Definition CreatePresetsDialog.hpp:210

References _L, m_print_height_input, OPTION_SIZE, PRINTER_SPACE_SIZE, and wxStaticText.

Referenced by create_printer_page1().

Here is the caller graph for this function:

◆ create_nozzle_diameter_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_nozzle_diameter_item ( wxWindow * parent)
protected
1927{
1928 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
1929
1930 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
1931 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Nozzle Diameter"), wxDefaultPosition, wxDefaultSize);
1932 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
1933 optionSizer->SetMinSize(OPTION_SIZE);
1934 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
1935
1936 wxBoxSizer *vertical_sizer = new wxBoxSizer(wxVERTICAL);
1937 wxBoxSizer *comboBoxSizer = new wxBoxSizer(wxHORIZONTAL);
1938 m_nozzle_diameter = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, OPTION_SIZE, 0, nullptr, wxCB_READONLY);
1939 wxArrayString nozzle_diameters;
1940 const char dec_sep = is_decimal_separator_point() ? '.' : ',';
1941 for (const std::string& nozzle : nozzle_diameter_vec) {
1942 std::string display_nozzle = nozzle;
1943 size_t pos = display_nozzle.find('.');
1944 if (pos != std::string::npos) { display_nozzle.replace(pos, 1, 1, dec_sep); }
1945 nozzle_diameters.Add(display_nozzle + " mm");
1946 }
1947 m_nozzle_diameter->Set(nozzle_diameters);
1948 m_nozzle_diameter->SetSelection(0);
1949 comboBoxSizer->Add(m_nozzle_diameter, 0, wxEXPAND | wxALL, 0);
1950
1951 m_custom_nozzle_diameter_ctrl = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE);
1952 m_custom_nozzle_diameter_ctrl->SetHint(_L("Input Custom Nozzle Diameter"));
1953 m_custom_nozzle_diameter_ctrl->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
1954 int key = event.GetKeyCode();
1955 if (key != 44 && key != 46 && cannot_input_key.find(key) != cannot_input_key.end()) { // "@" can not be inputed
1956 event.Skip(false);
1957 return;
1958 }
1959 event.Skip();
1960 });
1961 comboBoxSizer->Add(m_custom_nozzle_diameter_ctrl, 0, wxEXPAND | wxALL, 0);
1963 vertical_sizer->Add(comboBoxSizer, 0, wxEXPAND, 0);
1964
1965 wxBoxSizer *checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1966 m_can_not_find_nozzle_checkbox = new ::CheckBox(parent);
1967
1968 checkbox_sizer->Add(m_can_not_find_nozzle_checkbox, 0, wxALIGN_CENTER, 0);
1969 checkbox_sizer->Add(0, 0, 0, wxEXPAND | wxRIGHT, FromDIP(5));
1970
1971 auto can_not_find_nozzle_diameter = new wxStaticText(parent, wxID_ANY, _L("Can't find my nozzle diameter"), wxDefaultPosition, wxDefaultSize, 0);
1972 can_not_find_nozzle_diameter->SetFont(::Label::Body_13);
1973
1974 wxSize size = can_not_find_nozzle_diameter->GetTextExtent(_L("Can't find my printer model"));
1975 can_not_find_nozzle_diameter->SetMinSize(wxSize(size.x + FromDIP(4), -1));
1976 can_not_find_nozzle_diameter->Wrap(-1);
1977 checkbox_sizer->Add(can_not_find_nozzle_diameter, 0, wxALIGN_CENTER, 0);
1978
1979 m_can_not_find_nozzle_checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) {
1980 bool value = m_can_not_find_nozzle_checkbox->GetValue();
1981 if (value) {
1982 m_can_not_find_nozzle_checkbox->SetValue(true);
1984 m_nozzle_diameter->Hide();
1985 } else {
1986 m_can_not_find_nozzle_checkbox->SetValue(false);
1988 m_nozzle_diameter->Show();
1989 }
1990 Refresh();
1991 Layout();
1992 m_page1->SetSizerAndFit(m_page1_sizer);
1993 Fit();
1994
1995 e.Skip();
1996 });
1997
1998 vertical_sizer->Add(checkbox_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
1999 horizontal_sizer->Add(vertical_sizer, 0, wxEXPAND | wxALL, FromDIP(10));
2000 horizontal_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(200));
2001
2002 return horizontal_sizer;
2003}
#define NAME_OPTION_COMBOBOX_SIZE
Definition CreatePresetsDialog.cpp:78
static wxFont Body_13
Definition Label.hpp:54
wxBoxSizer * m_page1_sizer
Definition CreatePresetsDialog.hpp:218
wxTextCtrl * m_custom_nozzle_diameter_ctrl
Definition CreatePresetsDialog.hpp:202
::CheckBox * m_can_not_find_nozzle_checkbox
Definition CreatePresetsDialog.hpp:198
ComboBox * m_nozzle_diameter
Definition CreatePresetsDialog.hpp:203
static std::set< int > cannot_input_key
Definition CreatePresetsDialog.cpp:229
static std::vector< std::string > nozzle_diameter_vec
Definition CreatePresetsDialog.cpp:223
Vec3d pos(const Pt &p)
Definition ReprojectPointsOnMesh.hpp:16
bool is_decimal_separator_point()
Definition LocalesUtils.cpp:78

References _L, Label::Body_13, Slic3r::GUI::cannot_input_key, Slic3r::is_decimal_separator_point(), m_can_not_find_nozzle_checkbox, m_custom_nozzle_diameter_ctrl, m_nozzle_diameter, m_page1, m_page1_sizer, NAME_OPTION_COMBOBOX_SIZE, Slic3r::GUI::nozzle_diameter_vec, OPTION_SIZE, and wxStaticText.

Referenced by create_printer_page1().

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

◆ create_origin_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_origin_item ( wxWindow * parent)
protected
2057{
2058 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2059
2060 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2061 wxStaticText *static_type_text = new wxStaticText(parent, wxID_ANY, _L("Origin"), wxDefaultPosition, wxDefaultSize);
2062 optionSizer->Add(static_type_text, 0, wxEXPAND | wxALL, 0);
2063 optionSizer->SetMinSize(OPTION_SIZE);
2064 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2065
2066 wxBoxSizer * length_sizer = new wxBoxSizer(wxVERTICAL);
2067 // ORCA use icon on input box to match style with other Point fields
2068 horizontal_sizer->Add(length_sizer, 0, wxEXPAND | wxLEFT | wxTOP, FromDIP(10));
2069 wxBoxSizer *length_input_sizer = new wxBoxSizer(wxVERTICAL);
2070 m_bed_origin_x_input = new TextInput(parent, "0", _L("mm"), "inputbox_x", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
2071 wxTextValidator validator(wxFILTER_DIGITS);
2072 m_bed_origin_x_input->GetTextCtrl()->SetValidator(validator);
2073 length_input_sizer->Add(m_bed_origin_x_input, 0, wxEXPAND | wxLEFT, FromDIP(5)); // Align with other
2074 horizontal_sizer->Add(length_input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
2075
2076 wxBoxSizer * width_sizer = new wxBoxSizer(wxVERTICAL);
2077 // ORCA use icon on input box to match style with other Point fields
2078 horizontal_sizer->Add(width_sizer, 0, wxEXPAND | wxLEFT | wxTOP, FromDIP(10));
2079 wxBoxSizer *width_input_sizer = new wxBoxSizer(wxVERTICAL);
2080 m_bed_origin_y_input = new TextInput(parent, "0", _L("mm"), "inputbox_y", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
2081 m_bed_origin_y_input->GetTextCtrl()->SetValidator(validator);
2082 width_input_sizer->Add(m_bed_origin_y_input, 0, wxEXPAND | wxALL, 0);
2083 horizontal_sizer->Add(width_input_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
2084
2085 return horizontal_sizer;
2086}

References _L, m_bed_origin_x_input, m_bed_origin_y_input, OPTION_SIZE, PRINTER_SPACE_SIZE, and wxStaticText.

Referenced by create_printer_page1().

Here is the caller graph for this function:

◆ create_page1_dialog_buttons()

wxWindow * Slic3r::GUI::CreatePrinterPresetDialog::create_page1_dialog_buttons ( wxWindow * parent)
protected
2161{
2162 auto dlg_btns = new DialogButtons(parent, {"OK", "Cancel"});
2163
2164 dlg_btns->GetOK()->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) {
2165 if (!validate_input_valid()) return;
2166 data_init();
2167 show_page2();
2168 });
2169
2170 dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) { EndModal(wxID_CANCEL); });
2171
2172 return dlg_btns;
2173}
void show_page2()
Definition CreatePresetsDialog.cpp:3039
bool validate_input_valid()
Definition CreatePresetsDialog.cpp:3382
bool data_init()
Definition CreatePresetsDialog.cpp:3050
void EndModal(int retCode) override
Definition GUI_Utils.hpp:305

References data_init(), Slic3r::GUI::DPIDialog::EndModal(), Slic3r::GUI::DialogButtons::GetOK(), show_page2(), and validate_input_valid().

Referenced by create_printer_page1().

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

◆ create_page2_dialog_buttons()

wxWindow * Slic3r::GUI::CreatePrinterPresetDialog::create_page2_dialog_buttons ( wxWindow * parent)
protected
2806{
2807 auto dlg_btns = new DialogButtons(parent, {"Return", "OK", "Cancel"}, "", 1 /*left_aligned*/);
2808
2809 dlg_btns->GetRETURN()->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) { show_page1(); });
2810
2811 auto btn_ok = dlg_btns->GetOK();
2812 btn_ok->SetLabel(_L("Create"));
2813 btn_ok->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) {
2814
2815 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
2816 const wxString curr_selected_printer_type = curr_create_printer_type();
2817 const wxString curr_selected_preset_type = curr_create_preset_type();
2818
2819 // Confirm if the printer preset exists
2820 if (!m_printer_preset) {
2821 MessageDialog dlg(this, _L("You have not yet chosen which printer preset to create based on. Please choose the vendor and model of the printer"),
2822 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
2823 dlg.ShowModal();
2824 return;
2825 }
2826
2828 MessageDialog dlg(this, _L("You have entered a disallowed character in the printable area section on the first page. Please use only numbers."),
2829 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
2830 dlg.ShowModal();
2831 show_page1();
2832 return;
2833 }
2834
2835 // create preset name
2836 std::string printer_model_name = get_custom_printer_model();
2837 std::string printer_nozzle_name = get_nozzle_diameter();
2838 // Replace comma with period in nozzle diameter for consistency
2839 size_t comma_pos = printer_nozzle_name.find(',');
2840 if (comma_pos != std::string::npos) {
2841 printer_nozzle_name.replace(comma_pos, 1, ".");
2842 }
2843 std::string nozzle_diameter = printer_nozzle_name + " nozzle";
2844 std::string printer_preset_name = printer_model_name + " " + nozzle_diameter;
2845
2846 // Confirm if the printer preset has a duplicate name
2847 if (!rewritten && preset_bundle->printers.find_preset(printer_preset_name)) {
2848 MessageDialog dlg(this,
2849 _L("The printer preset you created already has a preset with the same name. Do you want to overwrite it\?\n\tYes: Overwrite the printer preset with the same name, and filament and process presets with the same preset name will be recreated \nand filament and process presets without the same preset name will be reserved.\n\tCancel: Do not create a preset; return to the creation interface."),
2850 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxCANCEL | wxYES_DEFAULT | wxCENTRE);
2851 int res = dlg.ShowModal();
2852 if (res == wxID_YES) {
2853 rewritten = true;
2854 } else {
2855 return;
2856 }
2857 }
2858
2859 // Confirm if the filament preset is exist
2860 bool filament_preset_is_exist = false;
2861 std::vector<Preset const *> selected_filament_presets;
2862 for (std::pair<::CheckBox *, Preset const *> filament_preset : m_filament_preset) {
2863 if (filament_preset.first->GetValue()) { selected_filament_presets.push_back(filament_preset.second); }
2864 if (!filament_preset_is_exist && preset_bundle->filaments.find_preset(filament_preset.second->alias + " @ " + printer_preset_name) != nullptr) {
2865 filament_preset_is_exist = true;
2866 }
2867 }
2868 if (selected_filament_presets.empty() && !filament_preset_is_exist) {
2869 MessageDialog dlg(this, _L("You need to select at least one filament preset."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
2870 dlg.ShowModal();
2871 return;
2872 }
2873
2874 // Confirm if the process preset is exist
2875 bool process_preset_is_exist = false;
2876 std::vector<Preset const *> selected_process_presets;
2877 for (std::pair<::CheckBox *, Preset const *> process_preset : m_process_preset) {
2878 if (process_preset.first->GetValue()) { selected_process_presets.push_back(process_preset.second); }
2879 if (!process_preset_is_exist && preset_bundle->prints.find_preset(process_preset.second->alias + " @" + printer_preset_name) != nullptr) {
2880 process_preset_is_exist = true;
2881 }
2882 }
2883 if (selected_process_presets.empty() && !process_preset_is_exist) {
2884 MessageDialog dlg(this, _L("You need to select at least one process preset."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
2885 dlg.ShowModal();
2886 return;
2887 }
2888
2889 // One load serves every clone below, since cloning assigns all filament ids before it saves a preset.
2890 PresetBundle filament_id_sources;
2891 if (!selected_filament_presets.empty())
2892 load_filament_id_sources(filament_id_sources);
2893 auto create_filament_id = [&filament_id_sources](std::string vendor_typr_serial) {
2894 return get_filament_id(vendor_typr_serial, filament_id_sources);
2895 };
2896
2897 std::vector<std::string> successful_preset_names;
2898 if (curr_selected_preset_type == m_create_type.base_template) {
2899 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " base template";
2900 /****************************** clone filament preset ********************************/
2901 std::vector<std::string> failures;
2902 if (!selected_filament_presets.empty()) {
2903 bool create_preset_result = preset_bundle->filaments.clone_presets_for_printer(selected_filament_presets, failures, printer_preset_name, create_filament_id, rewritten);
2904 if (!create_preset_result) {
2905 std::string message;
2906 for (const std::string &failure : failures) { message += "\t" + failure + "\n"; }
2907 MessageDialog dlg(this, _L("Create filament presets failed. As follows:\n") + from_u8(message) + _L("\nDo you want to rewrite it?"),
2908 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2909 wxYES | wxYES_DEFAULT | wxCENTRE);
2910 int res = dlg.ShowModal();
2911 if (wxID_YES == res) {
2912 create_preset_result = preset_bundle->filaments.clone_presets_for_printer(selected_filament_presets, failures, printer_preset_name,
2913 create_filament_id, true);
2914 } else {
2915 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " printer preset no same preset but filament has same preset, user cancel create the printer preset";
2916 return;
2917 }
2918 }
2919 // save created successfully preset name
2920 for (Preset const *sucessful_preset : selected_filament_presets)
2921 successful_preset_names.push_back(sucessful_preset->name.substr(0, sucessful_preset->name.find(" @")) + " @" + printer_preset_name);
2922 }
2923
2924 /****************************** clone process preset ********************************/
2925 failures.clear();
2926 if (!selected_process_presets.empty()) {
2927 generate_process_presets_data(selected_process_presets, printer_nozzle_name);
2928 bool create_preset_result = preset_bundle->prints.clone_presets_for_printer(selected_process_presets, failures, printer_preset_name,
2929 create_filament_id, rewritten);
2930 if (!create_preset_result) {
2931 std::string message;
2932 for (const std::string &failure : failures) { message += "\t" + failure + "\n"; }
2933 MessageDialog dlg(this, _L("Create process presets failed. As follows:\n") + from_u8(message) + _L("\nDo you want to rewrite it?"),
2934 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2935 wxYES | wxYES_DEFAULT | wxCENTRE);
2936 int res = dlg.ShowModal();
2937 if (wxID_YES == res) {
2938 create_preset_result = preset_bundle->prints.clone_presets_for_printer(selected_process_presets, failures, printer_preset_name, create_filament_id, true);
2939 } else {
2940 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " printer preset no same preset but process has same preset, user cancel create the printer preset";
2941 return;
2942 }
2943 }
2944 }
2945 } else if (curr_selected_preset_type == m_create_type.base_curr_printer) { // create printer and based on printer
2946 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " base curr printer";
2947 /****************************** clone filament preset ********************************/
2948 std::vector<std::string> failures;
2949 if (!selected_filament_presets.empty()) {
2950 bool create_preset_result = preset_bundle->filaments.clone_presets_for_printer(selected_filament_presets, failures, printer_preset_name, create_filament_id, rewritten);
2951 if (!create_preset_result) {
2952 std::string message;
2953 for (const std::string& failure : failures) {
2954 message += "\t" + failure + "\n";
2955 }
2956 MessageDialog dlg(this, _L("Create filament presets failed. As follows:\n") + from_u8(message) + _L("\nDo you want to rewrite it?"),
2957 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2958 wxYES | wxYES_DEFAULT | wxCENTRE);
2959 int res = dlg.ShowModal();
2960 if (wxID_YES == res) {
2961 create_preset_result = preset_bundle->filaments.clone_presets_for_printer(selected_filament_presets, failures, printer_preset_name, create_filament_id, true);
2962 } else {
2963 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " printer preset no same preset but filament has same preset, user cancel create the printer preset";
2964 return;
2965 }
2966 }
2967 }
2968
2969 /****************************** clone process preset ********************************/
2970 failures.clear();
2971 if (!selected_process_presets.empty()) {
2972 bool create_preset_result = preset_bundle->prints.clone_presets_for_printer(selected_process_presets, failures, printer_preset_name, create_filament_id, rewritten);
2973 if (!create_preset_result) {
2974 std::string message;
2975 for (const std::string& failure : failures) {
2976 message += "\t" + failure + "\n";
2977 }
2978 MessageDialog dlg(this, _L("Create process presets failed. As follows:\n") + from_u8(message) + _L("\nDo you want to rewrite it?"), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES | wxYES_DEFAULT | wxCENTRE);
2979 int res = dlg.ShowModal();
2980 if (wxID_YES == res) {
2981 create_preset_result = preset_bundle->prints.clone_presets_for_printer(selected_process_presets, failures, printer_preset_name, create_filament_id, true);
2982 } else {
2983 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " printer preset no same preset but filament has same preset, user cancel create the printer preset";
2984 return;
2985 }
2986 }
2987 // save created successfully preset name
2988 for (Preset const *sucessful_preset : selected_filament_presets)
2989 successful_preset_names.push_back(sucessful_preset->name.substr(0, sucessful_preset->name.find(" @")) + " @" + printer_preset_name);
2990 }
2991 }
2992
2993 /****************************** clone printer preset ********************************/
2994 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":creater printer ";
2995 try {
2996 auto printer_model = dynamic_cast<ConfigOptionString *>(m_printer_preset->config.option("printer_model", true));
2997 if (printer_model)
2998 printer_model->value = printer_model_name;
2999
3000 auto printer_variant = dynamic_cast<ConfigOptionString *>(m_printer_preset->config.option("printer_variant", true));
3001 if (printer_variant)
3002 printer_variant->value = printer_nozzle_name;
3003
3004 auto nozzle_diameter = dynamic_cast<ConfigOptionFloats *>(m_printer_preset->config.option("nozzle_diameter", true));
3005 if (nozzle_diameter) {
3006 std::unordered_map<std::string, float>::const_iterator iter = nozzle_diameter_map.find(printer_nozzle_name);
3007 if (nozzle_diameter_map.end() != iter) {
3008 std::fill(nozzle_diameter->values.begin(), nozzle_diameter->values.end(), iter->second);
3009 } else {
3010 std::fill(nozzle_diameter->values.begin(), nozzle_diameter->values.end(), my_stof(get_nozzle_diameter()));
3011 }
3012 }
3013 }
3014 catch (...) {
3015 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " bisic info is not rewritten, may be printer_model, printer_variant, or nozzle_diameter";
3016 }
3017 preset_bundle->printers.save_current_preset(printer_preset_name, true, false, m_printer_preset);
3018 preset_bundle->update_compatible(PresetSelectCompatibleType::Always);
3019 EndModal(wxID_OK);
3020
3021 });
3022
3023 dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](wxCommandEvent &e) { EndModal(wxID_CANCEL); });
3024
3025 return dlg_btns;
3026}
bool rewritten
Definition CreatePresetsDialog.hpp:184
void generate_process_presets_data(std::vector< Preset const * > presets, std::string nozzle)
Definition CreatePresetsDialog.cpp:2361
wxString curr_create_printer_type() const
Definition CreatePresetsDialog.cpp:3513
bool save_printable_area_config(Preset *preset)
Definition CreatePresetsDialog.cpp:3309
std::string get_nozzle_diameter() const
Definition CreatePresetsDialog.cpp:2494
wxString curr_create_preset_type() const
Definition CreatePresetsDialog.cpp:3502
void show_page1()
Definition CreatePresetsDialog.cpp:3028
std::string get_custom_printer_model() const
Definition CreatePresetsDialog.cpp:2513
#define SLIC3R_APP_FULL_NAME
Definition libslic3r.h:11
static std::unordered_map< std::string, float > nozzle_diameter_map
Definition CreatePresetsDialog.cpp:224
static void load_filament_id_sources(PresetBundle &temp_preset_bundle)
Definition CreatePresetsDialog.cpp:545
static std::string get_filament_id(std::string vendor_typr_serial, const PresetBundle &temp_preset_bundle)
Definition CreatePresetsDialog.cpp:556
static float my_stof(std::string str)
Definition CreatePresetsDialog.cpp:260
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
zaa_minimize_perimeter_height nozzle_diameter((ConfigOptionBool, reduce_infill_retraction))((ConfigOptionBool
@ Preset
Definition calib.hpp:39
zaa_minimize_perimeter_height ConfigOptionString
Definition PrintConfig.hpp:1702
ConfigOptionFloatsTempl< false > ConfigOptionFloats
Definition Config.hpp:1015
@ Always
Definition Preset.hpp:527

References _L, Slic3r::Always, Slic3r::PresetCollection::clone_presets_for_printer(), curr_create_preset_type(), curr_create_printer_type(), Slic3r::GUI::DPIDialog::EndModal(), Slic3r::PresetBundle::filaments, Slic3r::PresetCollection::find_preset(), Slic3r::GUI::from_u8(), generate_process_presets_data(), get_custom_printer_model(), Slic3r::GUI::get_filament_id(), get_nozzle_diameter(), Slic3r::GUI::DialogButtons::GetRETURN(), Slic3r::GUI::load_filament_id_sources(), m_create_type, m_filament_preset, m_printer_preset, m_process_preset, Slic3r::GUI::my_stof(), Slic3r::nozzle_diameter(), Slic3r::GUI::nozzle_diameter_map, Slic3r::PresetBundle::printers, Slic3r::PresetBundle::prints, rewritten, Slic3r::PresetCollection::save_current_preset(), save_printable_area_config(), Button::SetLabel(), show_page1(), Slic3r::GUI::DPIAware< P >::ShowModal(), SLIC3R_APP_FULL_NAME, Slic3r::PresetBundle::update_compatible(), and Slic3r::ConfigOptionSingle< T >::value.

Referenced by create_printer_page2().

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

◆ create_presets_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_presets_item ( wxWindow * parent)
protected
2701{
2702 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2703
2704 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2705 wxStaticText *static_serial_text = new wxStaticText(parent, wxID_ANY, _L("Presets"), wxDefaultPosition, wxDefaultSize);
2706 optionSizer->Add(static_serial_text, 0, wxEXPAND | wxALL, 0);
2707 optionSizer->SetMinSize(OPTION_SIZE);
2708 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2709
2710 wxBoxSizer *radioBoxSizer = new wxBoxSizer(wxVERTICAL);
2711
2712 radioBoxSizer->Add(create_radio_item(m_create_type.base_template, parent, wxEmptyString, m_create_presets_btns), 0, wxEXPAND | wxALL, 0);
2713 radioBoxSizer->Add(create_radio_item(m_create_type.base_curr_printer, parent, wxEmptyString, m_create_presets_btns), 0, wxEXPAND | wxTOP, FromDIP(10));
2714 horizontal_sizer->Add(radioBoxSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2715
2716 return horizontal_sizer;
2717}
wxBoxSizer * create_radio_item(wxString title, wxWindow *parent, wxString tooltip, std::vector< std::pair< RadioBox *, wxString > > &radiobox_list)
Definition CreatePresetsDialog.cpp:2545

References _L, create_radio_item(), m_create_presets_btns, m_create_type, OPTION_SIZE, and wxStaticText.

Referenced by create_printer_page2().

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

◆ create_presets_template_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_presets_template_item ( wxWindow * parent)
protected
2720{
2721 wxBoxSizer *vertical_sizer = new wxBoxSizer(wxVERTICAL);
2722
2723 m_scrolled_preset_window = new wxScrolledWindow(parent);
2724 m_scrolled_preset_window->SetScrollRate(5, FromDIP(20));
2725 m_scrolled_preset_window->SetBackgroundColour(*wxWHITE);
2726 //m_scrolled_preset_window->SetMinSize(wxSize(FromDIP(1500), FromDIP(-1)));
2727 m_scrolled_preset_window->SetMaxSize(wxSize(FromDIP(1500), FromDIP(-1)));
2728 m_scrolled_preset_window->SetSize(wxSize(FromDIP(1500), FromDIP(-1)));
2729 m_scrooled_preset_sizer = new wxBoxSizer(wxHORIZONTAL);
2730
2732 m_preset_template_panel->SetSize(wxSize(-1, -1));
2733 m_preset_template_panel->SetBackgroundColour(PRINTER_LIST_COLOUR);
2734 m_preset_template_panel->SetMinSize(wxSize(FromDIP(660), -1));
2735 m_filament_sizer = new wxBoxSizer(wxVERTICAL);
2736 wxStaticText *static_filament_preset_text = new wxStaticText(m_preset_template_panel, wxID_ANY, _L("Filament Preset Template"), wxDefaultPosition, wxDefaultSize);
2737 m_filament_sizer->Add(static_filament_preset_text, 0, wxEXPAND | wxALL, FromDIP(5));
2739 m_filament_preset_template_sizer = new wxGridSizer(3, FromDIP(5), FromDIP(5));
2742 m_filament_sizer->Add(m_filament_preset_panel, 0, wxEXPAND | wxALL, FromDIP(5));
2743
2744 wxBoxSizer *hori_filament_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
2745 wxPanel * filament_btn_panel = new wxPanel(m_preset_template_panel);
2746 filament_btn_panel->SetBackgroundColour(FILAMENT_OPTION_COLOUR);
2747 wxStaticText *filament_sel_all_text = new wxStaticText(filament_btn_panel, wxID_ANY, _L("Select All"), wxDefaultPosition, wxDefaultSize);
2748 filament_sel_all_text->SetForegroundColour(SELECT_ALL_OPTION_COLOUR);
2749 filament_sel_all_text->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
2751 e.Skip();
2752 });
2753 wxStaticText *filament_desel_all_text = new wxStaticText(filament_btn_panel, wxID_ANY, _L("Deselect All"), wxDefaultPosition, wxDefaultSize);
2754 filament_desel_all_text->SetForegroundColour(SELECT_ALL_OPTION_COLOUR);
2755 filament_desel_all_text->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
2757 e.Skip();
2758 });
2759 hori_filament_btn_sizer->Add(filament_sel_all_text, 0, wxEXPAND | wxALL, FromDIP(5));
2760 hori_filament_btn_sizer->Add(filament_desel_all_text, 0, wxEXPAND | wxALL, FromDIP(5));
2761 filament_btn_panel->SetSizer(hori_filament_btn_sizer);
2762 m_filament_sizer->Add(filament_btn_panel, 0, wxEXPAND, 0);
2763
2764 wxPanel *split_panel = new wxPanel(m_preset_template_panel, wxID_ANY, wxDefaultPosition, wxSize(-1, FromDIP(10)));
2765 split_panel->SetBackgroundColour(wxColour(*wxWHITE));
2766 m_filament_sizer->Add(split_panel, 0, wxEXPAND, 0);
2767
2768 wxStaticText *static_process_preset_text = new wxStaticText(m_preset_template_panel, wxID_ANY, _L("Process Preset Template"), wxDefaultPosition, wxDefaultSize);
2769 m_filament_sizer->Add(static_process_preset_text, 0, wxEXPAND | wxALL, FromDIP(5));
2772 m_process_preset_template_sizer = new wxGridSizer(3, FromDIP(5), FromDIP(5));
2774 m_filament_sizer->Add(m_process_preset_panel, 0, wxEXPAND | wxALL, FromDIP(5));
2775
2776
2777 wxBoxSizer *hori_process_btn_sizer = new wxBoxSizer(wxHORIZONTAL);
2778 wxPanel * process_btn_panel = new wxPanel(m_preset_template_panel);
2779 process_btn_panel->SetBackgroundColour(FILAMENT_OPTION_COLOUR);
2780 wxStaticText *process_sel_all_text = new wxStaticText(process_btn_panel, wxID_ANY, _L("Select All"), wxDefaultPosition, wxDefaultSize);
2781 process_sel_all_text->SetForegroundColour(SELECT_ALL_OPTION_COLOUR);
2782 process_sel_all_text->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
2784 e.Skip();
2785 });
2786 wxStaticText *process_desel_all_text = new wxStaticText(process_btn_panel, wxID_ANY, _L("Deselect All"), wxDefaultPosition, wxDefaultSize);
2787 process_desel_all_text->SetForegroundColour(SELECT_ALL_OPTION_COLOUR);
2788 process_desel_all_text->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
2790 e.Skip();
2791 });
2792 hori_process_btn_sizer->Add(process_sel_all_text, 0, wxEXPAND | wxALL, FromDIP(5));
2793 hori_process_btn_sizer->Add(process_desel_all_text, 0, wxEXPAND | wxALL, FromDIP(5));
2794 process_btn_panel->SetSizer(hori_process_btn_sizer);
2795 m_filament_sizer->Add(process_btn_panel, 0, wxEXPAND, 0);
2796
2798 m_scrooled_preset_sizer->Add(m_preset_template_panel, 0, wxEXPAND | wxALL, 0);
2800 vertical_sizer->Add(m_scrolled_preset_window, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(10));
2801
2802 return vertical_sizer;
2803}
#define FILAMENT_OPTION_COLOUR
Definition CreatePresetsDialog.cpp:91
#define PRINTER_LIST_COLOUR
Definition CreatePresetsDialog.cpp:90
#define PRESET_TEMPLATE_SIZE
Definition CreatePresetsDialog.cpp:84
#define SELECT_ALL_OPTION_COLOUR
Definition CreatePresetsDialog.cpp:92
wxPanel * m_process_preset_panel
Definition CreatePresetsDialog.hpp:214
wxScrolledWindow * m_scrolled_preset_window
Definition CreatePresetsDialog.hpp:192
wxPanel * m_filament_preset_panel
Definition CreatePresetsDialog.hpp:213
void select_all_preset_template(std::vector< std::pair<::CheckBox *, Preset * > > &preset_templates)
Definition CreatePresetsDialog.cpp:3238
wxBoxSizer * m_scrooled_preset_sizer
Definition CreatePresetsDialog.hpp:193
wxPanel * m_preset_template_panel
Definition CreatePresetsDialog.hpp:215
void deselect_all_preset_template(std::vector< std::pair<::CheckBox *, Preset * > > &preset_templates)
Definition CreatePresetsDialog.cpp:3245
wxBoxSizer * m_filament_sizer
Definition CreatePresetsDialog.hpp:216
wxMouseEvent
Definition CameraPopup.cpp:47

References _L, deselect_all_preset_template(), FILAMENT_OPTION_COLOUR, m_filament_preset, m_filament_preset_panel, m_filament_preset_template_sizer, m_filament_sizer, m_preset_template_panel, m_process_preset, m_process_preset_panel, m_process_preset_template_sizer, m_scrolled_preset_window, m_scrooled_preset_sizer, PRESET_TEMPLATE_SIZE, PRINTER_LIST_COLOUR, SELECT_ALL_OPTION_COLOUR, select_all_preset_template(), Slic3r::GUI::wxMouseEvent, and wxStaticText.

Referenced by create_printer_page2().

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

◆ create_printer_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_printer_item ( wxWindow * parent)
protected
1785{
1786 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
1787
1788 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
1789 wxStaticText *static_vendor_text = new wxStaticText(parent, wxID_ANY, _L("Printer"), wxDefaultPosition, wxDefaultSize);
1790 optionSizer->Add(static_vendor_text, 0, wxEXPAND | wxALL, 0);
1791 optionSizer->SetMinSize(OPTION_SIZE);
1792 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
1793
1794 wxBoxSizer *vertical_sizer = new wxBoxSizer(wxVERTICAL);
1795 wxBoxSizer *comboBoxSizer = new wxBoxSizer(wxHORIZONTAL);
1796 m_select_vendor = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE, 0, nullptr, wxCB_READONLY);
1797 m_select_vendor->SetValue(_L("Select Vendor"));
1799 wxArrayString printer_vendor;
1800 for (const std::string &vendor : printer_vendors) {
1801 assert(printer_model_map.find(vendor) != printer_model_map.end());
1802 printer_vendor.Add(vendor);
1803 }
1804 m_select_vendor->Set(printer_vendor);
1805 m_select_vendor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent e) {
1806 m_select_vendor->SetLabelColor(*wxBLACK);
1807 std::string curr_selected_vendor = into_u8(m_select_vendor->GetStringSelection());
1808 std::unordered_map<std::string,std::vector<std::string>>::const_iterator iter = printer_model_map.find(curr_selected_vendor);
1809 if (iter != printer_model_map.end())
1810 {
1811 std::vector<std::string> vendor_model = iter->second;
1812 wxArrayString model_choice;
1813 for (const std::string &model : vendor_model) {
1814 model_choice.Add(model);
1815 }
1816 m_select_model->Set(model_choice);
1817 if (!model_choice.empty()) {
1818 m_select_model->SetSelection(0);
1819 m_select_model->SetLabelColor(*wxBLACK);
1820 }
1821 } else {
1822 MessageDialog dlg(this, _L("The model was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
1823 dlg.ShowModal();
1824 }
1825
1826 m_select_printer->SetSelection(-1);
1827 m_select_printer->SetValue(_L("Select Printer"));
1829 e.Skip();
1830 });
1831
1832 comboBoxSizer->Add(m_select_vendor, 0, wxEXPAND | wxALL, 0);
1833
1834 m_select_model = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE, 0, nullptr, wxCB_READONLY);
1835 comboBoxSizer->Add(m_select_model, 0, wxEXPAND | wxLEFT, FromDIP(5));
1836 m_select_model->SetValue(_L("Select Model"));
1838 m_select_model->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent e) {
1839 m_select_model->SetLabelColor(*wxBLACK);
1840 e.Skip();
1841 });
1842
1843 m_select_printer = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, PRINTER_PRESET_MODEL_SIZE, 0, nullptr, wxCB_READONLY);
1844 comboBoxSizer->Add(m_select_printer, 0, wxEXPAND | wxALL, 0);
1845 m_select_printer->SetValue(_L("Select Printer"));
1847 m_select_printer->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent e) {
1848 m_select_printer->SetLabelColor(*wxBLACK);
1849
1850 e.Skip();
1851 });
1852 m_select_printer->Hide();
1853
1854 m_custom_vendor_text_ctrl = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE);
1855 m_custom_vendor_text_ctrl->SetHint(_L("Input Custom Vendor"));
1856 m_custom_vendor_text_ctrl->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
1857 int key = event.GetKeyCode();
1858 if (cannot_input_key.find(key) != cannot_input_key.end()) { // "@" can not be inputed
1859 event.Skip(false);
1860 return;
1861 }
1862 event.Skip();
1863 });
1864 comboBoxSizer->Add(m_custom_vendor_text_ctrl, 0, wxEXPAND | wxALL, 0);
1866 m_custom_model_text_ctrl = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE);
1867 m_custom_model_text_ctrl->SetHint(_L("Input Custom Model"));
1868 m_custom_model_text_ctrl->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
1869 int key = event.GetKeyCode();
1870 if (cannot_input_key.find(key) != cannot_input_key.end()) { // "@" can not be inputed
1871 event.Skip(false);
1872 return;
1873 }
1874 event.Skip();
1875 });
1876 comboBoxSizer->Add(m_custom_model_text_ctrl, 0, wxEXPAND | wxLEFT, FromDIP(5));
1878
1879 vertical_sizer->Add(comboBoxSizer, 0, wxEXPAND, 0);
1880
1881 wxBoxSizer *checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1882 m_can_not_find_vendor_combox = new ::CheckBox(parent);
1883
1884 checkbox_sizer->Add(m_can_not_find_vendor_combox, 0, wxALIGN_CENTER, 0);
1885 checkbox_sizer->Add(0, 0, 0, wxEXPAND | wxRIGHT, FromDIP(5));
1886
1887 m_can_not_find_vendor_text = new wxStaticText(parent, wxID_ANY, _L("Can't find my printer model"), wxDefaultPosition, wxDefaultSize, 0);
1889
1890 wxSize size = m_can_not_find_vendor_text->GetTextExtent(_L("Can't find my printer model"));
1891 m_can_not_find_vendor_text->SetMinSize(wxSize(size.x + FromDIP(4), -1));
1893 checkbox_sizer->Add(m_can_not_find_vendor_text, 0, wxALIGN_CENTER, 0);
1894
1895 m_can_not_find_vendor_combox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent &e) {
1896 bool value = m_can_not_find_vendor_combox->GetValue();
1897 if (value) {
1898 m_can_not_find_vendor_combox->SetValue(true);
1901 m_select_vendor->Hide();
1902 m_select_model->Hide();
1903 } else {
1904 m_can_not_find_vendor_combox->SetValue(false);
1907 m_select_vendor->Show();
1908 m_select_model->Show();
1909 }
1910 Refresh();
1911 Layout();
1912 m_page1->SetSizerAndFit(m_page1_sizer);
1913 Fit();
1914
1915 e.Skip();
1916 });
1917
1918 vertical_sizer->Add(checkbox_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
1919
1920 horizontal_sizer->Add(vertical_sizer, 0, wxEXPAND | wxALL, FromDIP(10));
1921
1922 return horizontal_sizer;
1923
1924}
#define DEFAULT_PROMPT_TEXT_COLOUR
Definition CreatePresetsDialog.cpp:93
#define PRINTER_PRESET_MODEL_SIZE
Definition CreatePresetsDialog.cpp:88
::CheckBox * m_can_not_find_vendor_combox
Definition CreatePresetsDialog.hpp:197
wxTextCtrl * m_custom_model_text_ctrl
Definition CreatePresetsDialog.hpp:201
ComboBox * m_select_model
Definition CreatePresetsDialog.hpp:195
ComboBox * m_select_vendor
Definition CreatePresetsDialog.hpp:194
wxTextCtrl * m_custom_vendor_text_ctrl
Definition CreatePresetsDialog.hpp:200
wxStaticText * m_can_not_find_vendor_text
Definition CreatePresetsDialog.hpp:199
ComboBox * m_select_printer
Definition CreatePresetsDialog.hpp:196
static const std::vector< std::string > printer_vendors
Definition CreatePresetsDialog.cpp:128
static const std::unordered_map< std::string, std::vector< std::string > > printer_model_map
Definition CreatePresetsDialog.cpp:140
std::string into_u8(const wxString &str)
Definition GUI.cpp:549

References _L, Label::Body_13, Slic3r::GUI::cannot_input_key, DEFAULT_PROMPT_TEXT_COLOUR, Slic3r::GUI::into_u8(), m_can_not_find_vendor_combox, m_can_not_find_vendor_text, m_custom_model_text_ctrl, m_custom_vendor_text_ctrl, m_page1, m_page1_sizer, m_select_model, m_select_printer, m_select_vendor, NAME_OPTION_COMBOBOX_SIZE, OPTION_SIZE, Slic3r::GUI::printer_model_map, PRINTER_PRESET_MODEL_SIZE, Slic3r::GUI::printer_vendors, Slic3r::GUI::DPIAware< P >::ShowModal(), SLIC3R_APP_FULL_NAME, and wxStaticText.

Referenced by create_printer_page1().

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

◆ create_printer_page1()

void Slic3r::GUI::CreatePrinterPresetDialog::create_printer_page1 ( wxWindow * parent)
protected
1738{
1739 this->SetBackgroundColour(*wxWHITE);
1740
1741 m_page1_sizer = new wxBoxSizer(wxVERTICAL);
1742
1743 m_page1_sizer->Add(create_type_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1744 m_page1_sizer->Add(create_printer_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1745 m_page1_sizer->Add(create_nozzle_diameter_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1746 m_printer_info_panel = new wxPanel(parent);
1747 m_printer_info_panel->SetBackgroundColour(*wxWHITE);
1748 m_printer_info_sizer = new wxBoxSizer(wxVERTICAL);
1749 m_printer_info_sizer->Add(create_bed_shape_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1750 m_printer_info_sizer->Add(create_bed_size_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1751 m_printer_info_sizer->Add(create_origin_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1752 m_printer_info_sizer->Add(create_hot_bed_stl_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1753 m_printer_info_sizer->Add(create_hot_bed_svg_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1754 m_printer_info_sizer->Add(create_max_print_height_item(m_printer_info_panel), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
1756 m_page1_sizer->Add(m_printer_info_panel, 0, wxEXPAND, 0);
1757 m_page1_sizer->Add(create_page1_dialog_buttons(parent), 0, wxEXPAND);
1758
1759 parent->SetSizerAndFit(m_page1_sizer);
1760 Layout();
1761
1762 wxGetApp().UpdateDlgDarkUI(this);
1763}
wxBoxSizer * create_hot_bed_svg_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2114
wxWindow * create_page1_dialog_buttons(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2160
wxBoxSizer * create_max_print_height_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2140
wxBoxSizer * m_printer_info_sizer
Definition CreatePresetsDialog.hpp:219
wxBoxSizer * create_bed_size_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2023
wxBoxSizer * create_type_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:1765
wxBoxSizer * create_origin_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2056
wxBoxSizer * create_hot_bed_stl_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2088
wxBoxSizer * create_bed_shape_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2005
wxPanel * m_printer_info_panel
Definition CreatePresetsDialog.hpp:217
wxBoxSizer * create_printer_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:1784
wxBoxSizer * create_nozzle_diameter_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:1926

References create_bed_shape_item(), create_bed_size_item(), create_hot_bed_stl_item(), create_hot_bed_svg_item(), create_max_print_height_item(), create_nozzle_diameter_item(), create_origin_item(), create_page1_dialog_buttons(), create_printer_item(), create_type_item(), m_page1_sizer, m_printer_info_panel, and m_printer_info_sizer.

Referenced by CreatePrinterPresetDialog().

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

◆ create_printer_page2()

void Slic3r::GUI::CreatePrinterPresetDialog::create_printer_page2 ( wxWindow * parent)
protected
2636{
2637 this->SetBackgroundColour(*wxWHITE);
2638
2639 m_page2_sizer = new wxBoxSizer(wxVERTICAL);
2640
2641 m_page2_sizer->Add(create_printer_preset_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
2642 m_page2_sizer->Add(create_presets_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
2643 m_page2_sizer->Add(create_presets_template_item(parent), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
2644 m_page2_sizer->Add(create_page2_dialog_buttons(parent), 0, wxEXPAND);
2645
2646 parent->SetSizerAndFit(m_page2_sizer);
2647 Layout();
2648 Fit();
2649
2650 wxGetApp().UpdateDlgDarkUI(this);
2651}
wxBoxSizer * m_page2_sizer
Definition CreatePresetsDialog.hpp:220
wxWindow * create_page2_dialog_buttons(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2805
wxBoxSizer * create_printer_preset_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2653
wxBoxSizer * create_presets_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2700
wxBoxSizer * create_presets_template_item(wxWindow *parent)
Definition CreatePresetsDialog.cpp:2719

References create_page2_dialog_buttons(), create_presets_item(), create_presets_template_item(), create_printer_preset_item(), and m_page2_sizer.

Referenced by CreatePrinterPresetDialog().

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

◆ create_printer_preset_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_printer_preset_item ( wxWindow * parent)
protected
2654{
2655 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2656
2657 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
2658 wxStaticText *static_vendor_text = new wxStaticText(parent, wxID_ANY, _L("Printer Preset"), wxDefaultPosition, wxDefaultSize);
2659 optionSizer->Add(static_vendor_text, 0, wxEXPAND | wxALL, 0);
2660 optionSizer->SetMinSize(OPTION_SIZE);
2661 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
2662
2663 wxBoxSizer * vertical_sizer = new wxBoxSizer(wxVERTICAL);
2664 wxStaticText *combobox_title = new wxStaticText(parent, wxID_ANY, m_create_type.base_curr_printer, wxDefaultPosition, wxDefaultSize, 0);
2665 combobox_title->SetFont(::Label::Body_13);
2666 auto size = combobox_title->GetTextExtent(m_create_type.base_curr_printer);
2667 combobox_title->SetMinSize(wxSize(size.x + FromDIP(4), -1));
2668 combobox_title->Wrap(-1);
2669 vertical_sizer->Add(combobox_title, 0, wxEXPAND | wxALL, 0);
2670
2671 wxBoxSizer *comboBox_sizer = new wxBoxSizer(wxHORIZONTAL);
2672 m_printer_vendor = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, PRINTER_PRESET_VENDOR_SIZE, 0, nullptr, wxCB_READONLY);
2673 m_printer_vendor->SetValue(_L("Select Vendor"));
2675
2676 VendorMap vendors;
2677 wxArrayString exist_vendor_choice = get_exist_vendor_choices(vendors);
2678 m_printer_vendor->Set(exist_vendor_choice);
2679 m_printer_vendor->Bind(wxEVT_COMBOBOX, [this](wxCommandEvent &e) {
2680 e.SetExtraLong(1); // 0 means form last page, 1 means form cur combobox
2682 });
2683
2684 comboBox_sizer->Add(m_printer_vendor, 0, wxEXPAND, 0);
2685 m_printer_model = new ComboBox(parent, wxID_ANY, wxEmptyString, wxDefaultPosition, PRINTER_PRESET_MODEL_SIZE, 0, nullptr, wxCB_READONLY);
2687 m_printer_model->SetValue(_L("Select Model"));
2688
2690
2691 comboBox_sizer->Add(m_printer_model, 0, wxEXPAND | wxLEFT, FromDIP(10));
2692 vertical_sizer->Add(comboBox_sizer, 0, wxEXPAND | wxTOP, FromDIP(5));
2693
2694 horizontal_sizer->Add(vertical_sizer, 0, wxEXPAND | wxALL, FromDIP(10));
2695
2696 return horizontal_sizer;
2697
2698}
#define PRINTER_PRESET_VENDOR_SIZE
Definition CreatePresetsDialog.cpp:87
void on_select_printer_model(wxCommandEvent &e)
Definition CreatePresetsDialog.cpp:3100
void on_preset_model_value_change(wxCommandEvent &e)
Definition CreatePresetsDialog.cpp:3481
ComboBox * m_printer_model
Definition CreatePresetsDialog.hpp:205
ComboBox * m_printer_vendor
Definition CreatePresetsDialog.hpp:204
static wxArrayString get_exist_vendor_choices(VendorMap &vendors)
Definition CreatePresetsDialog.cpp:395
std::map< std::string, VendorProfile > VendorMap
Definition Preset.hpp:238

References _L, Label::Body_13, DEFAULT_PROMPT_TEXT_COLOUR, Slic3r::GUI::get_exist_vendor_choices(), m_create_type, m_printer_model, m_printer_vendor, on_preset_model_value_change(), on_select_printer_model(), OPTION_SIZE, PRINTER_PRESET_MODEL_SIZE, PRINTER_PRESET_VENDOR_SIZE, and wxStaticText.

Referenced by create_printer_page2().

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

◆ create_radio_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_radio_item ( wxString title,
wxWindow * parent,
wxString tooltip,
std::vector< std::pair< RadioBox *, wxString > > & radiobox_list )
protected
2546{
2547 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
2548 RadioBox * radiobox = new RadioBox(parent);
2549 horizontal_sizer->Add(radiobox, 0, wxEXPAND | wxALL, 0);
2550 horizontal_sizer->Add(0, 0, 0, wxEXPAND | wxLEFT, FromDIP(5));
2551 radiobox_list.push_back(std::make_pair(radiobox,title));
2552 int btn_idx = radiobox_list.size() - 1;
2553 radiobox->Bind(wxEVT_LEFT_DOWN, [this, &radiobox_list, btn_idx](wxMouseEvent &e) {
2554 select_curr_radiobox(radiobox_list, btn_idx);
2555 });
2556
2557 wxStaticText *text = new wxStaticText(parent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize);
2558 text->Bind(wxEVT_LEFT_DOWN, [this, &radiobox_list, btn_idx](wxMouseEvent &e) {
2559 select_curr_radiobox(radiobox_list, btn_idx);
2560 });
2561 horizontal_sizer->Add(text, 0, wxEXPAND | wxLEFT, 0);
2562
2563 radiobox->SetToolTip(tooltip);
2564 text->SetToolTip(tooltip);
2565 return horizontal_sizer;
2566
2567}

References select_curr_radiobox(), Slic3r::GUI::wxMouseEvent, and wxStaticText.

Referenced by create_presets_item(), and create_type_item().

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

◆ create_step_switch_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_step_switch_item ( )
protected
1701{
1702 wxBoxSizer *step_switch_sizer = new wxBoxSizer(wxVERTICAL);
1703
1704 // std::string wiki_url = "https://wiki.bambulab.com/en/software/bambu-studio/3rd-party-printer-profile";
1705 // wxHyperlinkCtrl *m_download_hyperlink = new wxHyperlinkCtrl(this, wxID_ANY, _L("wiki"), wiki_url, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
1706 // step_switch_sizer->Add(m_download_hyperlink, 0, wxRIGHT | wxALIGN_RIGHT, FromDIP(5));
1707
1708 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
1709 wxPanel * step_switch_panel = new wxPanel(this);
1710 step_switch_panel->SetBackgroundColour(*wxWHITE);
1711 horizontal_sizer->Add(0, 0, 1, wxEXPAND,0);
1712 m_step_1 = new wxStaticBitmap(step_switch_panel, wxID_ANY, create_scaled_bitmap("step_1", nullptr, FromDIP(20)), wxDefaultPosition, wxDefaultSize);
1713 horizontal_sizer->Add(m_step_1, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(3));
1714 wxStaticText *static_create_printer_text = new wxStaticText(step_switch_panel, wxID_ANY, m_create_type.create_printer, wxDefaultPosition, wxDefaultSize);
1715 horizontal_sizer->Add(static_create_printer_text, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(3));
1716 auto divider_line = new wxPanel(step_switch_panel, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(50), 1));
1717 divider_line->SetBackgroundColour(PRINTER_LIST_COLOUR);
1718 horizontal_sizer->Add(divider_line, 0, wxLEFT | wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(3));
1719 m_step_2 = new wxStaticBitmap(step_switch_panel, wxID_ANY, create_scaled_bitmap("step_2_ready", nullptr, FromDIP(20)), wxDefaultPosition, wxDefaultSize);
1720 horizontal_sizer->Add(m_step_2, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(3));
1721 wxStaticText *static_import_presets_text = new wxStaticText(step_switch_panel, wxID_ANY, _L("Import Preset"), wxDefaultPosition, wxDefaultSize);
1722 horizontal_sizer->Add(static_import_presets_text, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(3));
1723 horizontal_sizer->Add(0, 0, 1, wxEXPAND, 0);
1724
1725 step_switch_panel->SetSizer(horizontal_sizer);
1726
1727 step_switch_sizer->Add(step_switch_panel, 0, wxBOTTOM | wxALIGN_CENTER_HORIZONTAL, FromDIP(10));
1728
1729 auto line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1), wxTAB_TRAVERSAL);
1730 line_top->SetBackgroundColour(PRINTER_LIST_COLOUR);
1731
1732 step_switch_sizer->Add(line_top, 0, wxEXPAND | wxALL, FromDIP(10));
1733
1734 return step_switch_sizer;
1735}
wxStaticBitmap * m_step_2
Definition CreatePresetsDialog.hpp:187
wxStaticBitmap * m_step_1
Definition CreatePresetsDialog.hpp:186
wxBitmap create_scaled_bitmap(const std::string &bmp_name_in, wxWindow *win, const int px_cnt, const bool grayscale, const std::string &new_color, const bool menu_bitmap, const bool resize, const bool bitmap2, const std::vector< std::string > &array_new_color)
Definition wxExtensions.cpp:448

References _L, create_scaled_bitmap(), m_create_type, m_step_1, m_step_2, PRINTER_LIST_COLOUR, and wxStaticText.

Referenced by CreatePrinterPresetDialog().

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

◆ create_type_item()

wxBoxSizer * Slic3r::GUI::CreatePrinterPresetDialog::create_type_item ( wxWindow * parent)
protected
1766{
1767 wxBoxSizer *horizontal_sizer = new wxBoxSizer(wxHORIZONTAL);
1768
1769 wxBoxSizer * optionSizer = new wxBoxSizer(wxVERTICAL);
1770 wxStaticText *static_serial_text = new wxStaticText(parent, wxID_ANY, _L("Create Type"), wxDefaultPosition, wxDefaultSize);
1771 optionSizer->Add(static_serial_text, 0, wxEXPAND | wxALL, 0);
1772 optionSizer->SetMinSize(OPTION_SIZE);
1773 horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL, FromDIP(10));
1774
1775 wxBoxSizer *radioBoxSizer = new wxBoxSizer(wxVERTICAL);
1776
1777 radioBoxSizer->Add(create_radio_item(m_create_type.create_printer, parent, wxEmptyString, m_create_type_btns), 0, wxEXPAND | wxALL, 0);
1778 radioBoxSizer->Add(create_radio_item(m_create_type.create_nozzle, parent, wxEmptyString, m_create_type_btns), 0, wxEXPAND | wxTOP, FromDIP(10));
1779 horizontal_sizer->Add(radioBoxSizer, 0, wxEXPAND | wxALL, FromDIP(10));
1780
1781 return horizontal_sizer;
1782}

References _L, create_radio_item(), m_create_type, m_create_type_btns, OPTION_SIZE, and wxStaticText.

Referenced by create_printer_page1().

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

◆ curr_create_preset_type()

wxString Slic3r::GUI::CreatePrinterPresetDialog::curr_create_preset_type ( ) const
protected
3503{
3504 wxString curr_selected_preset_type;
3505 for (const std::pair<RadioBox *, wxString> &presets_radio : m_create_presets_btns) {
3506 if (presets_radio.first->GetValue()) {
3507 curr_selected_preset_type = presets_radio.second;
3508 }
3509 }
3510 return curr_selected_preset_type;
3511}

References m_create_presets_btns.

Referenced by create_page2_dialog_buttons(), and on_preset_model_value_change().

Here is the caller graph for this function:

◆ curr_create_printer_type()

wxString Slic3r::GUI::CreatePrinterPresetDialog::curr_create_printer_type ( ) const
protected
3514{
3515 wxString curr_selected_printer_type;
3516 for (const std::pair<RadioBox *, wxString> &printer_radio : m_create_type_btns) {
3517 if (printer_radio.first->GetValue()) { curr_selected_printer_type = printer_radio.second; }
3518 }
3519 return curr_selected_printer_type;
3520}

References m_create_type_btns.

Referenced by create_page2_dialog_buttons(), get_custom_printer_model(), get_printer_model(), get_printer_vendor(), save_printable_area_config(), and validate_input_valid().

Here is the caller graph for this function:

◆ data_init()

bool Slic3r::GUI::CreatePrinterPresetDialog::data_init ( )
protected
3051{
3052 wxCommandEvent e;
3053 e.SetExtraLong(0); // 0 means form last page, 1 means form cur combobox
3055
3056 auto get_nozzle_size_for_printer_model = [this](const std::string &model_name) -> size_t {
3057 auto iter = m_printer_name_to_preset.find(model_name);
3058 if (iter != m_printer_name_to_preset.end()) {
3059 std::shared_ptr<Preset> printer_preset = iter->second;
3060 if (printer_preset) {
3061 auto nozzle_diameter = dynamic_cast<ConfigOptionFloats *>(printer_preset->config.option("nozzle_diameter", true));
3062 return nozzle_diameter->values.size();
3063 }
3064 }
3065 return 1; // default nozzle size
3066 };
3067
3068 size_t selected_nozzle_size = get_nozzle_size_for_printer_model(into_u8(m_select_printer->GetStringSelection()));
3069
3070 bool has_set_value = false;
3071 for (size_t i = 0; i < m_create_presets_btns.size(); ++i) {
3072 auto &item = m_create_presets_btns[i];
3073 if (item.second == m_create_type.base_template) {
3074 if (selected_nozzle_size > 1) {
3075 item.first->Disable();
3076 item.first->SetValue(false);
3077 }
3078 else {
3079 item.first->Enable();
3080 if (!has_set_value) {
3082 has_set_value = true;
3083 }
3084 }
3085 }
3086 else {
3087 if (!has_set_value) {
3089 has_set_value = true;
3090 } else {
3091 item.first->SetValue(false);
3092 }
3093 }
3094 }
3095
3096 m_page2->SetSizerAndFit(m_page2_sizer);
3097 return true;
3098}
std::vector< double > values
Definition Config.hpp:418
std::unordered_map< std::string, std::shared_ptr< Preset > > m_printer_name_to_preset
Definition CreatePresetsDialog.hpp:181

References Slic3r::GUI::into_u8(), m_create_presets_btns, m_create_type, m_page2, m_page2_sizer, m_printer_name_to_preset, m_select_printer, Slic3r::nozzle_diameter(), on_select_printer_model(), and select_curr_radiobox().

Referenced by create_page1_dialog_buttons().

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

◆ deselect_all_preset_template()

void Slic3r::GUI::CreatePrinterPresetDialog::deselect_all_preset_template ( std::vector< std::pair<::CheckBox *, Preset * > > & preset_templates)
protected
3246{
3247 for (std::pair<::CheckBox *, Preset const *> filament_preset : preset_templates) {
3248 filament_preset.first->SetValue(false);
3249 }
3250}

Referenced by create_presets_template_item().

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

◆ generate_process_presets_data()

void Slic3r::GUI::CreatePrinterPresetDialog::generate_process_presets_data ( std::vector< Preset const * > presets,
std::string nozzle )
protected
2362{
2363 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " entry, and nozzle is: " << nozzle;
2364 std::unordered_map<std::string, float> nozzle_diameter_map_ = nozzle_diameter_map;
2365 float nozzle_dia = my_stof(get_nozzle_diameter());
2366 for (const Preset *preset : presets) {
2367 auto layer_height = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("layer_height", true));
2368 if (layer_height)
2369 layer_height->value = nozzle_dia / 2;
2370 else
2371 BOOST_LOG_TRIVIAL(info) << "process template has no layer_height";
2372
2373 auto initial_layer_print_height = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("initial_layer_print_height", true));
2375 initial_layer_print_height->value = nozzle_dia / 2;
2376 else
2377 BOOST_LOG_TRIVIAL(info) << "process template has no initial_layer_print_height";
2378
2379 auto line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("line_width", true));
2380 if (line_width)
2381 line_width->value = nozzle_dia;
2382 else
2383 BOOST_LOG_TRIVIAL(info) << "process template has no line_width";
2384
2385 auto initial_layer_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("initial_layer_line_width", true));
2386 if (initial_layer_line_width)
2387 initial_layer_line_width->value = nozzle_dia;
2388 else
2389 BOOST_LOG_TRIVIAL(info) << "process template has no initial_layer_line_width";
2390
2391 auto outer_wall_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("outer_wall_line_width", true));
2392 if (outer_wall_line_width)
2393 outer_wall_line_width->value = nozzle_dia;
2394 else
2395 BOOST_LOG_TRIVIAL(info) << "process template has no outer_wall_line_width";
2396
2397 auto inner_wall_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("inner_wall_line_width", true));
2398 if (inner_wall_line_width)
2399 inner_wall_line_width->value = nozzle_dia;
2400 else
2401 BOOST_LOG_TRIVIAL(info) << "process template has no inner_wall_line_width";
2402
2403 auto top_surface_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("top_surface_line_width", true));
2405 top_surface_line_width->value = nozzle_dia;
2406 else
2407 BOOST_LOG_TRIVIAL(info) << "process template has no top_surface_line_width";
2408
2409 auto sparse_infill_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("sparse_infill_line_width", true));
2410 if (sparse_infill_line_width)
2411 sparse_infill_line_width->value = nozzle_dia;
2412 else
2413 BOOST_LOG_TRIVIAL(info) << "process template has no sparse_infill_line_width";
2414
2415 auto internal_solid_infill_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("internal_solid_infill_line_width", true));
2416 if (internal_solid_infill_line_width)
2417 internal_solid_infill_line_width->value = nozzle_dia;
2418 else
2419 BOOST_LOG_TRIVIAL(info) << "process template has no internal_solid_infill_line_width";
2420
2421 auto support_line_width = dynamic_cast<ConfigOptionFloat *>(const_cast<Preset *>(preset)->config.option("support_line_width", true));
2422 if (support_line_width)
2423 support_line_width->value = nozzle_dia;
2424 else
2425 BOOST_LOG_TRIVIAL(info) << "process template has no support_line_width";
2426
2427 auto wall_loops = dynamic_cast<ConfigOptionInt *>(const_cast<Preset *>(preset)->config.option("wall_loops", true));
2428 if (wall_loops)
2429 wall_loops->value = std::max(2, (int) std::ceil(2 * 0.4 / nozzle_dia));
2430 else
2431 BOOST_LOG_TRIVIAL(info) << "process template has no wall_loops";
2432
2433 auto top_shell_layers = dynamic_cast<ConfigOptionInt *>(const_cast<Preset *>(preset)->config.option("top_shell_layers", true));
2434 if (top_shell_layers)
2435 top_shell_layers->value = std::max(5, (int) std::ceil(5 * 0.4 / nozzle_dia));
2436 else
2437 BOOST_LOG_TRIVIAL(info) << "process template has no top_shell_layers";
2438
2439 auto bottom_shell_layers = dynamic_cast<ConfigOptionInt *>(const_cast<Preset *>(preset)->config.option("bottom_shell_layers", true));
2441 bottom_shell_layers->value = std::max(3, (int) std::ceil(3 * 0.4 / nozzle_dia));
2442 else
2443 BOOST_LOG_TRIVIAL(info) << "process template has no bottom_shell_layers";
2444 }
2445}
static std::string layer_height
Definition Tab.cpp:4294
zaa_minimize_perimeter_height ConfigOptionFloat
Definition PrintConfig.hpp:1954
zaa_minimize_perimeter_height initial_layer_print_height((ConfigOptionFloatsNullable, initial_layer_speed))((ConfigOptionFloatsNullable
bottom_shell_layers((ConfigOptionFloat, bottom_shell_thickness))((ConfigOptionInt
top_surface_line_width((ConfigOptionInt, top_shell_layers))((ConfigOptionFloat

References Slic3r::bottom_shell_layers(), Slic3r::Preset::config, get_nozzle_diameter(), Slic3r::initial_layer_print_height(), Slic3r::GUI::layer_height, Slic3r::GUI::my_stof(), Slic3r::GUI::nozzle_diameter_map, Slic3r::ConfigBase::option(), Slic3r::top_surface_line_width(), and Slic3r::ConfigOptionSingle< T >::value.

Referenced by create_page2_dialog_buttons().

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

◆ get_custom_printer_model()

std::string Slic3r::GUI::CreatePrinterPresetDialog::get_custom_printer_model ( ) const
protected
2514{
2515 const wxString curr_selected_printer_type = curr_create_printer_type();
2516 std::string printer_model_name;
2517 if (curr_selected_printer_type == m_create_type.create_printer) {
2518 std::string custom_vendor = get_printer_vendor();
2519 std::string custom_model = get_printer_model();
2520 printer_model_name = custom_vendor + " " + custom_model;
2521 } else if (curr_selected_printer_type == m_create_type.create_nozzle) {
2522 std::string selected_printer_preset_name = into_u8(m_select_printer->GetStringSelection());
2523 std::unordered_map<std::string, std::shared_ptr<Preset>>::const_iterator itor = m_printer_name_to_preset.find(selected_printer_preset_name);
2524 assert(m_printer_name_to_preset.end() != itor);
2525 if (m_printer_name_to_preset.end() != itor) {
2526 std::shared_ptr<Preset> printer_preset = itor->second;
2527 try {
2528 printer_model_name = printer_preset->config.opt_string("printer_model", true);
2529 } catch (...) {
2530 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " get config printer_model or , and the name is: " << selected_printer_preset_name;
2531 }
2532
2533 } else {
2534 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " don't get printer preset, and the name is: " << selected_printer_preset_name;
2535 }
2536 }
2537 return printer_model_name;
2538}
std::string get_printer_model() const
Definition CreatePresetsDialog.cpp:2480
std::string get_printer_vendor() const
Definition CreatePresetsDialog.cpp:2466

References curr_create_printer_type(), get_printer_model(), get_printer_vendor(), Slic3r::GUI::into_u8(), m_create_type, m_printer_name_to_preset, and m_select_printer.

Referenced by create_page2_dialog_buttons(), and get_custom_printer_name().

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

◆ get_custom_printer_name()

std::string Slic3r::GUI::CreatePrinterPresetDialog::get_custom_printer_name ( ) const
protected
2541{
2542 return get_custom_printer_model() + " " + get_nozzle_diameter() + " nozzle";
2543}

References get_custom_printer_model(), and get_nozzle_diameter().

Referenced by validate_input_valid().

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

◆ get_nozzle_diameter()

std::string Slic3r::GUI::CreatePrinterPresetDialog::get_nozzle_diameter ( ) const
protected
2495{
2496 std::string diameter;
2497 if (m_can_not_find_nozzle_checkbox->GetValue()) {
2498 diameter = into_u8(m_custom_nozzle_diameter_ctrl->GetValue());
2499 } else {
2500 diameter = into_u8(m_nozzle_diameter->GetStringSelection());
2501 size_t index_mm = diameter.find(" mm");
2502 if (std::string::npos != index_mm) { diameter = diameter.substr(0, index_mm); }
2503 }
2504 float nozzle = 0;
2505 try {
2506 nozzle = my_stof(diameter);
2507 }
2508 catch (...) { }
2509 if (nozzle == 0) diameter = "0.4";
2510 return diameter;
2511}

References Slic3r::GUI::into_u8(), m_can_not_find_nozzle_checkbox, m_custom_nozzle_diameter_ctrl, m_nozzle_diameter, and Slic3r::GUI::my_stof().

Referenced by create_page2_dialog_buttons(), generate_process_presets_data(), and get_custom_printer_name().

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

◆ get_printer_model()

std::string Slic3r::GUI::CreatePrinterPresetDialog::get_printer_model ( ) const
protected
2481{
2482 assert(curr_create_printer_type() == m_create_type.create_printer);
2483 std::string custom_model;
2484 if (m_can_not_find_vendor_combox->GetValue()) {
2485 custom_model = into_u8(m_custom_model_text_ctrl->GetValue());
2486 custom_model = remove_special_key(custom_model);
2487 boost::algorithm::trim(custom_model);
2488 } else {
2489 custom_model = into_u8(m_select_model->GetStringSelection());
2490 }
2491 return custom_model;
2492}
static std::string remove_special_key(const std::string &str)
Definition CreatePresetsDialog.cpp:233

References curr_create_printer_type(), Slic3r::GUI::into_u8(), m_can_not_find_vendor_combox, m_create_type, m_custom_model_text_ctrl, m_select_model, and Slic3r::GUI::remove_special_key().

Referenced by get_custom_printer_model(), and validate_input_valid().

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

◆ get_printer_vendor()

std::string Slic3r::GUI::CreatePrinterPresetDialog::get_printer_vendor ( ) const
protected
2467{
2468 assert(curr_create_printer_type() == m_create_type.create_printer);
2469 std::string custom_vendor;
2470 if (m_can_not_find_vendor_combox->GetValue()) {
2471 custom_vendor = into_u8(m_custom_vendor_text_ctrl->GetValue());
2472 custom_vendor = remove_special_key(custom_vendor);
2473 boost::algorithm::trim(custom_vendor);
2474 } else {
2475 custom_vendor = into_u8(m_select_vendor->GetStringSelection());
2476 }
2477 return custom_vendor;
2478}

References curr_create_printer_type(), Slic3r::GUI::into_u8(), m_can_not_find_vendor_combox, m_create_type, m_custom_vendor_text_ctrl, m_select_vendor, and Slic3r::GUI::remove_special_key().

Referenced by get_custom_printer_model(), and validate_input_valid().

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

◆ is_new_scale_factor()

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

◆ load_model_stl()

void Slic3r::GUI::CreatePrinterPresetDialog::load_model_stl ( )
protected
2205{
2206 wxFileDialog dialog(this, _L("Choose an STL file to import bed model from:"), last_directory, "", file_wildcards(FT_STL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
2207
2208 if (dialog.ShowModal() != wxID_OK)
2209 return;
2210
2211 m_custom_model = "";
2212 m_upload_stl_tip_text->SetLabelText(_L("Empty"));
2213 last_directory = dialog.GetDirectory().ToUTF8().data();
2214 std::string file_name = dialog.GetPath().ToUTF8().data();
2215 if (!boost::algorithm::iends_with(file_name, ".stl")) {
2216 show_error(this, _L("Invalid file format."));
2217 return;
2218 }
2219 bool try_ok;
2220 if (Utils::is_file_too_large(file_name, try_ok)) {
2221 if (try_ok) {
2222 m_upload_stl_tip_text->SetLabelText(wxString::Format(_L("The file exceeds %d MB, please import again."), STL_SVG_MAX_FILE_SIZE_MB));
2223 }
2224 else {
2225 m_upload_stl_tip_text->SetLabelText(_L("Exception in obtaining file size, please import again."));
2226 }
2227 return;
2228 }
2229 m_custom_model = file_name;
2230 wxGCDC dc;
2231 auto text = wxControl::Ellipsize(_L(boost::filesystem::path(file_name).filename().string()), dc, wxELLIPSIZE_END, FromDIP(200));
2232 m_upload_stl_tip_text->SetLabelText(text);
2233}
#define STL_SVG_MAX_FILE_SIZE_MB
Definition FileHelp.hpp:5
std::string m_custom_model
Definition CreatePresetsDialog.hpp:224
void show_error(wxWindow *parent, const wxString &message, bool has_code_excerpts)
Definition GUI.cpp:296
@ FT_STL
Definition GUI_App.hpp:121
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
Definition GUI_App.cpp:695
static std::string last_directory
Definition CreatePresetsDialog.cpp:2174
bool is_file_too_large(std::string file_path, bool &try_ok)
Definition FileHelp.cpp:12

References _L, Slic3r::GUI::file_wildcards(), Slic3r::GUI::FT_STL, Slic3r::Utils::is_file_too_large(), Slic3r::GUI::last_directory, m_custom_model, m_upload_stl_tip_text, Slic3r::GUI::show_error(), and STL_SVG_MAX_FILE_SIZE_MB.

Referenced by create_hot_bed_stl_item().

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

◆ load_system_and_user_presets_with_curr_model()

bool Slic3r::GUI::CreatePrinterPresetDialog::load_system_and_user_presets_with_curr_model ( PresetBundle & temp_preset_bundle,
bool just_template = false )
protected
2236{
2237 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " is load template: "<< just_template;
2238 std::string selected_vendor_id;
2239 std::string preset_path;
2240 if (m_printer_preset) {
2241 delete m_printer_preset;
2242 m_printer_preset = nullptr;
2243 }
2244
2245 std::string curr_selected_model = into_u8(m_printer_model->GetStringSelection());
2246 int nozzle_index = curr_selected_model.find_first_of("@");
2247 std::string select_model = curr_selected_model.substr(0, nozzle_index - 1);
2248 for (const Slic3r::VendorProfile::PrinterModel &model : m_printer_preset_vendor_selected.models) {
2249 if (model.name == select_model) {
2251 break;
2252 }
2253 }
2255 BOOST_LOG_TRIVIAL(info) << "selected id was not found";
2256 MessageDialog dlg(this, _L("Preset path was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2257 dlg.ShowModal();
2258 return false;
2259 }
2260
2261 bool is_custom_vendor = false;
2263 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " select custom vendor ";
2264 is_custom_vendor = true;
2265 temp_preset_bundle = *(wxGetApp().preset_bundle);
2266 } else {
2267 selected_vendor_id = m_printer_preset_vendor_selected.id;
2268
2269 // The vendor list is built from the bundled profiles, so a vendor the user never
2270 // installed loads from them.
2271 const boost::filesystem::path vendor_dir = is_vendor_installed(selected_vendor_id) ?
2272 boost::filesystem::path(Slic3r::data_dir()) / PRESET_SYSTEM_DIR :
2273 boost::filesystem::path(Slic3r::resources_dir()) / PRESET_PROFILES_DIR;
2274
2275 try {
2276 // Pass the app's preset bundle (which already holds OrcaFilamentLibrary) as the base
2277 // bundle so vendor filaments that inherit OFL bases resolve via the existing
2278 // cross-vendor inheritance path.
2279 // Orca: served from the vendor's preset cache where one covers it — a shipped
2280 // build carries that instead of the raw preset JSONs — and parsed otherwise.
2281 temp_preset_bundle.load_vendor_configs_from_json(vendor_dir.string(),
2282 selected_vendor_id,
2285 wxGetApp().preset_bundle);
2286 } catch (...) {
2287 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "load vendor fonfigs form json failed";
2288 MessageDialog dlg(this, _L("The printer model was not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2289 wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2290 dlg.ShowModal();
2291 return false;
2292 }
2293
2294 if (!just_template) {
2295 std::string dir_user_presets = wxGetApp().app_config->get("preset_folder");
2296 if (dir_user_presets.empty()) {
2297 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "default user presets path";
2299 } else {
2300 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "user presets path";
2301 temp_preset_bundle.load_user_presets(dir_user_presets, ForwardCompatibilitySubstitutionRule::EnableSilent);
2302 }
2303 }
2304 }
2305 //get model varient
2306 std::string model_varient = into_u8(m_printer_model->GetStringSelection());
2307 size_t index_at = model_varient.find(" @ ");
2308 size_t index_nozzle = model_varient.find("nozzle");
2309 std::string varient;
2310 if (index_at != std::string::npos && index_nozzle != std::string::npos) {
2311 varient = model_varient.substr(index_at + 3, index_nozzle - index_at - 4);
2312 } else {
2313 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "get nozzle failed";
2314 MessageDialog dlg(this, _L("The nozzle diameter was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2315 dlg.ShowModal();
2316 return false;
2317 }
2318
2319 const Preset *temp_printer_preset = is_custom_vendor ? temp_preset_bundle.printers.find_custom_preset_by_model_and_variant(m_printer_preset_model_selected.id, varient) :
2320 temp_preset_bundle.printers.find_system_preset_by_model_and_variant(m_printer_preset_model_selected.id, varient);
2321
2322 if (temp_printer_preset) {
2323 m_printer_preset = new Preset(*temp_printer_preset);
2324 } else {
2325 MessageDialog dlg(this, _L("The printer preset was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2326 dlg.ShowModal();
2327 return false;
2328 }
2329
2330 if (!just_template) {
2331 temp_preset_bundle.printers.select_preset_by_name(m_printer_preset->name, true);
2332 temp_preset_bundle.update_compatible(PresetSelectCompatibleType::Always);
2333 } else {
2334 selected_vendor_id = PRESET_TEMPLATE_DIR;
2335 preset_path.clear();
2336 if (boost::filesystem::exists(boost::filesystem::path(Slic3r::resources_dir()) / PRESET_PROFILES_TEMOLATE_DIR / selected_vendor_id)) {
2337 preset_path = (boost::filesystem::path(Slic3r::resources_dir()) / PRESET_PROFILES_TEMOLATE_DIR).string();
2338 }
2339 if (preset_path.empty()) {
2340 BOOST_LOG_TRIVIAL(info) << "Preset path was not found";
2341 MessageDialog dlg(this, _L("Preset path was not found; please reselect vendor."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2342 wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2343 dlg.ShowModal();
2344 return false;
2345 }
2346 try {
2347 temp_preset_bundle.load_vendor_configs_from_json(preset_path, selected_vendor_id, PresetBundle::LoadConfigBundleAttribute::LoadSystem,
2349 } catch (...) {
2350 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "load template vendor configs form json failed";
2351 MessageDialog dlg(this, _L("The printer model was not found, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
2352 wxYES_NO | wxYES_DEFAULT | wxCENTRE);
2353 dlg.ShowModal();
2354 return false;
2355 }
2356 }
2357
2358 return true;
2359}
#define DEFAULT_USER_FOLDER_NAME
Definition PresetBundle.hpp:31
#define PRESET_PROFILES_TEMOLATE_DIR
Definition Preset.hpp:39
#define PRESET_SYSTEM_DIR
Definition Preset.hpp:31
#define PRESET_PROFILES_DIR
Definition Preset.hpp:38
#define PRESET_TEMPLATE_DIR
Definition Preset.hpp:40
#define PRESET_CUSTOM_VENDOR
Definition Preset.hpp:41
Slic3r::VendorProfile::PrinterModel m_printer_preset_model_selected
Definition CreatePresetsDialog.hpp:183
VendorProfile m_printer_preset_vendor_selected
Definition CreatePresetsDialog.hpp:182
@ LoadSystem
Definition PresetBundle.hpp:605
@ EnableSilent
Definition Config.hpp:247
const std::string & data_dir()
Definition utils.cpp:365
const std::string & resources_dir()
Definition utils.cpp:296
bool is_vendor_installed(const std::string &vendor)
Definition utils.cpp:1973
std::string name
Definition Preset.hpp:155

References _L, Slic3r::Always, Slic3r::data_dir(), DEFAULT_USER_FOLDER_NAME, Slic3r::EnableSilent, Slic3r::PrinterPresetCollection::find_custom_preset_by_model_and_variant(), Slic3r::PrinterPresetCollection::find_system_preset_by_model_and_variant(), Slic3r::GUI::into_u8(), Slic3r::is_vendor_installed(), Slic3r::PresetBundle::load_user_presets(), Slic3r::PresetBundle::load_vendor_configs_from_json(), Slic3r::PresetBundle::LoadSystem, m_printer_model, m_printer_preset, m_printer_preset_model_selected, m_printer_preset_vendor_selected, Slic3r::VendorProfile::PrinterModel::name, Slic3r::Preset, PRESET_CUSTOM_VENDOR, PRESET_PROFILES_DIR, PRESET_PROFILES_TEMOLATE_DIR, PRESET_SYSTEM_DIR, PRESET_TEMPLATE_DIR, Slic3r::PresetBundle::printers, Slic3r::resources_dir(), Slic3r::PresetCollection::select_preset_by_name(), Slic3r::GUI::DPIAware< P >::ShowModal(), SLIC3R_APP_FULL_NAME, and Slic3r::PresetBundle::update_compatible().

Referenced by update_presets_list().

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

◆ load_texture()

void Slic3r::GUI::CreatePrinterPresetDialog::load_texture ( )
protected
2175 {
2176 wxFileDialog dialog(this, _L("Choose a file to import bed texture from (PNG/SVG):"), last_directory, "", file_wildcards(FT_TEX), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
2177
2178 if (dialog.ShowModal() != wxID_OK)
2179 return;
2180
2181 m_custom_texture = "";
2182 m_upload_svg_tip_text->SetLabelText(_L("Empty"));
2183 last_directory = dialog.GetDirectory().ToUTF8().data();
2184 std::string file_name = dialog.GetPath().ToUTF8().data();
2185 if (!boost::algorithm::iends_with(file_name, ".png") && !boost::algorithm::iends_with(file_name, ".svg")) {
2186 show_error(this, _L("Invalid file format."));
2187 return;
2188 }
2189 bool try_ok;
2190 if (Utils::is_file_too_large(file_name, try_ok)) {
2191 if (try_ok) {
2192 m_upload_svg_tip_text->SetLabelText(wxString::Format(_L("The file exceeds %d MB, please import again."), STL_SVG_MAX_FILE_SIZE_MB));
2193 } else {
2194 m_upload_svg_tip_text->SetLabelText(_L("Exception in obtaining file size, please import again."));
2195 }
2196 return;
2197 }
2198 m_custom_texture = file_name;
2199 wxGCDC dc;
2200 auto text = wxControl::Ellipsize(_L(boost::filesystem::path(file_name).filename().string()), dc, wxELLIPSIZE_END, FromDIP(200));
2201 m_upload_svg_tip_text->SetLabelText(text);
2202}
std::string m_custom_texture
Definition CreatePresetsDialog.hpp:223
@ FT_TEX
Definition GUI_App.hpp:135

References _L, Slic3r::GUI::file_wildcards(), Slic3r::GUI::FT_TEX, Slic3r::Utils::is_file_too_large(), Slic3r::GUI::last_directory, m_custom_texture, m_upload_svg_tip_text, Slic3r::GUI::show_error(), and STL_SVG_MAX_FILE_SIZE_MB.

Referenced by create_hot_bed_svg_item().

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

◆ normal_font()

◆ on_dpi_changed()

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

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

1696 {
1697 Layout();
1698}

◆ on_preset_model_value_change()

void Slic3r::GUI::CreatePrinterPresetDialog::on_preset_model_value_change ( wxCommandEvent & e)
protected
3482{
3483 m_printer_model->SetLabelColor(*wxBLACK);
3484 if (m_printer_preset_vendor_selected.models.empty()) {
3485 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " selected vendor has no models, and the vendor is: " << m_printer_preset_vendor_selected.id;
3486 return;
3487 }
3488
3489 wxString curr_selected_preset_type = curr_create_preset_type();
3490 if (curr_selected_preset_type == m_create_type.base_curr_printer) {
3492 } else if (curr_selected_preset_type == m_create_type.base_template) {
3493 update_presets_list(true);
3494 }
3495 rewritten = false;
3496
3498
3499 e.Skip();
3500}
void update_presets_list(bool jast_template=false)
Definition CreatePresetsDialog.cpp:3252
void update_preset_list_size()
Definition CreatePresetsDialog.cpp:2447

References curr_create_preset_type(), m_create_type, m_printer_model, m_printer_preset_vendor_selected, rewritten, update_preset_list_size(), and update_presets_list().

Referenced by create_printer_preset_item(), and on_select_printer_model().

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

◆ on_select_printer_model()

void Slic3r::GUI::CreatePrinterPresetDialog::on_select_printer_model ( wxCommandEvent & e)
protected
3101{
3102 bool is_from_last_page = e.GetExtraLong() == 0; // 0 means form last page, 1 means form cur combobox
3103 m_printer_vendor->SetLabelColor(*wxBLACK);
3104 VendorMap vendors;
3105 wxArrayString exist_vendor_choice = get_exist_vendor_choices(vendors);
3106 std::string curr_selected_vendor = into_u8(m_printer_vendor->GetStringSelection());
3107 auto iterator = vendors.find(curr_selected_vendor);
3108 if (iterator != vendors.end()) {
3109 m_printer_preset_vendor_selected = iterator->second;
3110 } else {
3111 if (is_from_last_page) {
3113 return;
3114 }
3115
3116 MessageDialog dlg(this, _L("Vendor was not found; please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxYES_NO | wxYES_DEFAULT | wxCENTRE);
3117 dlg.ShowModal();
3118 return;
3119 }
3120
3121 std::string nozzle_type = into_u8(m_nozzle_diameter->GetStringSelection());
3122 size_t index_mm = nozzle_type.find(" mm");
3123 if (std::string::npos != index_mm) { nozzle_type = nozzle_type.substr(0, index_mm); }
3124 float nozzle = nozzle_diameter_map[nozzle_type];
3125 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " entry and nozzle type is: " << nozzle_type << " and nozzle is: " << nozzle;
3126
3127 wxArrayString printer_preset_model = printer_preset_sort_with_nozzle_diameter(m_printer_preset_vendor_selected, nozzle);
3128 if (printer_preset_model.size() == 0) {
3129 MessageDialog dlg(this, _L("Current vendor has no models, please reselect."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
3130 dlg.ShowModal();
3131 return;
3132 }
3133 m_printer_model->Set(printer_preset_model);
3134 if (!printer_preset_model.empty()) {
3135 m_printer_model->SetSelection(0);
3136 wxCommandEvent e;
3139 }
3140 rewritten = false;
3141 e.Skip();
3142}
wxArrayString printer_preset_sort_with_nozzle_diameter(const VendorProfile &vendor_profile, float nozzle_diameter)
Definition CreatePresetsDialog.cpp:3165
zaa_minimize_perimeter_height nozzle_type((ConfigOptionInt, nozzle_hrc))((ConfigOptionBool

References _L, DEFAULT_PROMPT_TEXT_COLOUR, Slic3r::GUI::get_exist_vendor_choices(), Slic3r::GUI::into_u8(), m_nozzle_diameter, m_printer_model, m_printer_preset_vendor_selected, m_printer_vendor, Slic3r::GUI::nozzle_diameter_map, Slic3r::nozzle_type(), on_preset_model_value_change(), printer_preset_sort_with_nozzle_diameter(), rewritten, Slic3r::GUI::DPIAware< P >::ShowModal(), SLIC3R_APP_FULL_NAME, and update_preset_list_size().

Referenced by create_printer_preset_item(), and data_init().

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

◆ on_sys_color_changed()

◆ prev_scale_factor()

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

◆ printer_preset_sort_with_nozzle_diameter()

wxArrayString Slic3r::GUI::CreatePrinterPresetDialog::printer_preset_sort_with_nozzle_diameter ( const VendorProfile & vendor_profile,
float nozzle_diameter )
protected
3166{
3167 std::vector<std::pair<float, std::string>> preset_sort;
3168
3169 auto get_nozzle_size_for_printer_model = [this](const std::string & model_name) -> size_t {
3170 auto iter = m_printer_name_to_preset.find(model_name);
3171 if (iter != m_printer_name_to_preset.end()) {
3172 std::shared_ptr<Preset> printer_preset = iter->second;
3173 if (printer_preset) {
3174 auto nozzle_diameter = dynamic_cast<ConfigOptionFloats *>(printer_preset->config.option("nozzle_diameter", true));
3175 return nozzle_diameter->values.size();
3176 }
3177 }
3178 return 1; // default nozzle size
3179 };
3180
3181 size_t selected_nozzle_size = get_nozzle_size_for_printer_model(into_u8(m_select_printer->GetStringSelection()));
3182 for (const Slic3r::VendorProfile::PrinterModel &model : vendor_profile.models) {
3183 std::string model_name = model.name;
3184 size_t nozzle_size = get_nozzle_size_for_printer_model(model_name);
3185 if (nozzle_size != selected_nozzle_size)
3186 continue;
3187
3188 for (const Slic3r::VendorProfile::PrinterVariant &variant : model.variants) {
3189 try {
3190 float variant_diameter = my_stof(variant.name);
3191 preset_sort.push_back(std::make_pair(variant_diameter, model_name + " @ " + variant.name + " nozzle"));
3192 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "nozzle: " << variant_diameter << "model: " << preset_sort.back().second;
3193 }
3194 catch (...) {
3195 BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " prase varient fialed and the model_name is: " << model_name;
3196 continue;
3197 }
3198 }
3199 }
3200
3201 std::sort(preset_sort.begin(), preset_sort.end(), [](const std::pair<float, std::string> &a, const std::pair<float, std::string> &b) { return a.first < b.first; });
3202
3203 int index_nearest_nozzle = -1;
3204 float nozzle_diameter_diff = 1;
3205 for (int i = 0; i < preset_sort.size(); ++i) {
3206 float curr_nozzle_diameter_diff = std::abs(nozzle_diameter - preset_sort[i].first);
3207 if (curr_nozzle_diameter_diff < nozzle_diameter_diff) {
3208 index_nearest_nozzle = i;
3209 nozzle_diameter_diff = curr_nozzle_diameter_diff;
3210 if (curr_nozzle_diameter_diff == 0) break;
3211 }
3212 }
3213 wxArrayString printer_preset_model_selection;
3214 int right_index = index_nearest_nozzle + 1;
3215 while (index_nearest_nozzle >= 0 || right_index < preset_sort.size()) {
3216 if (index_nearest_nozzle >= 0 && right_index < preset_sort.size()) {
3217 float left_nozzle_diff = std::abs(nozzle_diameter - preset_sort[index_nearest_nozzle].first);
3218 float right_nozzle_diff = std::abs(nozzle_diameter - preset_sort[right_index].first);
3219 bool left_is_little = left_nozzle_diff < right_nozzle_diff;
3220 if (left_is_little) {
3221 printer_preset_model_selection.Add(from_u8(preset_sort[index_nearest_nozzle].second));
3222 index_nearest_nozzle--;
3223 } else {
3224 printer_preset_model_selection.Add(from_u8(preset_sort[right_index].second));
3225 right_index++;
3226 }
3227 } else if (index_nearest_nozzle >= 0) {
3228 printer_preset_model_selection.Add(from_u8(preset_sort[index_nearest_nozzle].second));
3229 index_nearest_nozzle--;
3230 } else if (right_index < preset_sort.size()) {
3231 printer_preset_model_selection.Add(from_u8(preset_sort[right_index].second));
3232 right_index++;
3233 }
3234 }
3235 return printer_preset_model_selection;
3236}
std::vector< PrinterVariant > variants
Definition Preset.hpp:160
std::string name
Definition Preset.hpp:145

References Slic3r::GUI::from_u8(), Slic3r::GUI::into_u8(), m_printer_name_to_preset, m_select_printer, Slic3r::VendorProfile::models, Slic3r::GUI::my_stof(), Slic3r::VendorProfile::PrinterModel::name, Slic3r::VendorProfile::PrinterVariant::name, Slic3r::nozzle_diameter(), and Slic3r::VendorProfile::PrinterModel::variants.

Referenced by on_select_printer_model().

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

◆ save_printable_area_config()

bool Slic3r::GUI::CreatePrinterPresetDialog::save_printable_area_config ( Preset * preset)
protected
3310{
3311 const wxString curr_selected_printer_type = curr_create_printer_type();
3312 DynamicPrintConfig &config = preset->config;
3313
3314 if (curr_selected_printer_type == m_create_type.create_printer) {
3315 double x = 0;
3316 m_bed_size_x_input->GetTextCtrl()->GetValue().ToDouble(&x);
3317 double y = 0;
3318 m_bed_size_y_input->GetTextCtrl()->GetValue().ToDouble(&y);
3319 double dx = 0;
3320 m_bed_origin_x_input->GetTextCtrl()->GetValue().ToDouble(&dx);
3321 double dy = 0;
3322 m_bed_origin_y_input->GetTextCtrl()->GetValue().ToDouble(&dy);
3323 // range check begin
3324 if (x == 0 || y == 0) { return false; }
3325 double x0 = 0.0;
3326 double y0 = 0.0;
3327 double x1 = x;
3328 double y1 = y;
3329 if (dx >= x || dy >= y) { return false; }
3330 x0 -= dx;
3331 x1 -= dx;
3332 y0 -= dy;
3333 y1 -= dy;
3334 // range check end
3335 std::vector<Vec2d> points = {Vec2d(x0, y0), Vec2d(x1, y0), Vec2d(x1, y1), Vec2d(x0, y1)};
3336 config.set_key_value("printable_area", new ConfigOptionPoints(points));
3337
3338 double max_print_height = 0;
3339 m_print_height_input->GetTextCtrl()->GetValue().ToDouble(&max_print_height);
3340 config.set("printable_height", max_print_height);
3341
3344 config.set("bed_custom_model", m_custom_model);
3345 config.set("bed_custom_texture", m_custom_texture);
3346 } else if(m_create_type.create_nozzle){
3347 std::string selected_printer_preset_name = into_u8(m_select_printer->GetStringSelection());
3348 std::unordered_map<std::string, std::shared_ptr<Preset>>::iterator itor = m_printer_name_to_preset.find(selected_printer_preset_name);
3349 assert(m_printer_name_to_preset.end() != itor);
3350 if (m_printer_name_to_preset.end() != itor) {
3351 std::shared_ptr<Preset> printer_preset = itor->second;
3352 std::vector<std::string> keys = {"printable_area", "printable_height", "bed_custom_model", "bed_custom_texture"};
3353 config.apply_only(printer_preset->config, keys, true);
3354 }
3355 }
3356 return true;
3357}
void slash_to_back_slash(std::string &file_path)
Definition FileHelp.cpp:26
Eigen::Matrix< double, 2, 1, Eigen::DontAlign > Vec2d
Definition Point.hpp:67

References Slic3r::ConfigBase::apply_only(), Slic3r::Preset::config, curr_create_printer_type(), Slic3r::GUI::into_u8(), m_bed_origin_x_input, m_bed_origin_y_input, m_bed_size_x_input, m_bed_size_y_input, m_create_type, m_custom_model, m_custom_texture, m_print_height_input, m_printer_name_to_preset, m_select_printer, Slic3r::ConfigBase::set(), Slic3r::DynamicConfig::set_key_value(), and Slic3r::Utils::slash_to_back_slash().

Referenced by create_page2_dialog_buttons().

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

◆ scale_factor()

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

◆ select_all_preset_template()

void Slic3r::GUI::CreatePrinterPresetDialog::select_all_preset_template ( std::vector< std::pair<::CheckBox *, Preset * > > & preset_templates)
protected
3239{
3240 for (std::pair<::CheckBox *, Preset const *> filament_preset : preset_templates) {
3241 filament_preset.first->SetValue(true);
3242 }
3243}

Referenced by create_presets_template_item().

Here is the caller graph for this function:

◆ select_curr_radiobox()

void Slic3r::GUI::CreatePrinterPresetDialog::select_curr_radiobox ( std::vector< std::pair< RadioBox *, wxString > > & radiobox_list,
int btn_idx )
protected
2570{
2571 int len = radiobox_list.size();
2572 for (int i = 0; i < len; ++i) {
2573 if (i == btn_idx) {
2574 if (!radiobox_list[i].first->IsEnabled())
2575 return;
2576 radiobox_list[i].first->SetValue(true);
2577 wxString curr_selected_type = radiobox_list[i].second;
2578 this->Freeze();
2579 if (curr_selected_type == m_create_type.base_template) {
2580 if (m_printer_model->GetValue() == _L("Select Model")) {
2582 m_filament_preset.clear();
2584 m_process_preset.clear();
2585 } else {
2586 update_presets_list(true);
2587 }
2588 m_page2->SetSizerAndFit(m_page2_sizer);
2589 } else if (curr_selected_type == m_create_type.base_curr_printer) {
2590 if (m_printer_model->GetValue() == _L("Select Model")) {
2592 m_filament_preset.clear();
2594 m_process_preset.clear();
2595 } else {
2597 }
2598 m_page2->SetSizerAndFit(m_page2_sizer);
2599 } else if (curr_selected_type == m_create_type.create_printer) {
2600 m_select_printer->Hide();
2603 m_printer_info_panel->Show();
2604 if (m_can_not_find_vendor_combox->GetValue()) {
2607 m_select_vendor->Hide();
2608 m_select_model->Hide();
2609 } else {
2610 m_select_vendor->Show();
2611 m_select_model->Show();
2612 }
2613 m_page1->SetSizerAndFit(m_page1_sizer);
2614 } else if (curr_selected_type == m_create_type.create_nozzle) {
2616 m_select_vendor->Hide();
2617 m_select_model->Hide();
2622 m_printer_info_panel->Hide();
2623 m_select_printer->Show();
2624 m_page1->SetSizerAndFit(m_page1_sizer);
2625 }
2626 this->Thaw();
2627 } else {
2628 radiobox_list[i].first->SetValue(false);
2629 }
2630 }
2631
2633}
void set_current_visible_printer()
Definition CreatePresetsDialog.cpp:3144

References _L, m_can_not_find_vendor_combox, m_can_not_find_vendor_text, m_create_type, m_custom_model_text_ctrl, m_custom_vendor_text_ctrl, m_filament_preset, m_filament_preset_template_sizer, m_page1, m_page1_sizer, m_page2, m_page2_sizer, m_printer_info_panel, m_printer_model, m_process_preset, m_process_preset_template_sizer, m_select_model, m_select_printer, m_select_vendor, set_current_visible_printer(), update_preset_list_size(), and update_presets_list().

Referenced by CreatePrinterPresetDialog(), create_radio_item(), and data_init().

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

◆ set_current_visible_printer()

void Slic3r::GUI::CreatePrinterPresetDialog::set_current_visible_printer ( )
protected
3145{
3146 //The entire process of creating a custom printer only needs to be done once
3147 if (m_printer_name_to_preset.size() > 0) return;
3148 PresetBundle *preset_bundle = wxGetApp().preset_bundle;
3149 const std::deque<Preset> &printer_presets = preset_bundle->printers.get_presets();
3150 wxArrayString printer_choice;
3152 for (const Preset &printer_preset : printer_presets) {
3153 if (!printer_preset.is_visible) continue;
3154 if (preset_bundle->printers.get_preset_base(printer_preset) != &printer_preset) continue;
3155 if (auto printer_model = dynamic_cast<ConfigOptionString*>(const_cast<Preset&>(printer_preset).config.option("printer_model", false))) {
3156 if (m_printer_name_to_preset.find(printer_model->value) == m_printer_name_to_preset.end()) {
3157 printer_choice.push_back(from_u8(printer_model->value));
3158 m_printer_name_to_preset[printer_model->value] = std::make_shared<Preset>(printer_preset);
3159 }
3160 }
3161 }
3162 m_select_printer->Set(printer_choice);
3163}
const std::deque< Preset > & get_presets() const
Definition Preset.hpp:781
PresetCollection & printer_presets(PresetBundle &bundle)
Definition PluginHostPresets.cpp:50

References Slic3r::GUI::from_u8(), Slic3r::PresetCollection::get_preset_base(), Slic3r::PresetCollection::get_presets(), m_printer_name_to_preset, m_select_printer, and Slic3r::PresetBundle::printers.

Referenced by select_curr_radiobox().

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

void Slic3r::GUI::CreatePrinterPresetDialog::show_page1 ( )
protected
3029{
3030 m_step_1->SetBitmap(create_scaled_bitmap("step_1", nullptr, FromDIP(20)));
3031 m_step_2->SetBitmap(create_scaled_bitmap("step_2_ready", nullptr, FromDIP(20)));
3032 m_page1->Show();
3033 m_page2->Hide();
3034 Refresh();
3035 Layout();
3036 Fit();
3037}

References create_scaled_bitmap(), m_page1, m_page2, m_step_1, and m_step_2.

Referenced by create_page2_dialog_buttons().

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

◆ show_page2()

void Slic3r::GUI::CreatePrinterPresetDialog::show_page2 ( )
protected
3040{
3041 m_step_1->SetBitmap(create_scaled_bitmap("step_is_ok", nullptr, FromDIP(20)));
3042 m_step_2->SetBitmap(create_scaled_bitmap("step_2", nullptr, FromDIP(20)));
3043 m_page2->Show();
3044 m_page1->Hide();
3045 Refresh();
3046 Layout();
3047 Fit();
3048}

References create_scaled_bitmap(), m_page1, m_page2, m_step_1, and m_step_2.

Referenced by create_page1_dialog_buttons().

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

◆ ShowModal()

◆ update_em_unit()

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

◆ update_preset_list_size()

void Slic3r::GUI::CreatePrinterPresetDialog::update_preset_list_size ( )
protected
2448{
2449 m_scrolled_preset_window->Freeze();
2451 m_preset_template_panel->SetMinSize(wxSize(FromDIP(660), -1));
2452 m_preset_template_panel->SetSize(wxSize(FromDIP(660), -1));
2453 int width = m_preset_template_panel->GetSize().GetWidth();
2454 int height = m_preset_template_panel->GetSize().GetHeight();
2455 m_scrolled_preset_window->SetMinSize(wxSize(std::min(1500, width + FromDIP(26)), std::min(600, height)));
2456 m_scrolled_preset_window->SetMaxSize(wxSize(std::min(1500, width + FromDIP(26)), std::min(600, height)));
2457 m_scrolled_preset_window->SetSize(wxSize(std::min(1500, width + FromDIP(26)), std::min(600, height)));
2458 m_page2->SetSizerAndFit(m_page2_sizer);
2459 Layout();
2460 Fit();
2461 Refresh();
2464}
static void adjust_dialog_in_screen(DPIDialog *dialog)
Definition CreatePresetsDialog.cpp:698
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184
coord_t height(const BoundingBox &box)
Definition Arrange.cpp:1185

References Slic3r::GUI::adjust_dialog_in_screen(), m_filament_sizer, m_page2, m_page2_sizer, m_preset_template_panel, and m_scrolled_preset_window.

Referenced by on_preset_model_value_change(), on_select_printer_model(), and select_curr_radiobox().

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

◆ update_presets_list()

void Slic3r::GUI::CreatePrinterPresetDialog::update_presets_list ( bool jast_template = false)
protected
3253{
3254 PresetBundle temp_preset_bundle;
3255 if (!load_system_and_user_presets_with_curr_model(temp_preset_bundle, just_template)) return;
3256
3257 const std::deque<Preset> &filament_presets = temp_preset_bundle.filaments.get_presets();
3258 const std::deque<Preset> &process_presets = temp_preset_bundle.prints.get_presets();
3259
3260 // clear filament preset window sizer
3261 m_preset_template_panel->Freeze();
3263
3264 // update filament preset window sizer
3265 for (const Preset &filament_preset : filament_presets) {
3266 if (filament_preset.is_compatible) {
3267 if (filament_preset.is_default) continue;
3268 Preset *temp_filament = new Preset(filament_preset);
3269 wxString filament_name = wxString::FromUTF8(temp_filament->name);
3271 wxEXPAND, FromDIP(5));
3272 }
3273 }
3274
3275 for (const Preset &process_preset : process_presets) {
3276 if (process_preset.is_compatible) {
3277 if (process_preset.is_default) continue;
3278
3279 Preset *temp_process = new Preset(process_preset);
3280 wxString process_name = wxString::FromUTF8(temp_process->name);
3281 m_process_preset_template_sizer->Add(create_checkbox(m_process_preset_panel, temp_process, process_name, m_process_preset), 0, wxEXPAND,
3282 FromDIP(5));
3283 }
3284 }
3286}
bool load_system_and_user_presets_with_curr_model(PresetBundle &temp_preset_bundle, bool just_template=false)
Definition CreatePresetsDialog.cpp:2235
static wxBoxSizer * create_checkbox(wxWindow *parent, Preset *preset, wxString &preset_name, std::vector< std::pair<::CheckBox *, Preset * > > &preset_checkbox)
Definition CreatePresetsDialog.cpp:360

References clear_preset_combobox(), Slic3r::GUI::create_checkbox(), Slic3r::PresetBundle::filaments, Slic3r::PresetCollection::get_presets(), load_system_and_user_presets_with_curr_model(), m_filament_preset, m_filament_preset_panel, m_filament_preset_template_sizer, m_preset_template_panel, m_process_preset, m_process_preset_panel, m_process_preset_template_sizer, Slic3r::Preset::name, Slic3r::Preset, and Slic3r::PresetBundle::prints.

Referenced by on_preset_model_value_change(), and select_curr_radiobox().

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

◆ validate_input_valid()

bool Slic3r::GUI::CreatePrinterPresetDialog::validate_input_valid ( )
protected
3383{
3384 const wxString curr_selected_printer_type = curr_create_printer_type();
3385 if (curr_selected_printer_type == m_create_type.create_printer) {
3386 std::string vendor_name = get_printer_vendor();
3387 std::string model_name = get_printer_model();
3388 if ((vendor_name.empty() || model_name.empty())) {
3389 MessageDialog dlg(this, _L("You have not selected the vendor and model or input the custom vendor and model."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
3390 wxOK | wxCENTRE);
3391 dlg.ShowModal();
3392 return false;
3393 }
3394
3395 vendor_name = remove_special_key(vendor_name);
3396 model_name = remove_special_key(model_name);
3397 if (vendor_name.empty() || model_name.empty()) {
3398 MessageDialog dlg(this, _L("There may be escape characters in the custom printer vendor or model. Please delete and re-enter."),
3399 wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
3400 dlg.ShowModal();
3401 return false;
3402 }
3403 boost::algorithm::trim(vendor_name);
3404 boost::algorithm::trim(model_name);
3405 if (vendor_name.empty() || model_name.empty()) {
3406 MessageDialog dlg(this, _L("All inputs in the custom printer vendor or model are spaces. Please re-enter."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
3407 wxOK | wxCENTRE);
3408 dlg.ShowModal();
3409 return false;
3410 }
3411
3412 if (check_printable_area() == false) {
3413 MessageDialog dlg(this, _L("Please check bed printable shape and origin input."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"), wxOK | wxCENTRE);
3414 dlg.ShowModal();
3415 return false;
3416 }
3417 } else if (curr_selected_printer_type == m_create_type.create_nozzle) {
3418 wxString printer_name = m_select_printer->GetStringSelection();
3419 if (printer_name.empty()) {
3420 MessageDialog dlg(this, _L("You have not yet selected the printer to replace the nozzle for; please choose a printer."), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
3421 wxOK | wxCENTRE);
3422 dlg.ShowModal();
3423 return false;
3424 }
3425 }
3426
3427 std::string nozzle_diameter;
3428 if (m_can_not_find_nozzle_checkbox->GetValue()) {
3430 } else {
3431 nozzle_diameter = into_u8(m_nozzle_diameter->GetStringSelection());
3432 size_t index_mm = nozzle_diameter.find(" mm");
3433 if (std::string::npos != index_mm) { nozzle_diameter = nozzle_diameter.substr(0, index_mm); }
3434 }
3435 float nozzle_dia = 0;
3436 try {
3437 nozzle_dia = my_stof(nozzle_diameter);
3438 } catch (...) { }
3439 if (nozzle_dia == 0) {
3440 MessageDialog dlg(this, _L("The entered nozzle diameter is invalid, please re-enter:\n"), wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info"),
3441 wxOK | wxYES_DEFAULT | wxCENTRE);
3442 int res = dlg.ShowModal();
3443 return false;
3444 }
3445
3446 std::string custom_printer_name = get_custom_printer_name();
3447
3448 if (auto preset = wxGetApp().preset_bundle->printers.find_preset(custom_printer_name)) {
3449 if (preset->is_system) {
3450 // ORCA offer switcing to existing preset to reduce confusion
3451 std::string diameters;
3452 auto printer_model = preset->config.opt_string("printer_model");
3453 for (auto &preset : wxGetApp().preset_bundle->printers) {
3454 if (preset.config.opt_string("printer_model") == printer_model)
3455 diameters += preset.config.opt_string("printer_variant") + " ";
3456 }
3457 MessageDialog dlg(this, _L("The system preset does not allow creation. \nPlease re-enter the printer model or nozzle diameter.")
3458 + _L("\n\nAvailable nozzle profiles for this printer:")
3459 + "\n" + diameters
3460 + _L("\n\nChoose YES to switch existing preset:")
3461 + "\n" + preset->name
3462 , wxString(SLIC3R_APP_FULL_NAME) + " - " + _L("Info")
3463 , wxYES | wxYES_DEFAULT | wxNO | wxCENTRE);
3464 if (dlg.ShowModal() == wxID_YES){
3465 auto bundle = wxGetApp().preset_bundle;
3466 bundle->printers.select_preset_by_name(preset->name, true);
3467 bundle->update_compatible(PresetSelectCompatibleType::Always);
3468 wxGetApp().load_current_presets();
3469 wxGetApp().mainframe->update_side_preset_ui();
3470 wxGetApp().sidebar().update_ui_from_settings();
3471 wxGetApp().sidebar().update_all_preset_comboboxes();
3472 EndModal(wxID_CANCEL);
3473 }
3474 return false;
3475 }
3476 }
3477
3478 return true;
3479}
std::string get_custom_printer_name() const
Definition CreatePresetsDialog.cpp:2540
bool check_printable_area()
Definition CreatePresetsDialog.cpp:3359

References _L, Slic3r::Always, check_printable_area(), curr_create_printer_type(), Slic3r::GUI::DPIDialog::EndModal(), get_custom_printer_name(), get_printer_model(), get_printer_vendor(), Slic3r::GUI::into_u8(), m_can_not_find_nozzle_checkbox, m_create_type, m_custom_nozzle_diameter_ctrl, m_nozzle_diameter, m_select_printer, Slic3r::GUI::my_stof(), Slic3r::nozzle_diameter(), Slic3r::GUI::remove_special_key(), Slic3r::GUI::DPIAware< P >::ShowModal(), and SLIC3R_APP_FULL_NAME.

Referenced by create_page1_dialog_buttons().

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

Member Data Documentation

◆ m_bed_origin_x_input

TextInput* Slic3r::GUI::CreatePrinterPresetDialog::m_bed_origin_x_input = nullptr
private

◆ m_bed_origin_y_input

TextInput* Slic3r::GUI::CreatePrinterPresetDialog::m_bed_origin_y_input = nullptr
private

◆ m_bed_size_x_input

TextInput* Slic3r::GUI::CreatePrinterPresetDialog::m_bed_size_x_input = nullptr
private

◆ m_bed_size_y_input

TextInput* Slic3r::GUI::CreatePrinterPresetDialog::m_bed_size_y_input = nullptr
private

◆ m_button_bed_stl

Button* Slic3r::GUI::CreatePrinterPresetDialog::m_button_bed_stl = nullptr
private

Referenced by create_hot_bed_stl_item().

◆ m_button_bed_svg

Button* Slic3r::GUI::CreatePrinterPresetDialog::m_button_bed_svg = nullptr
private

Referenced by create_hot_bed_svg_item().

◆ m_can_not_find_nozzle_checkbox

::CheckBox* Slic3r::GUI::CreatePrinterPresetDialog::m_can_not_find_nozzle_checkbox = nullptr
private

◆ m_can_not_find_vendor_combox

::CheckBox* Slic3r::GUI::CreatePrinterPresetDialog::m_can_not_find_vendor_combox = nullptr
private

◆ m_can_not_find_vendor_text

wxStaticText* Slic3r::GUI::CreatePrinterPresetDialog::m_can_not_find_vendor_text = nullptr
private

◆ m_can_rescale

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

◆ m_create_presets_btns

std::vector<std::pair<RadioBox *, wxString> > Slic3r::GUI::CreatePrinterPresetDialog::m_create_presets_btns
private

◆ m_create_type

◆ m_create_type_btns

std::vector<std::pair<RadioBox *, wxString> > Slic3r::GUI::CreatePrinterPresetDialog::m_create_type_btns
private

◆ m_custom_model

std::string Slic3r::GUI::CreatePrinterPresetDialog::m_custom_model
private

◆ m_custom_model_text_ctrl

wxTextCtrl* Slic3r::GUI::CreatePrinterPresetDialog::m_custom_model_text_ctrl = nullptr
private

◆ m_custom_nozzle_diameter_ctrl

wxTextCtrl* Slic3r::GUI::CreatePrinterPresetDialog::m_custom_nozzle_diameter_ctrl = nullptr
private

◆ m_custom_texture

std::string Slic3r::GUI::CreatePrinterPresetDialog::m_custom_texture
private

◆ m_custom_vendor_text_ctrl

wxTextCtrl* Slic3r::GUI::CreatePrinterPresetDialog::m_custom_vendor_text_ctrl = nullptr
private

◆ m_em_unit

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

◆ m_filament_preset

std::vector<std::pair<::CheckBox *, Preset *> > Slic3r::GUI::CreatePrinterPresetDialog::m_filament_preset
private

◆ m_filament_preset_panel

wxPanel* Slic3r::GUI::CreatePrinterPresetDialog::m_filament_preset_panel = nullptr
private

◆ m_filament_preset_template_sizer

wxGridSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_filament_preset_template_sizer = nullptr
private

◆ m_filament_sizer

wxBoxSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_filament_sizer = nullptr
private

◆ m_force_rescale

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

◆ 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_nozzle_diameter

ComboBox* Slic3r::GUI::CreatePrinterPresetDialog::m_nozzle_diameter = nullptr
private

◆ m_page1

wxScrolledWindow* Slic3r::GUI::CreatePrinterPresetDialog::m_page1 = nullptr
private

◆ m_page1_sizer

wxBoxSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_page1_sizer = nullptr
private

◆ m_page2

wxPanel* Slic3r::GUI::CreatePrinterPresetDialog::m_page2 = nullptr
private

◆ m_page2_sizer

wxBoxSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_page2_sizer = nullptr
private

◆ m_preset_template_panel

wxPanel* Slic3r::GUI::CreatePrinterPresetDialog::m_preset_template_panel = nullptr
private

◆ m_prev_scale_factor

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

◆ m_print_height_input

TextInput* Slic3r::GUI::CreatePrinterPresetDialog::m_print_height_input = nullptr
private

◆ m_printer_info_panel

wxPanel* Slic3r::GUI::CreatePrinterPresetDialog::m_printer_info_panel = nullptr
private

◆ m_printer_info_sizer

wxBoxSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_printer_info_sizer = nullptr
private

Referenced by create_printer_page1().

◆ m_printer_model

◆ m_printer_name_to_preset

std::unordered_map<std::string, std::shared_ptr<Preset> > Slic3r::GUI::CreatePrinterPresetDialog::m_printer_name_to_preset
private

◆ m_printer_preset

Preset* Slic3r::GUI::CreatePrinterPresetDialog::m_printer_preset = nullptr
private

◆ m_printer_preset_model_selected

Slic3r::VendorProfile::PrinterModel Slic3r::GUI::CreatePrinterPresetDialog::m_printer_preset_model_selected
private

◆ m_printer_preset_vendor_selected

VendorProfile Slic3r::GUI::CreatePrinterPresetDialog::m_printer_preset_vendor_selected
private

◆ m_printer_vendor

ComboBox* Slic3r::GUI::CreatePrinterPresetDialog::m_printer_vendor = nullptr
private

◆ m_process_preset

std::vector<std::pair<::CheckBox *, Preset *> > Slic3r::GUI::CreatePrinterPresetDialog::m_process_preset
private

◆ m_process_preset_panel

wxPanel* Slic3r::GUI::CreatePrinterPresetDialog::m_process_preset_panel = nullptr
private

◆ m_process_preset_template_sizer

wxGridSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_process_preset_template_sizer = nullptr
private

◆ m_scale_factor

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

◆ m_scrolled_preset_window

wxScrolledWindow* Slic3r::GUI::CreatePrinterPresetDialog::m_scrolled_preset_window = nullptr
private

◆ m_scrooled_preset_sizer

wxBoxSizer* Slic3r::GUI::CreatePrinterPresetDialog::m_scrooled_preset_sizer = nullptr
private

◆ m_select_model

ComboBox* Slic3r::GUI::CreatePrinterPresetDialog::m_select_model = nullptr
private

◆ m_select_printer

◆ m_select_vendor

ComboBox* Slic3r::GUI::CreatePrinterPresetDialog::m_select_vendor = nullptr
private

◆ m_step_1

wxStaticBitmap* Slic3r::GUI::CreatePrinterPresetDialog::m_step_1 = nullptr
private

◆ m_step_2

wxStaticBitmap* Slic3r::GUI::CreatePrinterPresetDialog::m_step_2 = nullptr
private

◆ m_upload_stl_tip_text

wxStaticText* Slic3r::GUI::CreatePrinterPresetDialog::m_upload_stl_tip_text = nullptr
private

◆ m_upload_svg_tip_text

wxStaticText* Slic3r::GUI::CreatePrinterPresetDialog::m_upload_svg_tip_text = nullptr
private

◆ rewritten

bool Slic3r::GUI::CreatePrinterPresetDialog::rewritten = false
private

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