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

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

Inheritance diagram for Slic3r::GUI::PlateSettingsDialog:
Collaboration diagram for Slic3r::GUI::PlateSettingsDialog:

Public Types

enum  ButtonStyle { ONLY_CONFIRM = 0 , CONFIRM_AND_CANCEL = 1 , MAX_STYLE_NUM = 2 }

Public Member Functions

 PlateSettingsDialog (wxWindow *parent, const wxString &title=wxEmptyString, bool only_layer_seq=false, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCLOSE_BOX|wxCAPTION)
 ~PlateSettingsDialog ()
void sync_bed_type (BedType type)
void sync_print_seq (int print_seq=0)
void sync_first_layer_print_seq (int selection, const std::vector< int > &seq=std::vector< int >())
void sync_other_layers_print_seq (int selection, const std::vector< LayerPrintSequence > &seq)
void sync_spiral_mode (bool spiral_mode, bool as_global)
wxString to_bed_type_name (BedType bed_type)
wxString to_print_sequence_name (PrintSequence print_seq)
void on_dpi_changed (const wxRect &suggested_rect) override
int get_print_seq_choice ()
BedType get_bed_type_choice ()
wxString get_plate_name () const
void set_plate_name (const wxString &name)
int get_first_layer_print_seq_choice ()
int get_other_layers_print_seq_choice ()
std::vector< int > get_first_layer_print_seq ()
std::vector< LayerPrintSequence > get_other_layers_print_seq_infos ()
int get_spiral_mode_choice ()
bool get_spiral_mode ()
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 add_layers ()
void delete_layers ()
virtual void on_sys_color_changed ()

Protected Attributes

ComboBox * m_bed_type_choice { nullptr }
std::vector< BedType > m_cur_combox_bed_types
ComboBox * m_print_seq_choice { nullptr }
ComboBox * m_first_layer_print_seq_choice { nullptr }
ComboBox * m_spiral_mode_choice { nullptr }
DragCanvas * m_drag_canvas
OtherLayersSeqPanel * m_other_layers_seq_panel
TextInput * m_ti_plate_name

Private Member Functions

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

Private Attributes

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

Member Enumeration Documentation

◆ ButtonStyle

Enumerator
ONLY_CONFIRM 
CONFIRM_AND_CANCEL 
MAX_STYLE_NUM 
102 {
103 ONLY_CONFIRM = 0,
105 MAX_STYLE_NUM = 2
106 };
@ MAX_STYLE_NUM
Definition PlateSettingsDialog.hpp:105
@ ONLY_CONFIRM
Definition PlateSettingsDialog.hpp:103
@ CONFIRM_AND_CANCEL
Definition PlateSettingsDialog.hpp:104

Constructor & Destructor Documentation

◆ PlateSettingsDialog()

