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

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

Inheritance diagram for Slic3r::GUI::InputIpAddressDialog:
Collaboration diagram for Slic3r::GUI::InputIpAddressDialog:

Public Member Functions

 InputIpAddressDialog (wxWindow *parent=nullptr)
 ~InputIpAddressDialog ()
void switch_input_panel (int index)
void on_cancel ()
void update_title (wxString title)
void set_machine_obj (MachineObject *obj)
void update_test_msg (wxString msg, bool connected)
bool isValidEndpoint (std::string endpoint)
void check_ip_address_failed (int result)
void on_check_ip_address_failed (wxCommandEvent &evt)
void on_ok (wxMouseEvent &evt)
void on_send_retry ()
void update_test_msg_event (wxCommandEvent &evt)
void post_update_test_msg (std::weak_ptr< InputIpAddressDialog > w, wxString text, bool beconnect)
void workerThreadFunc (std::string str_ip, std::string str_access_code, std::string sn, std::string model_id, std::string name)
void OnTimer (wxTimerEvent &event)
void on_text (wxCommandEvent &evt)
void on_dpi_changed (const wxRect &suggested_rect) override
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 ()

Public Attributes

wxString comfirm_before_check_text
wxString comfirm_before_enter_text
wxString comfirm_after_enter_text
wxString comfirm_last_enter_text
std::shared_ptr< InputIpAddressDialog > token_
boost::thread * m_thread {nullptr}
std::string m_ip
wxWindow * m_step_icon_panel3 { nullptr }
Label * m_tip0 { nullptr }
Label * m_tip1 { nullptr }
Label * m_tip2 { nullptr }
Label * m_tip3 { nullptr }
Label * m_tip4 { nullptr }
MachineObject * m_obj {nullptr}
wxPanel * ip_input_top_panel { nullptr }
wxPanel * ip_input_bot_panel { nullptr }
Button * m_button_ok { nullptr }
Button * m_button_manual_setup { nullptr }
Label * m_tips_ip { nullptr }
Label * m_tips_access_code { nullptr }
Label * m_tips_cafile { nullptr }
Label * m_cafile_hint { nullptr }
Label * m_tips_sn {nullptr}
Label * m_tips_modelID {nullptr}
Label * m_test_right_msg { nullptr }
Label * m_test_wrong_msg { nullptr }
TextInput * m_input_ip { nullptr }
TextInput * m_input_access_code { nullptr }
wxTextCtrl * m_input_cafile { nullptr }
Button * m_button_cafile { nullptr }
TextInput * m_input_printer_name { nullptr }
TextInput * m_input_sn { nullptr }
ComboBox * m_input_modelID { nullptr }
wxStaticBitmap * m_img_help { nullptr }
wxStaticBitmap * m_img_step1 { nullptr }
wxStaticBitmap * m_img_step2 { nullptr }
wxStaticBitmap * m_img_step3 { nullptr }
HyperLink * m_trouble_shoot { nullptr }
wxTimer * closeTimer { nullptr }
int closeCount {3}
bool m_show_access_code { false }
bool m_need_input_sn {true}
int m_result
int current_input_index {0}
std::shared_ptr< BBLStatusBarSend > m_status_bar
std::unique_ptr< Worker > m_worker
std::map< std::string, std::string > m_models_map

Protected Member Functions

virtual void on_sys_color_changed ()

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

Constructor & Destructor Documentation

◆ InputIpAddressDialog()

