Files
OrcaSlicer/src/slic3r/GUI/PhysicalPrinterDialog.hpp
T
HanifKoh 1a5f91d727 Add Missing Includes Across src/slic3r/GUI (#16048)
* Add Missing Includes Across src/slic3r/GUI

Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained.

* Drop the OS-Specific Includes Added Outside Their Platform Guards

GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build.

* Add the clang-tidy Configuration That Generated These Includes

Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly.

* Match Windows Paths in the clang-tidy Ignore List

Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
2026-10-02 14:56:56 +08:00

83 lines
2.2 KiB
C++

#ifndef slic3r_PhysicalPrinterDialog_hpp_
#define slic3r_PhysicalPrinterDialog_hpp_
#include "libslic3r/PrintConfig.hpp"
#include <string>
#include <vector>
#include <wx/event.h>
#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