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

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

Inheritance diagram for Slic3r::GUI::AMSextruder:
Collaboration diagram for Slic3r::GUI::AMSextruder:

Public Member Functions

void TurnOn (wxColour col)
void TurnOff ()
void OnVamsLoading (bool load, wxColour col=AMS_CONTROL_GRAY500)
void OnAmsLoading (bool load, int nozzle_id=0, wxColour col=AMS_CONTROL_GRAY500)
void msw_rescale ()
void has_ams (bool hams)
void no_ams_mode (bool mode)
bool updateNozzleNum (int nozzle_num, const std::string &series_name=std::string())
 AMSextruder (wxWindow *parent, wxWindowID id, int nozzle_num, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
 ~AMSextruder ()

Public Attributes

bool m_none_ams_mode {true}
bool m_has_vams {false}
bool m_vams_loading {false}
bool m_ams_loading {false}
wxColour m_current_colur
wxColour m_current_colur_deputy
wxBoxSizer * m_bitmap_sizer {nullptr}
wxPanel * m_bitmap_panel {nullptr}
AMSextruderImage * m_left_extruder = nullptr
AMSextruderImage * m_right_extruder = nullptr

Private Member Functions

void create (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int nozzle_num)

Private Attributes

int m_nozzle_num = -1
std::string m_series_name

Detailed Description

Constructor & Destructor Documentation

◆ AMSextruder()

Slic3r::GUI::AMSextruder::AMSextruder ( wxWindow * parent,
wxWindowID id,
int nozzle_num,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize )
848{
849 create(parent, id, pos, size, nozzle_num);
850}
void create(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int nozzle_num)
Definition AMSItem.cpp:864

References create().

Here is the call graph for this function:

◆ ~AMSextruder()

Slic3r::GUI::AMSextruder::~AMSextruder ( )
852{}

Member Function Documentation

◆ create()

void Slic3r::GUI::AMSextruder::create ( wxWindow * parent,
wxWindowID id,
const wxPoint & pos,
const wxSize & size,
int nozzle_num )
private
865{
866 wxWindow::Create(parent, id, pos, wxSize(-1, FromDIP(36)), wxBORDER_NONE);
867 SetBackgroundColour(*wxWHITE);
868
869 updateNozzleNum(nozzle_num);
870 Layout();
871}
bool updateNozzleNum(int nozzle_num, const std::string &series_name=std::string())
Definition AMSItem.cpp:904

References updateNozzleNum().

Referenced by AMSextruder().

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

◆ has_ams()

void Slic3r::GUI::AMSextruder::has_ams ( bool hams)
inline
467{m_has_vams = hams; Refresh();};
bool m_has_vams
Definition AMSItem.hpp:472

References m_has_vams.

◆ msw_rescale()

void Slic3r::GUI::AMSextruder::msw_rescale ( )
952{
953 //m_amsSextruder->msw_rescale();
954 if (m_left_extruder) m_left_extruder->msw_rescale();
955 if (m_right_extruder) m_right_extruder->msw_rescale();
956 Layout();
957 Update();
958 Refresh();
959}
AMSextruderImage * m_left_extruder
Definition AMSItem.hpp:481
AMSextruderImage * m_right_extruder
Definition AMSItem.hpp:482

References m_left_extruder, and m_right_extruder.

◆ no_ams_mode()

void Slic3r::GUI::AMSextruder::no_ams_mode ( bool mode)
inline
468{m_none_ams_mode = mode; Refresh();};
bool m_none_ams_mode
Definition AMSItem.hpp:471

References m_none_ams_mode.

◆ OnAmsLoading()

void Slic3r::GUI::AMSextruder::OnAmsLoading ( bool load,
int nozzle_id = 0,
wxColour col = AMS_CONTROL_GRAY500 )
881{
883 if (m_nozzle_num == 1){
884 m_left_extruder->OnAmsLoading(load, col);
885 if (load) m_current_colur_deputy = col;
886 }
887 else if (m_nozzle_num > 1){
888 if (nozzle_id == MAIN_EXTRUDER_ID) {
889 m_right_extruder->OnAmsLoading(load, col);
890 if (m_current_colur != col){
891 if (load) m_current_colur = col;
892 }
893 }
894 else if(nozzle_id == DEPUTY_EXTRUDER_ID) {
895 m_left_extruder->OnAmsLoading(load, col);
896 if (m_current_colur_deputy != col) {
897 if (load) m_current_colur_deputy = col;
898 }
899 }
900 }
901}
#define DEPUTY_EXTRUDER_ID
Definition DevDefs.h:102
#define MAIN_EXTRUDER_ID
Definition DevDefs.h:101
void load(Archive &archive, wxString &d)
Definition GLGizmoEmboss.cpp:3405
wxColour m_current_colur
Definition AMSItem.hpp:475
wxColour m_current_colur_deputy
Definition AMSItem.hpp:476
bool m_ams_loading
Definition AMSItem.hpp:474
int m_nozzle_num
Definition AMSItem.hpp:458

References DEPUTY_EXTRUDER_ID, load(), m_ams_loading, m_current_colur, m_current_colur_deputy, m_left_extruder, m_nozzle_num, m_right_extruder, and MAIN_EXTRUDER_ID.

Here is the call graph for this function:

◆ OnVamsLoading()

void Slic3r::GUI::AMSextruder::OnVamsLoading ( bool load,
wxColour col = AMS_CONTROL_GRAY500 )
874{
876 if (load)m_current_colur = col;
877 Refresh();
878}
bool m_vams_loading
Definition AMSItem.hpp:473

References load(), m_current_colur, and m_vams_loading.

Here is the call graph for this function:

◆ TurnOff()

void Slic3r::GUI::AMSextruder::TurnOff ( )
860{
861 m_left_extruder->TurnOff();
862}

References m_left_extruder.

◆ TurnOn()

void Slic3r::GUI::AMSextruder::TurnOn ( wxColour col)
855 {
856 //m_left_extruder->TurnOn(col);
857 }

◆ updateNozzleNum()

bool Slic3r::GUI::AMSextruder::updateNozzleNum ( int nozzle_num,
const std::string & series_name = std::string() )
905{
906 if (m_nozzle_num == nozzle_num && m_series_name == series_name) return false;
907 m_series_name = series_name;
908 m_nozzle_num = nozzle_num;
909 this->DestroyChildren();
910
911 m_right_extruder = new AMSextruderImage(this, wxID_ANY, "right_nozzle", AMS_EXTRUDER_DOUBLE_NOZZLE_BITMAP_SIZE);
912
913 wxBoxSizer* m_bitmap_sizer = new wxBoxSizer(wxHORIZONTAL);
914 if (m_nozzle_num >= 2)
915 {
916 m_left_extruder = new AMSextruderImage(this, wxID_ANY, "left_nozzle", AMS_EXTRUDER_DOUBLE_NOZZLE_BITMAP_SIZE);
917 m_left_extruder->setShowState(true);
918 m_right_extruder->setShowState(true);
919 m_bitmap_sizer->Add(m_left_extruder, 0, wxALIGN_LEFT | wxALIGN_TOP, 0);
920 m_bitmap_sizer->Add(m_right_extruder, 0, wxLEFT | wxALIGN_TOP, FromDIP(2));
921 m_bitmap_sizer->AddSpacer(2);
922 }
923 else
924 {
926 {
927 m_left_extruder = new AMSextruderImage(this, wxID_ANY, "single_nozzle_n", AMS_EXTRUDER_SINGLE_NOZZLE_N_SIZE);
928 }
930 {
931 m_left_extruder = new AMSextruderImage(this, wxID_ANY, "single_nozzle_xp", AMS_EXTRUDER_SINGLE_NOZZLE_XP_SIZE);
932 }
933 else
934 {
935 m_left_extruder = new AMSextruderImage(this, wxID_ANY, "single_nozzle_xp", AMS_EXTRUDER_SINGLE_NOZZLE_XP_SIZE);
936 }
937
938 m_left_extruder->setShowState(true);
939 m_right_extruder->setShowState(false);
940 m_bitmap_sizer->Add(m_left_extruder, 0, wxALIGN_LEFT | wxALIGN_TOP, 0);
941 m_bitmap_sizer->Add(m_right_extruder, 0, wxLEFT | wxALIGN_TOP, FromDIP(3));
942 }
943
944 SetSizer(m_bitmap_sizer);
945 Layout();
946 Refresh();
947
948 return true;
949}
#define AMS_EXTRUDER_SINGLE_NOZZLE_N_SIZE
Definition AMSItem.hpp:183
#define AMS_EXTRUDER_SINGLE_NOZZLE_XP_SIZE
Definition AMSItem.hpp:184
#define AMS_EXTRUDER_DOUBLE_NOZZLE_BITMAP_SIZE
Definition AMSItem.hpp:182
std::string m_series_name
Definition AMSItem.hpp:459
wxBoxSizer * m_bitmap_sizer
Definition AMSItem.hpp:478
bool is_series_p() const
Definition DeviceManager.cpp:616
bool is_series_x() const
Definition DeviceManager.cpp:617
bool is_series_n() const
Definition DeviceManager.cpp:615

References AMS_EXTRUDER_DOUBLE_NOZZLE_BITMAP_SIZE, AMS_EXTRUDER_SINGLE_NOZZLE_N_SIZE, AMS_EXTRUDER_SINGLE_NOZZLE_XP_SIZE, Slic3r::MachineObject::is_series_n(), Slic3r::MachineObject::is_series_p(), Slic3r::MachineObject::is_series_x(), m_bitmap_sizer, m_left_extruder, m_nozzle_num, m_right_extruder, and m_series_name.

Referenced by create().

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

Member Data Documentation

◆ m_ams_loading

bool Slic3r::GUI::AMSextruder::m_ams_loading {false}
474{false};

Referenced by OnAmsLoading().

◆ m_bitmap_panel

wxPanel* Slic3r::GUI::AMSextruder::m_bitmap_panel {nullptr}
479{nullptr};

◆ m_bitmap_sizer

wxBoxSizer* Slic3r::GUI::AMSextruder::m_bitmap_sizer {nullptr}
478{nullptr};

Referenced by updateNozzleNum().

◆ m_current_colur

wxColour Slic3r::GUI::AMSextruder::m_current_colur

Referenced by OnAmsLoading(), and OnVamsLoading().

◆ m_current_colur_deputy

wxColour Slic3r::GUI::AMSextruder::m_current_colur_deputy

Referenced by OnAmsLoading().

◆ m_has_vams

bool Slic3r::GUI::AMSextruder::m_has_vams {false}
472{false};

Referenced by has_ams().

◆ m_left_extruder

AMSextruderImage* Slic3r::GUI::AMSextruder::m_left_extruder = nullptr

◆ m_none_ams_mode

bool Slic3r::GUI::AMSextruder::m_none_ams_mode {true}
471{true};

Referenced by no_ams_mode().

◆ m_nozzle_num

int Slic3r::GUI::AMSextruder::m_nozzle_num = -1
private

Referenced by OnAmsLoading(), and updateNozzleNum().

◆ m_right_extruder

AMSextruderImage* Slic3r::GUI::AMSextruder::m_right_extruder = nullptr

◆ m_series_name

std::string Slic3r::GUI::AMSextruder::m_series_name
private

Referenced by updateNozzleNum().

◆ m_vams_loading

bool Slic3r::GUI::AMSextruder::m_vams_loading {false}
473{false};

Referenced by OnVamsLoading().


The documentation for this class was generated from the following files:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/AMSItem.hpp
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/Widgets/AMSItem.cpp