Slic3r::GUI::InputIpAddressDialog::InputIpAddressDialog ( wxWindow * parent = nullptr)
1432 : DPIDialog(static_cast<wxWindow *>(wxGetApp().mainframe),
1433 wxID_ANY,
1434 _L("Connect the printer using IP and access code"),
1435 wxDefaultPosition,
1436 wxDefaultSize,
1437 wxCAPTION | wxCLOSE_BOX)
1438{
1439 SetBackgroundColour(*wxWHITE);
1440 m_result = -1;
1441 wxBoxSizer *m_sizer_body = new wxBoxSizer(wxVERTICAL);
1442 wxBoxSizer *m_sizer_main = new wxBoxSizer(wxVERTICAL);
1443 wxBoxSizer *m_sizer_msg = new wxBoxSizer(wxHORIZONTAL);
1444 auto m_line_top = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 1));
1445 m_line_top->SetBackgroundColour(wxColour(166, 169, 170));
1446
1447 comfirm_before_check_text = _L("Try the following methods to update the connection parameters and reconnect to the printer.");
1448 comfirm_before_enter_text = _L("1. Please confirm Orca Slicer and your printer are in the same LAN.");
1449 comfirm_after_enter_text = _L("2. If the IP and Access Code below are different from the actual values on your printer, please correct them.");
1450 comfirm_last_enter_text = _L("3. Please obtain the device SN from the printer side; it is usually found in the device information on the printer screen.");
1451
1453 m_tip0->SetMinSize(wxSize(FromDIP(355), -1));
1454 m_tip0->SetMaxSize(wxSize(FromDIP(355), -1));
1455 m_tip0->Wrap(FromDIP(355));
1456
1458 m_tip1->SetMinSize(wxSize(FromDIP(355), -1));
1459 m_tip1->SetMaxSize(wxSize(FromDIP(355), -1));
1460 m_tip1->Wrap(FromDIP(355));
1461
1463 m_tip2->SetMinSize(wxSize(FromDIP(355), -1));
1464 m_tip2->SetMaxSize(wxSize(FromDIP(355), -1));
1465
1467 m_tip3->SetMinSize(wxSize(FromDIP(355), -1));
1468 m_tip3->SetMaxSize(wxSize(FromDIP(355), -1));
1469
1470 ip_input_top_panel = new wxPanel(this);
1471 ip_input_bot_panel = new wxPanel(this);
1472
1473 ip_input_top_panel->SetBackgroundColour(*wxWHITE);
1474 ip_input_bot_panel->SetBackgroundColour(*wxWHITE);
1475
1476 auto m_input_top_sizer = new wxBoxSizer(wxVERTICAL);
1477 auto m_input_bot_sizer = new wxBoxSizer(wxVERTICAL);
1478
1479 /*top input*/
1480 auto m_input_tip_area = new wxBoxSizer(wxHORIZONTAL);
1481 auto m_input_area = new wxBoxSizer(wxHORIZONTAL);
1482
1483 m_tips_ip = new Label(ip_input_top_panel, _L("IP"));
1484 m_tips_ip->SetMinSize(wxSize(FromDIP(168), -1));
1485 m_tips_ip->SetMaxSize(wxSize(FromDIP(168), -1));
1486
1487 m_input_ip = new TextInput(ip_input_top_panel, wxEmptyString, wxEmptyString);
1488 m_input_ip->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this);
1489 m_input_ip->SetMinSize(wxSize(FromDIP(168), FromDIP(28)));
1490 m_input_ip->SetMaxSize(wxSize(FromDIP(168), FromDIP(28)));
1491
1492 m_tips_access_code = new Label(ip_input_top_panel, _L("Access Code"));
1493 m_tips_access_code->SetMinSize(wxSize(FromDIP(168), -1));
1494 m_tips_access_code->SetMaxSize(wxSize(FromDIP(168), -1));
1495
1496 m_input_access_code = new TextInput(ip_input_top_panel, wxEmptyString, wxEmptyString);
1497 m_input_access_code->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this);
1498 m_input_access_code->SetMinSize(wxSize(FromDIP(168), FromDIP(28)));
1499 m_input_access_code->SetMaxSize(wxSize(FromDIP(168), FromDIP(28)));
1500
1501 m_input_tip_area->Add(m_tips_ip, 0, wxALIGN_CENTER, 0);
1502 m_input_tip_area->Add(0, 0, 0, wxLEFT, FromDIP(20));
1503 m_input_tip_area->Add(m_tips_access_code, 0, wxALIGN_CENTER, 0);
1504
1505 m_input_area->Add(m_input_ip, 0, wxALIGN_CENTER, 0);
1506 m_input_area->Add(0, 0, 0, wxLEFT, FromDIP(20));
1507 m_input_area->Add(m_input_access_code, 0, wxALIGN_CENTER, 0);
1508
1509 m_input_top_sizer->Add(m_input_tip_area, 0, wxRIGHT | wxEXPAND, FromDIP(18));
1510 m_input_top_sizer->Add(0, 0, 0, wxTOP, FromDIP(4));
1511 m_input_top_sizer->Add(m_input_area, 0, wxRIGHT | wxEXPAND, FromDIP(18));
1512
1513 m_tips_cafile = new Label(ip_input_top_panel, _L("HTTPS CA File"));
1514 m_input_cafile = new wxTextCtrl(ip_input_top_panel, wxID_ANY);
1515 m_input_cafile->SetMinSize(wxSize(FromDIP(260), FromDIP(28)));
1516 m_input_cafile->SetMaxSize(wxSize(FromDIP(260), FromDIP(28)));
1517
1518 m_button_cafile = new Button(ip_input_top_panel, _L("Browse") + " " + dots);
1520 m_button_cafile->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {
1521 static const auto filemasks = _L("Certificate files (*.crt, *.pem)|*.crt;*.pem|All files|*.*");
1522 wxFileDialog openFileDialog(this, _L("Open CA certificate file"), "", "", filemasks,
1523 wxFD_OPEN | wxFD_FILE_MUST_EXIST);
1524 if (openFileDialog.ShowModal() != wxID_CANCEL)
1525 m_input_cafile->SetValue(openFileDialog.GetPath());
1526 });
1527
1528 auto cafile_input_sizer = new wxBoxSizer(wxHORIZONTAL);
1529 cafile_input_sizer->Add(m_input_cafile, 1, wxALIGN_CENTER_VERTICAL);
1530 cafile_input_sizer->Add(m_button_cafile, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
1531
1532 m_cafile_hint = new Label(ip_input_top_panel, _L("HTTPS CA file is optional. It is only needed if you use HTTPS with a self-signed certificate."));
1533 m_cafile_hint->Wrap(FromDIP(352));
1534
1535 m_input_top_sizer->Add(m_tips_cafile, 0, wxTOP | wxEXPAND, FromDIP(10));
1536 m_input_top_sizer->Add(cafile_input_sizer, 0, wxTOP | wxEXPAND, FromDIP(4));
1537 m_input_top_sizer->Add(m_cafile_hint, 0, wxTOP | wxEXPAND, FromDIP(4));
1538
1539 if (!Http::ca_file_supported()) {
1540 m_input_cafile->Disable();
1541 m_button_cafile->Disable();
1542 m_cafile_hint->SetLabel(_L("This system uses HTTPS certificates from the system Certificate Store or Keychain. To use a custom CA file, import it there."));
1543 m_cafile_hint->Wrap(FromDIP(352));
1544 }
1545
1546 if (wxGetApp().preset_bundle) {
1547 const auto& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
1548 if (config.has("printhost_cafile"))
1549 m_input_cafile->SetValue(from_u8(config.opt_string("printhost_cafile")));
1550 }
1551
1552 ip_input_top_panel->SetSizer(m_input_top_sizer);
1553 ip_input_top_panel->Layout();
1554 ip_input_top_panel->Fit();
1555
1556 /*bom input*/
1557 auto m_input_sn_area = new wxBoxSizer(wxHORIZONTAL);
1558 auto m_input_modelID_area = new wxBoxSizer(wxHORIZONTAL);
1559
1560 m_tips_sn = new Label(ip_input_bot_panel, "SN");
1561 m_tips_sn->SetMinSize(wxSize(FromDIP(168), -1));
1562 m_tips_sn->SetMaxSize(wxSize(FromDIP(168), -1));
1563
1564 m_input_sn = new TextInput(ip_input_bot_panel, wxEmptyString, wxEmptyString);
1565 m_input_sn->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this);
1566 m_input_sn->SetMinSize(wxSize(FromDIP(168), FromDIP(28)));
1567 m_input_sn->SetMaxSize(wxSize(FromDIP(168), FromDIP(28)));
1568
1569 m_tips_modelID = new Label(ip_input_bot_panel, _L("Printer model"));
1570 m_tips_modelID->SetMinSize(wxSize(FromDIP(168), -1));
1571 m_tips_modelID->SetMaxSize(wxSize(FromDIP(168), -1));
1572
1573 m_input_modelID = new ComboBox(ip_input_bot_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(168), FromDIP(28)), 0, nullptr, wxCB_READONLY);
1574 // m_input_modelID->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this);
1575 m_input_modelID->SetMinSize(wxSize(FromDIP(168), FromDIP(28)));
1576 m_input_modelID->SetMaxSize(wxSize(FromDIP(168), FromDIP(28)));
1577
1579 for (auto it = m_models_map.begin(); it != m_models_map.end(); ++it) {
1580 m_input_modelID->Append(it->first);
1581 m_input_modelID->SetSelection(0);
1582 }
1583
1584 m_input_sn_area->Add(m_tips_sn, 0, wxALIGN_CENTER, 0);
1585 m_input_sn_area->Add(0, 0, 0, wxLEFT, FromDIP(20));
1586 m_input_sn_area->Add(m_tips_modelID, 0, wxALIGN_CENTER, 0);
1587
1588 m_input_modelID_area->Add(m_input_sn, 0, wxALIGN_CENTER, 0);
1589 m_input_modelID_area->Add(0, 0, 0, wxLEFT, FromDIP(20));
1590 m_input_modelID_area->Add(m_input_modelID, 0, wxALIGN_CENTER, 0);
1591
1592 auto* tips_printer_name = new Label(ip_input_bot_panel, _L("Printer name"));
1593
1594 m_input_printer_name = new TextInput(ip_input_bot_panel, wxEmptyString, wxEmptyString);
1595 m_input_printer_name->Bind(wxEVT_TEXT, &InputIpAddressDialog::on_text, this);
1596 m_input_printer_name->SetMinSize(wxSize(FromDIP(352), FromDIP(28)));
1597 m_input_printer_name->SetMaxSize(wxSize(FromDIP(352), FromDIP(28)));
1598
1599 m_input_bot_sizer->Add(tips_printer_name, 0, wxEXPAND, 0);
1600 m_input_bot_sizer->Add(0, 0, 0, wxTOP, FromDIP(4));
1601 m_input_bot_sizer->Add(m_input_printer_name, 0, wxEXPAND, 0);
1602 m_input_bot_sizer->Add(0, 0, 0, wxTOP, FromDIP(4));
1603
1604 m_input_bot_sizer->Add(m_input_sn_area, 0, wxEXPAND, 0);
1605 m_input_bot_sizer->Add(0, 0, 0, wxTOP, FromDIP(4));
1606 m_input_bot_sizer->Add(m_input_modelID_area, 0, wxEXPAND, 0);
1607
1608 ip_input_bot_panel->SetSizer(m_input_bot_sizer);
1609 ip_input_bot_panel->Layout();
1610 ip_input_bot_panel->Fit();
1611
1612 /*other*/
1613 m_test_right_msg = new Label(this, Label::Body_13, wxEmptyString, LB_AUTO_WRAP);
1614 m_test_right_msg->SetForegroundColour(wxColour(38, 166, 154));
1615 m_test_right_msg->Hide();
1616
1617 m_test_wrong_msg = new Label(this, Label::Body_13, wxEmptyString, LB_AUTO_WRAP);
1618 m_test_wrong_msg->SetForegroundColour(wxColour(208, 27, 27));
1619 m_test_wrong_msg->Hide();
1620
1621 m_tip4 = new Label(this, Label::Body_12, _L("Where to find your printer's IP and Access Code?"), LB_AUTO_WRAP);
1622 m_tip4->SetMinSize(wxSize(FromDIP(355), -1));
1623 m_tip4->SetMaxSize(wxSize(FromDIP(355), -1));
1624
1625 // ORCA standardized HyperLink
1626 m_trouble_shoot = new HyperLink(this, _L("How to trouble shooting"));
1627
1628 m_img_help = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("input_access_code_x1_en", this, 198), wxDefaultPosition, wxSize(FromDIP(355), -1), 0);
1629
1630 auto m_sizer_button = new wxBoxSizer(wxHORIZONTAL);
1631
1632 m_button_ok = new Button(this, _L("Connect"));
1634 m_button_ok->Enable(false);
1635 m_button_ok->Bind(wxEVT_LEFT_DOWN, &InputIpAddressDialog::on_ok, this);
1636
1637 m_button_manual_setup = new Button(this, _L("Manual Setup"));
1639 m_button_manual_setup->Enable(false);
1640
1641 m_button_manual_setup->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent&) {
1642 wxCommandEvent event(EVT_CHECK_IP_ADDRESS_LAYOUT);
1643 event.SetEventObject(this);
1644 event.SetInt(1);
1645 wxPostEvent(this, event);
1646 });
1647
1648 m_button_manual_setup->Hide();
1649
1650 m_sizer_button->AddStretchSpacer();
1651 m_sizer_button->Add(m_button_manual_setup, 0, wxALL, FromDIP(5));
1652 m_sizer_button->Add(m_button_ok, 0, wxALL, FromDIP(5));
1653 // m_sizer_button->Add(m_button_cancel, 0, wxALL, FromDIP(5));
1654 m_sizer_button->Layout();
1655
1656 m_status_bar = std::make_shared<BBLStatusBarSend>(this);
1657 m_status_bar->get_panel()->Hide();
1658
1659 auto m_step_icon_panel1 = new wxWindow(this, wxID_ANY);
1660 auto m_step_icon_panel2 = new wxWindow(this, wxID_ANY);
1661 m_step_icon_panel3 = new wxWindow(this, wxID_ANY);
1662
1663 m_step_icon_panel1->SetBackgroundColour(*wxWHITE);
1664 m_step_icon_panel2->SetBackgroundColour(*wxWHITE);
1665 m_step_icon_panel3->SetBackgroundColour(*wxWHITE);
1666
1667 auto m_sizer_step_icon_panel1 = new wxBoxSizer(wxVERTICAL);
1668 auto m_sizer_step_icon_panel2 = new wxBoxSizer(wxVERTICAL);
1669 auto m_sizer_step_icon_panel3 = new wxBoxSizer(wxVERTICAL);
1670
1671 m_img_step1 = new wxStaticBitmap(m_step_icon_panel1, wxID_ANY, create_scaled_bitmap("ip_address_step", this, 6), wxDefaultPosition, wxSize(FromDIP(6), FromDIP(6)), 0);
1672 m_img_step2 = new wxStaticBitmap(m_step_icon_panel2, wxID_ANY, create_scaled_bitmap("ip_address_step", this, 6), wxDefaultPosition, wxSize(FromDIP(6), FromDIP(6)), 0);
1673 m_img_step3 = new wxStaticBitmap(m_step_icon_panel3, wxID_ANY, create_scaled_bitmap("ip_address_step", this, 6), wxDefaultPosition, wxSize(FromDIP(6), FromDIP(6)), 0);
1674
1675 m_step_icon_panel1->SetSizer(m_sizer_step_icon_panel1);
1676 m_step_icon_panel1->Layout();
1677 m_step_icon_panel1->Fit();
1678
1679 m_step_icon_panel2->SetSizer(m_sizer_step_icon_panel2);
1680 m_step_icon_panel2->Layout();
1681 m_step_icon_panel2->Fit();
1682
1683 m_step_icon_panel3->SetSizer(m_sizer_step_icon_panel3);
1684 m_step_icon_panel3->Layout();
1685 m_step_icon_panel3->Fit();
1686
1687 m_sizer_step_icon_panel1->Add(m_img_step1, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
1688 m_sizer_step_icon_panel2->Add(m_img_step2, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
1689 m_sizer_step_icon_panel3->Add(m_img_step3, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
1690
1691 m_step_icon_panel1->SetMinSize(wxSize(-1, m_tip1->GetBestSize().y));
1692 m_step_icon_panel1->SetMaxSize(wxSize(-1, m_tip1->GetBestSize().y));
1693
1694 m_step_icon_panel2->SetMinSize(wxSize(-1, m_tip2->GetBestSize().y));
1695 m_step_icon_panel2->SetMaxSize(wxSize(-1, m_tip2->GetBestSize().y));
1696
1697 m_worker = std::make_unique<PlaterWorker<BoostThreadWorker>>(this, m_status_bar, "send_worker");
1698
1699 m_sizer_msg->Layout();
1700
1701
1702 m_trouble_shoot->Hide();
1703
1704 m_sizer_main->Add(m_tip0, 0, wxEXPAND, 0);
1705 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(6));
1706 m_sizer_main->Add(m_tip1, 0, wxEXPAND, 0);
1707 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(20));
1708 m_sizer_main->Add(m_tip2, 0, wxEXPAND, 0);
1709 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(2));
1710 m_sizer_main->Add(m_tip3, 0, wxTOP|wxEXPAND, 0);
1711 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(12));
1712 m_sizer_main->Add(m_tip4, 0, wxEXPAND, 0);
1713 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(3));
1714 m_sizer_main->Add(m_img_help, 0, 0, 0);
1715 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(12));
1716 m_sizer_main->Add(ip_input_top_panel, 0,wxEXPAND, 0);
1717 m_sizer_main->Add(ip_input_bot_panel, 0,wxEXPAND, 0);
1718 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(4));
1719 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(4));
1720 m_sizer_main->Add(m_test_right_msg, 0, wxEXPAND, 0);
1721 m_sizer_main->Add(m_test_wrong_msg, 0, wxEXPAND, 0);
1722
1723 m_sizer_main->Add(0, 0, 0, wxTOP, FromDIP(4));
1724 m_sizer_main->Add(m_status_bar->get_panel(), 0, wxEXPAND, 0);
1725 m_sizer_main->Layout();
1726
1727 m_sizer_body->Add(m_line_top, 0, wxEXPAND, 0);
1728 m_sizer_body->Add(0, 0, 0, wxTOP, FromDIP(10));
1729 m_sizer_body->Add(m_sizer_main, 0, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(20));
1730 m_sizer_body->Add(0, 0, 0, wxTOP, FromDIP(4));
1731 m_sizer_body->Add(m_sizer_msg, 0, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(20));
1732 m_sizer_body->Add(0, 0, 0, wxTOP, FromDIP(4));
1733 m_sizer_body->Add(m_trouble_shoot, 0, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(20));
1734 m_sizer_body->Add(0, 0, 0, wxTOP, FromDIP(8));
1735 m_sizer_body->Add(m_sizer_button, 0, wxLEFT|wxRIGHT|wxEXPAND, FromDIP(20));
1736 m_sizer_body->Add(0, 0, 0, wxTOP, FromDIP(10));
1737 m_sizer_body->Layout();
1738
1740
1741 SetSizer(m_sizer_body);
1742 Layout();
1743 Fit();
1744
1745 CentreOnParent(wxBOTH);
1746 Move(wxPoint(GetScreenPosition().x, GetScreenPosition().y - FromDIP(50)));
1747 wxGetApp().UpdateDlgDarkUI(this);
1748
1749 closeTimer = new wxTimer();
1750 closeTimer->SetOwner(this);
1751 Bind(wxEVT_TIMER, &InputIpAddressDialog::OnTimer, this);
1752
1753 Bind(EVT_CHECK_IP_ADDRESS_FAILED, &InputIpAddressDialog::on_check_ip_address_failed, this);
1754
1755 Bind(EVT_CLOSE_IPADDRESS_DLG, [this](auto& e) {
1756 m_status_bar->reset();
1757 EndModal(wxID_YES);
1758 });
1759 Bind(wxEVT_CLOSE_WINDOW, [this](auto& e) {
1760 on_cancel();
1761 closeTimer->Stop();
1762 });
1763
1764 Bind(EVT_UPDATE_TEXT_MSG, &InputIpAddressDialog::update_test_msg_event, this);
1765 Bind(EVT_CHECK_IP_ADDRESS_LAYOUT, [this](auto& e) {
1766 int mode = e.GetInt();
1767 update_test_msg(wxEmptyString, true);
1768 switch_input_panel(mode);
1769 Layout();
1770 Fit();
1771 });
1772}
@ Confirm
Definition Button.hpp:25
@ Regular
Definition Button.hpp:24
@ Choice
Definition Button.hpp:33
@ Parameter
Definition Button.hpp:34
#define LB_AUTO_WRAP
Definition Label.hpp:12
#define _L(s)
Definition OBJ.cpp:34
static wxFont Body_13
Definition Label.hpp:54
static wxFont Body_12
Definition Label.hpp:55
static std::map< std::string, std::string > get_all_model_id_with_name()
Definition DevConfigUtil.cpp:74
void EndModal(int retCode) override
Definition GUI_Utils.hpp:305
wxWindow * m_step_icon_panel3
Definition ReleaseNote.hpp:311
Label * m_tip2
Definition ReleaseNote.hpp:314
Button * m_button_ok
Definition ReleaseNote.hpp:323
Label * m_tips_ip
Definition ReleaseNote.hpp:325
wxPanel * ip_input_bot_panel
Definition ReleaseNote.hpp:322
wxStaticBitmap * m_img_step3
Definition ReleaseNote.hpp:343
Label * m_tips_cafile
Definition ReleaseNote.hpp:327
void switch_input_panel(int index)
Definition ReleaseNote.cpp:1774
Label * m_cafile_hint
Definition ReleaseNote.hpp:328
void update_test_msg_event(wxCommandEvent &evt)
Definition ReleaseNote.cpp:2016
Label * m_tip1
Definition ReleaseNote.hpp:313
Button * m_button_cafile
Definition ReleaseNote.hpp:336
TextInput * m_input_ip
Definition ReleaseNote.hpp:333
void on_ok(wxMouseEvent &evt)
Definition ReleaseNote.cpp:1891
void OnTimer(wxTimerEvent &event)
Definition ReleaseNote.cpp:2129
wxStaticBitmap * m_img_help
Definition ReleaseNote.hpp:340
std::unique_ptr< Worker > m_worker
Definition ReleaseNote.hpp:352
wxStaticBitmap * m_img_step1
Definition ReleaseNote.hpp:341
void on_check_ip_address_failed(wxCommandEvent &evt)
Definition ReleaseNote.cpp:2146
wxString comfirm_before_check_text
Definition ReleaseNote.hpp:302
ComboBox * m_input_modelID
Definition ReleaseNote.hpp:339
wxTimer * closeTimer
Definition ReleaseNote.hpp:345
Label * m_test_wrong_msg
Definition ReleaseNote.hpp:332
TextInput * m_input_sn
Definition ReleaseNote.hpp:338
Label * m_tips_modelID
Definition ReleaseNote.hpp:330
wxPanel * ip_input_top_panel
Definition ReleaseNote.hpp:321
Label * m_tips_access_code
Definition ReleaseNote.hpp:326
Label * m_test_right_msg
Definition ReleaseNote.hpp:331
int m_result
Definition ReleaseNote.hpp:349
TextInput * m_input_printer_name
Definition ReleaseNote.hpp:337
wxString comfirm_before_enter_text
Definition ReleaseNote.hpp:303
wxStaticBitmap * m_img_step2
Definition ReleaseNote.hpp:342
void on_text(wxCommandEvent &evt)
Definition ReleaseNote.cpp:2168
Button * m_button_manual_setup
Definition ReleaseNote.hpp:324
wxString comfirm_last_enter_text
Definition ReleaseNote.hpp:305
wxTextCtrl * m_input_cafile
Definition ReleaseNote.hpp:335
Label * m_tip4
Definition ReleaseNote.hpp:316
TextInput * m_input_access_code
Definition ReleaseNote.hpp:334
Label * m_tip0
Definition ReleaseNote.hpp:312
void on_cancel()
Definition ReleaseNote.cpp:1794
wxString comfirm_after_enter_text
Definition ReleaseNote.hpp:304
HyperLink * m_trouble_shoot
Definition ReleaseNote.hpp:344
void update_test_msg(wxString msg, bool connected)
Definition ReleaseNote.cpp:1834
std::map< std::string, std::string > m_models_map
Definition ReleaseNote.hpp:353
Label * m_tips_sn
Definition ReleaseNote.hpp:329
std::shared_ptr< BBLStatusBarSend > m_status_bar
Definition ReleaseNote.hpp:351
Label * m_tip3
Definition ReleaseNote.hpp:315
static bool ca_file_supported()
Definition Http.cpp:943
wxMouseEvent
Definition CameraPopup.cpp:47
static wxString dots("...", wxConvUTF8)
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
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_13, Slic3r::Http::ca_file_supported(), Choice, closeTimer, comfirm_after_enter_text, comfirm_before_check_text, comfirm_before_enter_text, comfirm_last_enter_text, Confirm, create_scaled_bitmap(), Slic3r::GUI::dots(), Slic3r::GUI::DPIDialog::EndModal(), Slic3r::GUI::from_u8(), Slic3r::DevPrinterConfigUtil::get_all_model_id_with_name(), ip_input_bot_panel, ip_input_top_panel, LB_AUTO_WRAP, m_button_cafile, m_button_manual_setup, m_button_ok, m_cafile_hint, m_img_help, m_img_step1, m_img_step2, m_img_step3, m_input_access_code, m_input_cafile, m_input_ip, m_input_modelID, m_input_printer_name, m_input_sn, m_models_map, m_result, m_status_bar, m_step_icon_panel3, m_test_right_msg, m_test_wrong_msg, m_tip0, m_tip1, m_tip2, m_tip3, m_tip4, m_tips_access_code, m_tips_cafile, m_tips_ip, m_tips_modelID, m_tips_sn, m_trouble_shoot, m_worker, on_cancel(), on_check_ip_address_failed(), on_ok(), on_text(), OnTimer(), Parameter, Regular, switch_input_panel(), update_test_msg(), update_test_msg_event(), and Slic3r::GUI::wxMouseEvent.

