37 : wxDialog{
plater, wxID_ANY,
_L(
"Import SLA archive")}
38 {
39 auto szvert = new wxBoxSizer{wxVERTICAL};
40 auto szfilepck = new wxBoxSizer{wxHORIZONTAL};
41
42 m_filepicker =
new wxFilePickerCtrl(
this, wxID_ANY,
from_u8(wxGetApp().app_config->get_last_dir()),
_(
L(
"Choose SLA archive:")),
43 _L(
"SL1 / SL1S archive files") +
" (*.sl1, *.sl1s, *.zip)|*.sl1;*.SL1;*.sl1s;*.SL1S;*.zip;*.ZIP",
44 wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE | wxFD_OPEN | wxFD_FILE_MUST_EXIST);
45
46 szfilepck->Add(
new wxStaticText(
this, wxID_ANY,
_L(
"Import file") +
": "), 0, wxALIGN_CENTER);
48 szvert->Add(szfilepck, 0, wxALL | wxEXPAND, 5);
49
50 auto szchoices = new wxBoxSizer{wxHORIZONTAL};
51
52 static const std::vector<wxString> inp_choices = {
_(
L(
"Import model and profile")),
_(
L(
"Import profile only")),
53 _(
L(
"Import model only"))};
54
55 m_import_dropdown =
new wxComboBox(
this, wxID_ANY, inp_choices[0], wxDefaultPosition, wxDefaultSize, inp_choices.size(),
56 inp_choices.data(), wxCB_READONLY | wxCB_DROPDOWN);
57
59 szchoices->Add(
new wxStaticText(
this, wxID_ANY,
_L(
"Quality") +
": "), 0, wxALIGN_CENTER | wxALL, 5);
60
61 static const std::vector<wxString> qual_choices = {
_(
L(
"Accurate")),
_(
L(
"Balanced")),
_(
L(
"Quick"))};
62
63 m_quality_dropdown =
new wxComboBox(
this, wxID_ANY, qual_choices[0], wxDefaultPosition, wxDefaultSize, qual_choices.size(),
64 qual_choices.data(), wxCB_READONLY | wxCB_DROPDOWN);
66
70 else
72 });
73
74 szvert->Add(szchoices, 0, wxALL, 5);
75 szvert->AddStretchSpacer(1);
76 auto szbtn = new wxBoxSizer(wxHORIZONTAL);
77 szbtn->Add(
new wxButton{
this, wxID_CANCEL});
78 szbtn->Add(
new wxButton{
this, wxID_OK});
79 szvert->Add(szbtn, 0, wxALIGN_RIGHT | wxALL, 5);
80
81 SetSizerAndFit(szvert);
82 }
#define _(s)
Definition 3mf.cpp:306
#define L(s)
Definition ExtrusionEntity.cpp:25
#define _L(s)
Definition OBJ.cpp:34
class WXDLLIMPEXP_FWD_CORE wxButton
Definition ProgressDialog.hpp:27
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
Sel get_selection() const override
Definition SLAImportDialog.hpp:84
wxFilePickerCtrl * m_filepicker
Definition SLAImportDialog.hpp:33
wxComboBox * m_import_dropdown
Definition SLAImportDialog.hpp:34
wxComboBox * m_quality_dropdown
Definition SLAImportDialog.hpp:34
static Plater * plater()
Definition GUI_Factories.cpp:400
wxString from_u8(const std::string &str)
Definition GUI.cpp:544