working on higher-level cpp Slic3r::Config that has a similar interface to the old Perl one.

This commit is contained in:
Joseph Lenox 2018-04-28 18:18:10 -05:00
parent d24001b92d
commit c0d8e68606
2 changed files with 27 additions and 1 deletions

View File

@ -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<wxString, std::tuple<wxPoint, wxSize, bool> > window_pos { std::map<wxString, std::tuple<wxPoint, wxSize, bool> >() };
private:
const std::string LogChannel {"GUI_Settings"}; //< Which log these messages should go to.
};
}} //namespace Slic3r::GUI

View File

@ -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