OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::wgtDeviceNozzleRack Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/DeviceTab/wgtDeviceNozzleRack.h>

Inheritance diagram for Slic3r::GUI::wgtDeviceNozzleRack:
Collaboration diagram for Slic3r::GUI::wgtDeviceNozzleRack:

Public Member Functions

 wgtDeviceNozzleRack (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
 ~wgtDeviceNozzleRack ()=default
void UpdateRackInfo (std::shared_ptr< DevNozzleRack > rack)
void Rescale ()

Private Member Functions

void CreateGui ()

Private Attributes

std::weak_ptr< DevNozzleRack > m_nozzle_rack
wgtDeviceNozzleRackToolHead * m_toolhead_panel { nullptr }
wgtDeviceNozzleRackArea * m_rack_area { nullptr }

Detailed Description

Constructor & Destructor Documentation

◆ wgtDeviceNozzleRack()

Slic3r::GUI::wgtDeviceNozzleRack::wgtDeviceNozzleRack ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxTAB_TRAVERSAL )
105 : wxPanel(parent, id, pos, size, style)
106{
107 CreateGui();
108}
#define style
Definition WipeTowerDialog.cpp:101
void CreateGui()
Definition wgtDeviceNozzleRack.cpp:110

References CreateGui(), and style.

Here is the call graph for this function:

◆ ~wgtDeviceNozzleRack()

Slic3r::GUI::wgtDeviceNozzleRack::~wgtDeviceNozzleRack ( )
default

Member Function Documentation

◆ CreateGui()

void Slic3r::GUI::wgtDeviceNozzleRack::CreateGui ( )
private
111{
112 m_toolhead_panel = new wgtDeviceNozzleRackToolHead(this);
113 m_rack_area = new wgtDeviceNozzleRackArea(this);
114
115 wxPanel* separator = new wxPanel(this);
116 separator->SetMaxSize(wxSize(FromDIP(1), -1));
117 separator->SetMinSize(wxSize(FromDIP(1), -1));
118 separator->SetBackgroundColour(WGT_GREY300);
119
120 wxSizer* main_sizer = new wxBoxSizer(wxHORIZONTAL);
121 main_sizer->AddStretchSpacer();
122 main_sizer->Add(m_toolhead_panel, 0, wxEXPAND);
123 main_sizer->Add(separator, 0, wxEXPAND);
124 main_sizer->Add(m_rack_area, 0, wxEXPAND);
125 main_sizer->AddStretchSpacer();
126
127 SetSizer(main_sizer);
128 SetMaxSize(WX_DIP_SIZE(586, -1));
129 SetMinSize(WX_DIP_SIZE(586, -1));
130 SetSize(WX_DIP_SIZE(586, -1));
131 Layout();
132
133 wxGetApp().UpdateDarkUIWin(this);
134}
wgtDeviceNozzleRackToolHead * m_toolhead_panel
Definition wgtDeviceNozzleRack.h:74
wgtDeviceNozzleRackArea * m_rack_area
Definition wgtDeviceNozzleRack.h:75
static const wxColour WGT_GREY300
Definition wgtDeviceNozzleRack.cpp:62
#define WX_DIP_SIZE(x, y)
Definition wgtDeviceNozzleRack.cpp:49

References m_rack_area, m_toolhead_panel, WGT_GREY300, and WX_DIP_SIZE.

Referenced by wgtDeviceNozzleRack().

Here is the caller graph for this function:

◆ Rescale()

void Slic3r::GUI::wgtDeviceNozzleRack::Rescale ( )
152{
153 m_toolhead_panel->Rescale();
154 m_rack_area->Rescale();
155 Layout();
156}

References m_rack_area, and m_toolhead_panel.

◆ UpdateRackInfo()

void Slic3r::GUI::wgtDeviceNozzleRack::UpdateRackInfo ( std::shared_ptr< DevNozzleRack > rack)
137{
138 if (!rack->IsSupported()) { return; }
139
140 m_nozzle_rack = rack;
141 if (m_nozzle_rack.expired()) { return; }
142
143 DevNozzleSystem* nozzle_system = m_nozzle_rack.lock()->GetNozzleSystem();
144 if (nozzle_system)
145 {
146 m_toolhead_panel->UpdateToolHeadInfo(nozzle_system->GetExtNozzle(MAIN_EXTRUDER_ID));
147 m_rack_area->UpdateRackInfo(m_nozzle_rack);
148 }
149}
#define MAIN_EXTRUDER_ID
Definition DevDefs.h:101
std::weak_ptr< DevNozzleRack > m_nozzle_rack
Definition wgtDeviceNozzleRack.h:71

References Slic3r::DevNozzleSystem::GetExtNozzle(), m_nozzle_rack, m_rack_area, m_toolhead_panel, and MAIN_EXTRUDER_ID.

Here is the call graph for this function:

Member Data Documentation

◆ m_nozzle_rack

std::weak_ptr<DevNozzleRack> Slic3r::GUI::wgtDeviceNozzleRack::m_nozzle_rack
private

Referenced by UpdateRackInfo().

◆ m_rack_area

wgtDeviceNozzleRackArea* Slic3r::GUI::wgtDeviceNozzleRack::m_rack_area { nullptr }
private
75{ nullptr };

Referenced by CreateGui(), Rescale(), and UpdateRackInfo().

◆ m_toolhead_panel

wgtDeviceNozzleRackToolHead* Slic3r::GUI::wgtDeviceNozzleRack::m_toolhead_panel { nullptr }
private
74{ nullptr };

Referenced by CreateGui(), Rescale(), and UpdateRackInfo().


The documentation for this class was generated from the following files: