mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-06 07:11:10 +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.
75 lines
1.7 KiB
C++
75 lines
1.7 KiB
C++
#ifndef slic3r_BonjourDialog_hpp_
|
|
#define slic3r_BonjourDialog_hpp_
|
|
|
|
#include <cstddef>
|
|
#include "libslic3r/Config.hpp"
|
|
#include <memory>
|
|
|
|
#include <boost/asio/ip/address.hpp>
|
|
|
|
#include <vector>
|
|
#include <wx/dialog.h>
|
|
#include <wx/event.h>
|
|
#include <wx/string.h>
|
|
|
|
#include "libslic3r/PrintConfig.hpp"
|
|
|
|
class wxListView;
|
|
class wxStaticText;
|
|
class wxTimer;
|
|
class wxTimerEvent;
|
|
class address;
|
|
|
|
namespace Slic3r {
|
|
|
|
class Bonjour;
|
|
class BonjourReplyEvent;
|
|
class ReplySet;
|
|
|
|
|
|
class BonjourDialog: public wxDialog
|
|
{
|
|
public:
|
|
BonjourDialog(wxWindow *parent, Slic3r::PrinterTechnology);
|
|
BonjourDialog(BonjourDialog &&) = delete;
|
|
BonjourDialog(const BonjourDialog &) = delete;
|
|
BonjourDialog &operator=(BonjourDialog &&) = delete;
|
|
BonjourDialog &operator=(const BonjourDialog &) = delete;
|
|
~BonjourDialog();
|
|
|
|
bool show_and_lookup();
|
|
wxString get_selected() const;
|
|
private:
|
|
wxListView *list;
|
|
std::unique_ptr<ReplySet> replies;
|
|
wxStaticText *label;
|
|
std::shared_ptr<Bonjour> bonjour;
|
|
std::unique_ptr<wxTimer> timer;
|
|
unsigned timer_state;
|
|
Slic3r::PrinterTechnology tech;
|
|
|
|
virtual void on_reply(BonjourReplyEvent &);
|
|
void on_timer(wxTimerEvent &);
|
|
void on_timer_process();
|
|
};
|
|
|
|
class IPListDialog : public wxDialog
|
|
{
|
|
public:
|
|
IPListDialog(wxWindow* parent, const wxString& hostname, const std::vector<boost::asio::ip::address>& ips, size_t& selected_index);
|
|
IPListDialog(IPListDialog&&) = delete;
|
|
IPListDialog(const IPListDialog&) = delete;
|
|
IPListDialog& operator=(IPListDialog&&) = delete;
|
|
IPListDialog& operator=(const IPListDialog&) = delete;
|
|
~IPListDialog();
|
|
|
|
virtual void EndModal(int retCode) wxOVERRIDE;
|
|
private:
|
|
wxListView* m_list;
|
|
size_t& m_selected_index;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|