mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-08 17:57:44 +00:00
build: clear 54 dead private fields 54 of the 161 -Wunused-private-field warnings, across 31 files. These are the ones needing no judgment. Each member is declared once and appears nowhere else in src/, counting the .mm and .c sources as well as .cpp and .hpp, so nothing writes them and nothing reads them. Every removal is a whole line, and no declaration shares a line with another member. The remaining 107 are left alone. Those members are mentioned elsewhere, usually assigned and never read, where the fix might be deleting the member or might be restoring a read that went missing.
166 lines
4.1 KiB
C++
166 lines
4.1 KiB
C++
#ifndef slic3r_Monitor_hpp_
|
|
#define slic3r_Monitor_hpp_
|
|
|
|
#include "Tabbook.hpp"
|
|
#include <wx/notebook.h>
|
|
#include <wx/scrolwin.h>
|
|
#include <wx/sizer.h>
|
|
#include <wx/bmpcbox.h>
|
|
#include <wx/bmpbuttn.h>
|
|
#include <wx/treectrl.h>
|
|
#include <wx/imaglist.h>
|
|
#include <wx/artprov.h>
|
|
#include <wx/xrc/xmlres.h>
|
|
#include <wx/string.h>
|
|
#include <wx/stattext.h>
|
|
#include <wx/gdicmn.h>
|
|
#include <wx/font.h>
|
|
#include <wx/colour.h>
|
|
#include <wx/settings.h>
|
|
#include <wx/sizer.h>
|
|
#include <wx/grid.h>
|
|
#include <wx/dataview.h>
|
|
#include <wx/panel.h>
|
|
#include <wx/statline.h>
|
|
#include <wx/bitmap.h>
|
|
#include <wx/image.h>
|
|
#include <wx/icon.h>
|
|
#include <wx/bmpbuttn.h>
|
|
#include <wx/button.h>
|
|
#include <wx/gbsizer.h>
|
|
#include <wx/statbox.h>
|
|
#include <wx/tglbtn.h>
|
|
#include <wx/popupwin.h>
|
|
#include <wx/spinctrl.h>
|
|
#include <wx/artprov.h>
|
|
#include <wx/webrequest.h>
|
|
#include <map>
|
|
#include <vector>
|
|
#include <memory>
|
|
#include "Event.hpp"
|
|
#include "libslic3r/ProjectTask.hpp"
|
|
#include "wxExtensions.hpp"
|
|
#include "slic3r/GUI/MsgDialog.hpp"
|
|
#include "slic3r/GUI/DeviceManager.hpp"
|
|
#include "slic3r/GUI/MonitorBasePanel.h"
|
|
#include "slic3r/GUI/StatusPanel.hpp"
|
|
#include "slic3r/GUI/UpgradePanel.hpp"
|
|
#include "slic3r/GUI/HMSPanel.hpp"
|
|
#include "slic3r/GUI/AmsWidgets.hpp"
|
|
#include "Widgets/SideTools.hpp"
|
|
#include "SelectMachinePop.hpp"
|
|
|
|
namespace Slic3r {
|
|
namespace GUI {
|
|
|
|
class MediaFilePanel;
|
|
|
|
class AddMachinePanel : public wxPanel
|
|
{
|
|
protected:
|
|
Button* m_button_add_machine;
|
|
wxStaticText* m_staticText_add_machine;
|
|
wxStaticBitmap* m_bitmap_empty;
|
|
|
|
void on_add_machine(wxCommandEvent& event);
|
|
|
|
public:
|
|
|
|
AddMachinePanel(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString);
|
|
~AddMachinePanel();
|
|
|
|
void msw_rescale();
|
|
};
|
|
|
|
class MonitorPanel : public wxPanel
|
|
{
|
|
private:
|
|
Tabbook* m_tabpanel{ nullptr };
|
|
wxSizer* m_main_sizer{ nullptr };
|
|
|
|
AddMachinePanel* m_status_add_machine_panel;
|
|
StatusPanel* m_status_info_panel;
|
|
MediaFilePanel* m_media_file_panel;
|
|
UpgradePanel* m_upgrade_panel;
|
|
HMSPanel* m_hms_panel;
|
|
|
|
/* side tools */
|
|
SideTools* m_side_tools{nullptr};
|
|
wxStaticBitmap* m_bitmap_arrow;
|
|
wxStaticBitmap* m_bitmap_wifi_signal;
|
|
SelectMachinePopup m_select_machine;
|
|
|
|
/* images */
|
|
wxBitmap m_signal_strong_img;
|
|
wxBitmap m_signal_middle_img;
|
|
wxBitmap m_signal_weak_img;
|
|
wxBitmap m_signal_no_img;
|
|
wxBitmap m_printer_img;
|
|
wxBitmap m_arrow_img;
|
|
|
|
int last_status;
|
|
bool m_initialized { false };
|
|
bool update_flag{false};
|
|
wxTimer* m_refresh_timer = nullptr;
|
|
|
|
public:
|
|
MonitorPanel(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
|
|
~MonitorPanel();
|
|
|
|
enum PrinterTab {
|
|
PT_STATUS = 0,
|
|
PT_MEDIA = 1,
|
|
PT_UPDATE = 2,
|
|
PT_HMS = 3,
|
|
PT_DEBUG = 4,
|
|
PT_MAX_NUM = 5
|
|
};
|
|
|
|
void init_bitmap();
|
|
void init_timer();
|
|
void init_tabpanel();
|
|
Tabbook* get_tabpanel() { return m_tabpanel; };
|
|
void set_default();
|
|
wxWindow* create_side_tools();
|
|
|
|
void on_sys_color_changed();
|
|
void msw_rescale();
|
|
|
|
StatusPanel* get_status_panel() {return m_status_info_panel;};
|
|
void select_machine(std::string machine_sn);
|
|
void on_timer(wxTimerEvent& event);
|
|
void on_select_printer(wxCommandEvent& event);
|
|
void on_printer_clicked(wxMouseEvent &event);
|
|
void on_size(wxSizeEvent &event);
|
|
|
|
/* update apis */
|
|
//void update_ams(MachineObject* obj);
|
|
void update_all();
|
|
|
|
void update_hms_tag();
|
|
bool Show(bool show);
|
|
|
|
void show_status(int status);
|
|
|
|
std::string get_string_from_tab(PrinterTab tab);
|
|
|
|
MachineObject *obj { nullptr };
|
|
std::string last_conn_type = "undedefined";
|
|
|
|
void stop_update() {update_flag = false;};
|
|
void start_update() {update_flag = true;};
|
|
|
|
|
|
void jump_to_HMS();
|
|
void jump_to_Upgrade();
|
|
void jump_to_LiveView();
|
|
void jump_to_Rack();
|
|
void update_network_version_footer();
|
|
};
|
|
|
|
|
|
} // GUI
|
|
} // Slic3r
|
|
|
|
#endif /* slic3r_Tab_hpp_ */
|