mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Various improvements to SimplyPrint integration (#4831)
* Allow using BBL's device tab when 3rd party print host is used * Add option to open SimplyPrint panel in device tab after uploading * Fix default print host for prusa connect * Do not set api key in device view when SimplyPrint is used * Sending 3mf file to SimplyPrint when using BBL printers * Fix file extension when uploading 3mf * Prepare for large file uploading * Implement chunk upload * Fix file uploading exceeding content size * Fix wrong field type * Add `temp=true` to all chunk upload calls * Add macro to enable test api * Merge branch 'main' into dev/simplyprint-improve * Fix another missing `temp=true` * Add delete token * Try fixing build error on *nix systems * Merge branch 'main' into dev/simplyprint-improve * Merge branch 'main' into dev/simplyprint-improve * Merge remote-tracking branch 'remote/main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/BackgroundSlicingProcess.cpp * Move the `bbl_use_print_host_webui` option to print host dialog. Also make it a derived option of `print_host_webui` instead. * Merge branch 'main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/MainFrame.cpp # src/slic3r/GUI/Plater.cpp * Merge branch 'main' into dev/simplyprint-improve # Conflicts: # src/slic3r/GUI/Plater.cpp * Use a more generic option instead of SimplyPrint specific * Merge branch 'main' into dev/simplyprint-improve * Merge branch 'main' into dev/simplyprint-improve
This commit is contained in:
parent
b7a0b30578
commit
cd6cd0786f
17 changed files with 505 additions and 110 deletions
|
@ -38,7 +38,7 @@ static const char *CONFIG_KEY_PATH = "printhost_path";
|
|||
static const char *CONFIG_KEY_GROUP = "printhost_group";
|
||||
static const char* CONFIG_KEY_STORAGE = "printhost_storage";
|
||||
|
||||
PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUploadActions post_actions, const wxArrayString &groups, const wxArrayString& storage_paths, const wxArrayString& storage_names)
|
||||
PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUploadActions post_actions, const wxArrayString &groups, const wxArrayString& storage_paths, const wxArrayString& storage_names, bool switch_to_device_tab)
|
||||
: MsgDialog(static_cast<wxWindow*>(wxGetApp().mainframe), _L("Send G-Code to printer host"), _L("Upload to Printer Host with the following filename:"), 0) // Set style = 0 to avoid default creation of the "OK" button.
|
||||
// All buttons will be added later in this constructor
|
||||
, txt_filename(new wxTextCtrl(this, wxID_ANY))
|
||||
|
@ -46,6 +46,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
|
|||
, combo_storage(storage_names.GetCount() > 1 ? new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, storage_names, wxCB_READONLY) : nullptr)
|
||||
, post_upload_action(PrintHostPostUploadAction::None)
|
||||
, m_paths(storage_paths)
|
||||
, m_switch_to_device_tab(switch_to_device_tab)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
txt_filename->OSXDisableAllSmartSubstitutions();
|
||||
|
@ -97,6 +98,22 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
|
|||
|
||||
txt_filename->SetValue(recent_path);
|
||||
|
||||
auto checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto checkbox = new ::CheckBox(this, wxID_APPLY);
|
||||
checkbox->SetValue(m_switch_to_device_tab);
|
||||
checkbox->Bind(wxEVT_TOGGLEBUTTON, [this](wxCommandEvent& e) {
|
||||
m_switch_to_device_tab = e.IsChecked();
|
||||
e.Skip();
|
||||
});
|
||||
checkbox_sizer->Add(checkbox, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
|
||||
|
||||
auto checkbox_text = new wxStaticText(this, wxID_ANY, _L("Switch to Device tab after upload."), wxDefaultPosition, wxDefaultSize, 0);
|
||||
checkbox_sizer->Add(checkbox_text, 0, wxALL | wxALIGN_CENTER, FromDIP(2));
|
||||
checkbox_text->SetFont(::Label::Body_13);
|
||||
checkbox_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#323A3D")));
|
||||
content_sizer->Add(checkbox_sizer);
|
||||
content_sizer->AddSpacer(VERT_SPACING);
|
||||
|
||||
if (size_t extension_start = recent_path.find_last_of('.'); extension_start != std::string::npos)
|
||||
m_valid_suffix = recent_path.substr(extension_start);
|
||||
// .gcode suffix control
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue