2018-04-20 12:58:07 +02:00
|
|
|
#ifndef slic3r_Preferences_hpp_
|
|
|
|
|
#define slic3r_Preferences_hpp_
|
|
|
|
|
|
2018-02-23 14:55:27 +01:00
|
|
|
#include "GUI.hpp"
|
2019-04-18 02:03:40 +02:00
|
|
|
#include "GUI_Utils.hpp"
|
2018-02-23 14:55:27 +01:00
|
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
|
#include <map>
|
|
|
|
|
|
2020-05-05 20:36:00 +02:00
|
|
|
class wxRadioBox;
|
2020-12-30 11:55:26 +01:00
|
|
|
class wxColourPickerCtrl;
|
2020-05-05 20:36:00 +02:00
|
|
|
|
2018-02-23 14:55:27 +01:00
|
|
|
namespace Slic3r {
|
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
|
class ConfigOptionsGroup;
|
|
|
|
|
|
2019-04-18 02:03:40 +02:00
|
|
|
class PreferencesDialog : public DPIDialog
|
2018-02-23 14:55:27 +01:00
|
|
|
{
|
|
|
|
|
std::map<std::string, std::string> m_values;
|
2020-01-16 11:08:19 +01:00
|
|
|
std::shared_ptr<ConfigOptionsGroup> m_optgroup_general;
|
|
|
|
|
std::shared_ptr<ConfigOptionsGroup> m_optgroup_camera;
|
|
|
|
|
std::shared_ptr<ConfigOptionsGroup> m_optgroup_gui;
|
2020-05-28 15:27:29 +02:00
|
|
|
#if ENABLE_ENVIRONMENT_MAP
|
|
|
|
|
std::shared_ptr<ConfigOptionsGroup> m_optgroup_render;
|
|
|
|
|
#endif // ENABLE_ENVIRONMENT_MAP
|
2020-01-16 11:08:19 +01:00
|
|
|
wxSizer* m_icon_size_sizer;
|
2020-05-05 17:23:58 +02:00
|
|
|
wxRadioBox* m_layout_mode_box;
|
2020-12-30 11:55:26 +01:00
|
|
|
wxColourPickerCtrl* m_sys_colour {nullptr};
|
|
|
|
|
wxColourPickerCtrl* m_mod_colour {nullptr};
|
2019-05-22 17:08:02 +02:00
|
|
|
bool isOSX {false};
|
2020-05-07 15:36:50 +02:00
|
|
|
bool m_settings_layout_changed {false};
|
2020-10-15 10:25:13 +02:00
|
|
|
bool m_seq_top_layer_only_changed{ false };
|
2021-02-16 10:07:05 +01:00
|
|
|
#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
|
|
|
|
|
bool m_seq_top_gcode_indices_changed{ false };
|
|
|
|
|
#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
|
|
|
|
|
|
2018-02-23 14:55:27 +01:00
|
|
|
public:
|
2021-02-16 10:07:05 +01:00
|
|
|
explicit PreferencesDialog(wxWindow* parent);
|
|
|
|
|
~PreferencesDialog() = default;
|
2018-02-23 14:55:27 +01:00
|
|
|
|
2020-10-15 10:25:13 +02:00
|
|
|
bool settings_layout_changed() const { return m_settings_layout_changed; }
|
|
|
|
|
bool seq_top_layer_only_changed() const { return m_seq_top_layer_only_changed; }
|
2021-02-16 10:07:05 +01:00
|
|
|
#if ENABLE_GCODE_LINES_ID_IN_H_SLIDER
|
|
|
|
|
bool seq_seq_top_gcode_indices_changed() const { return m_seq_top_gcode_indices_changed; }
|
|
|
|
|
#endif // ENABLE_GCODE_LINES_ID_IN_H_SLIDER
|
2020-05-07 15:36:50 +02:00
|
|
|
|
2018-02-23 14:55:27 +01:00
|
|
|
void build();
|
|
|
|
|
void accept();
|
2019-04-18 02:03:40 +02:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void on_dpi_changed(const wxRect &suggested_rect) override;
|
2019-05-22 13:51:02 +02:00
|
|
|
void layout();
|
|
|
|
|
void create_icon_size_slider();
|
2020-05-04 22:30:38 +02:00
|
|
|
void create_settings_mode_widget();
|
2020-12-30 11:55:26 +01:00
|
|
|
void create_settings_text_color_widget();
|
2018-02-23 14:55:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // GUI
|
|
|
|
|
} // Slic3r
|
|
|
|
|
|
2018-04-20 12:58:07 +02:00
|
|
|
|
|
|
|
|
#endif /* slic3r_Preferences_hpp_ */
|