Here is the call graph for this function:

◆ ~InputIpAddressDialog()

Slic3r::GUI::InputIpAddressDialog::~InputIpAddressDialog ( )
2200{
2201}

Member Function Documentation

◆ check_ip_address_failed()

void Slic3r::GUI::InputIpAddressDialog::check_ip_address_failed ( int result)
2140{
2141 auto evt = new wxCommandEvent(EVT_CHECK_IP_ADDRESS_FAILED);
2142 evt->SetInt(result);
2143 wxQueueEvent(this, evt);
2144}

Referenced by on_send_retry().

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::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; }

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

◆ isValidEndpoint()

bool Slic3r::GUI::InputIpAddressDialog::isValidEndpoint ( std::string endpoint)
1866{
1867 if (endpoint.empty() || std::any_of(endpoint.begin(), endpoint.end(), [](unsigned char c) {
1868 return std::isspace(c) != 0;
1869 }))
1870 return false;
1871
1872 const bool has_http_scheme = endpoint.rfind("http://", 0) == 0;
1873 const bool has_https_scheme = endpoint.rfind("https://", 0) == 0;
1874 const auto scheme_pos = endpoint.find("://");
1875 if (scheme_pos != std::string::npos && !has_http_scheme && !has_https_scheme)
1876 return false;
1877
1878 std::string port;
1879 const std::string host = Http::get_host_from_url(endpoint, &port);
1880 if (host.empty())
1881 return false;
1882
1883 // get_host_from_url returns its input when libcurl cannot parse it. For a
1884 // URL with a scheme, that means a failed parse still needs to be rejected.
1885 if (scheme_pos != std::string::npos && host == endpoint)
1886 return false;
1887
1888 return true;
1889}
static std::string get_host_from_url(const std::string &url, std::string *port=nullptr)
Definition Http.cpp:1008

