mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added ConfigManipulation to universal config manipulation (updating).
This commit is contained in:
parent
dac301e3b6
commit
463783e092
4 changed files with 338 additions and 2 deletions
|
@ -443,6 +443,39 @@ public:
|
|||
std::string get_name() { return m_chosen_name; }
|
||||
};
|
||||
|
||||
class ConfigManipulation
|
||||
{
|
||||
bool is_msg_dlg_already_exist{ false };
|
||||
bool support_material_overhangs_queried {false};
|
||||
wxWindow* msg_parent {nullptr};
|
||||
|
||||
std::function<void()> load_config = nullptr;
|
||||
std::function<Field* (const std::string&)> get_field = nullptr;
|
||||
std::function<void(const std::string&, const boost::any&)> on_value_change = nullptr;
|
||||
|
||||
wxWindow* parent() const { return msg_parent;}
|
||||
public:
|
||||
ConfigManipulation( wxWindow* msg_parent,
|
||||
std::function<void()> load_config,
|
||||
std::function<Field*(const std::string&)> get_field,
|
||||
std::function<void(const std::string&, const boost::any&)> on_value_change) :
|
||||
msg_parent(msg_parent),
|
||||
load_config(load_config),
|
||||
get_field(get_field),
|
||||
on_value_change(on_value_change) {}
|
||||
|
||||
~ConfigManipulation() {
|
||||
load_config = nullptr;
|
||||
get_field = nullptr;
|
||||
on_value_change = nullptr;
|
||||
}
|
||||
|
||||
bool is_modified(DynamicPrintConfig* config, DynamicPrintConfig* new_config);
|
||||
void load_new(DynamicPrintConfig* config, DynamicPrintConfig* new_config);
|
||||
void update_print_fff_options(DynamicPrintConfig* config);
|
||||
void update_print_sla_options(DynamicPrintConfig* config);
|
||||
};
|
||||
|
||||
} // GUI
|
||||
} // Slic3r
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue