mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-01 08:28:42 +03:00
update slic3r
This commit is contained in:
@@ -16,6 +16,11 @@ class wxComboBox;
|
||||
class wxComboCtrl;
|
||||
class wxCheckBox;
|
||||
|
||||
namespace DoubleSlider {
|
||||
class DSForGcode;
|
||||
class DSForLayers;
|
||||
};
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class DynamicPrintConfig;
|
||||
@@ -23,10 +28,6 @@ class Print;
|
||||
class BackgroundSlicingProcess;
|
||||
class Model;
|
||||
|
||||
namespace DoubleSlider {
|
||||
class Control;
|
||||
};
|
||||
|
||||
namespace GUI {
|
||||
|
||||
class GLCanvas3D;
|
||||
@@ -78,19 +79,11 @@ class Preview : public wxPanel
|
||||
wxGLCanvas* m_canvas_widget { nullptr };
|
||||
GLCanvas3D* m_canvas { nullptr };
|
||||
wxBoxSizer* m_left_sizer { nullptr };
|
||||
wxBoxSizer* m_layers_slider_sizer { nullptr };
|
||||
wxPanel* m_bottom_toolbar_panel { nullptr };
|
||||
|
||||
DynamicPrintConfig* m_config;
|
||||
BackgroundSlicingProcess* m_process;
|
||||
GCodeProcessorResult* m_gcode_result;
|
||||
|
||||
#ifdef __linux__
|
||||
// We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955.
|
||||
// So we are applying a workaround here.
|
||||
bool m_volumes_cleanup_required { false };
|
||||
#endif /* __linux__ */
|
||||
|
||||
// Calling this function object forces Plater::schedule_background_process.
|
||||
std::function<void()> m_schedule_background_process;
|
||||
|
||||
@@ -99,8 +92,8 @@ class Preview : public wxPanel
|
||||
|
||||
bool m_loaded { false };
|
||||
|
||||
DoubleSlider::Control* m_layers_slider{ nullptr };
|
||||
DoubleSlider::Control* m_moves_slider{ nullptr };
|
||||
std::unique_ptr<DoubleSlider::DSForLayers> m_layers_slider{ nullptr };
|
||||
std::unique_ptr<DoubleSlider::DSForGcode> m_moves_slider { nullptr };
|
||||
|
||||
public:
|
||||
enum class OptionType : unsigned int
|
||||
@@ -134,20 +127,18 @@ public:
|
||||
|
||||
void load_gcode_shells();
|
||||
void load_print(bool keep_z_range = false);
|
||||
void reload_print(bool keep_volumes = false);
|
||||
void refresh_print();
|
||||
void reload_print();
|
||||
|
||||
void msw_rescale();
|
||||
void sys_color_changed();
|
||||
void jump_layers_slider(wxKeyEvent& evt);
|
||||
void move_layers_slider(wxKeyEvent& evt);
|
||||
void edit_layers_slider(wxKeyEvent& evt);
|
||||
|
||||
void render_sliders(GLCanvas3D& canvas);
|
||||
float get_layers_slider_width() const;
|
||||
float get_moves_slider_height() const;
|
||||
|
||||
bool is_loaded() const { return m_loaded; }
|
||||
|
||||
void update_moves_slider();
|
||||
void update_moves_slider(std::optional<int> visible_range_min = std::nullopt, std::optional<int> visible_range_max = std::nullopt);
|
||||
void enable_moves_slider(bool enable);
|
||||
void move_moves_slider(wxKeyEvent& evt);
|
||||
void hide_layers_slider();
|
||||
|
||||
void set_keep_current_preview_type(bool value) { m_keep_current_preview_type = value; }
|
||||
@@ -163,20 +154,20 @@ private:
|
||||
void on_size(wxSizeEvent& evt);
|
||||
|
||||
// Create/Update/Reset double slider on 3dPreview
|
||||
wxBoxSizer* create_layers_slider_sizer();
|
||||
void create_sliders();
|
||||
void check_layers_slider_values(std::vector<CustomGCode::Item>& ticks_from_model,
|
||||
const std::vector<double>& layers_z);
|
||||
void reset_layers_slider();
|
||||
void update_layers_slider(const std::vector<double>& layers_z, bool keep_z_range = false);
|
||||
void update_layers_slider_mode();
|
||||
// update vertical DoubleSlider after keyDown in canvas
|
||||
void update_layers_slider_from_canvas(wxKeyEvent& event);
|
||||
void update_sliders_from_canvas(wxKeyEvent& event);
|
||||
|
||||
void load_print_as_fff(bool keep_z_range = false);
|
||||
void load_print_as_sla();
|
||||
|
||||
void on_layers_slider_scroll_changed(wxCommandEvent& event);
|
||||
void on_moves_slider_scroll_changed(wxCommandEvent& event);
|
||||
void on_layers_slider_scroll_changed();
|
||||
void on_moves_slider_scroll_changed();
|
||||
};
|
||||
|
||||
} // namespace GUI
|
||||
|
||||
Reference in New Issue
Block a user