References Slic3r::Http::get_host_from_url().

Referenced by on_text().

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

◆ normal_font()

◆ on_cancel()

void Slic3r::GUI::InputIpAddressDialog::on_cancel ( )
1795{
1796 if (m_thread) {
1797 m_thread->interrupt();
1798 m_thread->detach();
1799 delete m_thread;
1800 m_thread = nullptr;
1801 }
1802
1803 EndModal(wxID_CANCEL);
1804}
boost::thread * m_thread
Definition ReleaseNote.hpp:308

References Slic3r::GUI::DPIDialog::EndModal(), and m_thread.

Referenced by InputIpAddressDialog().

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

◆ on_check_ip_address_failed()

void Slic3r::GUI::InputIpAddressDialog::on_check_ip_address_failed ( wxCommandEvent & evt)
2147{
2148 m_result = evt.GetInt();
2149 if (m_result == -2) {
2150 update_test_msg(_L("Connection failed, please double check IP and Access Code"), false);
2151 }
2152 else {
2153 if (m_need_input_sn) {
2154 update_test_msg(_L("Connection failed! If your IP and Access Code is correct, \nplease move to step 3 for troubleshooting network issues"), false);
2155 }
2156 else {
2157 update_test_msg(_L("Connection failed! Please refer to the wiki page."), false);
2158 }
2159
2160 Layout();
2161 Fit();
2162 }
2163
2164 m_button_ok->Enable(true);
2165 // ORCA enabling / disabling buttons with conditions enough to change its style
2166}
bool m_need_input_sn
Definition ReleaseNote.hpp:348

