OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::PageWelcome Struct Reference

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

Inheritance diagram for Slic3r::GUI::PageWelcome:
Collaboration diagram for Slic3r::GUI::PageWelcome:

Public Member Functions

 PageWelcome (ConfigWizard *parent)
bool reset_user_profile () const
bool integrate_desktop () const
virtual void set_run_reason (ConfigWizard::RunReason run_reason) override
template<class T>
T * append (T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
wxStaticText * append_text (wxString text)
void append_spacer (int space)
ConfigWizard::priv * wizard_p () const
virtual void apply_custom_config (DynamicPrintConfig &config)
virtual void on_activate ()

Public Attributes

wxStaticText * welcome_text
wxCheckBox * cbox_reset
wxCheckBox * cbox_integrate
ConfigWizard * parent
const wxString shortname
wxBoxSizer * content
const unsigned indent

Detailed Description

Constructor & Destructor Documentation

◆ PageWelcome()

Slic3r::GUI::PageWelcome::PageWelcome ( ConfigWizard * parent)
530 : ConfigWizardPage(parent, from_u8((boost::format(
531#ifdef __APPLE__
532 _utf8(L("Welcome to the %s Configuration Assistant"))
533#else
534 _utf8(L("Welcome to the %s Configuration Wizard"))
535#endif
536 ) % SLIC3R_APP_NAME).str()), _L("Welcome"))
537 , welcome_text(append_text(from_u8((boost::format(
538 _utf8(L("Hello, welcome to %s! This %s helps you with the initial configuration; just a few settings and you will be ready to print.")))
539 % SLIC3R_APP_NAME
540 % _utf8(ConfigWizard::name())).str())
541 ))
543 new wxCheckBox(this, wxID_ANY, _L("Remove user profiles (a snapshot will be taken beforehand)"))
544 ))
546 new wxCheckBox(this, wxID_ANY, _L("Perform desktop integration (Sets this binary to be searchable by the system)."))
547 ))
548{
549 welcome_text->Hide();
550 cbox_reset->Hide();
551 cbox_integrate->Hide();
552}
#define L(s)
Definition ExtrusionEntity.cpp:25
#define _L(s)
Definition OBJ.cpp:34
static const wxString & name(const bool from_menu=false)
Definition ConfigWizard.cpp:2830
wxString from_u8(const std::string &str)
Definition GUI.cpp:544
#define _utf8(s)
Definition I18N.hpp:10
T * append(T *thing, int proportion=0, int flag=wxEXPAND|wxTOP|wxBOTTOM, int border=10)
Definition ConfigWizard_private.hpp:227
ConfigWizard * parent
Definition ConfigWizard_private.hpp:218
ConfigWizardPage(ConfigWizard *parent, wxString title, wxString shortname, unsigned indent=0)
Definition ConfigWizard.cpp:477
wxStaticText * append_text(wxString text)
Definition ConfigWizard.cpp:512
wxStaticText * welcome_text
Definition ConfigWizard_private.hpp:245
wxCheckBox * cbox_reset
Definition ConfigWizard_private.hpp:246
wxCheckBox * cbox_integrate
Definition ConfigWizard_private.hpp:247

References Slic3r::GUI::ConfigWizardPage::ConfigWizardPage(), _L, _utf8, Slic3r::GUI::ConfigWizardPage::append(), Slic3r::GUI::ConfigWizardPage::append_text(), cbox_integrate, cbox_reset, Slic3r::GUI::format(), Slic3r::GUI::from_u8(), L, Slic3r::GUI::ConfigWizardPage::parent, and welcome_text.

Here is the call graph for this function:

Member Function Documentation

◆ append()

template<class T>
T * Slic3r::GUI::ConfigWizardPage::append ( T * thing,
int proportion = 0,
int flag = wxEXPAND|wxTOP|wxBOTTOM,
int border = 10 )
inlineinherited
228 {
229 content->Add(thing, proportion, flag, border);
230 return thing;
231 }
wxBoxSizer * content
Definition ConfigWizard_private.hpp:220