Slic3r::GUI::PlateSettingsDialog::PlateSettingsDialog ( wxWindow * parent,
const wxString & title = wxEmptyString,
bool only_layer_seq = false,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxCLOSE_BOX | wxCAPTION )
393:DPIDialog(parent, wxID_ANY, title, pos, size, style)
394{
395 SetBackgroundColour(*wxWHITE);
396 wxBoxSizer* m_sizer_main = new wxBoxSizer(wxVERTICAL);
397 auto m_line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(FromDIP(650), -1));
398 m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
399 m_sizer_main->Add(m_line_top, 0, wxEXPAND, 0);
400
401 wxFlexGridSizer* top_sizer = new wxFlexGridSizer(0, 2, FromDIP(5), 0);
402 top_sizer->AddGrowableCol(0,1);
403 top_sizer->SetFlexibleDirection(wxBOTH);
404 top_sizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
405
406 auto plate_name_txt = new wxStaticText(this, wxID_ANY, _L("Plate name"));
407 plate_name_txt->SetFont(Label::Body_14);
408 m_ti_plate_name = new TextInput(this, wxString::FromDouble(0.0), "", "", wxDefaultPosition, wxSize(FromDIP(240),-1), wxTE_PROCESS_ENTER);
409 top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
410 top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
411
412 m_bed_type_choice = new ComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240),-1), 0, NULL, wxCB_READONLY );
413 auto pm = wxGetApp().plater()->get_curr_printer_model();
414 if (pm) {
416 m_bed_type_choice->AppendString(_L("Same as Global Plate Type"));
417 const ConfigOptionDef *bed_type_def = print_config_def.get("curr_bed_type");
418 int index = 0;
419 for (auto item : bed_type_def->enum_labels) {
420 index++;
421 bool find = std::find(pm->not_support_bed_types.begin(), pm->not_support_bed_types.end(), item) != pm->not_support_bed_types.end();
422 if (!find) {
423 m_bed_type_choice->AppendString(_L(item));
424 m_cur_combox_bed_types.emplace_back(BedType(index));
425 }
426 }
427
428 } else {
429 for (BedType i = btDefault; i < btCount; i = BedType(int(i) + 1)) {
431 }
432 }
433
434 auto &preset_bundle = *wxGetApp().preset_bundle;
435 const auto &printer_config = preset_bundle.printers.get_edited_preset().config;
436 m_bed_type_choice->Enable(preset_bundle.is_bbl_vendor() || printer_config.opt_bool("support_multi_bed_types"));
437
438 wxStaticText* m_bed_type_txt = new wxStaticText(this, wxID_ANY, _L("Bed type"));
439 m_bed_type_txt->SetFont(Label::Body_14);
440 top_sizer->Add(m_bed_type_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
441 top_sizer->Add(m_bed_type_choice, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
442
443 // Print Sequence
444 m_print_seq_choice = new ComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240),-1), 0, NULL, wxCB_READONLY );
445 m_print_seq_choice->Append(_L("Same as Global Print Sequence"));
446 for (auto i = PrintSequence::ByLayer; i < PrintSequence::ByDefault; i = PrintSequence(int(i) + 1)) {
448 }
449 wxStaticText* m_print_seq_txt = new wxStaticText(this, wxID_ANY, _L("Print sequence"));
450 m_print_seq_txt->SetFont(Label::Body_14);
451 top_sizer->Add(m_print_seq_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
452 top_sizer->Add(m_print_seq_choice, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
453
454 // Spiral mode
455 m_spiral_mode_choice = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240), -1), 0, NULL, wxCB_READONLY);
456 m_spiral_mode_choice->Append(_L("Same as Global"));
457 m_spiral_mode_choice->Append(_L("Enable"));
458 m_spiral_mode_choice->Append(_L("Disable"));
459 m_spiral_mode_choice->SetSelection(0);
460 wxStaticText* spiral_mode_txt = new wxStaticText(this, wxID_ANY, _L("Spiral vase"));
461 spiral_mode_txt->SetFont(Label::Body_14);
462 top_sizer->Add(spiral_mode_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
463 top_sizer->Add(m_spiral_mode_choice, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
464
465 // First layer filament sequence
466 m_first_layer_print_seq_choice = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240), -1), 0, NULL, wxCB_READONLY);
467 m_first_layer_print_seq_choice->Append(_L("Auto"));
468 m_first_layer_print_seq_choice->Append(_L("Customize"));
469 m_first_layer_print_seq_choice->SetSelection(0);
470 m_first_layer_print_seq_choice->Bind(wxEVT_COMBOBOX, [this](auto& e) {
471 if (e.GetSelection() == 0) {
472 m_drag_canvas->Hide();
473 }
474 else if (e.GetSelection() == 1) {
475 m_drag_canvas->Show();
476 }
477 Layout();
478 Fit();
479 });
480 wxStaticText* first_layer_txt = new wxStaticText(this, wxID_ANY, _L("First layer filament sequence"));
481 first_layer_txt->SetFont(Label::Body_14);
482 top_sizer->Add(first_layer_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
483 top_sizer->Add(m_first_layer_print_seq_choice, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
484
485 const std::vector<std::string> extruder_colours = wxGetApp().plater()->get_extruder_colors_from_plater_config();
486 std::vector<int> order(extruder_colours.size());
487 for (int i = 0; i < order.size(); i++) {
488 order[i] = i + 1;
489 }
490 m_drag_canvas = new DragCanvas(this, extruder_colours, order);
491 m_drag_canvas->Hide();
492 top_sizer->Add(0, 0, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT, 0);
493 top_sizer->Add(m_drag_canvas, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxBOTTOM, FromDIP(10));
494
495 m_sizer_main->Add(top_sizer, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, FromDIP(30));
496
497 // Other layer filament sequence
498 m_other_layers_seq_panel = new OtherLayersSeqPanel(this);
499 m_sizer_main->AddSpacer(FromDIP(5));
500 m_sizer_main->Add(m_other_layers_seq_panel, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
501
502 // A mixed-color slot resolves to a different physical filament per layer, so a user-defined
503 // filament order cannot be honoured; grey out the choice and explain that in the dialog.
504 {
505 auto &proj_cfg = wxGetApp().preset_bundle->project_config;
506 auto *is_mixed_opt = proj_cfg.option<ConfigOptionBools>("filament_is_mixed");
507 if (is_mixed_opt && Slic3r::has_any_mixed_filament(is_mixed_opt->values)) {
508 m_first_layer_print_seq_choice->Enable(false);
509 m_other_layers_seq_panel->enable_seq_choice(false);
510
511 auto *warn_sizer = new wxBoxSizer(wxHORIZONTAL);
512 auto *warn_icon = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("warning", this, 16),
513 wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)));
514 auto *warn_text = new wxStaticText(this, wxID_ANY,
515 _L("The filament list contains mixed filaments. Custom filament sequence will not take effect."));
516 warn_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#FF6F00")));
517 warn_text->SetFont(Label::Body_12);
518 warn_text->Wrap(FromDIP(300));
519
520 warn_sizer->Add(warn_icon, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(5));
521 warn_sizer->Add(warn_text, 1, wxALIGN_CENTER_VERTICAL, 0);
522 m_sizer_main->AddSpacer(FromDIP(5));
523 m_sizer_main->Add(warn_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
524 }
525 }
526
527 auto dlg_btns = new DialogButtons(this, {"OK", "Cancel"});
528
529 dlg_btns->GetOK()->Bind(wxEVT_BUTTON, [this](auto& e) {
530 wxCommandEvent evt(EVT_SET_BED_TYPE_CONFIRM, GetId());
531 static_cast<wxEvtHandler*>(m_other_layers_seq_panel)->ProcessEvent(evt);
532 GetEventHandler()->ProcessEvent(evt);
533 if (evt.GetString() == "Invalid")
534 return;
535 if (this->IsModal())
536 EndModal(wxID_YES);
537 else
538 this->Close();
539 });
540
541 dlg_btns->GetCANCEL()->Bind(wxEVT_BUTTON, [this](auto& e) {
542 if (this->IsModal())
543 EndModal(wxID_NO);
544 else
545 this->Close();
546 });
547
548 m_sizer_main->AddSpacer(FromDIP(20));
549 m_sizer_main->Add(dlg_btns, 0, wxEXPAND);
550
551 SetSizer(m_sizer_main);
552 Layout();
553 m_sizer_main->Fit(this);
554
555 CenterOnParent();
556
557 wxGetApp().UpdateDlgDarkUI(this);
558
559 if (only_layer_seq) {
560 for (auto item : top_sizer->GetChildren()) {
561 if (item->GetWindow())
562 item->GetWindow()->Show(false);
563 }
564 first_layer_txt->Show();
566 m_drag_canvas->Show();
568 Layout();
569 Fit();
570 }
571}
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
#define style
Definition WipeTowerDialog.cpp:101
static wxFont Body_12
Definition Label.hpp:55
static wxFont Body_14
Definition Label.hpp:53
const ConfigOptionDef * get(const t_config_option_key &opt_key) const
Definition Config.hpp:2662
bool opt_bool(const t_config_option_key &opt_key) const
Definition Config.hpp:3072
void EndModal(int retCode) override
Definition GUI_Utils.hpp:305
wxString to_bed_type_name(BedType bed_type)
Definition PlateSettingsDialog.cpp:644
TextInput * m_ti_plate_name
Definition PlateSettingsDialog.hpp:187
ComboBox * m_spiral_mode_choice
Definition PlateSettingsDialog.hpp:184
ComboBox * m_bed_type_choice
Definition PlateSettingsDialog.hpp:180
DragCanvas * m_drag_canvas
Definition PlateSettingsDialog.hpp:185
wxString to_print_sequence_name(PrintSequence print_seq)
Definition PlateSettingsDialog.cpp:656
OtherLayersSeqPanel * m_other_layers_seq_panel
Definition PlateSettingsDialog.hpp:186
ComboBox * m_print_seq_choice
Definition PlateSettingsDialog.hpp:182
ComboBox * m_first_layer_print_seq_choice
Definition PlateSettingsDialog.hpp:183
std::vector< BedType > m_cur_combox_bed_types
Definition PlateSettingsDialog.hpp:181
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
static DynamicPrintConfig & printer_config()
Definition GUI_ObjectList.cpp:131
bool has_any_mixed_filament(const std::vector< unsigned char > &is_mixed)
Definition FilamentMixer.cpp:486
BedType
Definition PrintConfig.hpp:507
@ btDefault
Definition PrintConfig.hpp:508
@ btCount
Definition PrintConfig.hpp:515
PrintSequence
Definition PrintConfig.hpp:310
@ ByDefault
Definition PrintConfig.hpp:313
@ ByLayer
Definition PrintConfig.hpp:311
const PrintConfigDef print_config_def
Definition PrintConfig.cpp:10099
ConfigOptionBoolsTempl< false > ConfigOptionBools
Definition Config.hpp:2066
RaycastManager::TrItems::iterator find(RaycastManager::TrItems &items, const RaycastManager::TrKey &key)
Definition RaycastManager.cpp:298
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, Label::Body_12, Label::Body_14, Slic3r::btCount, Slic3r::btDefault, Slic3r::ByDefault, Slic3r::ByLayer, create_scaled_bitmap(), StateColor::darkModeColorFor(), Slic3r::GUI::DPIDialog::EndModal(), Slic3r::ConfigOptionDef::enum_labels, Slic3r::GUI::DialogButtons::GetOK(), Slic3r::has_any_mixed_filament(), m_bed_type_choice, m_cur_combox_bed_types, m_drag_canvas, m_first_layer_print_seq_choice, m_other_layers_seq_panel, m_print_seq_choice, m_spiral_mode_choice, m_ti_plate_name, Slic3r::print_config_def, Slic3r::GUI::printer_config(), style, to_bed_type_name(), to_print_sequence_name(), and wxStaticText.