References _L, m_button_ok, m_need_input_sn, m_result, and update_test_msg().

Referenced by InputIpAddressDialog().

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

◆ on_dpi_changed()

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

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

2204{
2205 m_button_cafile->Rescale();
2206}

References m_button_cafile.

◆ on_ok()

void Slic3r::GUI::InputIpAddressDialog::on_ok ( wxMouseEvent & evt)
1892{
1893 if (!m_need_input_sn) {
1894 on_send_retry();
1895 return;
1896 }
1897
1898 m_test_right_msg->Hide();
1899 m_test_wrong_msg->Hide();
1900 m_trouble_shoot->Hide();
1901 std::string str_ip = m_input_ip->GetTextCtrl()->GetValue().ToStdString();
1902 std::string str_access_code = m_input_access_code->GetTextCtrl()->GetValue().ToStdString();
1903 if (str_access_code.empty())
1904 str_access_code = "88888888";
1905 std::string str_name = m_input_printer_name->GetTextCtrl()->GetValue().Strip(wxString::both).ToStdString();
1906 // Serial number should not contain lower case letters, and bambu_network plugin crashes
1907 // if user entered the wrong serial number, so we call `Upper()` here.
1908 std::string str_sn = m_input_sn->GetTextCtrl()->GetValue().Strip(wxString::both).Upper().ToStdString();
1909 std::string str_model_id = "";
1910
1911 auto it = m_models_map.find(m_input_modelID->GetStringSelection().ToStdString());
1912 if (it != m_models_map.end()) {
1913 str_model_id = it->second;
1914 }
1915
1916 // ORCA enabling / disabling buttons with conditions enough to change its style
1917 m_button_manual_setup->Enable(false);
1918 m_button_ok->Enable(false);
1919
1920 Refresh();
1921 Layout();
1922 Fit();
1923
1924 if (wxGetApp().preset_bundle) {
1925 auto& config = wxGetApp().preset_bundle->printers.get_edited_preset().config;
1926 std::string port;
1927 Http::get_host_from_url(str_ip, &port);
1928 config.opt_string("print_host") = str_ip;
1929 if (!port.empty())
1930 config.opt_string("printhost_port") = port;
1932 config.opt_string("printhost_cafile") = m_input_cafile->GetValue().ToStdString();
1933 }
1934
1935 token_.reset(this, nop_deleter);
1936 m_thread = new boost::thread(boost::bind(&InputIpAddressDialog::workerThreadFunc, this, str_ip, str_access_code, str_sn, str_model_id, str_name));
1937}
void on_send_retry()
Definition ReleaseNote.cpp:1939
void workerThreadFunc(std::string str_ip, std::string str_access_code, std::string sn, std::string model_id, std::string name)
Definition ReleaseNote.cpp:2036
std::shared_ptr< InputIpAddressDialog > token_
Definition ReleaseNote.hpp:307
static void nop_deleter(InputIpAddressDialog *)
Definition ReleaseNote.cpp:1429

References Slic3r::Http::ca_file_supported(), Slic3r::Http::get_host_from_url(), m_button_manual_setup, m_button_ok, m_input_access_code, m_input_cafile, m_input_ip, m_input_modelID, m_input_printer_name, m_input_sn, m_models_map, m_need_input_sn, m_test_right_msg, m_test_wrong_msg, m_thread, m_trouble_shoot, Slic3r::GUI::nop_deleter(), on_send_retry(), token_, workerThreadFunc(), and Slic3r::GUI::wxMouseEvent.

Referenced by InputIpAddressDialog().

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

◆ on_send_retry()

