Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVojtech Kral <vojtech@kral.hk>2018-04-05 17:10:44 +0300
committerVojtech Kral <vojtech@kral.hk>2018-04-06 14:24:02 +0300
commit8422cf93c0e550e75a40522c56b9570c72d32169 (patch)
tree75b828e2cdd593d6a6b8a1aac06cb6ac52af4db0 /xs/src/slic3r/GUI/ConfigWizard_private.hpp
parente53949f2c85e06adaf7be9a96873844a8862eab6 (diff)
ConfigWizard: Finalize custom setup
Diffstat (limited to 'xs/src/slic3r/GUI/ConfigWizard_private.hpp')
-rw-r--r--xs/src/slic3r/GUI/ConfigWizard_private.hpp40
1 files changed, 29 insertions, 11 deletions
diff --git a/xs/src/slic3r/GUI/ConfigWizard_private.hpp b/xs/src/slic3r/GUI/ConfigWizard_private.hpp
index ab291d40f..1d9519bc3 100644
--- a/xs/src/slic3r/GUI/ConfigWizard_private.hpp
+++ b/xs/src/slic3r/GUI/ConfigWizard_private.hpp
@@ -8,9 +8,13 @@
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/button.h>
+#include <wx/choice.h>
+#include <wx/spinctrl.h>
+#include "libslic3r/PrintConfig.hpp"
#include "AppConfig.hpp"
#include "PresetBundle.hpp"
+#include "BedShapeDialog.hpp"
namespace Slic3r {
@@ -21,6 +25,8 @@ enum {
DIALOG_MARGIN = 15,
INDEX_MARGIN = 40,
BTN_SPACING = 10,
+ INDENT_SPACING = 30,
+ VERTICAL_SPACING = 10,
};
struct ConfigWizardPage: wxPanel
@@ -41,17 +47,13 @@ struct ConfigWizardPage: wxPanel
ConfigWizardPage* page_next() const { return p_next; }
ConfigWizardPage* chain(ConfigWizardPage *page);
- void append_text(wxString text);
- void append_widget(wxWindow *widget, int proportion = 0, int flag = wxEXPAND|wxTOP|wxBOTTOM, int border = 10);
-
template<class T>
- void append_thing(T *thing, int proportion = 0, int flag = wxEXPAND|wxTOP|wxBOTTOM, int border = 10)
+ void append(T *thing, int proportion = 0, int flag = wxEXPAND|wxTOP|wxBOTTOM, int border = 10)
{
content->Add(thing, proportion, flag, border);
}
- // TODO: remove:
- void append_sizer(wxSizer *sizer, int proportion = 0);
+ void append_text(wxString text);
void append_spacer(int space);
ConfigWizard::priv *wizard_p() const { return parent->p.get(); }
@@ -60,6 +62,7 @@ struct ConfigWizardPage: wxPanel
virtual bool Hide() { return Show(false); }
virtual wxPanel* extra_buttons() { return nullptr; }
virtual void on_page_set() {}
+ virtual void apply_custom_config(DynamicPrintConfig &config) {}
void enable_next(bool enable);
private:
@@ -84,10 +87,8 @@ struct PageUpdate: ConfigWizardPage
{
bool version_check;
bool preset_update;
-
- PageUpdate(ConfigWizard *parent);
- void presets_update_enable(bool enable);
+ PageUpdate(ConfigWizard *parent);
};
struct PageVendors: ConfigWizardPage
@@ -97,22 +98,37 @@ struct PageVendors: ConfigWizardPage
struct PageFirmware: ConfigWizardPage
{
+ const ConfigOptionDef &gcode_opt;
+ wxChoice *gcode_picker;
+
PageFirmware(ConfigWizard *parent);
+ virtual void apply_custom_config(DynamicPrintConfig &config);
};
struct PageBedShape: ConfigWizardPage
{
+ BedShapePanel *shape_panel;
+
PageBedShape(ConfigWizard *parent);
+ virtual void apply_custom_config(DynamicPrintConfig &config);
};
struct PageDiameters: ConfigWizardPage
{
+ wxSpinCtrlDouble *spin_nozzle;
+ wxSpinCtrlDouble *spin_filam;
+
PageDiameters(ConfigWizard *parent);
+ virtual void apply_custom_config(DynamicPrintConfig &config);
};
struct PageTemperatures: ConfigWizardPage
{
+ wxSpinCtrl *spin_extr;
+ wxSpinCtrl *spin_bed;
+
PageTemperatures(ConfigWizard *parent);
+ virtual void apply_custom_config(DynamicPrintConfig &config);
};
@@ -133,7 +149,7 @@ private:
std::vector<wxString> items;
std::vector<wxString>::const_iterator item_active;
- void on_paint(wxPaintEvent & evt);
+ void on_paint(wxPaintEvent &evt);
};
struct ConfigWizard::priv
@@ -141,6 +157,7 @@ struct ConfigWizard::priv
ConfigWizard *q;
AppConfig appconfig_vendors;
PresetBundle bundle_vendors;
+ DynamicPrintConfig custom_config;
wxBoxSizer *topsizer = nullptr;
wxBoxSizer *btnsizer = nullptr;
@@ -171,7 +188,8 @@ struct ConfigWizard::priv
void on_other_vendors();
void on_custom_setup();
- void on_finish();
+
+ void apply_config(AppConfig *app_config, PresetBundle *preset_bundle);
};