Here is the call graph for this function:

◆ ~PlateSettingsDialog()

Slic3r::GUI::PlateSettingsDialog::~PlateSettingsDialog ( )
574{
575
576}

Member Function Documentation

◆ add_layers()

void Slic3r::GUI::PlateSettingsDialog::add_layers ( )
protected

◆ delete_layers()

void Slic3r::GUI::PlateSettingsDialog::delete_layers ( )
protected

◆ em_unit()

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

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

Here is the caller graph for this function:

◆ enable_force_rescale()

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

◆ EndModal()

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

References Slic3r::GUI::dialogStack.

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

◆ force_rescale()

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

◆ get_bed_type_choice()

BedType Slic3r::GUI::PlateSettingsDialog::get_bed_type_choice ( )
679{
680 if (m_bed_type_choice != nullptr) {
681 int choice = m_bed_type_choice->GetSelection();
682 if (choice > 0) {
683 return m_cur_combox_bed_types[choice - 1];//-1 because same as globlal
684 }
685 }
686 return BedType::btDefault;
687};

References Slic3r::btDefault, m_bed_type_choice, and m_cur_combox_bed_types.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_first_layer_print_seq()

std::vector< int > Slic3r::GUI::PlateSettingsDialog::get_first_layer_print_seq ( )
690{
691 return m_drag_canvas->get_shape_list_order();
692}

