OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::PageTemperatures Struct Reference

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

Inheritance diagram for Slic3r::GUI::PageTemperatures:
Collaboration diagram for Slic3r::GUI::PageTemperatures:

Public Member Functions

 PageTemperatures (ConfigWizard *parent)
virtual void apply_custom_config (DynamicPrintConfig &config)
template<class T>
T * append (T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
wxStaticText * append_text (wxString text)
void append_spacer (int space)
ConfigWizard::priv * wizard_p () const
virtual void set_run_reason (ConfigWizard::RunReason run_reason)
virtual void on_activate ()

Public Attributes

wxSpinCtrlDouble * spin_extr
wxSpinCtrlDouble * spin_bed
ConfigWizard * parent
const wxString shortname
wxBoxSizer * content
const unsigned indent

Detailed Description

Constructor & Destructor Documentation

◆ PageTemperatures()

Slic3r::GUI::PageTemperatures::PageTemperatures ( ConfigWizard * parent)
1448 : ConfigWizardPage(parent, _L("Nozzle and Bed Temperatures"), _L("Temperatures"), 1)
1449 , spin_extr(new SpinCtrlDouble(this))
1450 , spin_bed (new SpinCtrlDouble(this))
1451{
1452 // BBS: FIXME
1453#if 0
1454 spin_extr->SetIncrement(5.0);
1455 const auto &def_extr = *print_config_def.get("nozzle_temperature");
1456 spin_extr->SetRange(def_extr.min, def_extr.max);
1457 auto *default_extr = def_extr.get_default_value<ConfigOptionInts>();
1458 spin_extr->SetValue(default_extr != nullptr && default_extr->size() > 0 ? default_extr->get_at(0) : 200);
1459
1460 spin_bed->SetIncrement(5.0);
1461 const auto &def_bed = *print_config_def.get("bed_temperature");
1462 spin_bed->SetRange(def_bed.min, def_bed.max);
1463 auto *default_bed = def_bed.get_default_value<ConfigOptionInts>();
1464 spin_bed->SetValue(default_bed != nullptr && default_bed->size() > 0 ? default_bed->get_at(0) : 0);
1465
1466 append_text(_L("Enter the nozzle temperature needed for extruding your filament."));
1467 append_text(_L("A rule of thumb is 160 to 230℃ for PLA, and 215 to 250℃ for ABS."));
1468#endif
1469
1470 auto *sizer_extr = new wxFlexGridSizer(3, 5, 5);
1471 auto *text_extr = new wxStaticText(this, wxID_ANY, _L("Extrusion Temperature:"));
1472 auto *unit_extr = new wxStaticText(this, wxID_ANY, _L("\u2103" /* °C */));
1473 sizer_extr->AddGrowableCol(0, 1);
1474 sizer_extr->Add(text_extr, 0, wxALIGN_CENTRE_VERTICAL);
1475 sizer_extr->Add(spin_extr);
1476 sizer_extr->Add(unit_extr, 0, wxALIGN_CENTRE_VERTICAL);
1477 append(sizer_extr);
1478
1480
1481 append_text(_L("Enter the bed temperature needed for getting your filament to stick to your heated bed."));
1482 append_text(_L("A rule of thumb is 60℃ for PLA and 110℃ for ABS. Leave zero if you have no heated bed."));
1483
1484 auto *sizer_bed = new wxFlexGridSizer(3, 5, 5);
1485 auto *text_bed = new wxStaticText(this, wxID_ANY, _L("Bed Temperature:"));
1486 auto *unit_bed = new wxStaticText(this, wxID_ANY, _L("\u2103" /* °C */));
1487 sizer_bed->AddGrowableCol(0, 1);
1488 sizer_bed->Add(text_bed, 0, wxALIGN_CENTRE_VERTICAL);
1489 sizer_bed->Add(spin_bed);
1490 sizer_bed->Add(unit_bed, 0, wxALIGN_CENTRE_VERTICAL);
1491 append(sizer_bed);
1492}
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
const ConfigOptionDef * get(const t_config_option_key &opt_key) const
Definition Config.hpp:2662
@ VERTICAL_SPACING
Definition ConfigWizard_private.hpp:57
const PrintConfigDef print_config_def
Definition PrintConfig.cpp:10099
ConfigOptionIntsTempl< false > ConfigOptionInts
Definition Config.hpp:1154
T * append(T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
Definition ConfigWizard_private.hpp:227
ConfigWizard * parent
Definition ConfigWizard_private.hpp:218
void append_spacer(int space)
Definition ConfigWizard.cpp:521
ConfigWizardPage(ConfigWizard *parent, wxString title, wxString shortname, unsigned indent=0)
Definition ConfigWizard.cpp:477
wxStaticText * append_text(wxString text)
Definition ConfigWizard.cpp:512
wxSpinCtrlDouble * spin_bed
Definition ConfigWizard_private.hpp:469
wxSpinCtrlDouble * spin_extr
Definition ConfigWizard_private.hpp:468

References Slic3r::GUI::ConfigWizardPage::ConfigWizardPage(), _L, Slic3r::GUI::ConfigWizardPage::append(), Slic3r::GUI::ConfigWizardPage::append_spacer(), Slic3r::GUI::ConfigWizardPage::append_text(), Slic3r::GUI::ConfigWizardPage::parent, Slic3r::print_config_def, spin_bed, spin_extr, Slic3r::GUI::VERTICAL_SPACING, and wxStaticText.

Here is the call graph for this function:

Member Function Documentation

◆ append()

template<class T>
T * Slic3r::GUI::ConfigWizardPage::append ( T * thing,
int proportion = 0,
int flag = wxEXPAND|wxTOP|wxBOTTOM,
int border = 10 )
inlineinherited
228 {
229 content->Add(thing, proportion, flag, border);
230 return thing;
231 }
wxBoxSizer * content
Definition ConfigWizard_private.hpp:220

References content.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageMaterials::PageMaterials(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageTemperatures::PageTemperatures(), Slic3r::GUI::PageWelcome::PageWelcome(), and append_text().

Here is the caller graph for this function:

◆ append_spacer()

void Slic3r::GUI::ConfigWizardPage::append_spacer ( int space)
inherited
522{
523 // FIXME: scaling
524 content->AddSpacer(space);
525}

References content.

Referenced by Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageMaterials::PageMaterials(), and Slic3r::GUI::PageTemperatures::PageTemperatures().

Here is the caller graph for this function:

◆ append_text()

wxStaticText * Slic3r::GUI::ConfigWizardPage::append_text ( wxString text)
inherited
513{
514 auto *widget = new wxStaticText(this, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
515 widget->Wrap(WRAP_WIDTH);
516 widget->SetMinSize(wxSize(WRAP_WIDTH, -1));
517 append(widget);
518 return widget;
519}
@ WRAP_WIDTH
Definition ConfigWizard_private.hpp:50

References append(), Slic3r::GUI::WRAP_WIDTH, and wxStaticText.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageTemperatures::PageTemperatures(), and Slic3r::GUI::PageWelcome::PageWelcome().

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

◆ apply_custom_config()

void Slic3r::GUI::PageTemperatures::apply_custom_config ( DynamicPrintConfig & config)
virtual

Reimplemented from Slic3r::GUI::ConfigWizardPage.

1495{
1496 // BBS
1497 /*
1498 auto* opt_extr = new ConfigOptionInts(1, spin_extr->GetValue());
1499 config.set_key_value("nozzle_temperature", opt_extr);
1500 auto* opt_extr1st = new ConfigOptionInts(1, spin_extr->GetValue());
1501 config.set_key_value("nozzle_temperature_initial_layer", opt_extr1st);
1502 auto* opt_bed = new ConfigOptionInts(1, spin_bed->GetValue());
1503 config.set_key_value("bed_temperature", opt_bed);
1504 auto* opt_bed1st = new ConfigOptionInts(1, spin_bed->GetValue());
1505 config.set_key_value("bed_temperature_initial_layer", opt_bed1st);
1506 */
1507}

◆ on_activate()

virtual void Slic3r::GUI::ConfigWizardPage::on_activate ( )
inlinevirtualinherited

Reimplemented in Slic3r::GUI::PageMaterials.

240{}

◆ set_run_reason()

virtual void Slic3r::GUI::ConfigWizardPage::set_run_reason ( ConfigWizard::RunReason run_reason)
inlinevirtualinherited

◆ wizard_p()

ConfigWizard::priv * Slic3r::GUI::ConfigWizardPage::wizard_p ( ) const
inlineinherited
236{ return parent->p.get(); }

References parent.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageMaterials::on_activate(), Slic3r::GUI::PageMaterials::select_material(), and Slic3r::GUI::PageMaterials::update_lists().

Here is the caller graph for this function:

Member Data Documentation

◆ content

wxBoxSizer* Slic3r::GUI::ConfigWizardPage::content
inherited

◆ indent

const unsigned Slic3r::GUI::ConfigWizardPage::indent
inherited

◆ parent

◆ shortname

◆ spin_bed

wxSpinCtrlDouble* Slic3r::GUI::PageTemperatures::spin_bed

Referenced by PageTemperatures().

◆ spin_extr

wxSpinCtrlDouble* Slic3r::GUI::PageTemperatures::spin_extr

Referenced by PageTemperatures().


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