References content.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageMaterials::PageMaterials(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageTemperatures::PageTemperatures(), Slic3r::GUI::PageWelcome::PageWelcome(), and append_text().

Here is the caller graph for this function:

◆ append_spacer()

void Slic3r::GUI::ConfigWizardPage::append_spacer ( int space)
inherited
522{
523 // FIXME: scaling
524 content->AddSpacer(space);
525}

References content.

Referenced by Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageMaterials::PageMaterials(), and Slic3r::GUI::PageTemperatures::PageTemperatures().

Here is the caller graph for this function:

◆ append_text()

wxStaticText * Slic3r::GUI::ConfigWizardPage::append_text ( wxString text)
inherited
513{
514 auto *widget = new wxStaticText(this, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
515 widget->Wrap(WRAP_WIDTH);
516 widget->SetMinSize(wxSize(WRAP_WIDTH, -1));
517 append(widget);
518 return widget;
519}
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
@ WRAP_WIDTH
Definition ConfigWizard_private.hpp:50

References append(), Slic3r::GUI::WRAP_WIDTH, and wxStaticText.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageDiameters::PageDiameters(), Slic3r::GUI::PageFirmware::PageFirmware(), Slic3r::GUI::PageTemperatures::PageTemperatures(), and Slic3r::GUI::PageWelcome::PageWelcome().

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

◆ apply_custom_config()

virtual void Slic3r::GUI::ConfigWizardPage::apply_custom_config ( DynamicPrintConfig & config)
inlinevirtualinherited

◆ integrate_desktop()

bool Slic3r::GUI::PageWelcome::integrate_desktop ( ) const
inline
252{ return cbox_integrate != nullptr ? cbox_integrate->GetValue() : false; }

References cbox_integrate.

◆ on_activate()

virtual void Slic3r::GUI::ConfigWizardPage::on_activate ( )
inlinevirtualinherited

Reimplemented in Slic3r::GUI::PageMaterials.

240{}

◆ reset_user_profile()

bool Slic3r::GUI::PageWelcome::reset_user_profile ( ) const
inline
251{ return cbox_reset != nullptr ? cbox_reset->GetValue() : false; }

References cbox_reset.

◆ set_run_reason()

void Slic3r::GUI::PageWelcome::set_run_reason ( ConfigWizard::RunReason run_reason)
overridevirtual

Reimplemented from Slic3r::GUI::ConfigWizardPage.

555{
556 const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY;
557 welcome_text->Show(data_empty);
558 cbox_reset->Show(!data_empty);
559#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
560 if (!DesktopIntegrationDialog::is_integrated())
561 cbox_integrate->Show(true);
562 else
563 cbox_integrate->Hide();
564#else
565 cbox_integrate->Hide();
566#endif
567}
@ RR_DATA_EMPTY
Definition ConfigWizard.hpp:24

References cbox_integrate, cbox_reset, Slic3r::GUI::ConfigWizard::RR_DATA_EMPTY, and welcome_text.

◆ wizard_p()

ConfigWizard::priv * Slic3r::GUI::ConfigWizardPage::wizard_p ( ) const
inlineinherited
236{ return parent->p.get(); }

References parent.

Referenced by Slic3r::GUI::PageBedShape::PageBedShape(), Slic3r::GUI::PageCustom::PageCustom(), Slic3r::GUI::PagePrinters::PagePrinters(), Slic3r::GUI::PageMaterials::on_activate(), Slic3r::GUI::PageMaterials::select_material(), and Slic3r::GUI::PageMaterials::update_lists().

Here is the caller graph for this function:

Member Data Documentation

◆ cbox_integrate

wxCheckBox* Slic3r::GUI::PageWelcome::cbox_integrate

◆ cbox_reset

wxCheckBox* Slic3r::GUI::PageWelcome::cbox_reset

◆ content

wxBoxSizer* Slic3r::GUI::ConfigWizardPage::content
inherited

◆ indent

const unsigned Slic3r::GUI::ConfigWizardPage::indent
inherited

◆ parent

◆ shortname

◆ welcome_text

wxStaticText* Slic3r::GUI::PageWelcome::welcome_text

Referenced by PageWelcome(), and set_run_reason().


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