mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 15:21:09 +00:00
* Add Missing Includes Across src/slic3r/GUI Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained. * Drop the OS-Specific Includes Added Outside Their Platform Guards GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build. * Add the clang-tidy Configuration That Generated These Includes Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly. * Match Windows Paths in the clang-tidy Ignore List Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
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"
|
|
|
|
namespace fs = boost::filesystem;
|
|
|
|
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
|