OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::SmartFilamentPanel Class Reference
Inheritance diagram for Slic3r::GUI::SmartFilamentPanel:
Collaboration diagram for Slic3r::GUI::SmartFilamentPanel:

Public Member Functions

 SmartFilamentPanel (wxWindow *parent)

Private Member Functions

void on_smart_filament_checkbox (wxCommandEvent &event)

Static Private Member Functions

static ConfigOptionBool * enable_filament_dynamic_map ()

Private Attributes

CheckBox * m_smart_filament_checkbox {nullptr}

Static Private Attributes

static constexpr int spacing = 20

Detailed Description

Constructor & Destructor Documentation

◆ SmartFilamentPanel()

Slic3r::GUI::SmartFilamentPanel::SmartFilamentPanel ( wxWindow * parent)
inline
72 : wxPanel(parent)
73 {
74 SetBackgroundColour(*wxWHITE);
75 wxBoxSizer *main_sizer = new wxBoxSizer(wxVERTICAL);
76
77 main_sizer->AddSpacer(FromDIP(spacing));
78
79 auto *separator = new wxPanel(this);
80 separator->SetBackgroundColour(wxColour("#EEEEEE"));
81 main_sizer->Add(separator, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(15));
82
83 main_sizer->AddSpacer(FromDIP(spacing));
84
85 m_smart_filament_checkbox = new CheckBox(this);
86 if (auto *opt = enable_filament_dynamic_map())
87 m_smart_filament_checkbox->SetValue(opt->value);
89
90 auto *label = new Label(this, _L("Enable smart filament assign: Assign one filament to multiple nozzles to maximize savings"));
91 label->SetFont(Label::Body_12);
92
93 // Orca: dropped the vendor "Learn more" tracking link (no Orca help page for this feature).
94
95 auto *smart_sizer = new wxBoxSizer(wxHORIZONTAL);
96 smart_sizer->Add(m_smart_filament_checkbox, 0, wxALIGN_CENTER_VERTICAL);
97 smart_sizer->Add(label, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(3));
98
99 main_sizer->Add(smart_sizer, 0, wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(15));
100
101 SetSizer(main_sizer);
102 Layout();
103 Fit();
104 wxGetApp().UpdateDarkUIWin(this);
105 }
#define _L(s)
Definition OBJ.cpp:34
static wxFont Body_12
Definition Label.hpp:55
void on_smart_filament_checkbox(wxCommandEvent &event)
Definition FilamentMapDialog.cpp:114
static ConfigOptionBool * enable_filament_dynamic_map()
Definition FilamentMapDialog.cpp:108
static constexpr int spacing
Definition FilamentMapDialog.cpp:69
CheckBox * m_smart_filament_checkbox
Definition FilamentMapDialog.cpp:123

References _L, Label::Body_12, enable_filament_dynamic_map(), m_smart_filament_checkbox, on_smart_filament_checkbox(), and spacing.

Here is the call graph for this function:

Member Function Documentation

◆ enable_filament_dynamic_map()

ConfigOptionBool * Slic3r::GUI::SmartFilamentPanel::enable_filament_dynamic_map ( )
inlinestaticprivate
109 {
110 auto &config = wxGetApp().preset_bundle->project_config;
111 return dynamic_cast<ConfigOptionBool *>(config.option("enable_filament_dynamic_map"));
112 }

Referenced by SmartFilamentPanel(), and on_smart_filament_checkbox().

Here is the caller graph for this function:

◆ on_smart_filament_checkbox()

void Slic3r::GUI::SmartFilamentPanel::on_smart_filament_checkbox ( wxCommandEvent & event)
inlineprivate
115 {
116 if (auto *opt = enable_filament_dynamic_map())
117 opt->value = m_smart_filament_checkbox->GetValue();
118 wxGetApp().plater()->update();
119 event.Skip();
120 }

References enable_filament_dynamic_map(), and m_smart_filament_checkbox.

Referenced by SmartFilamentPanel().

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

Member Data Documentation

◆ m_smart_filament_checkbox

CheckBox* Slic3r::GUI::SmartFilamentPanel::m_smart_filament_checkbox {nullptr}
private
123{nullptr};

Referenced by SmartFilamentPanel(), and on_smart_filament_checkbox().

◆ spacing

int Slic3r::GUI::SmartFilamentPanel::spacing = 20
staticconstexprprivate

Referenced by SmartFilamentPanel().


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