void Slic3r::GUI::InputIpAddressDialog::on_send_retry ( )
1940{
1941 m_test_right_msg->Hide();
1942 m_test_wrong_msg->Hide();
1943 m_img_step3->Hide();
1944 m_tip4->Hide();
1945 m_trouble_shoot->Hide();
1946 Layout();
1947 Fit();
1948 wxString ip = m_input_ip->GetTextCtrl()->GetValue();
1949 wxString str_access_code = m_input_access_code->GetTextCtrl()->GetValue();
1950 if (str_access_code.IsEmpty())
1951 str_access_code = "88888888";
1952
1953 // check support function
1954 if (!m_obj) return;
1955 if (!m_obj->is_support_send_to_sdcard) {
1956 wxString input_str = wxString::Format("%s|%s", ip, str_access_code);
1957 auto event = wxCommandEvent(EVT_ENTER_IP_ADDRESS);
1958 event.SetString(input_str);
1959 event.SetEventObject(this);
1960 wxPostEvent(this, event);
1961
1962 auto event_close = wxCommandEvent(EVT_CLOSE_IPADDRESS_DLG);
1963 event_close.SetEventObject(this);
1964 wxPostEvent(this, event_close);
1965 return;
1966 }
1967
1968 m_button_ok->Enable(false); // ORCA enabling / disabling buttons with conditions enough to change its style
1969
1970 m_worker->wait_for_idle();
1971
1972 m_status_bar->reset();
1973 m_status_bar->set_prog_block();
1974 m_status_bar->set_cancel_callback_fina([this]() {
1975 BOOST_LOG_TRIVIAL(info) << "print_job: enter canceled";
1976 m_worker->cancel_all();
1977 m_worker->wait_for_idle();
1978 });
1979
1980 auto m_send_job = std::make_unique<SendJob>(m_obj->get_dev_id());
1981 m_send_job->m_dev_ip = ip.ToStdString();
1982 m_send_job->m_access_code = str_access_code.ToStdString();
1983
1984#if !BBL_RELEASE_TO_PUBLIC
1985 m_send_job->m_local_use_ssl = wxGetApp().app_config->get("enable_ssl_for_mqtt") == "true" ? true : false;
1986 m_send_job->m_local_use_ssl_for_ftp = wxGetApp().app_config->get("enable_ssl_for_ftp") == "true" ? true : false;
1987#else
1988 m_send_job->m_local_use_ssl = m_obj->local_use_ssl;
1989 m_send_job->m_local_use_ssl_for_ftp = m_obj->local_use_ssl_for_ftp;
1990#endif
1991
1992 m_send_job->connection_type = m_obj->connection_type();
1993 m_send_job->cloud_print_only = true;
1994 m_send_job->has_sdcard = m_obj->GetStorage()->get_sdcard_state() == DevStorage::SdcardState::HAS_SDCARD_NORMAL;
1995 m_send_job->set_check_mode();
1996 m_send_job->set_project_name("verify_job");
1997
1998 m_send_job->on_check_ip_address_fail([this](int result) {
1999 this->check_ip_address_failed(result);
2000 });
2001
2002 m_send_job->on_check_ip_address_success([this, ip, str_access_code]() {
2003 wxString input_str = wxString::Format("%s|%s", ip, str_access_code);
2004 auto event = wxCommandEvent(EVT_ENTER_IP_ADDRESS);
2005 event.SetString(input_str);
2006 event.SetEventObject(this);
2007 wxPostEvent(this, event);
2008 m_result = 0;
2009
2010 update_test_msg(_L("IP and Access Code Verified! You may close the window"), true);
2011 });
2012
2013 replace_job(*m_worker, std::move(m_send_job));
2014}
@ HAS_SDCARD_NORMAL
Definition DevStorage.h:19
MachineObject * m_obj
Definition ReleaseNote.hpp:320
void check_ip_address_failed(int result)
Definition ReleaseNote.cpp:2139
bool replace_job(Worker &w, Args &&...args)
Definition Worker.hpp:99

References _L, check_ip_address_failed(), Slic3r::DevStorage::HAS_SDCARD_NORMAL, m_button_ok, m_img_step3, m_input_access_code, m_input_ip, m_obj, m_result, m_status_bar, m_test_right_msg, m_test_wrong_msg, m_tip4, m_trouble_shoot, m_worker, Slic3r::GUI::replace_job(), and update_test_msg().

Referenced by on_ok().

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

◆ on_sys_color_changed()

◆ on_text()

void Slic3r::GUI::InputIpAddressDialog::on_text ( wxCommandEvent & evt)
2169{
2170 auto str_ip = m_input_ip->GetTextCtrl()->GetValue();
2171 auto str_access_code = m_input_access_code->GetTextCtrl()->GetValue();
2172
2173 if (str_access_code.IsEmpty()) {
2174 str_access_code = "88888888";
2175 }
2176
2177 auto str_name = m_input_printer_name->GetTextCtrl()->GetValue().Strip(wxString::both);
2178 auto str_sn = m_input_sn->GetTextCtrl()->GetValue().Strip(wxString::both);
2179 bool invalid_access_code = true;
2180
2181 for (char c : str_access_code) {
2182 if (!(('0' <= c && c <= '9') || ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'))) {
2183 invalid_access_code = false;
2184 break;
2185 }
2186 }
2187
2188 // ORCA enabling / disabling buttons with conditions enough to change its style
2189 bool valid_access_code_length = str_access_code.IsEmpty() || str_access_code.Length() >= 8;
2190 bool enable_btns = isValidEndpoint(str_ip.ToStdString()) && valid_access_code_length && invalid_access_code;
2191 m_button_manual_setup->Enable(enable_btns);
2192 m_button_ok->Enable(enable_btns);
2193
2194 if (current_input_index == 1)
2195 m_button_ok->Enable(!str_name.IsEmpty() && str_sn.length() == 15);
2196
2197}
int current_input_index
Definition ReleaseNote.hpp:350
bool isValidEndpoint(std::string endpoint)
Definition ReleaseNote.cpp:1865

References current_input_index, isValidEndpoint(), m_button_manual_setup, m_button_ok, m_input_access_code, m_input_ip, m_input_printer_name, and m_input_sn.

Referenced by InputIpAddressDialog(), set_machine_obj(), and update_test_msg().

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

◆ OnTimer()

void Slic3r::GUI::InputIpAddressDialog::OnTimer ( wxTimerEvent & event)
2129 {
2130 if (closeCount > 0) {
2131 closeCount--;
2132 }
2133 else {
2134 closeTimer->Stop();
2135 EndModal(wxID_CLOSE);
2136 }
2137}
int closeCount
Definition ReleaseNote.hpp:346

References closeCount, closeTimer, and Slic3r::GUI::DPIDialog::EndModal().

Referenced by InputIpAddressDialog().

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

◆ post_update_test_msg()

void Slic3r::GUI::InputIpAddressDialog::post_update_test_msg ( std::weak_ptr< InputIpAddressDialog > w,
wxString text,
bool beconnect )
2026{
2027 if (w.expired()) return;
2028
2029 wxCommandEvent event(EVT_UPDATE_TEXT_MSG);
2030 event.SetEventObject(this);
2031 event.SetString(text);
2032 event.SetInt(beconnect);
2033 wxPostEvent(this, event);
2034}

Referenced by workerThreadFunc().

Here is the caller graph for this function:

◆ 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_machine_obj()

void Slic3r::GUI::InputIpAddressDialog::set_machine_obj ( MachineObject * obj)
1813{
1814 m_obj = obj;
1815 m_input_ip->GetTextCtrl()->ChangeValue(m_obj->get_dev_ip());
1816 m_input_access_code->GetTextCtrl()->ChangeValue(m_obj->get_access_code());
1817 m_input_printer_name->GetTextCtrl()->ChangeValue(m_obj->get_dev_name());
1818
1819 std::string img_str = DevPrinterConfigUtil::get_printer_connect_help_img(m_obj->printer_type);
1820 if (img_str.empty()) { img_str = "input_access_code_x1"; }
1821
1822 std::string language = wxGetApp().app_config->get("language");
1823 auto diagram_bmp = create_scaled_bitmap(img_str + (language == "zh_CN" ? "_cn" : "_en"), this, 198);
1824 m_img_help->SetBitmap(diagram_bmp);
1825
1826
1827 wxCommandEvent dummy;
1828 on_text(dummy); // same button state as after user input
1829
1830 Layout();
1831 Fit();
1832}
static std::string get_printer_connect_help_img(const std::string &type_str)
Definition DevConfigUtil.h:77

References create_scaled_bitmap(), Slic3r::DevPrinterConfigUtil::get_printer_connect_help_img(), m_img_help, m_input_access_code, m_input_ip, m_input_printer_name, m_obj, and on_text().

Referenced by Slic3r::GUI::GUI_App::show_modal_ip_address_enter_dialog().

Here is the call graph for this function:
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()

◆ switch_input_panel()

void Slic3r::GUI::InputIpAddressDialog::switch_input_panel ( int index)
1775{
1776 m_button_manual_setup->Hide();
1777 if (index == 0) {
1778 ip_input_top_panel->Show();
1779 ip_input_bot_panel->Hide();
1780 m_step_icon_panel3->Hide();
1781 m_tip3->Hide();
1782 } else {
1783 ip_input_top_panel->Hide();
1784 ip_input_bot_panel->Show();
1785 m_step_icon_panel3->Show();
1786 m_tip3->Show();
1787
1788 // ORCA enabling / disabling buttons with conditions enough to change its style
1789 m_button_ok->Enable(false);
1790 }
1791 current_input_index = index;
1792}

References current_input_index, ip_input_bot_panel, ip_input_top_panel, m_button_manual_setup, m_button_ok, m_step_icon_panel3, and m_tip3.

Referenced by InputIpAddressDialog().

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 }

