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

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

Inheritance diagram for Slic3r::GUI::ElegooPrintHostSendDialog:
Collaboration diagram for Slic3r::GUI::ElegooPrintHostSendDialog:

Public Member Functions

 ElegooPrintHostSendDialog (const boost::filesystem::path &path, PrintHostPostUploadActions post_actions, const wxArrayString &groups, const wxArrayString &storage_paths, const wxArrayString &storage_names, bool switch_to_device_tab)
virtual void EndModal (int ret) override
int timeLapse () const
int heatedBedLeveling () const
BedType bedType () const
virtual void init () override
virtual std::map< std::string, std::string > extendedInfo () const override
boost::filesystem::path filename () const
PrintHostPostUploadAction post_action () const
std::string group () const
std::string storage () const
bool switch_to_device_tab () const
void show_dsa_button (wxString const &title={})
bool get_checkbox_state ()
virtual void on_dpi_changed (const wxRect &suggested_rect)
void SetButtonLabel (wxWindowID btn_id, const wxString &label, bool set_focus=false)
void AddButton (wxWindowID btn_id, const wxString &label, bool set_focus=false)
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 Types

enum  {
  BORDER = 20 , LOGO_SPACING = 25 , LOGO_GAP = 20 , CONTENT_WIDTH = 242 ,
  CONTENT_MAX_HEIGHT = 60 , BTN_SPACING = 20 , VERT_SPACING = 15
}

Protected Member Functions

Button * add_button (wxWindowID btn_id, bool set_focus=false, const wxString &label=wxString())
Button * get_button (wxWindowID btn_id)
void apply_style (long style)
void finalize ()
virtual void on_sys_color_changed ()

Protected Attributes

wxTextCtrl * txt_filename
wxComboBox * combo_groups
wxComboBox * combo_storage
PrintHostPostUploadAction post_upload_action
wxString m_valid_suffix
wxString m_preselected_storage
wxArrayString m_paths
bool m_switch_to_device_tab
boost::filesystem::path m_path
PrintHostPostUploadActions m_post_actions
wxArrayString m_storage_names
wxFont boldfont
wxBoxSizer * content_sizer
wxBoxSizer * btn_sizer
wxBoxSizer * m_dsa_sizer
wxStaticBitmap * logo
MsgButtonsHash m_buttons
CheckBox * m_checkbox_dsa {nullptr}
wxString m_forward_str

Private Member Functions

BedType appBedType () const
void refresh ()
void update_em_unit ()
bool is_new_scale_factor () const
void rescale (const wxRect &suggested_rect)

Private Attributes

const char * CONFIG_KEY_UPLOADANDPRINT = "elegoolink_upload_and_print"
const char * CONFIG_KEY_TIMELAPSE = "elegoolink_timelapse"
const char * CONFIG_KEY_HEATEDBEDLEVELING = "elegoolink_heated_bed_leveling"
const char * CONFIG_KEY_BEDTYPE = "elegoolink_bed_type"
wxStaticText * warning_text {nullptr}
wxBoxSizer * uploadandprint_sizer {nullptr}
int m_timeLapse
int m_heatedBedLeveling
BedType m_BedType
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

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
BORDER 
LOGO_SPACING 
LOGO_GAP 
CONTENT_WIDTH 
CONTENT_MAX_HEIGHT 
BTN_SPACING 
VERT_SPACING 
85 {
86 BORDER = 20,
87 LOGO_SPACING = 25,
88 LOGO_GAP = 20,
89 CONTENT_WIDTH = 242,
90 CONTENT_MAX_HEIGHT = 60,//TO
91 BTN_SPACING = 20,
92 VERT_SPACING = 15,//TO
93 };
@ CONTENT_WIDTH
Definition MsgDialog.hpp:89
@ LOGO_GAP
Definition MsgDialog.hpp:88
@ VERT_SPACING
Definition MsgDialog.hpp:92
@ BORDER
Definition MsgDialog.hpp:86
@ CONTENT_MAX_HEIGHT
Definition MsgDialog.hpp:90
@ BTN_SPACING
Definition MsgDialog.hpp:91
@ LOGO_SPACING
Definition MsgDialog.hpp:87

Constructor & Destructor Documentation

◆ ElegooPrintHostSendDialog()

Slic3r::GUI::ElegooPrintHostSendDialog::ElegooPrintHostSendDialog ( const boost::filesystem::path & path,
PrintHostPostUploadActions post_actions,
const wxArrayString & groups,
const wxArrayString & storage_paths,
const wxArrayString & storage_names,
bool switch_to_device_tab )
1588 : PrintHostSendDialog(path, post_actions, groups, storage_paths, storage_names, switch_to_device_tab)
1589 , m_timeLapse(0)
1592{}
int m_heatedBedLeveling
Definition PrintHostDialogs.hpp:191
BedType m_BedType
Definition PrintHostDialogs.hpp:192
int m_timeLapse
Definition PrintHostDialogs.hpp:190
bool switch_to_device_tab() const
Definition PrintHostDialogs.hpp:47
PrintHostSendDialog(const boost::filesystem::path &path, PrintHostPostUploadActions post_actions, const wxArrayString &groups, const wxArrayString &storage_paths, const wxArrayString &storage_names, bool switch_to_device_tab)
Definition PrintHostDialogs.cpp:470
@ btPTE
Definition PrintConfig.hpp:512

References Slic3r::GUI::PrintHostSendDialog::PrintHostSendDialog(), Slic3r::btPTE, m_BedType, m_heatedBedLeveling, m_timeLapse, and Slic3r::GUI::PrintHostSendDialog::switch_to_device_tab().

