mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 22:18:30 +00:00
- ClipperUtils.hpp imported jtMiter, jtRound and jtSquare into the global namespace for every includer. No code names them there. - BBLStatusBar.hpp, BBLStatusBarBind.hpp, BBLStatusBarPrint.hpp, BBLStatusBarSend.hpp and ProgressStatusBar.hpp re-exported their class into Slic3r::GUI. Nothing refers to the class through that namespace. - Jobs/SendJob.hpp, Jobs/BindJob.hpp, Jobs/UpgradeNetworkJob.hpp and AuxiliaryDataViewModel.hpp declared "namespace fs = boost::filesystem;" at global scope without using it.
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
#ifndef __BindJob_HPP__
|
|
#define __BindJob_HPP__
|
|
|
|
#include <boost/filesystem/path.hpp>
|
|
#include <boost/filesystem/operations.hpp>
|
|
#include <functional>
|
|
#include <string>
|
|
#include <exception>
|
|
#include <wx/event.h>
|
|
#include "Job.hpp"
|
|
|
|
class wxWindow;
|
|
|
|
namespace Slic3r {
|
|
namespace GUI {
|
|
|
|
class BindJob : public Job
|
|
{
|
|
wxWindow * m_event_handle{nullptr};
|
|
std::function<void()> m_success_fun{nullptr};
|
|
std::string m_dev_id;
|
|
std::string m_dev_ip;
|
|
std::string m_dev_model;
|
|
std::string m_sec_link;
|
|
std::string m_ssdp_version;
|
|
bool m_job_finished{ false };
|
|
bool m_improved{false};
|
|
|
|
public:
|
|
BindJob(std::string dev_id, std::string dev_ip, std::string dev_model, std::string sec_link, std::string ssdp_version);
|
|
|
|
int status_range() const
|
|
{
|
|
return 100;
|
|
}
|
|
|
|
bool is_finished() { return m_job_finished; }
|
|
|
|
void on_success(std::function<void()> success);
|
|
void update_status(Ctl &ctl, int st, const std::string &msg);
|
|
void process(Ctl &ctl) override;
|
|
void finalize(bool canceled, std::exception_ptr &eptr) override;
|
|
void set_event_handle(wxWindow* hanle);
|
|
void post_fail_event(int code, std::string info);
|
|
void set_improved(bool improved){m_improved = improved;};
|
|
};
|
|
|
|
wxDECLARE_EVENT(EVT_BIND_UPDATE_MESSAGE, wxCommandEvent);
|
|
wxDECLARE_EVENT(EVT_BIND_MACHINE_SUCCESS, wxCommandEvent);
|
|
wxDECLARE_EVENT(EVT_BIND_MACHINE_FAIL, wxCommandEvent);
|
|
}} // namespace Slic3r::GUI
|
|
|
|
#endif // ARRANGEJOB_HPP
|