mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-20 07:11:12 -06:00 
			
		
		
		
	NEW: add calibration
Change-Id: I03e5489a67042e7f76f5a42260a289d540b5a63a (cherry picked from commit cbac2c639db830eb779b1979c8d6b4eb3decb7e6)
This commit is contained in:
		
							parent
							
								
									ff3f78cfb5
								
							
						
					
					
						commit
						1f54aaf22b
					
				
					 35 changed files with 38647 additions and 54 deletions
				
			
		
							
								
								
									
										81
									
								
								src/slic3r/GUI/CalibrationWizardPage.hpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										81
									
								
								src/slic3r/GUI/CalibrationWizardPage.hpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,81 @@ | |||
| #ifndef slic3r_GUI_CalibrationWizardPage_hpp_ | ||||
| #define slic3r_GUI_CalibrationWizardPage_hpp_ | ||||
| 
 | ||||
| #include "Widgets/Button.hpp" | ||||
| #include "Event.hpp" | ||||
| 
 | ||||
| namespace Slic3r { namespace GUI { | ||||
| 
 | ||||
| wxDECLARE_EVENT(EVT_CALIBRATIONPAGE_PREV, IntEvent); | ||||
| wxDECLARE_EVENT(EVT_CALIBRATIONPAGE_NEXT, IntEvent); | ||||
| 
 | ||||
| class CalibrationWizard; | ||||
| enum ButtonType | ||||
| { | ||||
|     Start, | ||||
|     Back, | ||||
|     Next, | ||||
|     Calibrate, | ||||
|     Recalibrate, | ||||
|     Save, | ||||
| }; | ||||
| 
 | ||||
| class PageButton : public Button | ||||
| { | ||||
| public: | ||||
|     PageButton(wxWindow* parent, wxString text, ButtonType type); | ||||
|     void SetButtonType(ButtonType rhs_type) { m_type = rhs_type; } | ||||
|     ButtonType GetButtonType() { return m_type; } | ||||
|     ~PageButton() {}; | ||||
| private: | ||||
|     ButtonType m_type; | ||||
| }; | ||||
| 
 | ||||
| class CalibrationWizardPage : public wxPanel  | ||||
| { | ||||
| public: | ||||
|     CalibrationWizardPage(wxWindow* parent, bool has_split_line, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL); | ||||
|     ~CalibrationWizardPage() {}; | ||||
| 
 | ||||
|     CalibrationWizardPage* get_prev_page() { return m_prev_page; } | ||||
|     CalibrationWizardPage* get_next_page() { return m_next_page; } | ||||
|     void set_prev_page(CalibrationWizardPage* prev) { m_prev_page = prev; } | ||||
|     void set_next_page(CalibrationWizardPage* next) { m_next_page = next; } | ||||
|     CalibrationWizardPage* chain(CalibrationWizardPage* next) | ||||
|     { | ||||
|         set_next_page(next); | ||||
|         next->set_prev_page(this); | ||||
|         return next; | ||||
|     } | ||||
| 
 | ||||
|     wxBoxSizer* get_top_vsizer() { return m_top_sizer; } | ||||
|     wxBoxSizer* get_left_vsizer() { return m_left_sizer; } | ||||
|     wxBoxSizer* get_right_content_vsizer() { return m_right_content_sizer; } | ||||
|     PageButton* get_prev_btn() { return m_btn_prev; } | ||||
|     PageButton* get_next_btn() { return m_btn_next; } | ||||
| 
 | ||||
|     void set_page_title(wxString title) { m_title->SetLabel(title); } | ||||
|     void set_page_index(wxString index) { m_index->SetLabel(index); } | ||||
| 
 | ||||
| private: | ||||
|     bool m_has_middle_line; | ||||
| 
 | ||||
|     wxStaticText* m_title; | ||||
|     wxStaticText* m_index; | ||||
|     wxBoxSizer* m_top_sizer; | ||||
|     wxBoxSizer* m_left_sizer; | ||||
|     wxBoxSizer* m_right_content_sizer; | ||||
|     wxBoxSizer* m_right_btn_sizer; | ||||
|     PageButton* m_btn_prev; | ||||
|     PageButton* m_btn_next; | ||||
| 
 | ||||
|     CalibrationWizardPage* m_prev_page{nullptr}; | ||||
|     CalibrationWizardPage* m_next_page{nullptr}; | ||||
| 
 | ||||
|     void on_click_prev(wxCommandEvent&); | ||||
|     void on_click_next(wxCommandEvent&); | ||||
| }; | ||||
| 
 | ||||
| }} // namespace Slic3r::GUI
 | ||||
| 
 | ||||
| #endif | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 liz.li
						liz.li