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

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

Inheritance diagram for Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate:
Collaboration diagram for Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate:

Public Member Functions

 wgtDeviceNozzleRackHotendUpdate (wxWindow *parent, const wxString &idx_text)
void UpdateColourStyle (const wxColour &clr)
int GetExtruderNozzleId () const
void SetExtruderNozzleId (int ext_nozzle_id)
void UpdateExtruderNozzleInfo (const std::shared_ptr< DevNozzleRack > rack)
void SetRackNozzleId (int rack_nozzle_id)
int GetRackNozzleId () const
void UpdateRackNozzleInfo (const std::shared_ptr< DevNozzleRack > rack)
void Rescale ()
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
void SetCornerRadius (double radius)
void SetBorderWidth (int width)
void SetTopMargin (int margin)
void SetBorderColor (StateColor const &color)
void SetBorderColorNormal (wxColor const &color)
void SetBorderStyle (wxPenStyle style)
void SetBackgroundColor (StateColor const &color)
void SetBackgroundColorNormal (wxColor const &color)
void SetBackgroundColor2 (StateColor const &color)
void ShowBadge (bool show)

Static Public Member Functions

static wxColor GetParentBackgroundColor (wxWindow *parent)

Protected Member Functions

void eraseEvent (wxEraseEvent &evt)
void sizeEvent (wxSizeEvent &evt)
void paintEvent (wxPaintEvent &evt)
void render (wxDC &dc)
virtual void doRender (wxDC &dc)

Protected Attributes

double radius
int border_width = 1
int top_margin = 0
wxPenStyle border_style = wxPENSTYLE_SOLID
StateHandler state_handler
StateColor border_color
StateColor background_color
StateColor background_color2
ScalableBitmap badge

Private Types

enum  NozzleStatus : int {
  NOZZLE_STATUS_DC = -1 , NOZZLE_STATUS_EMPTY , NOZZLE_STATUS_NORMAL , NOZZLE_STATUS_ABNORMAL ,
  NOZZLE_STATUS_UNKNOWN
}

Private Member Functions

void CreateGui ()
void UpdateInfo (const DevNozzle &nozzle)
void OnBitmapHoverEnter (wxMouseEvent &event)
void OnBitmapHoverLeave (wxMouseEvent &event)
void OnStatusIconClick (wxMouseEvent &event)
void updateNozzleImage (const DevNozzle &nozzle)

Private Attributes

int m_ext_nozzle_id = -1
int m_rack_nozzle_id = -1
bool findNozzleImage = false
NozzleStatus m_nozzle_status = NOZZLE_STATUS_DC
std::weak_ptr< DevNozzleRack > m_nozzle_rack
std::vector< std::vector< ScalableBitmap * > > nozzle_hs
std::vector< std::vector< ScalableBitmap * > > nozzle_hh
ScalableBitmap * m_nozzle_image = nullptr
ScalableBitmap * m_nozzle_empty_image = nullptr
ScalableBitmap * m_scaled_nozzle_image = nullptr
ScalableBitmap * m_scaled_nozzle_empty_image = nullptr
ScalableBitmap * m_refresh_icon = nullptr
AnimaIcon * m_refreshing_icon = nullptr
ScalableBitmap * m_error_icon = nullptr
Label * m_idx_label
wxStaticBitmap * m_icon_bitmap { nullptr }
wxStaticBitmap * m_status_bitmap { nullptr }
Label * m_material_label { nullptr }
StaticBox * m_colour_box { nullptr }
wxFrame * m_hoverFrame { nullptr }
Label * m_status_label { nullptr }
Label * m_used_time { nullptr }
Label * m_diameter_label
Label * m_flowtype_label
Label * m_type_label
Label * m_sn_label
Label * m_version_label
Label * m_version_new_label

Detailed Description

Member Enumeration Documentation

◆ NozzleStatus

Enumerator
NOZZLE_STATUS_DC 
NOZZLE_STATUS_EMPTY 
NOZZLE_STATUS_NORMAL 
NOZZLE_STATUS_ABNORMAL 
NOZZLE_STATUS_UNKNOWN 
120 {
121 NOZZLE_STATUS_DC = -1,
126 };
@ NOZZLE_STATUS_ABNORMAL
Definition wgtDeviceNozzleRackUpdate.h:124
@ NOZZLE_STATUS_UNKNOWN
Definition wgtDeviceNozzleRackUpdate.h:125
@ NOZZLE_STATUS_EMPTY
Definition wgtDeviceNozzleRackUpdate.h:122
@ NOZZLE_STATUS_DC
Definition wgtDeviceNozzleRackUpdate.h:121
@ NOZZLE_STATUS_NORMAL
Definition wgtDeviceNozzleRackUpdate.h:123

Constructor & Destructor Documentation

◆ wgtDeviceNozzleRackHotendUpdate()

Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::wgtDeviceNozzleRackHotendUpdate ( wxWindow * parent,
const wxString & idx_text )
173 : StaticBox(parent, wxID_ANY)
174{
175 CreateGui();
176
177 m_idx_label->SetLabel(idx_text);
178}
Label * m_idx_label
Definition wgtDeviceNozzleRackUpdate.h:148
void CreateGui()
Definition wgtDeviceNozzleRackUpdate.cpp:180
StaticBox()
Definition StaticBox.cpp:33

References StaticBox::StaticBox(), CreateGui(), and m_idx_label.

Here is the call graph for this function:

Member Function Documentation

◆ Create()

bool StaticBox::Create ( wxWindow * parent,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = 0 )
inherited
52{
53 if (style & wxBORDER_NONE)
54 border_width = 0;
55 wxWindow::Create(parent, id, pos, size, style);
57 state_handler.update_binds();
58 SetBackgroundColour(GetParentBackgroundColor(parent));
59 return true;
60}
#define style
Definition WipeTowerDialog.cpp:101
StateColor border_color
Definition StaticBox.hpp:72
int border_width
Definition StaticBox.hpp:68
static wxColor GetParentBackgroundColor(wxWindow *parent)
Definition StaticBox.cpp:122
StateHandler state_handler
Definition StaticBox.hpp:71
StateColor background_color
Definition StaticBox.hpp:73
StateColor background_color2
Definition StaticBox.hpp:74

References background_color, background_color2, border_color, border_width, GetParentBackgroundColor(), state_handler, and style.

