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

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

Inheritance diagram for Slic3r::GUI::CalibrationPAStartPage:
Collaboration diagram for Slic3r::GUI::CalibrationPAStartPage:

Public Member Functions

 CalibrationPAStartPage (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
void create_page (wxWindow *parent)
void on_reset_page () override
void on_device_connected (MachineObject *obj) override
void msw_rescale () override
CaliPageType get_page_type ()
CalibrationWizardPage * get_prev_page ()
CalibrationWizardPage * get_next_page ()
void set_prev_page (CalibrationWizardPage *prev)
void set_next_page (CalibrationWizardPage *next)
CalibrationWizardPage * chain (CalibrationWizardPage *next)
virtual void update (MachineObject *obj)
virtual void set_cali_filament_mode (CalibrationFilamentMode mode)
virtual void set_cali_method (CalibrationMethod method)
virtual void on_sys_color_changed ()

Protected Member Functions

void create_when (wxWindow *parent, wxString title, wxString content)
void create_about (wxWindow *parent, wxString title, wxString content)
void create_bitmap (wxWindow *parent, const wxBitmap &before_img, const wxBitmap &after_img)
void create_bitmap (wxWindow *parent, std::string before_img, std::string after_img)
void create_bitmap (wxWindow *parent, std::string img)

Protected Attributes

CalibMode m_cali_mode
wxBoxSizer * m_top_sizer { nullptr }
wxBoxSizer * m_images_sizer { nullptr }
Label * m_when_title { nullptr }
Label * m_when_content { nullptr }
Label * m_about_title { nullptr }
Label * m_about_content { nullptr }
wxStaticBitmap * m_before_bmp { nullptr }
wxStaticBitmap * m_after_bmp { nullptr }
wxStaticBitmap * m_bmp_intro { nullptr }
PAPageHelpPanel * m_help_panel { nullptr }
CaliPageType m_page_type
CalibrationFilamentMode m_cali_filament_mode
CalibrationMethod m_cali_method { CalibrationMethod::CALI_METHOD_MANUAL }
MachineObject * curr_obj { nullptr }
wxWindow * m_parent { nullptr }
CaliPageCaption * m_page_caption { nullptr }
CaliPageActionPanel * m_action_panel { nullptr }
Label * m_statictext_printer_msg { nullptr }

Private Attributes

CalibrationWizardPage * m_prev_page {nullptr}
CalibrationWizardPage * m_next_page {nullptr}

Detailed Description

Constructor & Destructor Documentation

◆ CalibrationPAStartPage()

Slic3r::GUI::CalibrationPAStartPage::CalibrationPAStartPage ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxTAB_TRAVERSAL )
87 : CalibrationStartPage(parent, id, pos, size, style)
88{
91
92 create_page(this);
93
94 this->SetSizer(m_top_sizer);
95 Layout();
96 m_top_sizer->Fit(this);
97}
#define style
Definition WipeTowerDialog.cpp:101
void create_page(wxWindow *parent)
Definition CalibrationWizardStartPage.cpp:99
CalibrationStartPage(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
Definition CalibrationWizardStartPage.cpp:19
wxBoxSizer * m_top_sizer
Definition CalibrationWizardStartPage.hpp:30
CaliPageType m_page_type
Definition CalibrationWizardPage.hpp:338
CalibMode m_cali_mode
Definition CalibrationWizardPage.hpp:337
@ CALI_PAGE_START
Definition CalibrationWizardPage.hpp:82
@ Calib_PA_Line
Definition calib.hpp:25

References Slic3r::GUI::CalibrationStartPage::CalibrationStartPage(), Slic3r::GUI::CALI_PAGE_START, Slic3r::Calib_PA_Line, create_page(), Slic3r::GUI::CalibrationStartPage::m_cali_mode, Slic3r::GUI::CalibrationWizardPage::m_page_type, Slic3r::GUI::CalibrationStartPage::m_top_sizer, and style.

Here is the call graph for this function:

Member Function Documentation

◆ chain()

CalibrationWizardPage * Slic3r::GUI::CalibrationWizardPage::chain ( CalibrationWizardPage * next)
inlineinherited
313 {
314 set_next_page(next);
315 next->set_prev_page(this);
316 return next;
317 }
void set_next_page(CalibrationWizardPage *next)
Definition CalibrationWizardPage.hpp:311

References CalibrationWizardPage(), set_next_page(), and set_prev_page().

Here is the call graph for this function:

◆ create_about()

void Slic3r::GUI::CalibrationStartPage::create_about ( wxWindow * parent,
wxString title,
wxString content )
protectedinherited
39{
40 m_about_title = new Label(this, title);
44
45 m_about_content = new Label(this, content);
49}
#define CALIBRATION_START_PAGE_TEXT_MAX_LENGTH
Definition CalibrationWizardStartPage.cpp:18
static wxFont Head_14
Definition Label.hpp:45
static wxFont Body_14
Definition Label.hpp:53
Label * m_about_content
Definition CalibrationWizardStartPage.hpp:35
Label * m_about_title
Definition CalibrationWizardStartPage.hpp:34

References Label::Body_14, CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, Label::Head_14, m_about_content, and m_about_title.

Referenced by Slic3r::GUI::CalibrationFlowRateStartPage::create_page(), and Slic3r::GUI::CalibrationPAStartPage::create_page().

Here is the caller graph for this function:

◆ create_bitmap() [1/3]

void Slic3r::GUI::CalibrationStartPage::create_bitmap ( wxWindow * parent,
const wxBitmap & before_img,
const wxBitmap & after_img )
protectedinherited
52{
53 if (!m_before_bmp)
54 m_before_bmp = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
55 m_before_bmp->SetBitmap(before_img);
56 if (!m_after_bmp)
57 m_after_bmp = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
58 m_after_bmp->SetBitmap(after_img);
59 if (!m_images_sizer) {
60 m_images_sizer = new wxBoxSizer(wxHORIZONTAL);
61 m_images_sizer->Add(m_before_bmp, 0, wxALL, 0);
62 m_images_sizer->AddSpacer(FromDIP(20));
63 m_images_sizer->Add(m_after_bmp, 0, wxALL, 0);
64 }
65}
wxStaticBitmap * m_after_bmp
Definition CalibrationWizardStartPage.hpp:37
wxStaticBitmap * m_before_bmp
Definition CalibrationWizardStartPage.hpp:36
wxBoxSizer * m_images_sizer
Definition CalibrationWizardStartPage.hpp:31

References m_after_bmp, m_before_bmp, and m_images_sizer.

Referenced by create_bitmap(), Slic3r::GUI::CalibrationFlowRateStartPage::create_page(), Slic3r::GUI::CalibrationMaxVolumetricSpeedStartPage::create_page(), Slic3r::GUI::CalibrationPAStartPage::create_page(), Slic3r::GUI::CalibrationFlowRateStartPage::msw_rescale(), Slic3r::GUI::CalibrationMaxVolumetricSpeedStartPage::msw_rescale(), and Slic3r::GUI::CalibrationPAStartPage::msw_rescale().

Here is the caller graph for this function:

◆ create_bitmap() [2/3]

void Slic3r::GUI::CalibrationStartPage::create_bitmap ( wxWindow * parent,
std::string before_img,
std::string after_img )
protectedinherited
68{
69 wxBitmap before_bmp = create_scaled_bitmap(before_img, this, 350);
70 wxBitmap after_bmp = create_scaled_bitmap(after_img, this, 350);
71
72 create_bitmap(parent, before_bmp, after_bmp);
73}
void create_bitmap(wxWindow *parent, const wxBitmap &before_img, const wxBitmap &after_img)
Definition CalibrationWizardStartPage.cpp:51
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 create_bitmap(), and create_scaled_bitmap().

Here is the call graph for this function:

◆ create_bitmap() [3/3]

void Slic3r::GUI::CalibrationStartPage::create_bitmap ( wxWindow * parent,
std::string img )
protectedinherited
75 {
76 wxBitmap before_bmp = create_scaled_bitmap(img, this, 350);
77 if (!m_bmp_intro)
78 m_bmp_intro = new wxStaticBitmap(parent, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
79 m_bmp_intro->SetBitmap(before_bmp);
80 if (!m_images_sizer) {
81 m_images_sizer = new wxBoxSizer(wxHORIZONTAL);
82 m_images_sizer->Add(m_bmp_intro, 0, wxALL, 0);
83 }
84}
wxStaticBitmap * m_bmp_intro
Definition CalibrationWizardStartPage.hpp:38

References create_scaled_bitmap(), m_bmp_intro, and m_images_sizer.

Here is the call graph for this function:

◆ create_page()

void Slic3r::GUI::CalibrationPAStartPage::create_page ( wxWindow * parent)
100{
101 m_page_caption = new CaliPageCaption(parent, CalibMode::Calib_PA_Line);
102 m_page_caption->show_prev_btn(false);
103 m_top_sizer->Add(m_page_caption, 0, wxEXPAND, 0);
104 create_when(parent,
105 _L("When do you need Flow Dynamics Calibration"),
106 _L("We now have added the auto-calibration for different filaments, which is fully automated and the result will be saved into the printer for future use. "
107 "You only need to do the calibration in the following limited cases:\n"
108 "1. If you introduce a new filament of different brands/models or the filament is damp;\n"
109 "2. If the nozzle is worn out or replaced with a new one;\n"
110 "3. If the max volumetric speed or print temperature is changed in the filament setting."));
111
114 m_top_sizer->AddSpacer(PRESET_GAP);
115
116 if (wxGetApp().app_config->get_language_code() == "zh-cn") {
117 create_bitmap(parent, "cali_page_before_pa_CN", "cali_page_after_pa_CN");
118 } else {
119 create_bitmap(parent, "cali_page_before_pa", "cali_page_after_pa");
120 }
121 m_top_sizer->Add(m_images_sizer, 0, wxALL, 0);
122 m_top_sizer->AddSpacer(PRESET_GAP);
123
124 m_help_panel = new PAPageHelpPanel(parent, false);
125 m_top_sizer->Add(m_help_panel, 0, wxALL, 0);
126 m_top_sizer->AddSpacer(PRESET_GAP);
127
128 create_about(parent,
129 _L("About this calibration"),
130 _L("Please find the details of Flow Dynamics Calibration from our wiki.\n\nUsually the calibration is unnecessary. When you start a single color/material print, with the \"flow dynamics calibration\" option checked in the print start menu, the printer will follow the old way, calibrate the filament before the print; When you start a multi color/material print, the printer will use the default compensation parameter for the filament during every filament switch which will have a good result in most cases.\n\nPlease note that there are a few cases that can make the calibration results unreliable, such as insufficient adhesion on the build plate. Improving adhesion can be achieved by washing the build plate or applying glue. For more information on this topic, please refer to our Wiki.\n\nThe calibration results have about 10 percent jitter in our test, which may cause the result not exactly the same in each calibration. We are still investigating the root cause to do improvements with new updates."));
133 m_top_sizer->AddSpacer(PRESET_GAP);
134
136
137 m_top_sizer->Add(m_action_panel, 0, wxEXPAND, 0);
138
139#ifdef __linux__
140 wxGetApp().CallAfter([this]() {
141 m_when_content->SetMinSize(m_when_content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
142 m_about_content->SetMinSize(m_about_content->GetSize() + wxSize{ 0, wxWindow::GetCharHeight() });
143 Layout();
144 Fit();
145 });
146#endif
147}
#define PRESET_GAP
Definition CalibrationWizardPage.hpp:34
#define _L(s)
Definition OBJ.cpp:34
Label * m_when_title
Definition CalibrationWizardStartPage.hpp:32
Label * m_when_content
Definition CalibrationWizardStartPage.hpp:33
void create_about(wxWindow *parent, wxString title, wxString content)
Definition CalibrationWizardStartPage.cpp:38
void create_when(wxWindow *parent, wxString title, wxString content)
Definition CalibrationWizardStartPage.cpp:25
PAPageHelpPanel * m_help_panel
Definition CalibrationWizardStartPage.hpp:39
CaliPageActionPanel * m_action_panel
Definition CalibrationWizardPage.hpp:345
CaliPageCaption * m_page_caption
Definition CalibrationWizardPage.hpp:344

References _L, Slic3r::GUI::CALI_PAGE_START, Slic3r::Calib_PA_Line, Slic3r::GUI::CalibrationStartPage::create_about(), Slic3r::GUI::CalibrationStartPage::create_bitmap(), Slic3r::GUI::CalibrationStartPage::create_when(), Slic3r::GUI::CalibrationStartPage::m_about_content, Slic3r::GUI::CalibrationStartPage::m_about_title, Slic3r::GUI::CalibrationWizardPage::m_action_panel, Slic3r::GUI::CalibrationStartPage::m_help_panel, Slic3r::GUI::CalibrationStartPage::m_images_sizer, Slic3r::GUI::CalibrationWizardPage::m_page_caption, Slic3r::GUI::CalibrationStartPage::m_top_sizer, Slic3r::GUI::CalibrationStartPage::m_when_content, Slic3r::GUI::CalibrationStartPage::m_when_title, and PRESET_GAP.

Referenced by CalibrationPAStartPage().

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

◆ create_when()

void Slic3r::GUI::CalibrationStartPage::create_when ( wxWindow * parent,
wxString title,
wxString content )
protectedinherited

References Label::Body_14, CALIBRATION_START_PAGE_TEXT_MAX_LENGTH, Label::Head_14, m_when_content, and m_when_title.

Referenced by Slic3r::GUI::CalibrationFlowRateStartPage::create_page(), Slic3r::GUI::CalibrationMaxVolumetricSpeedStartPage::create_page(), and Slic3r::GUI::CalibrationPAStartPage::create_page().

Here is the caller graph for this function:

◆ get_next_page()

CalibrationWizardPage * Slic3r::GUI::CalibrationWizardPage::get_next_page ( )
inlineinherited
309{ return m_next_page; }
CalibrationWizardPage * m_next_page
Definition CalibrationWizardPage.hpp:350

References CalibrationWizardPage(), and m_next_page.

Here is the call graph for this function:

◆ get_page_type()

CaliPageType Slic3r::GUI::CalibrationWizardPage::get_page_type ( )
inlineinherited
306{ return m_page_type; }

References m_page_type.

Referenced by Slic3r::GUI::CalibrationWizard::on_cali_go_home().

Here is the caller graph for this function:

◆ get_prev_page()

CalibrationWizardPage * Slic3r::GUI::CalibrationWizardPage::get_prev_page ( )
inlineinherited
308{ return m_prev_page; }
CalibrationWizardPage * m_prev_page
Definition CalibrationWizardPage.hpp:349

References CalibrationWizardPage(), and m_prev_page.

Here is the call graph for this function:

◆ msw_rescale()

void Slic3r::GUI::CalibrationPAStartPage::msw_rescale ( )
overridevirtual

Reimplemented from Slic3r::GUI::CalibrationWizardPage.

198{
200 m_help_panel->msw_rescale();
201 if (wxGetApp().app_config->get_language_code() == "zh-cn") {
202 create_bitmap(this, "cali_page_before_pa_CN", "cali_page_after_pa_CN");
203 } else {
204 create_bitmap(this, "cali_page_before_pa", "cali_page_after_pa");
205 }
206}
virtual void msw_rescale()
Definition CalibrationWizardPage.cpp:997

References Slic3r::GUI::CalibrationStartPage::create_bitmap(), Slic3r::GUI::CalibrationStartPage::m_help_panel, and Slic3r::GUI::CalibrationWizardPage::msw_rescale().

Here is the call graph for this function:

◆ on_device_connected()

void Slic3r::GUI::CalibrationPAStartPage::on_device_connected ( MachineObject * obj)
overridevirtual

Reimplemented from Slic3r::GUI::CalibrationWizardPage.

157{
158 // enable all button
162
163 if (obj->get_printer_series() == PrinterSeries::SERIES_X1) {
167
168 if (obj->cali_version <= -1) {
172 }
173 else {
177 }
178
179
180 if (!obj->is_support_pa_calibration) {
182 }
183 }
184 else if (obj->get_printer_series() == PrinterSeries::SERIES_P1P || obj->get_printer_arch() == PrinterArch::ARCH_I3) {
185 if (obj->cali_version >= 0) {
188 }
189 else
194 }
195}
@ ARCH_I3
Definition DevDefs.h:30
@ SERIES_P1P
Definition DevDefs.h:36
@ SERIES_X1
Definition DevDefs.h:35
@ CALI_ACTION_AUTO_CALI
Definition CalibrationWizardPage.hpp:225
@ CALI_ACTION_MANUAL_CALI
Definition CalibrationWizardPage.hpp:224
@ CALI_ACTION_MANAGE_RESULT
Definition CalibrationWizardPage.hpp:223

References ARCH_I3, Slic3r::GUI::CALI_ACTION_AUTO_CALI, Slic3r::GUI::CALI_ACTION_MANAGE_RESULT, Slic3r::GUI::CALI_ACTION_MANUAL_CALI, Slic3r::MachineObject::cali_version, Slic3r::MachineObject::get_printer_arch(), Slic3r::MachineObject::get_printer_series(), Slic3r::MachineObject::is_support_pa_calibration, Slic3r::GUI::CalibrationWizardPage::m_action_panel, SERIES_P1P, and SERIES_X1.

Here is the call graph for this function:

◆ on_reset_page()

◆ on_sys_color_changed()

void Slic3r::GUI::CalibrationWizardPage::on_sys_color_changed ( )
virtualinherited

Reimplemented in Slic3r::GUI::CalibrationPresetPage.

1004{
1005 m_page_caption->on_sys_color_changed();
1006}

References m_page_caption.

Referenced by Slic3r::GUI::CalibrationPresetPage::on_sys_color_changed().

Here is the caller graph for this function:

◆ set_cali_filament_mode()

virtual void Slic3r::GUI::CalibrationWizardPage::set_cali_filament_mode ( CalibrationFilamentMode mode)
inlinevirtualinherited

Reimplemented in Slic3r::GUI::CalibrationPresetPage.

325 {
327 }
CalibrationFilamentMode m_cali_filament_mode
Definition CalibrationWizardPage.hpp:339

References m_cali_filament_mode.

Referenced by Slic3r::GUI::CalibrationPresetPage::set_cali_filament_mode().

Here is the caller graph for this function:

◆ set_cali_method()

virtual void Slic3r::GUI::CalibrationWizardPage::set_cali_method ( CalibrationMethod method)
inlinevirtualinherited

Reimplemented in Slic3r::GUI::CalibrationCaliPage, Slic3r::GUI::CalibrationPASavePage, and Slic3r::GUI::CalibrationPresetPage.

329 {
330 m_cali_method = method;
331 }
CalibrationMethod m_cali_method
Definition CalibrationWizardPage.hpp:340

References m_cali_method.

Referenced by Slic3r::GUI::CalibrationPASavePage::set_cali_method(), and Slic3r::GUI::CalibrationPresetPage::set_cali_method().

Here is the caller graph for this function:

◆ set_next_page()

void Slic3r::GUI::CalibrationWizardPage::set_next_page ( CalibrationWizardPage * next)
inlineinherited
311{ m_next_page = next; }

References CalibrationWizardPage(), and m_next_page.

Referenced by chain().

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

◆ set_prev_page()

void Slic3r::GUI::CalibrationWizardPage::set_prev_page ( CalibrationWizardPage * prev)
inlineinherited
310{ m_prev_page = prev; }

References CalibrationWizardPage(), and m_prev_page.

Referenced by chain().

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

◆ update()

virtual void Slic3r::GUI::CalibrationWizardPage::update ( MachineObject * obj)
inlinevirtualinherited

Reimplemented in Slic3r::GUI::CalibrationCaliPage, Slic3r::GUI::CalibrationPASavePage, and Slic3r::GUI::CalibrationPresetPage.

319{ curr_obj = obj; }
MachineObject * curr_obj
Definition CalibrationWizardPage.hpp:341

References curr_obj.

Referenced by Slic3r::GUI::CalibrationPASavePage::update().

Here is the caller graph for this function:

Member Data Documentation

◆ curr_obj

◆ m_about_content

Label* Slic3r::GUI::CalibrationStartPage::m_about_content { nullptr }
protectedinherited

◆ m_about_title

Label* Slic3r::GUI::CalibrationStartPage::m_about_title { nullptr }
protectedinherited

◆ m_action_panel

◆ m_after_bmp

wxStaticBitmap* Slic3r::GUI::CalibrationStartPage::m_after_bmp { nullptr }
protectedinherited
37{ nullptr };

Referenced by create_bitmap().

◆ m_before_bmp

wxStaticBitmap* Slic3r::GUI::CalibrationStartPage::m_before_bmp { nullptr }
protectedinherited
36{ nullptr };

Referenced by create_bitmap().

◆ m_bmp_intro

wxStaticBitmap* Slic3r::GUI::CalibrationStartPage::m_bmp_intro { nullptr }
protectedinherited
38{ nullptr };

Referenced by create_bitmap().

◆ m_cali_filament_mode

◆ m_cali_method

◆ m_cali_mode

◆ m_help_panel

PAPageHelpPanel* Slic3r::GUI::CalibrationStartPage::m_help_panel { nullptr }
protectedinherited

◆ m_images_sizer

◆ m_next_page

CalibrationWizardPage* Slic3r::GUI::CalibrationWizardPage::m_next_page {nullptr}
privateinherited
350{nullptr};

Referenced by get_next_page(), and set_next_page().

◆ m_page_caption

◆ m_page_type

◆ m_parent

wxWindow* Slic3r::GUI::CalibrationWizardPage::m_parent { nullptr }
protectedinherited
343{ nullptr };

Referenced by CalibrationWizardPage().

◆ m_prev_page

CalibrationWizardPage* Slic3r::GUI::CalibrationWizardPage::m_prev_page {nullptr}
privateinherited
349{nullptr};

Referenced by get_prev_page(), and set_prev_page().

◆ m_statictext_printer_msg

Label* Slic3r::GUI::CalibrationWizardPage::m_statictext_printer_msg { nullptr }
protectedinherited

◆ m_top_sizer

◆ m_when_content

◆ m_when_title


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