mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 19:02:10 +00:00
Support file uploads and the device details page for Elegoo Centauri Carbon 2 (#13212)
* Support file uploads and the device details page for CC2 printers. * Resolved build issues for Linux and macOS. * 1. Added `ElegooPrinterWebViewHandler` to handle WebUI messages for Elegoo printers. Other printers will keep the current behavior. 2. Added a static `get_print_host_webui` method in `PrintHost` to retrieve the printer WebUI URL. * Improved timeout handling for CC2 file upload and SN info APIs. --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
36
src/slic3r/GUI/PrinterWebViewHandler.hpp
Normal file
36
src/slic3r/GUI/PrinterWebViewHandler.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef slic3r_PrinterWebViewHandler_hpp_
|
||||
#define slic3r_PrinterWebViewHandler_hpp_
|
||||
|
||||
#include <memory>
|
||||
#include <wx/webview.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
class wxWebView;
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
class PrinterWebView;
|
||||
|
||||
class PrinterWebViewHandler {
|
||||
public:
|
||||
explicit PrinterWebViewHandler(PrinterWebView& owner);
|
||||
virtual ~PrinterWebViewHandler();
|
||||
|
||||
virtual void on_loaded(wxWebViewEvent &evt);
|
||||
virtual void on_script_message(wxWebViewEvent &evt);
|
||||
|
||||
protected:
|
||||
PrinterWebView& owner() const;
|
||||
wxWebView* browser() const;
|
||||
|
||||
private:
|
||||
PrinterWebView& m_owner;
|
||||
};
|
||||
|
||||
std::unique_ptr<PrinterWebViewHandler> create_printer_webview_handler(PrinterWebView& owner);
|
||||
|
||||
} // GUI
|
||||
} // Slic3r
|
||||
|
||||
#endif /* slic3r_PrinterWebViewHandler_hpp_ */
|
||||
Reference in New Issue
Block a user