Here is the call graph for this function:

Member Function Documentation

◆ add_button()

Button * Slic3r::GUI::MsgDialog::add_button ( wxWindowID btn_id,
bool set_focus = false,
const wxString & label = wxString() )
protectedinherited
185{
186 Button* btn = new Button(this, label, "", 0, 0, btn_id);
187 /* ORCA not required since all buttons has same size and Rescale re applies its style
188 ButtonSizeType type;
189
190 if (label.length() < 5) {
191 type = ButtonSizeNormal;
192 btn->SetMinSize(MSG_DIALOG_BUTTON_SIZE); // ?????
193 }
194 else if (label.length() >= 5 && label.length() < 8) {
195 type = ButtonSizeMiddle;
196 btn->SetMinSize(MSG_DIALOG_MIDDLE_BUTTON_SIZE);
197 }
198 else if (label.length() >= 8 && label.length() < 12) {
199 type = ButtonSizeMiddle;
200 btn->SetMinSize(MSG_DIALOG_LONG_BUTTON_SIZE);
201 } else {
202 type = ButtonSizeLong;
203 btn->SetMinSize(MSG_DIALOG_LONGER_BUTTON_SIZE);
204 }
205 */
206
207 if (btn_id == wxID_OK || btn_id == wxID_YES || btn_id == wxFORWARD) {
209 }
210
211 if (btn_id == wxID_CANCEL || btn_id == wxID_NO) {
213 }
214
215 if (set_focus)
216 btn->SetFocus();
217 btn_sizer->Add(btn, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(ButtonProps::ChoiceButtonGap()));
218 btn->Bind(wxEVT_BUTTON, [this, btn_id](wxCommandEvent&) { EndModal(btn_id); });
219
220 MsgButton *mb = new MsgButton;
221 ButtonData *bd = new ButtonData;
222
223 bd->button = btn;
224 //bd->type = type;
225
226 // m_buttons.size() is a size_t, which does not match the %d conversion
227 mb->id = wxString(std::to_string(m_buttons.size()));
228 mb->buttondata = bd;
229 m_buttons[ wxString(std::to_string(m_buttons.size()))] = mb;
230 return btn;
231};
static const wxColour bd
Definition AxisCtrlButton.cpp:25
@ Confirm
Definition Button.hpp:25
@ Regular
Definition Button.hpp:24
@ Choice
Definition Button.hpp:33
static int ChoiceButtonGap()
Definition Button.hpp:19
void SetStyle(const ButtonStyle style, const ButtonType type)
Definition Button.cpp:200
void EndModal(int retCode) override
Definition GUI_Utils.hpp:305
MsgButtonsHash m_buttons
Definition MsgDialog.hpp:108
wxBoxSizer * btn_sizer
Definition MsgDialog.hpp:105

References bd, btn_sizer, Slic3r::GUI::MsgButton::buttondata, Choice, ButtonProps::ChoiceButtonGap(), Confirm, Slic3r::GUI::DPIDialog::EndModal(), Slic3r::GUI::MsgButton::id, m_buttons, Regular, and Button::SetStyle().

Referenced by Slic3r::GUI::ConfigsOverwriteConfirmDialog::ConfigsOverwriteConfirmDialog(), Slic3r::GUI::DownloadDialog::DownloadDialog(), Slic3r::GUI::MsgUpdateForced::MsgUpdateForced(), AddButton(), apply_style(), Slic3r::GUI::ElegooPrintHostSendDialog::init(), Slic3r::GUI::FlashforgePrintHostSendDialog::init(), and Slic3r::GUI::PrintHostSendDialog::init().

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

◆ AddButton()

void Slic3r::GUI::MsgDialog::AddButton ( wxWindowID btn_id,
const wxString & label,
bool set_focus = false )
inlineinherited
82{ add_button(btn_id, set_focus, label); }
Button * add_button(wxWindowID btn_id, bool set_focus=false, const wxString &label=wxString())
Definition MsgDialog.cpp:184

References add_button().

Referenced by Slic3r::GUI::PrintOptionsDialog::PrintOptionsDialog(), Slic3r::GUI::wgtDeviceNozzleRackNozzleItem::OnBtnNozzleStatus(), and Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnStatusIconClick().

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

◆ appBedType()

BedType Slic3r::GUI::ElegooPrintHostSendDialog::appBedType ( ) const
private
1886{
1887 std::string str_bed_type = wxGetApp().app_config->get("curr_bed_type");
1888 int bed_type_value = atoi(str_bed_type.c_str());
1889 return static_cast<BedType>(bed_type_value);
1890}
BedType
Definition PrintConfig.hpp:507

Referenced by init(), and refresh().

Here is the caller graph for this function:

◆ apply_style()

void Slic3r::GUI::MsgDialog::apply_style ( long style)
protectedinherited
238{
239 if (style & wxFORWARD)
240 add_button(wxFORWARD, true, _L("Go to") + " " + m_forward_str);
241 if (style & wxOK) {
242 if (style & wxFORWARD) { add_button(wxID_CANCEL, false, _L("Later")); }
243 else {
244 add_button(wxID_OK, true, _L("OK"));
245 }
246 }
247 if (style & wxYES) add_button(wxID_YES, true, _L("Yes"));
248 if (style & wxNO) add_button(wxID_NO, false,_L("No"));
249 if (style & wxCANCEL) add_button(wxID_CANCEL, false, _L("Cancel"));
250
251 logo->SetBitmap( create_scaled_bitmap(style & wxAPPLY ? "completed" :
252 style & wxICON_WARNING ? "exclamation" : // ORCA "exclamation" used for dialogs "obj_warning" used for 16x16 areas
253 style & wxICON_INFORMATION ? "info" :
254 style & wxICON_QUESTION ? "question" : "OrcaSlicer", this, 64, style & wxICON_ERROR));
255}
#define _L(s)
Definition OBJ.cpp:34
#define style
Definition WipeTowerDialog.cpp:101
wxStaticBitmap * logo
Definition MsgDialog.hpp:107
wxString m_forward_str
Definition MsgDialog.hpp:110
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, add_button(), create_scaled_bitmap(), logo, m_forward_str, and style.

