Files
OrcaSlicer/src/slic3r/GUI/PhysicalPrinterDialog.hpp
T
Drew WingfieldandSoftFever 6e4be42a04 UltiMaker S5 Profile + Local API Support (#14062)
* Add Ultimaker S5 Profile - WIP

* Add Ultimaker physical printer base

* Ultimaker API WIP for base update.

* Fix undefined reference error.

* Add UMS5 profile, add placeholders for testAuth stuff.

* Fix non-const func definitions, make func names align with style guide.

* Localization stuff? IDK if this does anything or is required.

* Add cover image

* Auth code cleanup, add UI button for auth cred generation, implement various auth checks and tests.

* Fix auth stuff

* Clean up code

* Get upload code sort-of working, fix typo

* Update printer settings and start/end gcodes

* Add makeGriffinCompatible preprocessor script to prevent machine crash, update machine profile.

* Fix buildplate size, fix time missing bug, add S5 buildplate model

* Correct capitalization to UltiMaker

* Fix display bug, fix capitalization bug

* Implement credential generation button and logic

* Fix generate auth creds button, add todos, fix capitalization.

* Actually fix generate auth credentials.

* Fix generate auth creds message.

* Update UM S5 machine limits

* Revert accidental commit.

* Fix postprocessor, clean up code.

* Update presets for multi-extruder printing.

* Add Single Extruder and Fast profiles.

* Code cleanup

* Register and validate the UltiMaker S5 presets

* Show the Generate API Key button only for UltiMaker print hosts

The PR added it to the Physical Printer dialog for every host type, where pressing it runs an ordinary connection test and reports "API Key created". Gate it on the selected host type instead.

* Drop unused lambda captures in the UltiMaker host code

clang promotes -Wunused-lambda-capture to an error under the project's -Werror, so the file failed to build on macOS; the five callbacks do not touch this.

* Fix the Windows build of the UltiMaker print host

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-09-21 01:00:55 +08:00

80 lines
2.2 KiB
C++

#ifndef slic3r_PhysicalPrinterDialog_hpp_
#define slic3r_PhysicalPrinterDialog_hpp_
#include <vector>
#include <wx/gdicmn.h>
#include "libslic3r/Preset.hpp"
#include "GUI_Utils.hpp"
#include "Widgets/RoundedRectangle.hpp"
#include "Widgets/Button.hpp"
class wxTextCtrl;
class wxStaticText;
class Button;
class wxBoxSizer;
namespace Slic3r {
namespace GUI {
//------------------------------------------
// PhysicalPrinterDialog
//------------------------------------------
class ConfigOptionsGroup;
class PhysicalPrinterDialog : public DPIDialog
{
DynamicPrintConfig* m_config { nullptr };
ConfigOptionsGroup* m_optgroup { nullptr };
Button* m_printhost_browse_btn {nullptr};
Button* m_printhost_test_btn {nullptr};
Button* m_printhost_generate_creds_btn {nullptr};
Button* m_printhost_logout_btn {nullptr};
Button* m_printhost_cafile_browse_btn {nullptr};
Button* m_printhost_port_browse_btn {nullptr};
RoundedRectangle* m_input_area {nullptr};
wxStaticText* m_valid_label {nullptr};
wxTextCtrl* m_input_ctrl {nullptr};
Button* btnOK {nullptr};
void build_printhost_settings(ConfigOptionsGroup* optgroup);
void OnOK(wxEvent& event);
public:
PhysicalPrinterDialog(wxWindow* parent);
~PhysicalPrinterDialog();
enum ValidationType
{
Valid,
NoValid,
Warning
};
PresetCollection* m_presets {nullptr};
ValidationType m_valid_type;
std::string m_preset_name;
void update(bool printer_change = false);
void update_host_type(bool printer_change);
void update_preset_input();
void update_printhost_buttons();
void update_printers();
void update_ports();
void update_webui();
protected:
void on_dpi_changed(const wxRect& suggested_rect) override;
void on_sys_color_changed() override {};
void check_host_key_valid();
};
} // namespace GUI
} // namespace Slic3r
#endif