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

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

Inheritance diagram for Slic3r::GUI::CaliPageStepGuide:
Collaboration diagram for Slic3r::GUI::CaliPageStepGuide:

Public Member Functions

 CaliPageStepGuide (wxWindow *parent, wxArrayString steps, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL)
void set_steps (int index)
void set_steps_string (wxArrayString steps)

Protected Attributes

wxArrayString m_steps
wxBoxSizer * m_step_sizer
std::vector< Label * > m_text_steps

Detailed Description

Constructor & Destructor Documentation

◆ CaliPageStepGuide()

Slic3r::GUI::CaliPageStepGuide::CaliPageStepGuide ( wxWindow * parent,
wxArrayString steps,
wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize,
long style = wxTAB_TRAVERSAL )
529 : wxPanel(parent, id, pos, size, style),
530 m_steps(steps)
531{
532 SetBackgroundColour(*wxWHITE);
533
534 auto top_sizer = new wxBoxSizer(wxVERTICAL);
535
536 m_step_sizer = new wxBoxSizer(wxHORIZONTAL);
537 m_step_sizer->AddSpacer(FromDIP(90));
538 for (int i = 0; i < m_steps.size(); i++) {
539 Label* step_text = new Label(this, m_steps[i]);
540 step_text->SetForegroundColour(wxColour(206, 206, 206));
541 m_text_steps.push_back(step_text);
542 m_step_sizer->Add(step_text, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(15));
543 if (i != m_steps.size() - 1) {
544 auto line = new wxPanel(this, wxID_ANY, wxDefaultPosition);
545 line->SetBackgroundColour(*wxBLACK);
546 m_step_sizer->Add(line, 1, wxALIGN_CENTER);
547 }
548 }
549 m_step_sizer->AddSpacer(FromDIP(90));
550
551 top_sizer->Add(m_step_sizer, 0, wxEXPAND);
552 top_sizer->AddSpacer(FromDIP(30));
553 this->SetSizer(top_sizer);
554 top_sizer->Fit(this);
555
556 wxGetApp().UpdateDarkUIWin(this);
557}
#define style
Definition WipeTowerDialog.cpp:101
std::vector< Label * > m_text_steps
Definition CalibrationWizardPage.hpp:180
wxArrayString m_steps
Definition CalibrationWizardPage.hpp:178
wxBoxSizer * m_step_sizer
Definition CalibrationWizardPage.hpp:179

References m_step_sizer, m_steps, m_text_steps, and style.

Member Function Documentation

◆ set_steps()

void Slic3r::GUI::CaliPageStepGuide::set_steps ( int index)
560{
561 for (Label* text_step : m_text_steps) {
562 text_step->SetForegroundColour(wxColour(206, 206, 206));
563 }
564 m_text_steps[index]->SetForegroundColour(*wxBLACK);
565
566 wxGetApp().UpdateDarkUIWin(this);
567}

References m_text_steps.

◆ set_steps_string()

void Slic3r::GUI::CaliPageStepGuide::set_steps_string ( wxArrayString steps)
570{
571 m_steps.Clear();
572 m_text_steps.clear();
573 m_step_sizer->Clear(true);
574 m_steps = steps;
575 m_step_sizer->AddSpacer(FromDIP(90));
576 for (int i = 0; i < m_steps.size(); i++) {
577 Label* step_text = new Label(this, m_steps[i]);
578 step_text->SetForegroundColour(wxColour(206, 206, 206));
579 m_text_steps.push_back(step_text);
580 m_step_sizer->Add(step_text, 0, wxALIGN_CENTER | wxLEFT | wxRIGHT, FromDIP(15));
581 if (i != m_steps.size() - 1) {
582 auto line = new wxPanel(this, wxID_ANY, wxDefaultPosition);
583 line->SetBackgroundColour(*wxBLACK);
584 m_step_sizer->Add(line, 1, wxALIGN_CENTER);
585 }
586 }
587 m_step_sizer->AddSpacer(FromDIP(90));
588
589 wxGetApp().UpdateDarkUIWin(this);
590
591 Layout();
592}

References m_step_sizer, m_steps, and m_text_steps.

Member Data Documentation

◆ m_step_sizer

wxBoxSizer* Slic3r::GUI::CaliPageStepGuide::m_step_sizer
protected

◆ m_steps

wxArrayString Slic3r::GUI::CaliPageStepGuide::m_steps
protected

◆ m_text_steps

std::vector<Label*> Slic3r::GUI::CaliPageStepGuide::m_text_steps
protected

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