Referenced by MsgDialog().

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

◆ bedType()

BedType Slic3r::GUI::ElegooPrintHostSendDialog::bedType ( ) const
inline
167{ return m_BedType; }

References m_BedType.

Referenced by init().

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::ElegooPrintHostSendDialog::EndModal ( int ret)
overridevirtual

Reimplemented from Slic3r::GUI::PrintHostSendDialog.

1872{
1873 if (ret == wxID_OK) {
1874
1875 AppConfig* app_config = wxGetApp().app_config;
1876 app_config->set("recent", CONFIG_KEY_UPLOADANDPRINT, std::to_string(static_cast<int>(post_upload_action)));
1877 app_config->set("recent", CONFIG_KEY_TIMELAPSE, std::to_string(m_timeLapse));
1878 app_config->set("recent", CONFIG_KEY_HEATEDBEDLEVELING, std::to_string(m_heatedBedLeveling));
1879 app_config->set("recent", CONFIG_KEY_BEDTYPE, std::to_string(static_cast<int>(m_BedType)));
1880 }
1881
1883}
const char * CONFIG_KEY_TIMELAPSE
Definition PrintHostDialogs.hpp:182
const char * CONFIG_KEY_HEATEDBEDLEVELING
Definition PrintHostDialogs.hpp:183
const char * CONFIG_KEY_BEDTYPE
Definition PrintHostDialogs.hpp:184
const char * CONFIG_KEY_UPLOADANDPRINT
Definition PrintHostDialogs.hpp:181
PrintHostPostUploadAction post_upload_action
Definition PrintHostDialogs.hpp:57
virtual void EndModal(int ret) override
Definition PrintHostDialogs.cpp:662

References CONFIG_KEY_BEDTYPE, CONFIG_KEY_HEATEDBEDLEVELING, CONFIG_KEY_TIMELAPSE, CONFIG_KEY_UPLOADANDPRINT, Slic3r::GUI::PrintHostSendDialog::EndModal(), m_BedType, m_heatedBedLeveling, m_timeLapse, Slic3r::GUI::PrintHostSendDialog::post_upload_action, and Slic3r::AppConfig::set().

Here is the call graph for this function:

◆ extendedInfo()

virtual std::map< std::string, std::string > Slic3r::GUI::ElegooPrintHostSendDialog::extendedInfo ( ) const
inlineoverridevirtual

Reimplemented from Slic3r::GUI::PrintHostSendDialog.

171 {
172 return {{"bedType", std::to_string(static_cast<int>(m_BedType))},
173 {"timeLapse", std::to_string(m_timeLapse)},
174 {"heatedBedLeveling", std::to_string(m_heatedBedLeveling)}};
175 }

References m_BedType, m_heatedBedLeveling, and m_timeLapse.

◆ filename()

fs::path Slic3r::GUI::PrintHostSendDialog::filename ( ) const
inherited
634{
635 return into_path(txt_filename->GetValue());
636}
wxTextCtrl * txt_filename
Definition PrintHostDialogs.hpp:54
boost::filesystem::path into_path(const wxString &str)
Definition GUI.cpp:564

References Slic3r::GUI::into_path(), and txt_filename.

Referenced by Slic3r::GUI::FlashforgePrintHostSendDialog::init().

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

◆ finalize()

◆ force_rescale()

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

◆ get_button()

Button * Slic3r::GUI::MsgDialog::get_button ( wxWindowID btn_id)
protectedinherited
233 {
234 return static_cast<Button*>(FindWindowById(btn_id, this));
235}

Referenced by Slic3r::GUI::MsgUpdateForced::MsgUpdateForced(), and SetButtonLabel().

Here is the caller graph for this function:

◆ get_checkbox_state()

bool Slic3r::GUI::MsgDialog::get_checkbox_state ( )
inherited

◆ group()

std::string Slic3r::GUI::PrintHostSendDialog::group ( ) const
inherited
644{
645 if (combo_groups == nullptr) {
646 return "";
647 } else {
648 wxString group = combo_groups->GetValue();
649 return into_u8(group);
650 }
651}
std::string group() const
Definition PrintHostDialogs.cpp:643
wxComboBox * combo_groups
Definition PrintHostDialogs.hpp:55
std::string into_u8(const wxString &str)
Definition GUI.cpp:549

References combo_groups, group(), and Slic3r::GUI::into_u8().

Referenced by EndModal(), and group().

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

◆ heatedBedLeveling()

int Slic3r::GUI::ElegooPrintHostSendDialog::heatedBedLeveling ( ) const
inline
166{ return m_heatedBedLeveling; }

References m_heatedBedLeveling.

Referenced by init().

Here is the caller graph for this function:

◆ init()

void Slic3r::GUI::ElegooPrintHostSendDialog::init ( )
overridevirtual

Reimplemented from Slic3r::GUI::PrintHostSendDialog.

