mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
Support for SimplyPrint cloud integration (#4525)
* Make httpserver more generic and reusable * Add OAuthJob * Fix issue caused by the fact that the backing widget of the `TextCtrl` is no longer `wxTextCtrl` * Implement login and token refresh * Implement file upload * Try fix build error * Support BBL printers * Show error message if user hasn't done OAuth * Fix typo * Update error message * Disable unsupported options when SimplyPrint is selected
This commit is contained in:
parent
f3b3e92782
commit
e29bbac193
27 changed files with 1075 additions and 228 deletions
34
src/slic3r/GUI/OAuthDialog.hpp
Normal file
34
src/slic3r/GUI/OAuthDialog.hpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef __OAuthDialog_HPP__
|
||||
#define __OAuthDialog_HPP__
|
||||
|
||||
#include "GUI_Utils.hpp"
|
||||
#include "Jobs/OAuthJob.hpp"
|
||||
#include "Jobs/Worker.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
class OAuthDialog : public DPIDialog
|
||||
{
|
||||
private:
|
||||
OAuthParams _params;
|
||||
std::shared_ptr<OAuthResult> _result;
|
||||
|
||||
wxButton* btnCancel{nullptr};
|
||||
std::unique_ptr<Worker> m_worker;
|
||||
|
||||
void on_cancel(wxEvent& event);
|
||||
|
||||
protected:
|
||||
bool Show(bool show) override;
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
|
||||
public:
|
||||
OAuthDialog(wxWindow* parent, OAuthParams params);
|
||||
|
||||
OAuthResult get_result() { return *_result; }
|
||||
};
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue