mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-06 11:47:58 -05:00
build: drop dead private fields, close malformed comments (227 warnings) Clears 227 of the clang-cl warnings tracked in #15374, taking a full Windows build from 1,491 to 1,264. Five of the six changes are in headers, which are re-diagnosed in every translation unit that includes them, so the count is large for a 14-line diff. Tabbook.hpp: delete two private fields, unread since the 2022 import. m_parent also shadowed wxWindowBase::m_parent. GUI_Utils.hpp: the wxEVT_SYS_COLOUR_CHANGED lambda body is empty on Windows, so its `this` capture is unused there. (void) this; leaves the handler bound, which is what stops the event propagating. DevFirmware.h: mark m_owner [[maybe_unused]]. The class is never instantiated, and the file tracks BambuStudio, so this is the smallest divergence. Eight DeviceTab/ files, AMSItem.cpp and SelectMachine.cpp: block comments malformed so that they read as a nested /*. No behavior change. -Wcomment goes to zero, and only the three intended categories move.
71 lines
2.0 KiB
C++
71 lines
2.0 KiB
C++
//**********************************************************/
|
|
/* File: wgtDeviceNozzleSelect.h
|
|
* Description: The panel to select nozzle
|
|
*
|
|
* \n class wgtDeviceNozzleSelect;
|
|
************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "slic3r/GUI/DeviceCore/DevNozzleSystem.h"
|
|
|
|
#include <wx/panel.h>
|
|
|
|
#include <memory>
|
|
|
|
// Previous definitions
|
|
class Label;
|
|
namespace Slic3r
|
|
{
|
|
struct DevNozzle;
|
|
class DevNozzleRack;
|
|
namespace GUI
|
|
{
|
|
class wgtDeviceNozzleRackNozzleItem;
|
|
class wgtMsgBox;
|
|
}
|
|
};
|
|
|
|
wxDECLARE_EVENT(EVT_NOZZLE_SELECT_CHANGED, wxCommandEvent);
|
|
wxDECLARE_EVENT(EVT_NOZZLE_SELECT_CLICKED, wxCommandEvent);
|
|
namespace Slic3r::GUI
|
|
{
|
|
class wgtDeviceNozzleRackSelect : public wxPanel
|
|
{
|
|
public:
|
|
wgtDeviceNozzleRackSelect(wxWindow* parent);
|
|
~wgtDeviceNozzleRackSelect() = default;
|
|
|
|
public:
|
|
int GetSelectedNozzlePosID() const { return m_selected_nozzle.GetNozzlePosId();}
|
|
void UpdatSelectedNozzles(std::shared_ptr<DevNozzleRack> rack, std::vector<int> selected_nozzle_pos_vec, bool use_dynamic_switch, std::optional<PrintFromType> print_from_type);// for slicing with dynamic switch
|
|
void Rescale();
|
|
|
|
private:
|
|
void CreateGui();
|
|
|
|
void ClearSelection();
|
|
void SetSelectedNozzle(const DevNozzle &nozzle);
|
|
void UpdatSelectedNozzle(std::shared_ptr<DevNozzleRack> rack, int selected_nozzle_pos_id = -1); // for slicing without dynamic switch
|
|
|
|
void UpdateNozzleInfos(std::shared_ptr<DevNozzleRack> rack);
|
|
|
|
void OnNozzleItemSelected(wxCommandEvent& evt);
|
|
|
|
private:
|
|
DevNozzle m_selected_nozzle;
|
|
std::weak_ptr<DevNozzleRack> m_nozzle_rack;
|
|
|
|
// pick
|
|
bool m_enable_manual_nozzle_pick = true;
|
|
|
|
// Label
|
|
wgtMsgBox* m_title_tips_dynamic;
|
|
|
|
// GUI
|
|
wgtDeviceNozzleRackNozzleItem * m_toolhead_nozzle_l{nullptr};
|
|
wgtDeviceNozzleRackNozzleItem * m_toolhead_nozzle_r{nullptr};
|
|
std::unordered_map<int, wgtDeviceNozzleRackNozzleItem *> m_nozzle_items; // from 16 to 21
|
|
};
|
|
|
|
};// end of namespace Slic3r::GUI
|