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

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/MultiNozzleSync.hpp>

Inheritance diagram for Slic3r::GUI::MultiNozzleStatusTable:
Collaboration diagram for Slic3r::GUI::MultiNozzleStatusTable:

Public Member Functions

 MultiNozzleStatusTable (wxWindow *parent)
void UpdateRackInfo (std::weak_ptr< DevNozzleRack > rack)
void MarkRelatedItems (const NozzleOption &option)
void UnMarkRelatedItems (const NozzleOption &option)

Private Attributes

ExtruderBadge * m_badge
HotEndTable * m_table

Detailed Description

Constructor & Destructor Documentation

◆ MultiNozzleStatusTable()

Slic3r::GUI::MultiNozzleStatusTable::MultiNozzleStatusTable ( wxWindow * parent)
806 : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE)
807{
808 m_badge = new ExtruderBadge(this);
809
810 SetBackgroundColour(wxColour("#F8F8F8"));
811
812 auto main_sizer = new wxBoxSizer(wxVERTICAL);
813
814 auto title_panel = new wxPanel(this);
815 title_panel->SetBackgroundColour(0xEEEEEE);
816 auto title_sizer = new wxBoxSizer(wxHORIZONTAL);
817 title_panel->SetSizer(title_sizer);
818
819 Label* static_text = new Label(this, _L("Nozzle Info"));
820 static_text->SetFont(Label::Head_13);
821 static_text->SetBackgroundColour(0xEEEEEE);
822
823 title_sizer->Add(static_text, 0, wxALIGN_CENTER | wxALL, FromDIP(5));
824
825 main_sizer->Add(title_panel, 0, wxEXPAND);
826 main_sizer->AddSpacer(10);
827
828 wxSizer* nozzle_area_sizer = new wxBoxSizer(wxHORIZONTAL);
829
830 m_table = new HotEndTable(this);
831
832 nozzle_area_sizer->Add(m_badge, 0, wxLEFT | wxRIGHT, FromDIP(20));
833 nozzle_area_sizer->Add(m_table, 0, wxRIGHT, FromDIP(10));
834
835 main_sizer->Add(nozzle_area_sizer);
836 main_sizer->AddSpacer(FromDIP(5));
837
838 SetSizer(main_sizer);
839 Layout();
840 Fit();
841 wxGetApp().UpdateDarkUIWin(this);
842}
#define _L(s)
Definition OBJ.cpp:34
static wxFont Head_13
Definition Label.hpp:46
ExtruderBadge * m_badge
Definition MultiNozzleSync.hpp:167
HotEndTable * m_table
Definition MultiNozzleSync.hpp:168

References _L, Label::Head_13, m_badge, and m_table.

Member Function Documentation

◆ MarkRelatedItems()

void Slic3r::GUI::MultiNozzleStatusTable::MarkRelatedItems ( const NozzleOption & option)
845{
846 m_table->MarkRelatedItems(option);
847
848 m_badge->MarkRelatedItems(option);
849}

References m_badge, and m_table.

◆ UnMarkRelatedItems()

void Slic3r::GUI::MultiNozzleStatusTable::UnMarkRelatedItems ( const NozzleOption & option)
852{
853 m_table->UnMarkRelatedItems(option);
854
855 m_badge->UnMarkRelatedItems(option);
856}

References m_badge, and m_table.

◆ UpdateRackInfo()

void Slic3r::GUI::MultiNozzleStatusTable::UpdateRackInfo ( std::weak_ptr< DevNozzleRack > rack)
859{
860 if (m_table)
861 m_table->UpdateRackInfo(rack);
862 if (m_badge) {
863 auto nozzle_rack = rack.lock();
864 if (!nozzle_rack)
865 return;
866 auto nozzles_in_extruder = nozzle_rack->GetNozzleSystem()->GetExtNozzles();
867 bool has_right = false;
868 for (auto& elem : nozzles_in_extruder) {
869 auto& nozzle = elem.second;
870 int extruder_id = nozzle.AtLeftExtruder() ? 0 : 1;
871 if (nozzle.AtRightExtruder())
872 has_right = true;
873
874 NozzleVolumeType volume_type = DevNozzle::ToNozzleVolumeType(nozzle.m_nozzle_flow);
875
876 m_badge->SetExtruderInfo(extruder_id, format_diameter_to_str(nozzle.GetNozzleDiameter()), volume_type);
877 }
878 m_badge->SetExtruderValid(has_right);
879 }
880}
NozzleVolumeType
Definition PrintConfig.hpp:618
std::string format_diameter_to_str(double diameter, int precision)
Definition utils.cpp:1739
static NozzleVolumeType ToNozzleVolumeType(const NozzleFlowType &type)
Definition DevNozzleSystem.cpp:52

References Slic3r::format_diameter_to_str(), m_badge, m_table, and Slic3r::DevNozzle::ToNozzleVolumeType().

Here is the call graph for this function:

Member Data Documentation

◆ m_badge

ExtruderBadge* Slic3r::GUI::MultiNozzleStatusTable::m_badge
private

◆ m_table

HotEndTable* Slic3r::GUI::MultiNozzleStatusTable::m_table
private

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