mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-03 01:18:44 +03:00
PRUSA 2.7.0
This commit is contained in:
@@ -1815,6 +1815,8 @@ public:
|
||||
// Close parameter, string value could be one of the list values.
|
||||
select_close,
|
||||
};
|
||||
static bool is_gui_type_enum_open(const GUIType gui_type)
|
||||
{ return gui_type == ConfigOptionDef::GUIType::i_enum_open || gui_type == ConfigOptionDef::GUIType::f_enum_open || gui_type == ConfigOptionDef::GUIType::select_open; }
|
||||
|
||||
// Identifier of this option. It is stored here so that it is accessible through the by_serialization_key_ordinal map.
|
||||
t_config_option_key opt_key;
|
||||
@@ -1832,6 +1834,7 @@ public:
|
||||
// Create a default option to be inserted into a DynamicConfig.
|
||||
ConfigOption* create_default_option() const;
|
||||
|
||||
bool is_scalar() const { return (int(this->type) & int(coVectorType)) == 0; }
|
||||
template<class Archive> ConfigOption* load_option_from_archive(Archive &archive) const {
|
||||
if (this->nullable) {
|
||||
switch (this->type) {
|
||||
@@ -1902,6 +1905,7 @@ public:
|
||||
// Special values - "i_enum_open", "f_enum_open" to provide combo box for int or float selection,
|
||||
// "select_open" - to open a selection dialog (currently only a serial port selection).
|
||||
GUIType gui_type { GUIType::undefined };
|
||||
bool is_gui_type_enum_open() const { return is_gui_type_enum_open(this->gui_type); }
|
||||
// Usually empty. Otherwise "serialized" or "show_value"
|
||||
// The flags may be combined.
|
||||
// "serialized" - vector valued option is entered in a single edit field. Values are separated by a semicolon.
|
||||
@@ -1965,7 +1969,7 @@ public:
|
||||
|
||||
void set_enum_values(GUIType gui_type, const std::initializer_list<std::string_view> il) {
|
||||
this->enum_def_new();
|
||||
assert(gui_type == GUIType::i_enum_open || gui_type == GUIType::f_enum_open || gui_type == GUIType::select_open);
|
||||
assert(is_gui_type_enum_open(gui_type));
|
||||
this->gui_type = gui_type;
|
||||
enum_def->set_values(il);
|
||||
}
|
||||
@@ -2077,6 +2081,7 @@ public:
|
||||
out.push_back(kvp.first);
|
||||
return out;
|
||||
}
|
||||
bool empty() const { return options.empty(); }
|
||||
|
||||
// Iterate through all of the CLI options and write them to a stream.
|
||||
std::ostream& print_cli_help(
|
||||
@@ -2307,7 +2312,8 @@ public:
|
||||
// Loading a "will be one day a legacy format" of configuration stored into 3MF or AMF.
|
||||
// Accepts the same data as load_from_ini_string(), only with each configuration line possibly prefixed with a semicolon (G-code comment).
|
||||
ConfigSubstitutions load_from_ini_string_commented(std::string &&data, ForwardCompatibilitySubstitutionRule compatibility_rule);
|
||||
ConfigSubstitutions load_from_gcode_file(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule);
|
||||
ConfigSubstitutions load_from_gcode_file(const std::string &filename, ForwardCompatibilitySubstitutionRule compatibility_rule);
|
||||
ConfigSubstitutions load_from_binary_gcode_file(const std::string& filename, ForwardCompatibilitySubstitutionRule compatibility_rule);
|
||||
ConfigSubstitutions load(const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule);
|
||||
void save(const std::string &file) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user