Looks like the reworked C++ preferences start to work again.

This commit is contained in:
bubnikv 2017-11-02 16:21:34 +01:00
parent 95c284c764
commit e8b6d92d4d
26 changed files with 469 additions and 512 deletions

View file

@ -6,6 +6,8 @@
namespace Slic3r {
class PlaceholderParser;
// Bundle of Print + Filament + Printer presets.
class PresetBundle
{
@ -23,6 +25,8 @@ public:
void load_selections(const AppConfig &config);
// Export selections (current print, current filaments, current printer) into config.ini
void export_selections(AppConfig &config);
// Export selections (current print, current filaments, current printer) into a placeholder parser.
void export_selections(PlaceholderParser &pp);
PresetCollection prints;
PresetCollection filaments;
@ -31,6 +35,9 @@ public:
// extruders.size() should be the same as printers.get_edited_preset().config.nozzle_diameter.size()
std::vector<std::string> filament_presets;
bool has_defauls_only() const
{ return prints.size() <= 1 && filaments.size() <= 1 && printers.size() <= 1; }
DynamicPrintConfig full_config() const;
// Load an external config file containing the print, filament and printer presets.
@ -66,7 +73,7 @@ public:
void update_multi_material_filament_presets();
private:
void load_config_file_config(const std::string &path, const boost::property_tree::ptree &tree);
void load_config_file_config(const std::string &path, const DynamicPrintConfig &config);
void load_config_file_config_bundle(const std::string &path, const boost::property_tree::ptree &tree);
bool load_compatible_bitmaps(const std::string &path_bitmap_compatible, const std::string &path_bitmap_incompatible);