ConfigOptions: GUI type as enum, not string.

Fixing compilation error in the new Platform code.
Fixing one issue in FDM support after splitting the top/bottom
interface layers.
This commit is contained in:
Vojtech Bubnik 2021-03-11 15:01:24 +01:00
parent 051ba0e6f4
commit a9c3d270e6
10 changed files with 66 additions and 55 deletions

View file

@ -66,7 +66,7 @@ void PrintConfigDef::init_common_params()
def->label = L("G-code thumbnails");
def->tooltip = L("Picture sizes to be stored into a .gcode and .sl1 files, in the following format: \"XxY, XxY, ...\"");
def->mode = comExpert;
def->gui_type = "one_string";
def->gui_type = ConfigOptionDef::GUIType::one_string;
def->set_default_value(new ConfigOptionPoints());
def = this->add("layer_height", coFloat);
@ -116,7 +116,7 @@ void PrintConfigDef::init_common_params()
def = this->add("printhost_port", coString);
def->label = L("Printer");
def->tooltip = L("Name of the printer");
def->gui_type = "select_open";
def->gui_type = ConfigOptionDef::GUIType::select_open;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionString(""));
@ -568,7 +568,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(true));
def = this->add("extruder", coInt);
def->gui_type = "i_enum_open";
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
def->label = L("Extruder");
def->category = L("Extruders");
def->tooltip = L("The extruder to use (unless more specific extruder settings are specified). "
@ -606,7 +606,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("extruder_colour", coStrings);
def->label = L("Extruder Color");
def->tooltip = L("This is only used in the Slic3r interface as a visual help.");
def->gui_type = "color";
def->gui_type = ConfigOptionDef::GUIType::color;
// Empty string means no color assigned yet.
def->set_default_value(new ConfigOptionStrings { "" });
@ -668,7 +668,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("filament_colour", coStrings);
def->label = L("Color");
def->tooltip = L("This is only used in the Slic3r interface as a visual help.");
def->gui_type = "color";
def->gui_type = ConfigOptionDef::GUIType::color;
def->set_default_value(new ConfigOptionStrings { "#29B2B2" });
def = this->add("filament_notes", coStrings);
@ -812,7 +812,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("filament_type", coStrings);
def->label = L("Filament type");
def->tooltip = L("The filament material type for use in custom G-codes.");
def->gui_type = "f_enum_open";
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->gui_flags = "show_value";
def->enum_values.push_back("PLA");
def->enum_values.push_back("PET");
@ -881,7 +881,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("fill_density", coPercent);
def->gui_type = "f_enum_open";
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->gui_flags = "show_value";
def->label = L("Fill density");
def->category = L("Infill");
@ -1168,7 +1168,7 @@ void PrintConfigDef::init_fff_params()
"Set this parameter to zero to disable anchoring perimeters connected to a single infill line.");
def->sidetext = L("mm or %");
def->ratio_over = "infill_extrusion_width";
def->gui_type = "f_enum_open";
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->enum_values.push_back("0");
def->enum_values.push_back("1");
def->enum_values.push_back("2");
@ -1950,7 +1950,7 @@ void PrintConfigDef::init_fff_params()
#if 0
def = this->add("seam_preferred_direction", coFloat);
// def->gui_type = "slider";
// def->gui_type = ConfigOptionDef::GUIType::slider;
def->label = L("Direction");
def->sidetext = L("°");
def->full_label = L("Preferred direction of the seam");
@ -1960,7 +1960,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("seam_preferred_direction_jitter", coFloat);
// def->gui_type = "slider";
// def->gui_type = ConfigOptionDef::GUIType::slider;
def->label = L("Jitter");
def->sidetext = L("°");
def->full_label = L("Seam preferred direction jitter");
@ -2234,7 +2234,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionBool(false));
def = this->add("support_material_contact_distance", coFloat);
def->gui_type = "f_enum_open";
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->label = L("Top contact Z distance");
def->category = L("Support material");
def->tooltip = L("The vertical distance between object and support material interface. "
@ -2252,7 +2252,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionFloat(0.2));
def = this->add("support_material_bottom_contact_distance", coFloat);
def->gui_type = "f_enum_open";
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
def->label = L("Bottom contact Z distance");
def->category = L("Support material");
def->tooltip = L("The vertical distance between the object top surface and the support material interface. "
@ -2318,7 +2318,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInt(1));
auto support_material_interface_layers = def = this->add("support_material_interface_layers", coInt);
def->gui_type = "i_enum_open";
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
def->label = L("Top interface layers");
def->category = L("Support material");
def->tooltip = L("Number of interface layers to insert between the object(s) and support material.");
@ -2336,7 +2336,7 @@ void PrintConfigDef::init_fff_params()
def->set_default_value(new ConfigOptionInt(3));
def = this->add("support_material_bottom_interface_layers", coInt);
def->gui_type = "i_enum_open";
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
def->label = L("Bottom interface layers");
def->category = L("Support material");
def->tooltip = L("Number of interface layers to insert between the object(s) and support material. "
@ -2873,7 +2873,7 @@ void PrintConfigDef::init_sla_params()
def = this->add("material_type", coString);
def->label = L("SLA material type");
def->tooltip = L("SLA material type");
def->gui_type = "f_enum_open"; // TODO: ???
def->gui_type = ConfigOptionDef::GUIType::f_enum_open; // TODO: ???
def->gui_flags = "show_value";
def->enum_values.push_back("Tough");
def->enum_values.push_back("Flexible");