2018-02-28 15:04:56 +00:00
|
|
|
#ifndef _WIPE_TOWER_DIALOG_H_
|
|
|
|
#define _WIPE_TOWER_DIALOG_H_
|
|
|
|
|
|
|
|
#include <wx/spinctrl.h>
|
|
|
|
#include <wx/stattext.h>
|
|
|
|
#include <wx/textctrl.h>
|
|
|
|
#include <wx/checkbox.h>
|
|
|
|
#include <wx/msgdlg.h>
|
|
|
|
|
|
|
|
#include "RammingChart.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
class RammingPanel : public wxPanel {
|
|
|
|
public:
|
2018-03-13 14:54:29 +00:00
|
|
|
RammingPanel(wxWindow* parent);
|
2018-03-15 13:04:12 +00:00
|
|
|
RammingPanel(wxWindow* parent,const std::string& data);
|
|
|
|
std::string get_parameters();
|
2018-02-28 15:04:56 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Chart* m_chart = nullptr;
|
|
|
|
wxSpinCtrl* m_widget_volume = nullptr;
|
|
|
|
wxSpinCtrl* m_widget_ramming_line_width_multiplicator = nullptr;
|
|
|
|
wxSpinCtrl* m_widget_ramming_step_multiplicator = nullptr;
|
|
|
|
wxSpinCtrlDouble* m_widget_time = nullptr;
|
2018-03-13 14:54:29 +00:00
|
|
|
int m_ramming_step_multiplicator;
|
|
|
|
int m_ramming_line_width_multiplicator;
|
|
|
|
|
2018-02-28 15:04:56 +00:00
|
|
|
void line_parameters_changed();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-03-13 14:54:29 +00:00
|
|
|
class RammingDialog : public wxDialog {
|
|
|
|
public:
|
2018-03-15 13:04:12 +00:00
|
|
|
RammingDialog(wxWindow* parent,const std::string& parameters);
|
|
|
|
std::string get_parameters() { return m_output_data; }
|
2018-03-13 14:54:29 +00:00
|
|
|
private:
|
|
|
|
RammingPanel* m_panel_ramming = nullptr;
|
2018-03-15 13:04:12 +00:00
|
|
|
std::string m_output_data;
|
2018-03-13 14:54:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-28 15:04:56 +00:00
|
|
|
|
2018-03-20 12:50:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-28 15:04:56 +00:00
|
|
|
class WipingPanel : public wxPanel {
|
|
|
|
public:
|
2018-03-22 12:07:45 +00:00
|
|
|
WipingPanel(wxWindow* parent, const std::vector<float>& matrix, const std::vector<float>& extruders, wxButton* widget_button);
|
2018-03-20 12:50:51 +00:00
|
|
|
std::vector<float> read_matrix_values();
|
|
|
|
std::vector<float> read_extruders_values();
|
2018-03-22 12:07:45 +00:00
|
|
|
void toggle_advanced(bool user_action = false);
|
2018-02-28 15:04:56 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void fill_in_matrix();
|
2018-03-20 12:50:51 +00:00
|
|
|
bool advanced_matches_simple();
|
2018-02-28 15:04:56 +00:00
|
|
|
|
|
|
|
std::vector<wxSpinCtrl*> m_old;
|
|
|
|
std::vector<wxSpinCtrl*> m_new;
|
2018-03-20 12:50:51 +00:00
|
|
|
std::vector<wxWindow*> m_advanced_widgets;
|
|
|
|
std::vector<wxWindow*> m_notadvanced_widgets;
|
2018-02-28 15:04:56 +00:00
|
|
|
std::vector<std::vector<wxTextCtrl*>> edit_boxes;
|
2018-03-20 12:50:51 +00:00
|
|
|
unsigned int m_number_of_extruders = 0;
|
|
|
|
bool m_advanced = false;
|
2018-03-22 12:07:45 +00:00
|
|
|
wxBoxSizer*m_sizer_simple = nullptr;
|
|
|
|
wxBoxSizer*m_sizer_advanced = nullptr;
|
|
|
|
wxButton* m_widget_button = nullptr;
|
2018-02-28 15:04:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-15 13:04:12 +00:00
|
|
|
class WipingDialog : public wxDialog {
|
2018-02-28 15:04:56 +00:00
|
|
|
public:
|
2018-03-20 12:50:51 +00:00
|
|
|
WipingDialog(wxWindow* parent,const std::vector<float>& matrix, const std::vector<float>& extruders);
|
|
|
|
std::vector<float> get_matrix() const { return m_output_matrix; }
|
|
|
|
std::vector<float> get_extruders() const { return m_output_extruders; }
|
|
|
|
|
|
|
|
|
2018-02-28 15:04:56 +00:00
|
|
|
private:
|
|
|
|
WipingPanel* m_panel_wiping = nullptr;
|
2018-03-20 12:50:51 +00:00
|
|
|
std::vector<float> m_output_matrix;
|
|
|
|
std::vector<float> m_output_extruders;
|
2018-02-28 15:04:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WIPE_TOWER_DIALOG_H_
|