OrcaSlicer/src/slic3r/GUI/OAuthDialog.hpp
Noisyfox e29bbac193
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
2024-03-23 10:08:48 +08:00

34 lines
681 B
C++

#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