1594 {
1595
1596 auto preset_bundle = wxGetApp().preset_bundle;
1597 auto model_id = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
1598
1599 if (model_id != "Elegoo-CC" && model_id != "Elegoo-C") {
1601 return;
1602 }
1603
1604 const auto& path = m_path;
1605 const auto& storage_paths = m_paths;
1606 const auto& post_actions = m_post_actions;
1607 const auto& storage_names = m_storage_names;
1608
1609 this->SetMinSize(wxSize(500, 300));
1610 const AppConfig* app_config = wxGetApp().app_config;
1611
1612 std::string uploadAndPrint = app_config->get("recent", CONFIG_KEY_UPLOADANDPRINT);
1613 if (!uploadAndPrint.empty())
1614 post_upload_action = static_cast<PrintHostPostUploadAction>(std::stoi(uploadAndPrint));
1615
1616 std::string timeLapse = app_config->get("recent", CONFIG_KEY_TIMELAPSE);
1617 if (!timeLapse.empty())
1618 m_timeLapse = std::stoi(timeLapse);
1619 std::string heatedBedLeveling = app_config->get("recent", CONFIG_KEY_HEATEDBEDLEVELING);
1620 if (!heatedBedLeveling.empty())
1622 std::string bedType = app_config->get("recent", CONFIG_KEY_BEDTYPE);
1623 if (!bedType.empty())
1624 m_BedType = static_cast<BedType>(std::stoi(bedType));
1625
1626 auto* label_dir_hint = new wxStaticText(this, wxID_ANY, _L("Use forward slashes ( / ) as a directory separator if needed."));
1627 label_dir_hint->Wrap(CONTENT_WIDTH * wxGetApp().em_unit());
1628
1629 wxSizerFlags flags = wxSizerFlags().Border(wxRIGHT, 16).Expand();
1630
1631 content_sizer->Add(txt_filename, flags);
1632 content_sizer->AddSpacer(4);
1633 content_sizer->Add(label_dir_hint);
1634 content_sizer->AddSpacer(VERT_SPACING);
1635
1636 if (combo_groups != nullptr) {
1637 // Repetier specific: Show a selection of file groups.
1638 auto* label_group = new wxStaticText(this, wxID_ANY, _L("Group"));
1639 content_sizer->Add(label_group);
1640 content_sizer->Add(combo_groups, 0, wxBOTTOM, 2 * VERT_SPACING);
1641 wxString recent_group = from_u8(app_config->get("recent", CONFIG_KEY_GROUP));
1642 if (!recent_group.empty())
1643 combo_groups->SetValue(recent_group);
1644 }
1645
1646 if (combo_storage != nullptr) {
1647 // PrusaLink specific: User needs to choose a storage
1648 auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage") + ":");
1649 content_sizer->Add(label_group);
1650 content_sizer->Add(combo_storage, 0, wxBOTTOM, 2 * VERT_SPACING);
1651 combo_storage->SetValue(storage_names.front());
1652 wxString recent_storage = from_u8(app_config->get("recent", CONFIG_KEY_STORAGE));
1653 if (!recent_storage.empty())
1654 combo_storage->SetValue(recent_storage);
1655 } else if (storage_names.GetCount() == 1) {
1656 // PrusaLink specific: Show which storage has been detected.
1657 auto* label_group = new wxStaticText(this, wxID_ANY, _L("Upload to storage") + ": " + storage_names.front());
1658 content_sizer->Add(label_group);
1660 }
1661
1662 wxString recent_path = from_u8(app_config->get("recent", CONFIG_KEY_PATH));
1663 if (recent_path.Length() > 0 && recent_path[recent_path.Length() - 1] != '/') {
1664 recent_path += '/';
1665 }
1666 const auto recent_path_len = recent_path.Length();
1667 recent_path += path.filename().wstring();
1668 wxString stem(path.stem().wstring());
1669 const auto stem_len = stem.Length();
1670
1671 txt_filename->SetValue(recent_path);
1672
1673 {
1674 auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1675 auto checkbox = new ::CheckBox(this, wxID_APPLY);
1676 checkbox->SetValue(m_switch_to_device_tab);
1677 checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
1678 m_switch_to_device_tab = e.IsChecked();
1679 e.Skip();
1680 });
1681 checkbox_sizer->Add(checkbox, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1682
1683 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Switch to Device tab after upload."), wxDefaultPosition, wxDefaultSize, 0);
1684 checkbox_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1685 checkbox_text->SetFont(::Label::Body_13);
1686 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1687 content_sizer->Add(checkbox_sizer);
1688 content_sizer->AddSpacer(VERT_SPACING);
1689 }
1690 warning_text = new wxStaticText(this, wxID_ANY,
1691 _L("The selected bed type does not match the file. Please confirm before starting the print."),
1692 wxDefaultPosition, wxDefaultSize, 0);
1693 uploadandprint_sizer = new wxBoxSizer(wxVERTICAL);
1694 {
1695 auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1696 auto checkbox = new ::CheckBox(this);
1698 checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
1699 if (e.IsChecked()) {
1701 } else {
1703 }
1704 refresh();
1705 e.Skip();
1706 });
1707 checkbox_sizer->Add(checkbox, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1708
1709 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Upload and Print"), wxDefaultPosition, wxDefaultSize, 0);
1710 checkbox_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1711 checkbox_text->SetFont(::Label::Body_13);
1712 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1713 content_sizer->Add(checkbox_sizer);
1714 content_sizer->AddSpacer(VERT_SPACING);
1715 }
1716
1717 {
1718 auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1719 auto checkbox = new ::CheckBox(this);
1720 checkbox->SetValue(m_timeLapse == 1);
1721 checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
1722 m_timeLapse = e.IsChecked() ? 1 : 0;
1723 e.Skip();
1724 });
1725 checkbox_sizer->AddSpacer(16);
1726 checkbox_sizer->Add(checkbox, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1727
1728 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Time-lapse"), wxDefaultPosition, wxDefaultSize, 0);
1729 checkbox_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1730 checkbox_text->SetFont(::Label::Body_13);
1731 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1732 uploadandprint_sizer->Add(checkbox_sizer);
1734 }
1735
1736 {
1737 auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
1738 auto checkbox = new ::CheckBox(this);
1739 checkbox->SetValue(m_heatedBedLeveling == 1);
1740 checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
1741 m_heatedBedLeveling = e.IsChecked() ? 1 : 0;
1742 e.Skip();
1743 });
1744 checkbox_sizer->AddSpacer(16);
1745 checkbox_sizer->Add(checkbox, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1746
1747 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Heated Bed Leveling"), wxDefaultPosition, wxDefaultSize, 0);
1748 checkbox_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1749 checkbox_text->SetFont(::Label::Body_13);
1750 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1751 uploadandprint_sizer->Add(checkbox_sizer);
1753 }
1754
1755 {
1756 auto radioBoxA = new RadioBox(this);
1757 auto radioBoxB = new RadioBox(this);
1758 if (m_BedType == BedType::btPC)
1759 radioBoxB->SetValue(true);
1760 else
1761 radioBoxA->SetValue(true);
1762
1763 radioBoxA->Bind(wxEVT_LEFT_DOWN, [this, radioBoxA, radioBoxB](wxMouseEvent& e) {
1764 radioBoxA->SetValue(true);
1765 radioBoxB->SetValue(false);
1767 refresh();
1768 });
1769 radioBoxB->Bind(wxEVT_LEFT_DOWN, [this, radioBoxA, radioBoxB](wxMouseEvent& e) {
1770 radioBoxA->SetValue(false);
1771 radioBoxB->SetValue(true);
1773 refresh();
1774 });
1775
1776 {
1777 auto radio_sizer = new wxBoxSizer(wxHORIZONTAL);
1778 radio_sizer->AddSpacer(16);
1779 radio_sizer->Add(radioBoxA, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1780
1781 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Textured Build Plate (Side A)"), wxDefaultPosition, wxDefaultSize, 0);
1782 radio_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1783 checkbox_text->SetFont(::Label::Body_13);
1784 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1785 uploadandprint_sizer->Add(radio_sizer);
1787 }
1788 {
1789 auto radio_sizer = new wxBoxSizer(wxHORIZONTAL);
1790 radio_sizer->AddSpacer(16);
1791 radio_sizer->Add(radioBoxB, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1792
1793 auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Smooth Build Plate (Side B)"), wxDefaultPosition, wxDefaultSize, 0);
1794 radio_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
1795 checkbox_text->SetFont(::Label::Body_13);
1796 checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
1797 uploadandprint_sizer->Add(radio_sizer);
1799 }
1800 }
1801 {
1802 auto h_sizer = new wxBoxSizer(wxHORIZONTAL);
1804 warning_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#FF1001")));
1805 // wrapping the text
1806 warning_text->Wrap(350);
1807 h_sizer->AddSpacer(16);
1808 h_sizer->Add(warning_text);
1809
1810 uploadandprint_sizer->Add(h_sizer);
1812 }
1813
1817
1818 uploadandprint_sizer->Layout();
1819
1820 if (size_t extension_start = recent_path.find_last_of('.'); extension_start != std::string::npos)
1821 m_valid_suffix = recent_path.substr(extension_start);
1822 // .gcode suffix control
1823 auto validate_path = [this](const wxString& path) -> bool {
1824 if (!path.Lower().EndsWith(m_valid_suffix.Lower())) {
1825 MessageDialog msg_wingow(this,
1826 wxString::Format(_L("Upload filename doesn't end with \"%s\". Do you wish to continue?"),
1828 wxString(SLIC3R_APP_NAME), wxYES | wxNO);
1829 if (msg_wingow.ShowModal() == wxID_NO)
1830 return false;
1831 }
1832 return true;
1833 };
1834
1835 auto* btn_ok = add_button(wxID_OK, true, _L("Upload"));
1836 btn_ok->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
1837 if (validate_path(txt_filename->GetValue())) {
1838 // post_upload_action = PrintHostPostUploadAction::None;
1839 EndDialog(wxID_OK);
1840 }
1841 });
1842 txt_filename->SetFocus();
1843
1844 add_button(wxID_CANCEL, false, _L("Cancel"));
1845 finalize();
1846
1847#ifdef __linux__
1848 // On Linux with GTK2 when text control lose the focus then selection (colored background) disappears but text color stay white
1849 // and as a result the text is invisible with light mode
1850 // see https://github.com/prusa3d/PrusaSlicer/issues/4532
1851 // Workaround: Unselect text selection explicitly on kill focus
1852 txt_filename->Bind(
1853 wxEVT_KILL_FOCUS,
1854 [this](wxEvent& e) {
1855 e.Skip();
1856 txt_filename->SetInsertionPoint(txt_filename->GetLastPosition());
1857 },
1858 txt_filename->GetId());
1859#endif /* __linux__ */
1860
1861 Bind(wxEVT_SHOW, [=](const wxShowEvent&) {
1862 // Another similar case where the function only works with EVT_SHOW + CallAfter,
1863 // this time on Mac.
1864 CallAfter([=]() {
1865 txt_filename->SetInsertionPoint(0);
1866 txt_filename->SetSelection(recent_path_len, recent_path_len + stem_len);
1867 });
1868 });
1869}
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
static wxFont Body_13
Definition Label.hpp:54
int em_unit() const
Definition GUI_Utils.hpp:203
wxStaticText * warning_text
Definition PrintHostDialogs.hpp:187
BedType appBedType() const
Definition PrintHostDialogs.cpp:1885
BedType bedType() const
Definition PrintHostDialogs.hpp:167
int heatedBedLeveling() const
Definition PrintHostDialogs.hpp:166
int timeLapse() const
Definition PrintHostDialogs.hpp:165
void refresh()
Definition PrintHostDialogs.cpp:1892
wxBoxSizer * uploadandprint_sizer
Definition PrintHostDialogs.hpp:188
wxComboBox * combo_storage
Definition PrintHostDialogs.hpp:56
wxString m_valid_suffix
Definition PrintHostDialogs.hpp:58
virtual void init()
Definition PrintHostDialogs.cpp:487
wxArrayString m_paths
Definition PrintHostDialogs.hpp:60
boost::filesystem::path m_path
Definition PrintHostDialogs.hpp:63
wxArrayString m_storage_names
Definition PrintHostDialogs.hpp:65
bool m_switch_to_device_tab
Definition PrintHostDialogs.hpp:61
PrintHostPostUploadActions m_post_actions
Definition PrintHostDialogs.hpp:64
wxString m_preselected_storage
Definition PrintHostDialogs.hpp:59
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
wxMouseEvent
Definition CameraPopup.cpp:47
static const char * CONFIG_KEY_STORAGE
Definition PrintHostDialogs.cpp:468
static const char * CONFIG_KEY_GROUP
Definition PrintHostDialogs.cpp:467
static const char * CONFIG_KEY_PATH
Definition PrintHostDialogs.cpp:466
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
@ btPC
Definition PrintConfig.hpp:509
PrintHostPostUploadAction
Definition PrintHost.hpp:23
@ None
Definition PrintHost.hpp:24
@ StartPrint
Definition PrintHost.hpp:25
wxBoxSizer * content_sizer
Definition MsgDialog.hpp:104
void finalize()
Definition MsgDialog.cpp:257

