WIP: ConfigWizard: 3rd party bundle installation roughly done

This commit is contained in:
Vojtech Kral 2019-06-17 16:39:22 +02:00
parent dba9925c4e
commit 235b659cf9
11 changed files with 493 additions and 215 deletions

View file

@ -2,6 +2,8 @@
#define slic3r_Preset_hpp_
#include <deque>
#include <set>
#include <unordered_map>
#include <boost/filesystem/path.hpp>
#include <boost/property_tree/ptree_fwd.hpp>
@ -89,6 +91,12 @@ public:
bool operator==(const VendorProfile &rhs) const { return this->id == rhs.id; }
};
// Note: it is imporant that map is used here rather than unordered_map,
// because we need iterators to not be invalidated,
// because Preset and the ConfigWizard hold pointers to VendorProfiles.
// XXX: maybe set is enough (cf. changes in Wizard)
typedef std::map<std::string, VendorProfile> VendorMap;
class Preset
{
public:
@ -435,7 +443,7 @@ protected:
bool select_preset_by_name_strict(const std::string &name);
// Merge one vendor's presets with the other vendor's presets, report duplicates.
std::vector<std::string> merge_presets(PresetCollection &&other, const std::set<VendorProfile> &new_vendors);
std::vector<std::string> merge_presets(PresetCollection &&other, const VendorMap &new_vendors);
private:
PresetCollection();