Files
OrcaSlicer-bambulab/src/slic3r/GUI/Preferences.hpp
T

64 lines
1.8 KiB
C++
Raw Normal View History

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"
#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;
class wxColourPickerCtrl;
2020-05-05 20:36:00 +02:00
2018-02-23 14:55:27 +01:00
namespace Slic3r {
namespace GUI {
class ConfigOptionsGroup;
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;
#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;
wxColourPickerCtrl* m_sys_colour {nullptr};
wxColourPickerCtrl* m_mod_colour {nullptr};
bool isOSX {false};
2020-05-07 15:36:50 +02:00
bool m_settings_layout_changed {false};
bool m_seq_top_layer_only_changed{ false };
#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:
explicit PreferencesDialog(wxWindow* parent);
~PreferencesDialog() = default;
2018-02-23 14:55:27 +01: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; }
#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();
protected:
void on_dpi_changed(const wxRect &suggested_rect) override;
void layout();
void create_icon_size_slider();
void create_settings_mode_widget();
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_ */