Files
OrcaSlicer/src/slic3r/GUI/SafetyOptionsDialog.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

68 lines
1.8 KiB
C++

#ifndef slic3r_GUI_SafetyOptionsDialog_hpp_
#define slic3r_GUI_SafetyOptionsDialog_hpp_
#include <wx/panel.h>
#include <wx/timer.h>
#include <wx/wx.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/dialog.h>
#include <wx/tipwin.h>
#include "GUI_Utils.hpp"
#include "wxExtensions.hpp"
#include "DeviceManager.hpp"
#include "Widgets/Label.hpp"
#include "Widgets/CheckBox.hpp"
#include "Widgets/StaticLine.hpp"
#include "Widgets/ComboBox.hpp"
// Previous definitions
class SwitchBoard;
namespace Slic3r { namespace GUI {
class SafetyOptionsDialog : public DPIDialog
{
protected:
// settings
wxScrolledWindow* m_scrollwindow;
CheckBox* m_cb_open_door;
CheckBox* m_cb_idel_heating_protection;
Label* m_text_open_door;
Label* m_text_idel_heating_protection;
Label* m_text_idel_heating_protection_caption;
SwitchBoard* m_open_door_switch_board;
wxPanel* m_idel_heating_container { nullptr };
// toast for idle heating unavailable
wxPopupWindow *m_idel_heating_toast{nullptr};
wxTimer m_idel_heating_toast_timer;
bool m_idel_protect_unavailable { false };
wxBoxSizer* create_settings_group(wxWindow* parent);
bool print_halt = false;
public:
SafetyOptionsDialog(wxWindow* parent);
~SafetyOptionsDialog();
void on_dpi_changed(const wxRect &suggested_rect) override;
MachineObject *obj { nullptr };
void update_options(MachineObject *obj_);
void update_machine_obj(MachineObject *obj_);
bool Show(bool show) override;
private:
void updateOpenDoorCheck(MachineObject *obj);
void updateIdelHeatingProtect(MachineObject *obj);
void show_idel_heating_toast(const wxString &text);
};
}} // namespace Slic3r::GUI
#endif