References m_drag_canvas.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_first_layer_print_seq_choice()

int Slic3r::GUI::PlateSettingsDialog::get_first_layer_print_seq_choice ( )
inline
138 {
139 int choice = 0;
140 if (m_first_layer_print_seq_choice != nullptr)
141 choice = m_first_layer_print_seq_choice->GetSelection();
142 return choice;
143 };

References m_first_layer_print_seq_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_other_layers_print_seq_choice()

int Slic3r::GUI::PlateSettingsDialog::get_other_layers_print_seq_choice ( )
inline
145 {
147 return m_other_layers_seq_panel->get_layers_print_seq_choice();
148 return 0;
149 };

References m_other_layers_seq_panel.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_other_layers_print_seq_infos()

std::vector< LayerPrintSequence > Slic3r::GUI::PlateSettingsDialog::get_other_layers_print_seq_infos ( )
inline
153 {
154 const std::vector<LayerSeqInfo>& layer_seq_infos = m_other_layers_seq_panel->get_layers_print_seq_infos();
155 std::vector<LayerPrintSequence> result;
156 result.reserve(layer_seq_infos.size());
157 for (int i = 0; i < layer_seq_infos.size(); i++) {
158 LayerPrintSequence item = std::make_pair(std::make_pair(layer_seq_infos[i].begin_layer_number, layer_seq_infos[i].end_layer_number), layer_seq_infos[i].print_sequence);
159 result.push_back(item);
160 }
161 return result;
162 }
zaa_minimize_perimeter_height print_sequence((ConfigOptionEnum< PrintOrder >, print_order))((ConfigOptionInts
std::pair< std::pair< int, int >, std::vector< int > > LayerPrintSequence
Definition ParameterUtils.hpp:11

References m_other_layers_seq_panel, and Slic3r::print_sequence().

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

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

◆ get_plate_name()

wxString Slic3r::GUI::PlateSettingsDialog::get_plate_name ( ) const
672 {
673 return m_ti_plate_name->GetTextCtrl()->GetValue();
674}

References m_ti_plate_name.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_print_seq_choice()

int Slic3r::GUI::PlateSettingsDialog::get_print_seq_choice ( )
inline
126 {
127 int choice = 0;
128 if (m_print_seq_choice != nullptr)
129 choice = m_print_seq_choice->GetSelection();
130 return choice;
131 }

References m_print_seq_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ get_spiral_mode()

bool Slic3r::GUI::PlateSettingsDialog::get_spiral_mode ( )
inline
171 {
172 return false;
173 }

◆ get_spiral_mode_choice()

int Slic3r::GUI::PlateSettingsDialog::get_spiral_mode_choice ( )
inline
164 {
165 int choice = 0;
166 if (m_spiral_mode_choice != nullptr)
167 choice = m_spiral_mode_choice->GetSelection();
168 return choice;
169 };

References m_spiral_mode_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ is_new_scale_factor()

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

◆ normal_font()

◆ on_dpi_changed()

void Slic3r::GUI::PlateSettingsDialog::on_dpi_changed ( const wxRect & suggested_rect)
overridevirtual

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

669{
670}

◆ on_sys_color_changed()

◆ prev_scale_factor()

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

◆ rescale()

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

◆ scale_factor()

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

◆ set_em_unit()

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

◆ set_plate_name()

void Slic3r::GUI::PlateSettingsDialog::set_plate_name ( const wxString & name)
676{ m_ti_plate_name->GetTextCtrl()->SetValue(name); }

References m_ti_plate_name.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ set_prev_scale_factor()

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

◆ set_scale_factor()

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

◆ ShowModal()

◆ sync_bed_type()

void Slic3r::GUI::PlateSettingsDialog::sync_bed_type ( BedType type)
579{
580 if (m_bed_type_choice != nullptr) {
581 for (int i = 0; i < m_cur_combox_bed_types.size(); i++) {
582 if (m_cur_combox_bed_types[i] == type) {
583 m_bed_type_choice->SetSelection(i + 1);//+1 because same as global
584 return;
585 }
586 }
587 m_bed_type_choice->SetSelection(0);
588 }
589}

References m_bed_type_choice, and m_cur_combox_bed_types.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ sync_first_layer_print_seq()

void Slic3r::GUI::PlateSettingsDialog::sync_first_layer_print_seq ( int selection,
const std::vector< int > & seq = std::vector<int>() )
599{
600 if (m_first_layer_print_seq_choice != nullptr) {
601 if (selection == 1) {
602 const std::vector<std::string> extruder_colours = wxGetApp().plater()->get_extruder_colors_from_plater_config();
603 m_drag_canvas->set_shape_list(extruder_colours, seq);
604 }
605 m_first_layer_print_seq_choice->SetSelection(selection);
606
607 wxCommandEvent event(wxEVT_COMBOBOX);
608 event.SetInt(selection);
609 event.SetEventObject(m_first_layer_print_seq_choice);
610 wxPostEvent(m_first_layer_print_seq_choice, event);
611 }
612}

References m_drag_canvas, and m_first_layer_print_seq_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ sync_other_layers_print_seq()

void Slic3r::GUI::PlateSettingsDialog::sync_other_layers_print_seq ( int selection,
const std::vector< LayerPrintSequence > & seq )
614 {
615 if (selection == 1) {
616 std::vector<LayerSeqInfo> sequences;
617 sequences.reserve(seq.size());
618 for (int i = 0; i < seq.size(); i++) {
619 LayerSeqInfo info{ seq[i].first.first, seq[i].first.second, seq[i].second };
620 sequences.push_back(info);
621 }
622 m_other_layers_seq_panel->sync_layers_print_seq(selection, sequences);
623 }
624 else {
625 m_other_layers_seq_panel->sync_layers_print_seq(selection, {});
626 }
627}

References m_other_layers_seq_panel.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ sync_print_seq()

void Slic3r::GUI::PlateSettingsDialog::sync_print_seq ( int print_seq = 0)
592{
593 if (m_print_seq_choice != nullptr) {
594 m_print_seq_choice->SetSelection(print_seq);
595 }
596}

References m_print_seq_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ sync_spiral_mode()

void Slic3r::GUI::PlateSettingsDialog::sync_spiral_mode ( bool spiral_mode,
bool as_global )
630{
632 if (as_global) {
633 m_spiral_mode_choice->SetSelection(0);
634 }
635 else {
636 if (spiral_mode)
637 m_spiral_mode_choice->SetSelection(1);
638 else
639 m_spiral_mode_choice->SetSelection(2);
640 }
641 }
642}

References m_spiral_mode_choice.

Referenced by Slic3r::GUI::Plater::open_platesettings_dialog().

Here is the caller graph for this function:

◆ to_bed_type_name()

wxString Slic3r::GUI::PlateSettingsDialog::to_bed_type_name ( BedType bed_type)
644 {
645 switch (bed_type) {
646 case btDefault:
647 return _L("Same as Global Plate Type");
648 default: {
649 const ConfigOptionDef *bed_type_def = print_config_def.get("curr_bed_type");
650 return _(bed_type_def->enum_labels[size_t(bed_type) - 1]);
651 }
652 }
653 return _L("Same as Global Plate Type");
654}
#define _(s)
Definition 3mf.cpp:306

References _, _L, Slic3r::btDefault, Slic3r::ConfigOptionDef::enum_labels, and Slic3r::print_config_def.

Referenced by PlateSettingsDialog().

Here is the caller graph for this function:

◆ to_print_sequence_name()

wxString Slic3r::GUI::PlateSettingsDialog::to_print_sequence_name ( PrintSequence print_seq)
656 {
657 switch (print_seq) {
659 return _L("By Layer");
661 return _L("By Object");
662 default:
663 return _L("By Layer");
664 }
665 return _L("By Layer");
666}
@ ByObject
Definition PrintConfig.hpp:312

References _L, Slic3r::ByLayer, and Slic3r::ByObject.

Referenced by PlateSettingsDialog().

Here is the caller graph for this function:

◆ update_em_unit()

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

Member Data Documentation

◆ m_bed_type_choice

ComboBox* Slic3r::GUI::PlateSettingsDialog::m_bed_type_choice { nullptr }
protected
180{ nullptr };

Referenced by PlateSettingsDialog(), get_bed_type_choice(), and sync_bed_type().

◆ m_can_rescale

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

◆ m_cur_combox_bed_types

std::vector<BedType> Slic3r::GUI::PlateSettingsDialog::m_cur_combox_bed_types
protected

◆ m_drag_canvas

DragCanvas* Slic3r::GUI::PlateSettingsDialog::m_drag_canvas
protected

◆ m_em_unit

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

◆ m_first_layer_print_seq_choice

ComboBox* Slic3r::GUI::PlateSettingsDialog::m_first_layer_print_seq_choice { nullptr }
protected

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

OtherLayersSeqPanel* Slic3r::GUI::PlateSettingsDialog::m_other_layers_seq_panel
protected

◆ m_prev_scale_factor

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

◆ m_print_seq_choice

ComboBox* Slic3r::GUI::PlateSettingsDialog::m_print_seq_choice { nullptr }
protected
182{ nullptr };

Referenced by PlateSettingsDialog(), get_print_seq_choice(), and sync_print_seq().

◆ m_scale_factor

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

◆ m_spiral_mode_choice

ComboBox* Slic3r::GUI::PlateSettingsDialog::m_spiral_mode_choice { nullptr }
protected

◆ m_ti_plate_name

TextInput* Slic3r::GUI::PlateSettingsDialog::m_ti_plate_name
protected

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