References _L, Slic3r::GUI::MsgDialog::add_button(), appBedType(), bedType(), Label::Body_13, Slic3r::btPC, Slic3r::btPTE, Slic3r::GUI::PrintHostSendDialog::combo_groups, Slic3r::GUI::PrintHostSendDialog::combo_storage, CONFIG_KEY_BEDTYPE, Slic3r::GUI::CONFIG_KEY_GROUP, CONFIG_KEY_HEATEDBEDLEVELING, Slic3r::GUI::CONFIG_KEY_PATH, Slic3r::GUI::CONFIG_KEY_STORAGE, CONFIG_KEY_TIMELAPSE, CONFIG_KEY_UPLOADANDPRINT, Slic3r::GUI::MsgDialog::content_sizer, Slic3r::GUI::MsgDialog::CONTENT_WIDTH, StateColor::darkModeColorFor(), Slic3r::GUI::DPIAware< wxDialog >::em_unit(), Slic3r::GUI::MsgDialog::finalize(), Slic3r::GUI::from_u8(), Slic3r::AppConfig::get(), heatedBedLeveling(), Slic3r::GUI::PrintHostSendDialog::init(), m_BedType, m_heatedBedLeveling, Slic3r::GUI::PrintHostSendDialog::m_path, Slic3r::GUI::PrintHostSendDialog::m_paths, Slic3r::GUI::PrintHostSendDialog::m_post_actions, Slic3r::GUI::PrintHostSendDialog::m_preselected_storage, Slic3r::GUI::PrintHostSendDialog::m_storage_names, Slic3r::GUI::PrintHostSendDialog::m_switch_to_device_tab, m_timeLapse, Slic3r::GUI::PrintHostSendDialog::m_valid_suffix, Slic3r::None, Slic3r::GUI::PrintHostSendDialog::post_upload_action, refresh(), Slic3r::GUI::DPIAware< P >::ShowModal(), Slic3r::StartPrint, timeLapse(), Slic3r::GUI::PrintHostSendDialog::txt_filename, uploadandprint_sizer, Slic3r::GUI::MsgDialog::VERT_SPACING, warning_text, Slic3r::GUI::wxMouseEvent, and wxStaticText.

