mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 20:21:59 +08:00
working on higher-level cpp Slic3r::Config that has a similar interface to the old Perl one.
This commit is contained in:
parent
d24001b92d
commit
c0d8e68606
@ -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
|
||||
|
21
xs/src/libslic3r/Config.hpp
Normal file
21
xs/src/libslic3r/Config.hpp
Normal 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
|
Loading…
x
Reference in New Issue
Block a user