◆ update_test_msg()

void Slic3r::GUI::InputIpAddressDialog::update_test_msg ( wxString msg,
bool connected )
1835{
1836 if (msg.empty()) {
1837 m_test_right_msg->Hide();
1838 m_test_wrong_msg->Hide();
1839 }
1840 else {
1841 if(connected){
1842 m_test_right_msg->Show();
1843 m_test_right_msg->SetLabelText(msg);
1844 m_test_right_msg->SetMinSize(wxSize(FromDIP(355), -1));
1845 m_test_right_msg->SetMaxSize(wxSize(FromDIP(355), -1));
1846 }
1847 else{
1848 m_test_wrong_msg->Show();
1849 m_test_wrong_msg->SetLabelText(msg);
1850 m_test_wrong_msg->SetMinSize(wxSize(FromDIP(355), -1));
1851 m_test_wrong_msg->SetMaxSize(wxSize(FromDIP(355), -1));
1852 if (current_input_index == 0) {
1853 m_button_manual_setup->Show();
1854 m_button_manual_setup->Enable();
1855 }
1856 wxCommandEvent e;
1857 on_text(e);
1858 }
1859 }
1860
1861 Layout();
1862 Fit();
1863}

References current_input_index, m_button_manual_setup, m_test_right_msg, m_test_wrong_msg, and on_text().

Referenced by InputIpAddressDialog(), on_check_ip_address_failed(), on_send_retry(), and update_test_msg_event().

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

◆ update_test_msg_event()

void Slic3r::GUI::InputIpAddressDialog::update_test_msg_event ( wxCommandEvent & evt)
2017{
2018 wxString text = evt.GetString();
2019 bool beconnect = evt.GetInt();
2020 update_test_msg(text, beconnect);
2021 Layout();
2022 Fit();
2023}

References update_test_msg().

Referenced by InputIpAddressDialog().

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

◆ update_title()

void Slic3r::GUI::InputIpAddressDialog::update_title ( wxString title)
1808{
1809 SetTitle(title);
1810}

Referenced by Slic3r::GUI::GUI_App::show_modal_ip_address_enter_dialog().

Here is the caller graph for this function:

◆ workerThreadFunc()

void Slic3r::GUI::InputIpAddressDialog::workerThreadFunc ( std::string str_ip,
std::string str_access_code,
std::string sn,
std::string model_id,
std::string name )
2037{
2038 std::weak_ptr<InputIpAddressDialog> w = std::weak_ptr<InputIpAddressDialog>(token_);
2039
2040 post_update_test_msg(w, _L("connecting..."), true);
2041
2042 detectResult detectData;
2043 auto result = -1;
2044 if (current_input_index == 0) {
2045
2046#ifdef __APPLE__
2047 result = -3;
2048#else
2049 result = wxGetApp().getAgent()->bind_detect(str_ip, "secure", detectData);
2050#endif
2051
2052 } else {
2053 result = 0;
2054 detectData.model_id = model_id;
2055 detectData.dev_name = name;
2056 detectData.dev_id = sn;
2057 detectData.connect_type = "lan";
2058 detectData.bind_state = "free";
2059 }
2060
2061 if (w.expired()) return;
2062
2063 if (result < 0) {
2064 post_update_test_msg(w, wxEmptyString, true);
2065 if (result == -1) {
2066 post_update_test_msg(w, _L("Failed to connect to printer."), false);
2067 }
2068 else if (result == -2) {
2069 post_update_test_msg(w, _L("Failed to publish login request."), false);
2070 }
2071 else if (result == -3) {
2072 wxCommandEvent event(EVT_CHECK_IP_ADDRESS_LAYOUT);
2073 event.SetEventObject(this);
2074 event.SetInt(1);
2075 wxPostEvent(this, event);
2076 }
2077 return;
2078 }
2079
2080 if (detectData.bind_state == "occupied") {
2081 post_update_test_msg(w, wxEmptyString, true);
2082 post_update_test_msg(w, _L("The printer has already been bound."), false);
2083 return;
2084 }
2085
2086 if (detectData.connect_type == "cloud") {
2087 post_update_test_msg(w, wxEmptyString, true);
2088 post_update_test_msg(w, _L("The printer mode is incorrect, please switch to LAN Only."), false);
2089 return;
2090 }
2091 if (w.expired()) return;
2092
2093 CallAfter([this, detectData, str_ip, str_access_code, w]() {
2094 DeviceManager* dev = wxGetApp().getDeviceManager();
2095 BBLocalMachine machine;
2096 machine.dev_name = detectData.dev_name;
2097 machine.dev_ip = str_ip;
2098 machine.dev_id = detectData.dev_id;
2099 machine.printer_type = detectData.model_id;
2100 m_obj = dev->insert_local_device(machine,
2101 detectData.connect_type, detectData.bind_state, detectData.version,
2102 str_access_code);
2103
2104
2105 if (w.expired()) return;
2106
2107 if (m_obj) {
2108 m_obj->set_access_code(str_access_code);
2109 wxGetApp().getDeviceManager()->set_selected_machine(m_obj->get_dev_id());
2110 }
2111
2112
2113 closeCount = 1;
2114
2115 post_update_test_msg(w, wxEmptyString, true);
2116 post_update_test_msg(w, wxString::Format(_L("Connecting to printer... The dialog will close later"), closeCount), true);
2117
2118 if (w.expired()) return;
2119
2120#ifdef __APPLE__
2121 wxCommandEvent event(EVT_CLOSE_IPADDRESS_DLG);
2122 wxPostEvent(this, event);
2123#else
2124 closeTimer->Start(1000);
2125#endif
2126 });
2127}
void post_update_test_msg(std::weak_ptr< InputIpAddressDialog > w, wxString text, bool beconnect)
Definition ReleaseNote.cpp:2025

References _L, Slic3r::detectResult::bind_state, closeCount, closeTimer, Slic3r::detectResult::connect_type, current_input_index, Slic3r::BBLocalMachine::dev_id, Slic3r::detectResult::dev_id, Slic3r::BBLocalMachine::dev_ip, Slic3r::BBLocalMachine::dev_name, Slic3r::detectResult::dev_name, Slic3r::DeviceManager::insert_local_device(), m_obj, Slic3r::detectResult::model_id, post_update_test_msg(), Slic3r::BBLocalMachine::printer_type, token_, and Slic3r::detectResult::version.

Referenced by on_ok().

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

Member Data Documentation

◆ closeCount

int Slic3r::GUI::InputIpAddressDialog::closeCount {3}
346{3};

Referenced by OnTimer(), and workerThreadFunc().

◆ closeTimer

wxTimer* Slic3r::GUI::InputIpAddressDialog::closeTimer { nullptr }
345{ nullptr };

Referenced by InputIpAddressDialog(), OnTimer(), and workerThreadFunc().

◆ comfirm_after_enter_text