Here is the call 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::MsgDialog::on_dpi_changed ( const wxRect & suggested_rect)
virtualinherited

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

150 {
151 if (m_buttons.size() > 0) {
152 MsgButtonsHash::iterator i = m_buttons.begin();
153
154 while (i != m_buttons.end()) {
155 MsgButton *bd = i->second;
156 /* ORCA not required since all buttons has same size and Rescale re applies its style
157 wxSize bsize;
158
159
160 switch (bd->buttondata->type) {
161 case ButtonSizeNormal:bsize = MSG_DIALOG_BUTTON_SIZE;break;
162 case ButtonSizeMiddle: bsize = MSG_DIALOG_MIDDLE_BUTTON_SIZE; break;
163 case ButtonSizeLong: bsize = MSG_DIALOG_LONG_BUTTON_SIZE; break;
164 default: break;
165 }
166
167 bd->buttondata->button->SetMinSize(bsize);
168 */
169 bd->buttondata->button->Rescale();
170 i++;
171 }
172 }
173 }

References bd, and m_buttons.

◆ on_sys_color_changed()

◆ post_action()

PrintHostPostUploadAction Slic3r::GUI::PrintHostSendDialog::post_action ( ) const
inherited
639{
640 return post_upload_action;
641}

References post_upload_action.