Referenced by FanSwitchButton::FanSwitchButton(), ImageSwitchButton::ImageSwitchButton(), ModeSwitchButton::ModeSwitchButton(), StaticBox(), Button::Create(), SpinInput::Create(), TabButton::Create(), TempInput::Create(), and TextInput::Create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateGui()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::CreateGui ( )
private
181{
185
186 //load nozzle hs image
187 for (int i = 1; i <= 4; i++)
188 {
189 auto normalImage = new ScalableBitmap(this, "Nozzle_HS_01_0" + std::to_string(i * 2), 46);
190 auto bigImage = new ScalableBitmap(this, "Big_Nozzle_HS_01_0" + std::to_string(i * 2), 216);
191 nozzle_hs.push_back({normalImage, bigImage});
192 }
193 for (int i = 2; i <= 4; i++)
194 {
195 auto normalImage = new ScalableBitmap(this, "Nozzle_HH_01_0" + std::to_string(i * 2), 46);
196 auto bigImage = new ScalableBitmap(this, "Big_Nozzle_HH_01_0" + std::to_string(i * 2), 216);
197 nozzle_hh.push_back({normalImage, bigImage});
198 }
199
200 auto* content_sizer = new wxBoxSizer(wxHORIZONTAL);
201
202 // Index
203 m_idx_label = new Label(this);
204 m_idx_label->SetFont(Label::Head_14);
206 content_sizer->Add(m_idx_label, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(25));
207
208 // Icon
209 wxPanel* imagePanel = new wxPanel(this);
210 imagePanel->SetBackgroundColour(WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG);
211 imagePanel->SetMaxSize(WX_DIP_SIZE(46, -1));
212 imagePanel->SetMinSize(WX_DIP_SIZE(46, -1));
213 imagePanel->SetSize(wxSize(FromDIP(46), FromDIP(-1)));
214 wxBoxSizer* panelSizer = new wxBoxSizer(wxVERTICAL);
215 imagePanel->SetSizer(panelSizer);
216
217 m_nozzle_empty_image = new ScalableBitmap(imagePanel, "dev_rack_nozzle_empty", 46);
218 m_icon_bitmap = new wxStaticBitmap(imagePanel, wxID_ANY, m_nozzle_empty_image->bmp());
219 panelSizer->Add(m_icon_bitmap, 0, wxALIGN_CENTER);
220 content_sizer->Add(imagePanel, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(25));
223
224 // Diameter/type (vertical)
225 wxPanel* type_panel = new wxPanel(this);
226 type_panel->SetBackgroundColour(WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG);
227 auto* main_type_sizer = new wxBoxSizer(wxVERTICAL);
228 auto* type_sizer_row_1 = new wxBoxSizer(wxHORIZONTAL);
229 auto* type_sizer_row_2 = new wxBoxSizer(wxHORIZONTAL);
230
231 m_material_label = new Label(type_panel);
234
235 m_colour_box = new StaticBox(type_panel);
236 m_colour_box->SetMaxSize(WX_DIP_SIZE(16, 16));
237 m_colour_box->SetMinSize(WX_DIP_SIZE(16, 16));
238 m_colour_box->SetCornerRadius(FromDIP(2));
239 m_colour_box->SetSize(wxSize(FromDIP(16), FromDIP(16)));
240 // m_colour_box->SetBackgroundColour(*wxRED);
241
242 // type_sizer_row_1->AddStretchSpacer();
243 type_sizer_row_1->Add(m_colour_box, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT);
244 type_sizer_row_1->AddStretchSpacer(1);
245 type_sizer_row_1->Add(m_material_label, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(2));
246 // type_sizer_row_1->AddStretchSpacer();
247
248 m_diameter_label = new Label(type_panel);
251
252 m_flowtype_label = new Label(type_panel);
255
256 m_type_label = new Label(type_panel);
259
260 type_sizer_row_2->Add(m_diameter_label, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT );
261 type_sizer_row_2->Add(m_flowtype_label, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(2));
262 type_sizer_row_2->Add(m_type_label, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(2));
263
264 main_type_sizer->Add(type_sizer_row_1, 0, wxALIGN_LEFT);
265 main_type_sizer->Add(type_sizer_row_2, 1, wxALIGN_LEFT | wxEXPAND | wxTOP, FromDIP(4));
266 type_panel->SetSizer(main_type_sizer);
267 type_panel->SetMaxSize(WX_DIP_SIZE(160, 40));
268 type_panel->SetMinSize(WX_DIP_SIZE(160, 40));
269 type_panel->SetSize(WX_DIP_SIZE(160, 40));
270
271 content_sizer->Add(type_panel, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(12));
272
273 // SN and version (vertical)
274 wxPanel* info_panel = new wxPanel(this);
275 info_panel->SetBackgroundColour(WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG);
276 auto* info_sizer = new wxBoxSizer(wxVERTICAL);
277 m_sn_label = new Label(info_panel);
278 m_sn_label->SetFont(Label::Body_12);
280
281 auto* version_h_sizer = new wxBoxSizer(wxHORIZONTAL);
282 m_version_label = new Label(info_panel);
285
286 m_version_new_label = new Label(info_panel);
289 m_version_new_label->SetForegroundColour(wxColour(0, 168, 84)); // Green
290
291 version_h_sizer->Add(m_version_label, 0, wxALIGN_CENTER_VERTICAL);
292 version_h_sizer->Add(m_version_new_label, 0, wxALIGN_CENTER_VERTICAL);
293 info_sizer->Add(m_sn_label, 0, wxALIGN_LEFT);
294 info_sizer->Add(version_h_sizer, 0, wxALIGN_LEFT | wxTOP, FromDIP(4));
295 info_panel->SetSizer(info_sizer);
296 info_panel->SetMaxSize(WX_DIP_SIZE(183, 40));
297 info_panel->SetMinSize(WX_DIP_SIZE(183, 40));
298 info_panel->SetSize(WX_DIP_SIZE(183, 40));
299
300 //Used Time
301 m_used_time = new Label(this);
302 m_used_time->SetFont(Label::Body_12);
304
305 m_refresh_icon = new ScalableBitmap(this, "refresh_printer", 12);
306 // m_in_refreh_icon = new ScalableBitmap(this, "refresh_nozzle", 12);
307 m_error_icon = new ScalableBitmap(this, "error", 14);
308 m_status_bitmap = new wxStaticBitmap(this, wxID_ANY, m_refresh_icon->bmp());
310
311 std::vector<std::string> list{"refresh_nozzle_1", "refresh_nozzle_2", "refresh_nozzle_3", "refresh_nozzle_4"};
312 // Orca: AnimaIcon has no per-instance size argument (it fixes the size internally), so none is passed.
313 m_refreshing_icon = new AnimaIcon(this, wxID_ANY, list, "refresh_nozzle", 100);
314 m_refreshing_icon->Show(false);
315
316
317 m_status_label = new Label(this);
319 // m_status_label->SetForegroundColour(wxColour("#00AE42"));
320
321 content_sizer->Add(info_panel, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
322 content_sizer->Add(m_used_time, 1, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
323 content_sizer->Add(m_status_label, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(20));
324 content_sizer->Add(m_status_bitmap, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(2));
325 content_sizer->Add(m_refreshing_icon, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(2));
326 content_sizer->AddSpacer(FromDIP(25));
327
328 auto* main_sizer = new wxBoxSizer(wxHORIZONTAL);
329 main_sizer->Add(content_sizer, 0, wxEXPAND | wxTOP | wxBOTTOM, FromDIP(10));
330
331 SetSizer(main_sizer);
332 Layout();
333}
static wxFont Head_14
Definition Label.hpp:45
static wxFont Body_12
Definition Label.hpp:55
Label * m_type_label
Definition wgtDeviceNozzleRackUpdate.h:161
std::vector< std::vector< ScalableBitmap * > > nozzle_hh
Definition wgtDeviceNozzleRackUpdate.h:137
StaticBox * m_colour_box
Definition wgtDeviceNozzleRackUpdate.h:153
AnimaIcon * m_refreshing_icon
Definition wgtDeviceNozzleRackUpdate.h:145
Label * m_flowtype_label
Definition wgtDeviceNozzleRackUpdate.h:160
std::vector< std::vector< ScalableBitmap * > > nozzle_hs
Definition wgtDeviceNozzleRackUpdate.h:136
ScalableBitmap * m_refresh_icon
Definition wgtDeviceNozzleRackUpdate.h:143
Label * m_used_time
Definition wgtDeviceNozzleRackUpdate.h:157
Label * m_version_new_label
Definition wgtDeviceNozzleRackUpdate.h:165
void OnStatusIconClick(wxMouseEvent &event)
Definition wgtDeviceNozzleRackUpdate.cpp:335
wxStaticBitmap * m_status_bitmap
Definition wgtDeviceNozzleRackUpdate.h:150
Label * m_sn_label
Definition wgtDeviceNozzleRackUpdate.h:163
wxStaticBitmap * m_icon_bitmap
Definition wgtDeviceNozzleRackUpdate.h:149
Label * m_status_label
Definition wgtDeviceNozzleRackUpdate.h:156
Label * m_diameter_label
Definition wgtDeviceNozzleRackUpdate.h:159
void OnBitmapHoverEnter(wxMouseEvent &event)
Definition wgtDeviceNozzleRackUpdate.cpp:385
ScalableBitmap * m_nozzle_empty_image
Definition wgtDeviceNozzleRackUpdate.h:140
void OnBitmapHoverLeave(wxMouseEvent &event)
Definition wgtDeviceNozzleRackUpdate.cpp:421
Label * m_version_label
Definition wgtDeviceNozzleRackUpdate.h:164
ScalableBitmap * m_error_icon
Definition wgtDeviceNozzleRackUpdate.h:146
Label * m_material_label
Definition wgtDeviceNozzleRackUpdate.h:152
void SetCornerRadius(double radius)
Definition StaticBox.cpp:62
void SetBorderColor(StateColor const &color)
Definition StaticBox.cpp:87
#define WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG
Definition wgtDeviceNozzleRackUpdate.cpp:171
#define WX_DIP_SIZE(x, y)
Definition wgtDeviceNozzleRack.cpp:49

References StaticBox::StaticBox(), Label::Body_12, Label::Head_14, m_colour_box, m_diameter_label, m_error_icon, m_flowtype_label, m_icon_bitmap, m_idx_label, m_material_label, m_nozzle_empty_image, m_refresh_icon, m_refreshing_icon, m_sn_label, m_status_bitmap, m_status_label, m_type_label, m_used_time, m_version_label, m_version_new_label, nozzle_hh, nozzle_hs, OnBitmapHoverEnter(), OnBitmapHoverLeave(), OnStatusIconClick(), StaticBox::SetBorderColor(), StaticBox::SetCornerRadius(), WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG, and WX_DIP_SIZE.

Referenced by wgtDeviceNozzleRackHotendUpdate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doRender()

void StaticBox::doRender ( wxDC & dc)
protectedvirtualinherited

Reimplemented in FilamentStepIndicator, ModeSwitchButton, StepCtrl, StepIndicator, and TabCtrl.

215{
216 wxSize size = GetSize();
217 int states = state_handler.states();
218 if (background_color2.count() == 0) {
219 if ((border_width && border_color.count() > 0) || background_color.count() > 0) {
220 int topM = top_margin > 0 ? top_margin : 0;
221 wxRect rc(0, topM, size.x, size.y - topM);
222 if (border_width && border_color.count() > 0) {
223 const double scale = dc.GetContentScaleFactor();
224
225 // Snap rect edges to physical pixel boundaries so the 1px pen doesn't straddle a pixel boundary
226 auto snap = [&](int logical) -> int {
227 return (int)(ceil(logical * scale) / scale);
228 };
229
230 int deflate = snap(border_width / 2.0); // at 175%: snap(0.5) = snap→1/1.75 ≈ 1
231 rc.x += deflate;
232 rc.y += deflate;
233 rc.width -= deflate * 2;
234 rc.height -= deflate * 2;
235 dc.SetPen(wxPen(border_color.colorForStates(states), border_width, border_style));
236 } else {
237 dc.SetPen(wxPen(background_color.colorForStates(states)));
238 }
239 if (background_color.count() > 0)
240 dc.SetBrush(wxBrush(background_color.colorForStates(states)));
241 else
242 dc.SetBrush(wxBrush(GetBackgroundColour()));
243 if (radius == 0) {
244 dc.DrawRectangle(rc);
245 }
246 else {
247 dc.DrawRoundedRectangle(rc, radius - border_width);
248 }
249 }
250 }
251 else {
252 wxColor start = background_color.colorForStates(states);
253 wxColor stop = background_color2.colorForStates(states);
254 int r = start.Red(), g = start.Green(), b = start.Blue();
255 int dr = (int) stop.Red() - r, dg = (int) stop.Green() - g, db = (int) stop.Blue() - b;
256 int lr = 0, lg = 0, lb = 0;
257 for (int y = 0; y < size.y; ++y) {
258 dc.SetPen(wxPen(wxColor(r, g, b)));
259 dc.DrawLine(0, y, size.x, y);
260 lr += dr; while (lr >= size.y) { ++r, lr -= size.y; } while (lr <= -size.y) { --r, lr += size.y; }
261 lg += dg; while (lg >= size.y) { ++g, lg -= size.y; } while (lg <= -size.y) { --g, lg += size.y; }
262 lb += db; while (lb >= size.y) { ++b, lb -= size.y; } while (lb <= -size.y) { --b, lb += size.y; }
263 }
264 }
265
266 if (badge.bmp().IsOk()) {
267 auto s = badge.bmp().GetScaledSize();
268 dc.DrawBitmap(badge.bmp(), size.x - s.x, top_margin > 0 ? top_margin : 0);
269 }
270}
int scale(const int val)
Definition WipeTowerDialog.cpp:58
ScalableBitmap badge
Definition StaticBox.hpp:75
int top_margin
Definition StaticBox.hpp:69
double radius
Definition StaticBox.hpp:67
wxPenStyle border_style
Definition StaticBox.hpp:70

References background_color, background_color2, badge, border_color, border_style, border_width, radius, scale(), state_handler, and top_margin.

Referenced by FilamentStepIndicator::doRender(), StepCtrl::doRender(), StepIndicator::doRender(), and render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eraseEvent()

void StaticBox::eraseEvent ( wxEraseEvent & evt)
protectedinherited
153{
154 // for transparent background, but not work
155#ifdef __WXMSW__
156 wxDC *dc = evt.GetDC();
157 wxSize size = GetSize();
158 wxClientDC dc2(GetParent());
159 dc->Blit({0, 0}, size, &dc2, GetPosition());
160#endif
161}

◆ GetExtruderNozzleId()

int Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::GetExtruderNozzleId ( ) const
inline
96{ return m_ext_nozzle_id; }
int m_ext_nozzle_id
Definition wgtDeviceNozzleRackUpdate.h:129

References m_ext_nozzle_id.

◆ GetParentBackgroundColor()

wxColor StaticBox::GetParentBackgroundColor ( wxWindow * parent)
staticinherited
123{
124 if (auto box = dynamic_cast<StaticBox*>(parent)) {
125 if (box->background_color.count() > 0) {
126 if (box->background_color2.count() == 0)
127 return box->background_color.defaultColor();
128 auto s = box->background_color.defaultColor();
129 auto e = box->background_color2.defaultColor();
130 int r = (s.Red() + e.Red()) / 2;
131 int g = (s.Green() + e.Green()) / 2;
132 int b = (s.Blue() + e.Blue()) / 2;
133 return wxColor(r, g, b);
134 }
135 }
136 if (parent)
137 return parent->GetBackgroundColour();
138 return *wxWHITE;
139}

References StaticBox().

Referenced by Label::Label(), ModeSwitchButton::ModeSwitchButton(), ScalableButton::ScalableButton(), SwitchButton::SwitchButton(), Create(), and SwitchButton::Rescale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRackNozzleId()

int Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::GetRackNozzleId ( ) const
inline
102{ return m_rack_nozzle_id; }
int m_rack_nozzle_id
Definition wgtDeviceNozzleRackUpdate.h:130

References m_rack_nozzle_id.

◆ OnBitmapHoverEnter()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnBitmapHoverEnter ( wxMouseEvent & event)
private
386{
387 int scaledW = FromDIP(240);
388 int scaledH = FromDIP(240);
389
390 ScalableBitmap* scaledBmp{nullptr};
392 {
393 if (!m_scaled_nozzle_empty_image) {m_scaled_nozzle_empty_image = new ScalableBitmap(this, "dev_rack_nozzle_empty", 216);}
394
395 scaledBmp = m_scaled_nozzle_empty_image;
396 }
397 else
398 {
399 scaledBmp = m_scaled_nozzle_image;
400 }
401
402 m_hoverFrame = new wxFrame(nullptr, wxID_ANY, "",
403 wxDefaultPosition, wxDefaultSize,
404 wxFRAME_NO_TASKBAR | wxBORDER_NONE | wxTRANSPARENT_WINDOW);
406 m_hoverFrame->SetSize(scaledW, scaledH);
407 wxBoxSizer* frameSizer = new wxBoxSizer(wxVERTICAL);
408 m_hoverFrame->SetSizer(frameSizer);
409
410 wxStaticBitmap* hoverBmp = new wxStaticBitmap(m_hoverFrame, wxID_ANY, scaledBmp->bmp());
411 frameSizer->Add(hoverBmp, 0, wxALIGN_CENTER_HORIZONTAL | wxTOP | wxBOTTOM, FromDIP(12));
412
413 wxPoint mousePos = wxGetMousePosition();
414 m_hoverFrame->SetPosition(wxPoint(mousePos.x + 10, mousePos.y));
415 m_hoverFrame->Layout();
416 m_hoverFrame->Show(true);
417
418 event.Skip();
419}
const wxBitmap & bmp() const
Definition wxExtensions.hpp:189
wxFrame * m_hoverFrame
Definition wgtDeviceNozzleRackUpdate.h:154
ScalableBitmap * m_scaled_nozzle_empty_image
Definition wgtDeviceNozzleRackUpdate.h:142
bool findNozzleImage
Definition wgtDeviceNozzleRackUpdate.h:131
NozzleStatus m_nozzle_status
Definition wgtDeviceNozzleRackUpdate.h:133
ScalableBitmap * m_scaled_nozzle_image
Definition wgtDeviceNozzleRackUpdate.h:141

References ScalableBitmap::bmp(), findNozzleImage, m_hoverFrame, m_nozzle_status, m_scaled_nozzle_empty_image, m_scaled_nozzle_image, NOZZLE_STATUS_EMPTY, NOZZLE_STATUS_UNKNOWN, WGT_DEVICE_NOZZLE_RACK_HOTEND_UPDATE_DEFAULT_BG, and Slic3r::GUI::wxMouseEvent.

Referenced by CreateGui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnBitmapHoverLeave()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnBitmapHoverLeave ( wxMouseEvent & event)
private
422{
423 if (m_hoverFrame)
424 {
425 m_hoverFrame->Destroy();
426 m_hoverFrame = nullptr;
427 }
428 event.Skip();
429}

References m_hoverFrame, and Slic3r::GUI::wxMouseEvent.

Referenced by CreateGui().

Here is the caller graph for this function:

◆ OnStatusIconClick()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::OnStatusIconClick ( wxMouseEvent & event)
private
336{
337 if (m_status_label->GetLabel() == _L("Refresh"))
338 {
339 m_status_label->SetForegroundColour(wxColour("#A3A3A3"));
340 m_status_label->SetLabel(_L("Refreshing"));
341 m_status_bitmap->Show(false);
342 // m_status_bitmap->Refresh();
343 if(!m_refreshing_icon->IsPlaying())
344 {
345 m_refreshing_icon->Play();
346 m_refreshing_icon->Show();
347 }
348 if (auto shared = m_nozzle_rack.lock())
349 {
350 shared->CrtlRackReadNozzle(m_rack_nozzle_id);
351 }
352 Layout();
353 }
354
355 if (m_status_label->GetLabel() == _L("Error") /*&& m_nozzle_status == NOZZLE_STATUS_ABNORMAL*/)
356 {
357 if (auto shared = m_nozzle_rack.lock())
358 {
359 MessageDialog dlg(nullptr, _L("Hotend status abnormal, unavailable at present. Please upgrade the firmware"
360 " and try again."), _L("Update"), wxICON_WARNING);
361 dlg.AddButton(wxID_CANCEL, _L("Cancel"), false);
362 dlg.AddButton(wxID_OK,_L("Jump to the upgrade page"), true);
363
364 if (dlg.ShowModal() == wxID_OK)
365 {
366 if (MonitorPanel* monitor = MonitorPanel::if_built())
367 monitor->jump_to_Upgrade();
368
369 wxCommandEvent evt(wxEVT_NOZZLE_JUMP_UPGRADE, GetId());
370 evt.SetEventObject(this);
371 wxWindow* target = GetParent();
372 if (target)
373 {
374 target = target->GetParent();
375 if (target)
376 {
377 wxPostEvent(target, evt);
378 }
379 }
380 };
381 }
382 }
383}
#define _L(s)
Definition OBJ.cpp:34
static MonitorPanel * if_built()
Definition Lazy.hpp:183
std::weak_ptr< DevNozzleRack > m_nozzle_rack
Definition wgtDeviceNozzleRackUpdate.h:134

References _L, Slic3r::GUI::MsgDialog::AddButton(), Slic3r::GUI::LazyInstance< MonitorPanel >::if_built(), m_nozzle_rack, m_rack_nozzle_id, m_refreshing_icon, m_status_bitmap, m_status_label, Slic3r::GUI::DPIAware< P >::ShowModal(), and Slic3r::GUI::wxMouseEvent.

Referenced by CreateGui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintEvent()

void StaticBox::paintEvent ( wxPaintEvent & evt)
protectedinherited
170{
171 // depending on your system you may need to look at double-buffered dcs
172 wxPaintDC dc(this);
173 render(dc);
174}
void render(wxDC &dc)
Definition StaticBox.cpp:181

References render().

Here is the call graph for this function:

◆ render()

void StaticBox::render ( wxDC & dc)
protectedinherited
182{
183#ifdef __WXMSW__
184 if (radius == 0) {
185 doRender(dc);
186 return;
187 }
188
189 wxSize size = GetSize();
190 if (size.x <= 0 || size.y <= 0)
191 return;
192 wxMemoryDC memdc(&dc);
193 if (!memdc.IsOk()) {
194 doRender(dc);
195 return;
196 }
197 wxBitmap bmp(size.x, size.y);
198 memdc.SelectObject(bmp);
199 //memdc.Blit({0, 0}, size, &dc, {0, 0});
200 memdc.SetBackground(wxBrush(GetBackgroundColour()));
201 memdc.Clear();
202 {
203 wxGCDC dc2(memdc);
204 doRender(dc2);
205 }
206
207 memdc.SelectObject(wxNullBitmap);
208 dc.DrawBitmap(bmp, 0, 0);
209#else
210 doRender(dc);
211#endif
212}
virtual void doRender(wxDC &dc)
Definition StaticBox.cpp:214

References doRender(), and radius.

Referenced by paintEvent(), Button::render(), FanSwitchButton::render(), ImageSwitchButton::render(), SpinInput::render(), TabButton::render(), TempInput::render(), and TextInput::render().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Rescale()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::Rescale ( )
710{
711 // update images
712 if (m_nozzle_image) { m_nozzle_image->msw_rescale(); }
713 if (m_nozzle_empty_image) { m_nozzle_empty_image->msw_rescale(); }
715 {
716 m_icon_bitmap->SetBitmap(m_nozzle_empty_image->bmp());
717 }
718 else if (m_nozzle_image != nullptr)
719 {
720 m_icon_bitmap->SetBitmap(m_nozzle_image->bmp());
721 }
722 m_icon_bitmap->Refresh();
723}
ScalableBitmap * m_nozzle_image
Definition wgtDeviceNozzleRackUpdate.h:139

References m_icon_bitmap, m_nozzle_empty_image, m_nozzle_image, m_nozzle_status, and NOZZLE_STATUS_EMPTY.

◆ SetBackgroundColor()

◆ SetBackgroundColor2()

void StaticBox::SetBackgroundColor2 ( StateColor const & color)
inherited
116{
117 background_color2 = color;
118 state_handler.update_binds();
119 Refresh();
120}

References background_color2, and state_handler.

◆ SetBackgroundColorNormal()

void StaticBox::SetBackgroundColorNormal ( wxColor const & color)
inherited
110{
111 background_color.setColorForStates(color, 0);
112 Refresh();
113}

References background_color.

Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().

Here is the caller graph for this function:

◆ SetBorderColor()

◆ SetBorderColorNormal()

void StaticBox::SetBorderColorNormal ( wxColor const & color)
inherited
97{
98 border_color.setColorForStates(color, 0);
99 Refresh();
100}

References border_color.

Referenced by Slic3r::GUI::ShortcutCaptureDialog::ShortcutCaptureDialog(), and Slic3r::GUI::HotEndTable::CreateNozzleBox().

Here is the caller graph for this function:

◆ SetBorderStyle()

void StaticBox::SetBorderStyle ( wxPenStyle style)
inherited
76{
78 Refresh();
79}

References border_style, and style.

◆ SetBorderWidth()

void StaticBox::SetBorderWidth ( int width)
inherited
82{
84 Refresh();
85}
coord_t width(const BoundingBox &box)
Definition Arrange.cpp:1184

References border_width.

Referenced by MultiSwitchButton::MultiSwitchButton(), Slic3r::GUI::KBShortcutsDialog::create_page(), and Button::SetStyle().

Here is the caller graph for this function:

◆ SetCornerRadius()

◆ SetExtruderNozzleId()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::SetExtruderNozzleId ( int ext_nozzle_id)
inline
97{ m_ext_nozzle_id = ext_nozzle_id; }

References m_ext_nozzle_id.

◆ SetRackNozzleId()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::SetRackNozzleId ( int rack_nozzle_id)
inline
101{ m_rack_nozzle_id = rack_nozzle_id; }

References m_rack_nozzle_id.

◆ SetTopMargin()

void StaticBox::SetTopMargin ( int margin)
inherited
70{
71 this->top_margin = margin;
72 Refresh();
73}

References top_margin.

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().

Here is the caller graph for this function:

◆ ShowBadge()

void StaticBox::ShowBadge ( bool show)
inherited
142{
143 if (show && badge.name() != "badge") {
144 badge = ScalableBitmap(this, "badge", 18);
145 Refresh();
146 } else if (!show && !badge.name().empty()) {
147 badge = ScalableBitmap {};
148 Refresh();
149 }
150}

References badge.

Referenced by Slic3r::GUI::ExtruderGroup::ExtruderGroup().

Here is the caller graph for this function:

◆ sizeEvent()

void StaticBox::sizeEvent ( wxSizeEvent & evt)
protectedinherited
164{
165 Refresh();
166 evt.Skip();
167}

◆ UpdateColourStyle()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::UpdateColourStyle ( const wxColour & clr)
476{
477 SetBackgroundColour(clr);
478 SetBorderColor(clr);
479
480 // BFS: Update all children background color
481 auto children = GetChildren();
482 while (!children.IsEmpty())
483 {
484 auto win = children.front();
485 children.pop_front();
486 win->SetBackgroundColour(clr);
487
488 for (auto child : win->GetChildren())
489 {
490 children.push_back(child);
491 }
492 }
493}

References StaticBox::SetBorderColor().

Here is the call graph for this function:

◆ UpdateExtruderNozzleInfo()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::UpdateExtruderNozzleInfo ( const std::shared_ptr< DevNozzleRack > rack)
496{
497 m_nozzle_rack = rack;
498 if (rack)
499 {
500 DevNozzleSystem* nozzle_system = rack->GetNozzleSystem();
501 if (nozzle_system)
502 {
503 UpdateInfo(nozzle_system->GetExtNozzle(m_ext_nozzle_id));
504 }
505 }
506}
void UpdateInfo(const DevNozzle &nozzle)
Definition wgtDeviceNozzleRackUpdate.cpp:517

References Slic3r::DevNozzleSystem::GetExtNozzle(), m_ext_nozzle_id, m_nozzle_rack, and UpdateInfo().

Here is the call graph for this function:

◆ UpdateInfo()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::UpdateInfo ( const DevNozzle & nozzle)
private
518{
519 /*update nozzle possition and background*/
520 if (auto share = m_nozzle_rack.lock())
521 {
522 // if (share->GetReadingCount() > 0 && m_status_label->IsShown())
523 if (share->GetReadingCount() > 0 && m_status_label->IsShown() && m_status_label->GetLabel() == _L("Refreshing"))
524 {
525 m_refreshing_icon->Play();
526 m_refreshing_icon->Show();
528 return;
529 }
530 else
531 {
532 m_refreshing_icon->Stop();
533 m_refreshing_icon->Show(false);
534 }
535 }
536
537 wxString filamentDisplayName{};
538 for (auto iter = GUI::wxGetApp().preset_bundle->filaments.begin(); iter != GUI::wxGetApp().preset_bundle->filaments.end(); ++iter)
539 {
540 const Preset& filament_preset = *iter;
541 // const auto& config = filament_preset.config;
542 if (filament_preset.filament_id == nozzle.GetFilamentId())
543 {
544 filamentDisplayName = wxString(filament_preset.alias);
545 }
546 }
547
548 if (nozzle.IsEmpty() && m_nozzle_status != NOZZLE_STATUS_EMPTY)
549 {
551
552 m_material_label->Show(false);
553 m_colour_box->Show(false);
554
555 m_diameter_label->Show(false);
556 m_flowtype_label->Show(false);
557 m_type_label->SetLabel(_L("Empty"));
558 m_type_label->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
559
560 m_sn_label->Show(false);
561 m_version_label->Show(false);
562 m_version_new_label->Show(false);
563
564 updateNozzleImage(nozzle);
565
566 m_used_time->Show(false);
567 m_status_label->Show(false);
568 m_status_bitmap->Show(false);
569
570 }
571 else if (nozzle.IsNormal() && m_nozzle_status != NOZZLE_STATUS_NORMAL)
572 {
574
575 m_material_label->SetLabel(filamentDisplayName);
576 m_colour_box->SetBackgroundColour(wxColour("#" + nozzle.GetFilamentColor()));
577 m_colour_box->SetBorderColor(wxColour("#" + nozzle.GetFilamentColor()));
578 m_material_label->Show(true);
579 m_colour_box->Show(true);
580
581 m_diameter_label->Show(true);
582 m_flowtype_label->Show(true);
583 m_diameter_label->SetLabel(nozzle.GetNozzleDiameterStr());
584 m_flowtype_label->SetLabel(nozzle.GetNozzleFlowTypeStr());
585 m_type_label->SetLabel(nozzle.GetNozzleTypeStr());
586 m_type_label->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
587
588 m_sn_label->Show(true);
589 m_version_label->Show(true);
590
591 updateNozzleImage(nozzle);
592
593 m_used_time->Show(true);
594 m_status_label->Show(false);
595 m_status_bitmap->Show(false);
596 }
597 else if (nozzle.IsAbnormal() && m_nozzle_status != NOZZLE_STATUS_ABNORMAL)
598 {
600
601 m_material_label->SetLabel(filamentDisplayName);
602 m_colour_box->SetBackgroundColour(wxColour("#" + nozzle.GetFilamentColor()));
603 m_colour_box->SetBorderColor(wxColour("#" + nozzle.GetFilamentColor()));
604 m_material_label->Show(true);
605 m_colour_box->Show(true);
606
607 m_diameter_label->Show(true);
608 m_flowtype_label->Show(true);
609 m_diameter_label->SetLabel(nozzle.GetNozzleDiameterStr());
610 m_flowtype_label->SetLabel(nozzle.GetNozzleFlowTypeStr());
611 m_type_label->SetLabel(nozzle.GetNozzleTypeStr());
612 m_type_label->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
613
614 updateNozzleImage(nozzle);
615
616 m_status_label->Show(true);
617 m_status_bitmap->Show(true);
618 m_status_label->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#E14747")));
619 m_status_label->SetLabel(_L("Error"));
620 m_status_bitmap->SetBitmap(m_error_icon->bmp());
621 m_status_bitmap->Refresh();
622 }
623 else if (nozzle.IsUnknown() && m_nozzle_status != NOZZLE_STATUS_UNKNOWN)
624 {
626
627 m_colour_box->Show(false);
628 m_material_label->SetLabel(wxString("--"));
629 m_material_label->Show(true);
630
631 m_diameter_label->Show(false);
632 m_flowtype_label->Show(false);
633 m_type_label->SetLabel(_L("Unknown"));
634 m_type_label->SetForegroundColour(StateColor::darkModeColorFor(*wxBLACK));
635
636 m_sn_label->Show(true);
637 m_version_label->Show(true);
638
639 updateNozzleImage(nozzle);
640
641 m_used_time->Show(true);
642 m_status_label->Show(true);
643 m_status_bitmap->Show(true);
644 m_status_label->SetForegroundColour(wxColour("#009688")); // Orca: accent green
645 m_status_label->SetLabel(_L("Refresh"));
646 m_status_bitmap->SetBitmap(m_refresh_icon->bmp());
647 m_status_bitmap->Refresh();
648 }
649
650 // Update firmware info
651 const DevFirmwareVersionInfo& firmware = nozzle.GetFirmwareInfo();
652 if (nozzle.IsUnknown())
653 {
654 m_sn_label->SetLabel(wxString::Format("%s: --", _L("SN")));
655 m_version_label->SetLabel(wxString::Format("%s: --", _L("Version")));
656 m_version_new_label->Show(false);
657 }
658 if (nozzle.IsNormal() || nozzle.IsAbnormal())
659 {
660 if (firmware.isValid())
661 {
662 m_sn_label->SetLabel(wxString::Format("%s: %s", _L("SN"), firmware.sn));
663
664 if (!firmware.sw_new_ver.empty() && firmware.sw_new_ver != firmware.sw_ver)
665 {
666 m_version_label->SetLabel(wxString::Format("%s: %s > ", _L("Version"), firmware.sw_ver));
667 m_version_new_label->SetLabel(wxString::Format("%s", firmware.sw_new_ver));
668 m_version_new_label->Show(true);
669 }
670 else
671 {
672 m_version_label->SetLabel(wxString::Format("%s:%s", _L("Version"), firmware.sw_ver));
673 m_version_new_label->Show(false);
674 }
675 }
676 else
677 {
678 m_sn_label->SetLabel(wxString::Format("%s: --", _L("SN")));
679 m_version_label->SetLabel(wxString::Format("%s: --", _L("Version")));
680 m_version_new_label->Show(false);
681 }
682 }
683
684 if (!nozzle.IsEmpty())
685 {
686 if (nozzle.IsUnknown())
687 {
688 m_used_time->SetLabel(wxString::Format(_L("Used Time: %s"), "--h"));
689 }
690 else
691 {
692 // Update used time
693 int usedSeconds = nozzle.GetNozzlePrintTime();
694 if (usedSeconds < 60)
695 {
696 m_used_time->SetLabel(wxString::Format(_L("Used Time: %s"), "0 h"));
697 }
698 else
699 {
700 int printTime = (usedSeconds >= 3600 ? usedSeconds / 3600 : usedSeconds / 60);
701 std::string printTimeStr = (usedSeconds >= 3600 ? std::to_string(printTime) + " h" : std::to_string(printTime) + " min");
702 m_used_time->SetLabel(wxString::Format(_L("Used Time: %s"), printTimeStr.c_str()));
703 }
704 }
705
706 }
707}
void updateNozzleImage(const DevNozzle &nozzle)
Definition wgtDeviceNozzleRackUpdate.cpp:431
static wxColour darkModeColorFor(wxColour const &color)
Definition StateColor.cpp:219
@ Preset
Definition calib.hpp:39

References _L, Slic3r::Preset::alias, StateColor::darkModeColorFor(), Slic3r::Preset::filament_id, Slic3r::DevNozzle::GetFilamentColor(), Slic3r::DevNozzle::GetFilamentId(), Slic3r::DevNozzle::GetFirmwareInfo(), Slic3r::DevNozzle::GetNozzleDiameterStr(), Slic3r::DevNozzle::GetNozzleFlowTypeStr(), Slic3r::DevNozzle::GetNozzlePrintTime(), Slic3r::DevNozzle::GetNozzleTypeStr(), Slic3r::DevNozzle::IsAbnormal(), Slic3r::DevNozzle::IsEmpty(), Slic3r::DevNozzle::IsNormal(), Slic3r::DevNozzle::IsUnknown(), Slic3r::DevFirmwareVersionInfo::isValid(), m_colour_box, m_diameter_label, m_error_icon, m_flowtype_label, m_material_label, m_nozzle_rack, m_nozzle_status, m_refresh_icon, m_refreshing_icon, m_sn_label, m_status_bitmap, m_status_label, m_type_label, m_used_time, m_version_label, m_version_new_label, NOZZLE_STATUS_ABNORMAL, NOZZLE_STATUS_DC, NOZZLE_STATUS_EMPTY, NOZZLE_STATUS_NORMAL, NOZZLE_STATUS_UNKNOWN, Slic3r::DevFirmwareVersionInfo::sn, Slic3r::DevFirmwareVersionInfo::sw_new_ver, Slic3r::DevFirmwareVersionInfo::sw_ver, and updateNozzleImage().

Referenced by UpdateExtruderNozzleInfo(), and UpdateRackNozzleInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNozzleImage()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::updateNozzleImage ( const DevNozzle & nozzle)
private
432{
434 {
435 if (!m_nozzle_empty_image) {m_nozzle_empty_image = new ScalableBitmap(this, "dev_rack_nozzle_empty", 46);}
436 m_icon_bitmap->SetBitmap(m_nozzle_empty_image->bmp());
437 m_icon_bitmap->Refresh();
438 return;
439 }
440 findNozzleImage = false;
441 int index = -1;
442 switch (nozzle.GetNozzleDiameterType()) {
443 case NOZZLE_DIAMETER_0_2: index = 0; break;
444 case NOZZLE_DIAMETER_0_4: index = 1; break;
445 case NOZZLE_DIAMETER_0_6: index = 2; break;
446 case NOZZLE_DIAMETER_0_8: index = 3; break;
447 default: index = -1; break;
448 }
449 NozzleType nozzleType = nozzle.GetNozzleType();
450 if (nozzleType == ntHardenedSteel || nozzleType == ntStainlessSteel)
451 {
452 if (nozzle.GetNozzleFlowType() == H_FLOW && index >= 1)
453 {
454 m_nozzle_image = nozzle_hh[index - 1][0];
455 m_icon_bitmap->SetBitmap(m_nozzle_image->bmp());
456 m_scaled_nozzle_image = nozzle_hh[index - 1][1];
457 findNozzleImage = true;
458 }
459 else if (nozzle.GetNozzleFlowType() == S_FLOW && index >= 0)
460 {
461 m_nozzle_image = nozzle_hs[index][0];
462 m_icon_bitmap->SetBitmap(m_nozzle_image->bmp());
464 findNozzleImage = true;
465 }
466 }
467 if (!findNozzleImage)
468 {
469 if (!m_nozzle_empty_image) {m_nozzle_empty_image = new ScalableBitmap(this, "dev_rack_nozzle_empty", 46);}
470 m_icon_bitmap->SetBitmap(m_nozzle_empty_image->bmp());
471 }
472 m_icon_bitmap->Refresh();
473}
@ H_FLOW
Definition DevDefs.h:119
@ S_FLOW
Definition DevDefs.h:118
NozzleType
Definition CommonDefs.hpp:13
@ ntStainlessSteel
Definition CommonDefs.hpp:16
@ ntHardenedSteel
Definition CommonDefs.hpp:15
@ NOZZLE_DIAMETER_0_4
Definition DevDefs.h:128
@ NOZZLE_DIAMETER_0_2
Definition DevDefs.h:127
@ NOZZLE_DIAMETER_0_6
Definition DevDefs.h:129
@ NOZZLE_DIAMETER_0_8
Definition DevDefs.h:130

References findNozzleImage, Slic3r::DevNozzle::GetNozzleDiameterType(), Slic3r::DevNozzle::GetNozzleFlowType(), Slic3r::DevNozzle::GetNozzleType(), Slic3r::H_FLOW, m_icon_bitmap, m_nozzle_empty_image, m_nozzle_image, m_nozzle_status, m_scaled_nozzle_image, Slic3r::NOZZLE_DIAMETER_0_2, Slic3r::NOZZLE_DIAMETER_0_4, Slic3r::NOZZLE_DIAMETER_0_6, Slic3r::NOZZLE_DIAMETER_0_8, nozzle_hh, nozzle_hs, NOZZLE_STATUS_EMPTY, NOZZLE_STATUS_UNKNOWN, Slic3r::ntHardenedSteel, Slic3r::ntStainlessSteel, and Slic3r::S_FLOW.

Referenced by UpdateInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateRackNozzleInfo()

void Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::UpdateRackNozzleInfo ( const std::shared_ptr< DevNozzleRack > rack)
509{
510 m_nozzle_rack = rack;
511 if (rack)
512 {
513 UpdateInfo(rack->GetNozzle(m_rack_nozzle_id));
514 }
515}

References m_nozzle_rack, m_rack_nozzle_id, and UpdateInfo().

Here is the call graph for this function:

Member Data Documentation

◆ background_color

◆ background_color2

StateColor StaticBox::background_color2
protectedinherited

◆ badge

ScalableBitmap StaticBox::badge
protectedinherited

Referenced by doRender(), and ShowBadge().

◆ border_color

◆ border_style

wxPenStyle StaticBox::border_style = wxPENSTYLE_SOLID
protectedinherited

Referenced by doRender(), and SetBorderStyle().

◆ border_width

◆ findNozzleImage

bool Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::findNozzleImage = false
private

◆ m_colour_box

StaticBox* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_colour_box { nullptr }
private
153{ nullptr };

Referenced by CreateGui(), and UpdateInfo().

◆ m_diameter_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_diameter_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_error_icon

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_error_icon = nullptr
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_ext_nozzle_id

int Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_ext_nozzle_id = -1
private

◆ m_flowtype_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_flowtype_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_hoverFrame

wxFrame* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_hoverFrame { nullptr }
private
154{ nullptr };

Referenced by OnBitmapHoverEnter(), and OnBitmapHoverLeave().

◆ m_icon_bitmap

wxStaticBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_icon_bitmap { nullptr }
private
149{ nullptr };

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

◆ m_idx_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_idx_label
private

◆ m_material_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_material_label { nullptr }
private
152{ nullptr };

Referenced by CreateGui(), and UpdateInfo().

◆ m_nozzle_empty_image

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_nozzle_empty_image = nullptr
private

◆ m_nozzle_image

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_nozzle_image = nullptr
private

Referenced by Rescale(), and updateNozzleImage().

◆ m_nozzle_rack

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

◆ m_nozzle_status

NozzleStatus Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_nozzle_status = NOZZLE_STATUS_DC
private

◆ m_rack_nozzle_id

int Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_rack_nozzle_id = -1
private

◆ m_refresh_icon

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_refresh_icon = nullptr
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_refreshing_icon

AnimaIcon* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_refreshing_icon = nullptr
private

◆ m_scaled_nozzle_empty_image

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_scaled_nozzle_empty_image = nullptr
private

Referenced by OnBitmapHoverEnter().

◆ m_scaled_nozzle_image

ScalableBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_scaled_nozzle_image = nullptr
private

◆ m_sn_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_sn_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_status_bitmap

wxStaticBitmap* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_status_bitmap { nullptr }
private
150{ nullptr };

Referenced by CreateGui(), OnStatusIconClick(), and UpdateInfo().

◆ m_status_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_status_label { nullptr }
private
156{ nullptr };

Referenced by CreateGui(), OnStatusIconClick(), and UpdateInfo().

◆ m_type_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_type_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_used_time

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_used_time { nullptr }
private
157{ nullptr };

Referenced by CreateGui(), and UpdateInfo().

◆ m_version_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_version_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ m_version_new_label

Label* Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::m_version_new_label
private

Referenced by CreateGui(), and UpdateInfo().

◆ nozzle_hh

std::vector<std::vector<ScalableBitmap*> > Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::nozzle_hh
private

Referenced by CreateGui(), and updateNozzleImage().

◆ nozzle_hs

std::vector<std::vector<ScalableBitmap*> > Slic3r::GUI::wgtDeviceNozzleRackHotendUpdate::nozzle_hs
private

Referenced by CreateGui(), and updateNozzleImage().

◆ radius

◆ state_handler

◆ top_margin

int StaticBox::top_margin = 0
protectedinherited

Referenced by doRender(), and SetTopMargin().


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