NEW:Add safety button

jira: [STUDIO-14064]

Change-Id: I6a9be69033ea80c2242561c4e1b0ca5626bc7a51
(cherry picked from commit ac4af3aa1de453330fbf2d58988a6e1ea8d5d445)
This commit is contained in:
milk
2025-08-22 13:00:23 +08:00
committed by Noisyfox
parent ac69e7cfbc
commit 299c7c0bac
17 changed files with 417 additions and 78 deletions

View File

@@ -0,0 +1,53 @@
#ifndef slic3r_GUI_SafetyOptionsDialog_hpp_
#define slic3r_GUI_SafetyOptionsDialog_hpp_
#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 "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;
Label* text_open_door;
SwitchBoard* open_door_switch_board;
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 UpdateOptionOpenDoorCheck(MachineObject *obj);
};
}} // namespace Slic3r::GUI
#endif