◆ prev_scale_factor()

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

◆ refresh()

void Slic3r::GUI::ElegooPrintHostSendDialog::refresh ( )
private
1893{
1896 uploadandprint_sizer->Show(true);
1897 } else {
1898 uploadandprint_sizer->Show(false);
1899 }
1900 }
1901 if (warning_text) {
1903 }
1904 this->Layout();
1905 this->Fit();
1906}

References appBedType(), m_BedType, Slic3r::GUI::PrintHostSendDialog::post_upload_action, Slic3r::StartPrint, uploadandprint_sizer, and warning_text.

Referenced by init().

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

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

◆ SetButtonLabel()

void Slic3r::GUI::MsgDialog::SetButtonLabel ( wxWindowID btn_id,
const wxString & label,
bool set_focus = false )
inherited
176{
177 if (Button* btn = get_button(btn_id)) {
178 btn->SetLabel(label);
179 if (set_focus)
180 btn->SetFocus();
181 }
182}
Button * get_button(wxWindowID btn_id)
Definition MsgDialog.cpp:233

References get_button().

Referenced by Slic3r::GUI::MixedFilamentWarningDialog::MixedFilamentWarningDialog(), Slic3r::GUI::ConfigManipulation::check_layer_height(), Slic3r::GUI::FanControlNew::check_printing_state(), Slic3r::GUI::FanOperate::check_printing_state(), Slic3r::DevNozzleRack::CtrlRackReadAll(), Slic3r::DevNozzleRack::CtrlRackUpgrade(), Slic3r::GUI::ObjectList::del_from_cut_object(), Slic3r::GUI::Plater::priv::delete_object_from_model(), Slic3r::GUI::Field::get_value_by_opt_type(), Slic3r::GUI::GUI_App::handle_web_request(), Slic3r::GUI::ConfigManipulation::layer_height_out_of_range_dialog(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::StatusPanel::on_lamp_switch(), Slic3r::GUI::TextureImportDialog::on_mesh_repair_decision_required(), Slic3r::GUI::Tab::on_value_change(), Slic3r::GUI::AMSSettingTypePanel::OnAmsTypeChanged(), Slic3r::GUI::run_scene_benchmark(), Slic3r::GUI::FanControlPopupNew::UpdatePartSubMode(), and Slic3r::GUI::Tab::validate_filament_temperature_pairs().

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

◆ show_dsa_button()

void Slic3r::GUI::MsgDialog::show_dsa_button ( wxString const & title = {})
inherited
112{
113 m_checkbox_dsa = new CheckBox(this);
114 m_dsa_sizer->Add(m_checkbox_dsa, 0, wxALIGN_CENTER);
115 m_checkbox_dsa->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
116 auto event = wxCommandEvent(EVT_CHECKBOX_CHANGE);
117 event.SetInt(m_checkbox_dsa->GetValue()?1:0);
118 event.SetEventObject(this);
119 wxPostEvent(this, event);
120 e.Skip();
121 });
122
123 auto m_text_dsa = new wxStaticText(this, wxID_ANY, title.IsEmpty() ? _L("Don't show again") : title, wxDefaultPosition, wxDefaultSize, 0);
124 auto on_toggle = [this]() {
125 m_checkbox_dsa->SetValue(!m_checkbox_dsa->GetValue());
126 wxCommandEvent ev(wxEVT_TOGGLEBUTTON, m_checkbox_dsa->GetId());
127 ev.SetEventObject(m_checkbox_dsa);
128 m_checkbox_dsa->GetEventHandler()->ProcessEvent(ev);
129 };
130 m_text_dsa->Bind(wxEVT_LEFT_DOWN, [on_toggle](wxMouseEvent& e) {if(!e.LeftDClick()) on_toggle();});
131 m_text_dsa->Bind(wxEVT_LEFT_DCLICK, [on_toggle](wxMouseEvent& e) {on_toggle();});
132
133 m_dsa_sizer->Add(m_text_dsa, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
134 m_dsa_sizer->AddSpacer(FromDIP(10)); // spacing after checkbox
135 m_text_dsa->SetFont(::Label::Body_13);
136 m_text_dsa->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
137 btn_sizer->Layout();
138 Fit();
139}
wxBoxSizer * m_dsa_sizer
Definition MsgDialog.hpp:106

References _L, Label::Body_13, btn_sizer, StateColor::darkModeColorFor(), m_checkbox_dsa, m_dsa_sizer, Slic3r::GUI::wxMouseEvent, and wxStaticText.

