diff --git a/src/GUI/Settings.hpp b/src/GUI/Settings.hpp index 9c135cec3..bc391ae87 100644 --- a/src/GUI/Settings.hpp +++ b/src/GUI/Settings.hpp @@ -25,7 +25,7 @@ enum class ReloadBehavior { }; /// Stub class to hold onto GUI-specific settings options. -/// TODO: Incorporate a copy of Slic3r::Config +/// TODO: Incorporate the system from libslic3r class Settings { public: bool show_host {false}; @@ -50,9 +50,14 @@ class Settings { const wxString version { wxString(SLIC3R_VERSION) }; void save_settings(); + void load_settings(); /// Storage for window positions std::map > window_pos { std::map >() }; + + private: + const std::string LogChannel {"GUI_Settings"}; //< Which log these messages should go to. + }; }} //namespace Slic3r::GUI diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp new file mode 100644 index 000000000..265cc2201 --- /dev/null +++ b/xs/src/libslic3r/Config.hpp @@ -0,0 +1,21 @@ +#ifndef CONFIG_HPP +#define CONFIG_HPP + +#include "PrintConfig.hpp" + +namespace Slic3r { + +class Config : DynamicPrintConfig { +public: + static Config *new_from_defaults(); + static Config *new_from_cli(const &argc, const char* argv[]); + + void write_ini(const std::string& file) { save(file); } + void read_ini(const std::string& file) { load(file); } + + +}; + +} // namespace Slic3r + +#endif // CONFIG_HPP