Files
OrcaSlicer/src/slic3r/GUI/NetworkTestDialog.hpp
T
HanifKoh 4895bc03b4 Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced (#16099)
* Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced

Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes.

clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer.

* Remove Unused Project Includes From Files With Platform-Specific Code

A Linux include-what-you-use run cannot see the code inside _WIN32, __APPLE__ or __linux__ blocks, so its verdict is only taken where nothing the removed header declares, directly or through what it includes, is named inside those blocks. Removals also have to hold in both the Release and Debug configuration and never touch a line inside a conditional block.

* Restore the libslic3r Precompiled Header and Direct Includes Lost in the Platform Pass

The platform-file pass treated pchheader.hpp as an ordinary header and
emptied it, and left GUI_Preview.hpp and 14 other files relying on
headers they no longer reached directly.

* Restore MainFrame.hpp in ParamsDialog.cpp for the Windows-Only Reparent Call

* Include Headers That Files Reached Through Ones the Cleanup Removed

* Drop Includes Duplicated by the Cleanup or by Main's Own Additions

* Leave PreciseSeam.cpp as Main Has It After the Precise Seam Rework
2026-10-05 16:47:17 +08:00

116 lines
2.7 KiB
C++

#ifndef slic3r_GUI_NetworkTestDialog_hpp_
#define slic3r_GUI_NetworkTestDialog_hpp_
#include <wx/event.h>
#include <wx/wx.h>
#include <boost/thread.hpp>
#include "GUI_Utils.hpp"
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/button.h>
#include <wx/string.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <wx/grid.h>
#include <wx/dialog.h>
#include <wx/srchctrl.h>
#include <wx/stattext.h>
#include <iomanip>
#include <sys/timeb.h>
#include <time.h>
#include <vector>
#include <algorithm>
class Button;
class wxBoxSizer;
class wxCloseEvent;
class wxStaticText;
class wxTextCtrl;
class wxWindow;
namespace boost { class thread; }
namespace Slic3r {
namespace GUI {
enum TestJob {
TEST_BING_JOB = 0,
TEST_ORCA_JOB = 1,
TEST_PING_JOB,
TEST_JOB_MAX
};
class NetworkTestDialog : public DPIDialog
{
protected:
Button* btn_start;
Button* btn_start_sequence;
Button* btn_download_log;
wxStaticText* text_basic_info;
wxStaticText* text_version_title;
wxStaticText* text_version_val;
wxStaticText* txt_sys_info_title;
wxStaticText* txt_sys_info_value;
wxStaticText* txt_dns_info_title;
wxStaticText* txt_dns_info_value;
Button* btn_link;
wxStaticText* text_link_title;
wxStaticText* text_link_val;
Button* btn_bing;
wxStaticText* text_bing_title;
wxStaticText* text_bing_val;
wxStaticText* text_ping_title;
wxStaticText* text_ping_value;
wxStaticText* text_result;
wxTextCtrl* txt_log;
wxBoxSizer* create_top_sizer(wxWindow* parent);
wxBoxSizer* create_info_sizer(wxWindow* parent);
wxBoxSizer* create_content_sizer(wxWindow* parent);
wxBoxSizer* create_result_sizer(wxWindow* parent);
boost::thread* test_job[TEST_JOB_MAX];
boost::thread* m_sequence_job { nullptr };
bool m_in_testing[TEST_JOB_MAX];
bool m_download_cancel = false;
bool m_closing = false;
void init_bind();
public:
NetworkTestDialog(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(605, 375), long style = wxDEFAULT_DIALOG_STYLE);
~NetworkTestDialog();
void on_dpi_changed(const wxRect& suggested_rect);
void set_default();
wxString get_studio_version();
wxString get_os_info();
wxString get_dns_info();
void start_all_job();
void start_all_job_sequence();
void start_test_bing_thread();
void start_test_github_thread();
void start_test_ping_thread();
void start_test_url(TestJob job, wxString name, wxString url);
void on_close(wxCloseEvent& event);
void update_status(int job_id, wxString info);
};
} // namespace GUI
} // namespace Slic3r
#endif