Referenced by Slic3r::DevNozzleRack::CheckRackMoveWarningDlg(), Slic3r::GUI::Plater::close_with_confirm(), Slic3r::GUI::confirm_create_decompose_missing_components(), Slic3r::DevNozzleRack::CtrlRackUpgrade(), Slic3r::GUI::ObjectList::layers_editing(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::Plater::priv::on_action_layersediting(), Slic3r::GUI::RichMessageDialog::ShowModal(), Slic3r::GUI::MediaPlayCtrl::ToggleStream(), and Slic3r::GUI::ConfigManipulation::update_print_fff_config().

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

◆ ShowModal()

◆ storage()

std::string Slic3r::GUI::PrintHostSendDialog::storage ( ) const
inherited
654{
655 if (!combo_storage)
656 return GUI::format("%1%", m_preselected_storage);
657 if (combo_storage->GetSelection() < 0 || combo_storage->GetSelection() >= int(m_paths.size()))
658 return {};
659 return into_u8(m_paths[combo_storage->GetSelection()]);
660}
std::string format(const char *fmt, TArgs &&... args)
Definition format.hpp:36

References combo_storage, Slic3r::GUI::format(), Slic3r::GUI::into_u8(), m_paths, and m_preselected_storage.

Referenced by EndModal().

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

◆ switch_to_device_tab()

bool Slic3r::GUI::PrintHostSendDialog::switch_to_device_tab ( ) const
inlineinherited

References m_switch_to_device_tab.

Referenced by Slic3r::GUI::CrealityPrintHostSendDialog::CrealityPrintHostSendDialog(), Slic3r::GUI::ElegooPrintHostSendDialog::ElegooPrintHostSendDialog(), Slic3r::GUI::FlashforgePrintHostSendDialog::FlashforgePrintHostSendDialog(), and PrintHostSendDialog().

Here is the caller graph for this function:

◆ timeLapse()

int Slic3r::GUI::ElegooPrintHostSendDialog::timeLapse ( ) const
inline
165{ return m_timeLapse; }

References m_timeLapse.

Referenced by init().

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

◆ boldfont

wxFont Slic3r::GUI::MsgDialog::boldfont
protectedinherited

◆ btn_sizer

wxBoxSizer* Slic3r::GUI::MsgDialog::btn_sizer
protectedinherited

◆ combo_groups

wxComboBox* Slic3r::GUI::PrintHostSendDialog::combo_groups
protectedinherited

◆ combo_storage

wxComboBox* Slic3r::GUI::PrintHostSendDialog::combo_storage
protectedinherited

◆ CONFIG_KEY_BEDTYPE

const char* Slic3r::GUI::ElegooPrintHostSendDialog::CONFIG_KEY_BEDTYPE = "elegoolink_bed_type"
private

Referenced by EndModal(), and init().

◆ CONFIG_KEY_HEATEDBEDLEVELING

const char* Slic3r::GUI::ElegooPrintHostSendDialog::CONFIG_KEY_HEATEDBEDLEVELING = "elegoolink_heated_bed_leveling"
private

Referenced by EndModal(), and init().

◆ CONFIG_KEY_TIMELAPSE

const char* Slic3r::GUI::ElegooPrintHostSendDialog::CONFIG_KEY_TIMELAPSE = "elegoolink_timelapse"
private

Referenced by EndModal(), and init().

◆ CONFIG_KEY_UPLOADANDPRINT

const char* Slic3r::GUI::ElegooPrintHostSendDialog::CONFIG_KEY_UPLOADANDPRINT = "elegoolink_upload_and_print"
private

Referenced by EndModal(), and init().

◆ content_sizer

◆ logo

wxStaticBitmap* Slic3r::GUI::MsgDialog::logo
protectedinherited

◆ m_BedType

BedType Slic3r::GUI::ElegooPrintHostSendDialog::m_BedType
private

◆ m_buttons

MsgButtonsHash Slic3r::GUI::MsgDialog::m_buttons
protectedinherited

◆ m_can_rescale

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

◆ m_checkbox_dsa

CheckBox* Slic3r::GUI::MsgDialog::m_checkbox_dsa {nullptr}
protectedinherited

◆ m_dsa_sizer

wxBoxSizer* Slic3r::GUI::MsgDialog::m_dsa_sizer
protectedinherited

Referenced by MsgDialog(), and show_dsa_button().

◆ m_em_unit

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

◆ m_force_rescale

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

◆ m_forward_str

wxString Slic3r::GUI::MsgDialog::m_forward_str
protectedinherited

Referenced by MsgDialog(), and apply_style().

◆ m_heatedBedLeveling

int Slic3r::GUI::ElegooPrintHostSendDialog::m_heatedBedLeveling
private

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

boost::filesystem::path Slic3r::GUI::PrintHostSendDialog::m_path
protectedinherited

◆ m_paths

wxArrayString Slic3r::GUI::PrintHostSendDialog::m_paths
protectedinherited

◆ m_post_actions

◆ m_preselected_storage

wxString Slic3r::GUI::PrintHostSendDialog::m_preselected_storage
protectedinherited

◆ m_prev_scale_factor

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

◆ m_scale_factor

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

◆ m_storage_names

wxArrayString Slic3r::GUI::PrintHostSendDialog::m_storage_names
protectedinherited

◆ m_switch_to_device_tab

bool Slic3r::GUI::PrintHostSendDialog::m_switch_to_device_tab
protectedinherited

◆ m_timeLapse

int Slic3r::GUI::ElegooPrintHostSendDialog::m_timeLapse
private

◆ m_valid_suffix

wxString Slic3r::GUI::PrintHostSendDialog::m_valid_suffix
protectedinherited

◆ post_upload_action

◆ txt_filename

wxTextCtrl* Slic3r::GUI::PrintHostSendDialog::txt_filename
protectedinherited

◆ uploadandprint_sizer

wxBoxSizer* Slic3r::GUI::ElegooPrintHostSendDialog::uploadandprint_sizer {nullptr}
private
188{nullptr};

Referenced by init(), and refresh().

◆ warning_text

wxStaticText* Slic3r::GUI::ElegooPrintHostSendDialog::warning_text {nullptr}
private
187{nullptr};

Referenced by init(), and refresh().


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