-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support obico #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the code is quite clean. The biggest problem is the "PhysicalPrinterDialog.cpp". This is a common class shared by all kinds of PrintHost. Ideally we shouldn't add any Obico-specific logic to this file.
//------------------------------------------ | ||
namespace Slic3r { namespace GUI { | ||
|
||
PrinterCloundAuthDialog::PrinterCloundAuthDialog(wxWindow* parent, PrintHost* host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the name to CloudPrinterAuthDialog. Please don't misspell "Cloud".
src/slic3r/Utils/ObicoPrint.hpp
Outdated
|
||
class DynamicPrintConfig; | ||
class Http; | ||
class ObicoPrint : public PrintHost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the name to be Obico
@@ -415,6 +473,12 @@ void PhysicalPrinterDialog::update(bool printer_change) | |||
if (wxTextCtrl* temp = dynamic_cast<wxTextCtrl*>(printhost_field->getWindow()); temp && temp->GetValue() == L"https://connect.prusa3d.com") { | |||
temp->SetValue(wxString()); | |||
} | |||
|
|||
if (TextInput* temp_input = dynamic_cast<TextInput*>(printhost_field->getWindow()); temp_input) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this part? It looks quite hacky.
@@ -436,6 +500,18 @@ void PhysicalPrinterDialog::update(bool printer_change) | |||
} | |||
} | |||
} | |||
|
|||
if (opt->value == htObico) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is pretty hacky too.
const PrinterTechnology tech = Preset::printer_technology(*m_config); | ||
if (tech == ptFFF) { | ||
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type"); | ||
if (opt->value == htObico) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this part to Obico.cpp or CloudPrinterAuthDialog.cpp? We want to minimize the amount of code specific to Obico in the common classes
support obico (#3) Add printer support for Obico cloud. --------- Co-authored-by: zzh <[email protected]>
No description provided.