wxString Slic3r::GUI::InputIpAddressDialog::comfirm_after_enter_text

Referenced by InputIpAddressDialog().

◆ comfirm_before_check_text

wxString Slic3r::GUI::InputIpAddressDialog::comfirm_before_check_text

Referenced by InputIpAddressDialog().

◆ comfirm_before_enter_text

wxString Slic3r::GUI::InputIpAddressDialog::comfirm_before_enter_text

Referenced by InputIpAddressDialog().

◆ comfirm_last_enter_text

wxString Slic3r::GUI::InputIpAddressDialog::comfirm_last_enter_text

Referenced by InputIpAddressDialog().

◆ current_input_index

int Slic3r::GUI::InputIpAddressDialog::current_input_index {0}

◆ ip_input_bot_panel

wxPanel* Slic3r::GUI::InputIpAddressDialog::ip_input_bot_panel { nullptr }
322{ nullptr };

Referenced by InputIpAddressDialog(), and switch_input_panel().

◆ ip_input_top_panel

wxPanel* Slic3r::GUI::InputIpAddressDialog::ip_input_top_panel { nullptr }
321{ nullptr };

Referenced by InputIpAddressDialog(), and switch_input_panel().

◆ m_button_cafile

Button* Slic3r::GUI::InputIpAddressDialog::m_button_cafile { nullptr }
336{ nullptr };

Referenced by InputIpAddressDialog(), and on_dpi_changed().

◆ m_button_manual_setup

Button* Slic3r::GUI::InputIpAddressDialog::m_button_manual_setup { nullptr }

◆ m_button_ok

Button* Slic3r::GUI::InputIpAddressDialog::m_button_ok { nullptr }

◆ m_cafile_hint

Label* Slic3r::GUI::InputIpAddressDialog::m_cafile_hint { nullptr }
328{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_can_rescale

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

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

wxStaticBitmap* Slic3r::GUI::InputIpAddressDialog::m_img_help { nullptr }
340{ nullptr };

Referenced by InputIpAddressDialog(), and set_machine_obj().

◆ m_img_step1

wxStaticBitmap* Slic3r::GUI::InputIpAddressDialog::m_img_step1 { nullptr }
341{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_img_step2

wxStaticBitmap* Slic3r::GUI::InputIpAddressDialog::m_img_step2 { nullptr }
342{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_img_step3

wxStaticBitmap* Slic3r::GUI::InputIpAddressDialog::m_img_step3 { nullptr }
343{ nullptr };

Referenced by InputIpAddressDialog(), and on_send_retry().

◆ m_input_access_code

TextInput* Slic3r::GUI::InputIpAddressDialog::m_input_access_code { nullptr }

◆ m_input_cafile

wxTextCtrl* Slic3r::GUI::InputIpAddressDialog::m_input_cafile { nullptr }
335{ nullptr };

Referenced by InputIpAddressDialog(), and on_ok().

◆ m_input_ip

TextInput* Slic3r::GUI::InputIpAddressDialog::m_input_ip { nullptr }

◆ m_input_modelID

ComboBox* Slic3r::GUI::InputIpAddressDialog::m_input_modelID { nullptr }
339{ nullptr };

Referenced by InputIpAddressDialog(), and on_ok().

◆ m_input_printer_name

TextInput* Slic3r::GUI::InputIpAddressDialog::m_input_printer_name { nullptr }
337{ nullptr };

Referenced by InputIpAddressDialog(), on_ok(), on_text(), and set_machine_obj().

◆ m_input_sn

TextInput* Slic3r::GUI::InputIpAddressDialog::m_input_sn { nullptr }
338{ nullptr };

Referenced by InputIpAddressDialog(), on_ok(), and on_text().

◆ m_ip

std::string Slic3r::GUI::InputIpAddressDialog::m_ip

◆ m_models_map

std::map<std::string, std::string> Slic3r::GUI::InputIpAddressDialog::m_models_map

Referenced by InputIpAddressDialog(), and on_ok().

◆ m_need_input_sn

bool Slic3r::GUI::InputIpAddressDialog::m_need_input_sn {true}

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

MachineObject* Slic3r::GUI::InputIpAddressDialog::m_obj {nullptr}
320{nullptr};

Referenced by on_send_retry(), set_machine_obj(), and workerThreadFunc().

◆ m_prev_scale_factor

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

◆ m_result

int Slic3r::GUI::InputIpAddressDialog::m_result

◆ m_scale_factor

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

◆ m_show_access_code

bool Slic3r::GUI::InputIpAddressDialog::m_show_access_code { false }
347{ false };

◆ m_status_bar

std::shared_ptr<BBLStatusBarSend> Slic3r::GUI::InputIpAddressDialog::m_status_bar

◆ m_step_icon_panel3

wxWindow* Slic3r::GUI::InputIpAddressDialog::m_step_icon_panel3 { nullptr }
311{ nullptr };

Referenced by InputIpAddressDialog(), and switch_input_panel().

◆ m_test_right_msg

Label* Slic3r::GUI::InputIpAddressDialog::m_test_right_msg { nullptr }
331{ nullptr };

Referenced by InputIpAddressDialog(), on_ok(), on_send_retry(), and update_test_msg().

◆ m_test_wrong_msg

Label* Slic3r::GUI::InputIpAddressDialog::m_test_wrong_msg { nullptr }
332{ nullptr };

Referenced by InputIpAddressDialog(), on_ok(), on_send_retry(), and update_test_msg().

◆ m_thread

boost::thread* Slic3r::GUI::InputIpAddressDialog::m_thread {nullptr}
308{nullptr};

Referenced by on_cancel(), and on_ok().

◆ m_tip0

Label* Slic3r::GUI::InputIpAddressDialog::m_tip0 { nullptr }
312{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tip1

Label* Slic3r::GUI::InputIpAddressDialog::m_tip1 { nullptr }
313{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tip2

Label* Slic3r::GUI::InputIpAddressDialog::m_tip2 { nullptr }
314{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tip3

Label* Slic3r::GUI::InputIpAddressDialog::m_tip3 { nullptr }
315{ nullptr };

Referenced by InputIpAddressDialog(), and switch_input_panel().

◆ m_tip4

Label* Slic3r::GUI::InputIpAddressDialog::m_tip4 { nullptr }
316{ nullptr };

Referenced by InputIpAddressDialog(), and on_send_retry().

◆ m_tips_access_code

Label* Slic3r::GUI::InputIpAddressDialog::m_tips_access_code { nullptr }
326{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tips_cafile

Label* Slic3r::GUI::InputIpAddressDialog::m_tips_cafile { nullptr }
327{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tips_ip

Label* Slic3r::GUI::InputIpAddressDialog::m_tips_ip { nullptr }
325{ nullptr };

Referenced by InputIpAddressDialog().

◆ m_tips_modelID

Label* Slic3r::GUI::InputIpAddressDialog::m_tips_modelID {nullptr}
330{nullptr};

Referenced by InputIpAddressDialog().

◆ m_tips_sn

Label* Slic3r::GUI::InputIpAddressDialog::m_tips_sn {nullptr}
329{nullptr};

Referenced by InputIpAddressDialog().

◆ m_trouble_shoot

HyperLink* Slic3r::GUI::InputIpAddressDialog::m_trouble_shoot { nullptr }
344{ nullptr }; // ORCA

Referenced by InputIpAddressDialog(), on_ok(), and on_send_retry().

◆ m_worker

std::unique_ptr<Worker> Slic3r::GUI::InputIpAddressDialog::m_worker

◆ token_

std::shared_ptr<InputIpAddressDialog> Slic3r::GUI::InputIpAddressDialog::token_

Referenced by on_ok(), and workerThreadFunc().


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