mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Add info for the removed "Print host upload" group
This commit is contained in:
		
							parent
							
								
									86ee8e7687
								
							
						
					
					
						commit
						bc2088eb78
					
				
					 4 changed files with 46 additions and 7 deletions
				
			
		|  | @ -867,6 +867,16 @@ void ConfigOptionsGroup::change_opt_value(const t_config_option_key& opt_key, co | |||
| 		m_modelconfig->touch(); | ||||
| } | ||||
| 
 | ||||
| ogStaticText::ogStaticText(wxWindow* parent, const wxString& text) :  | ||||
|     wxStaticText(parent, wxID_ANY, text, wxDefaultPosition, wxDefaultSize) | ||||
| { | ||||
|     if (!text.IsEmpty()) { | ||||
| 		Wrap(60 * wxGetApp().em_unit()); | ||||
| 		GetParent()->Layout(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void ogStaticText::SetText(const wxString& value, bool wrap/* = true*/) | ||||
| { | ||||
| 	SetLabel(value); | ||||
|  |  | |||
|  | @ -296,7 +296,8 @@ private: | |||
| class ogStaticText :public wxStaticText{ | ||||
| public: | ||||
| 	ogStaticText() {} | ||||
| 	ogStaticText(wxWindow* parent, const char *text) : wxStaticText(parent, wxID_ANY, text, wxDefaultPosition, wxDefaultSize) {} | ||||
| //	ogStaticText(wxWindow* parent, const char *text) : wxStaticText(parent, wxID_ANY, text, wxDefaultPosition, wxDefaultSize) {}
 | ||||
| 	ogStaticText(wxWindow* parent, const wxString& text); | ||||
| 	~ogStaticText() {} | ||||
| 
 | ||||
| 	void		SetText(const wxString& value, bool wrap = true); | ||||
|  |  | |||
|  | @ -1991,9 +1991,9 @@ void TabFilament::clear_pages() | |||
| 	m_cooling_description_line = nullptr; | ||||
| } | ||||
| 
 | ||||
| wxSizer* Tab::description_line_widget(wxWindow* parent, ogStaticText* *StaticText) | ||||
| wxSizer* Tab::description_line_widget(wxWindow* parent, ogStaticText* *StaticText, wxString text /*= wxEmptyString*/) | ||||
| { | ||||
|     *StaticText = new ogStaticText(parent, ""); | ||||
|     *StaticText = new ogStaticText(parent, text); | ||||
| 
 | ||||
| //	auto font = (new wxSystemSettings)->GetFont(wxSYS_DEFAULT_GUI_FONT);
 | ||||
|     (*StaticText)->SetFont(wxGetApp().normal_font()); | ||||
|  | @ -2018,6 +2018,27 @@ void TabPrinter::build() | |||
|     m_presets->get_selected_preset().printer_technology() == ptSLA ? build_sla() : build_fff(); | ||||
| } | ||||
| 
 | ||||
| void TabPrinter::build_print_host_upload_group(Page* page) | ||||
| { | ||||
|     ConfigOptionsGroupShp optgroup = page->new_optgroup(L("Print Host upload")); | ||||
| 
 | ||||
|     wxString description_line_text = _L("" | ||||
|         "Note: All parameters from this group are moved to the Physical Printer settings (see changelog).\n\n" | ||||
|         "A new Physical Printer profile is created by clicking on the \"cog\" icon right of the Printer profiles combo box, " | ||||
|         "by selecting the \"add or remove printers\" item in the Printer combo box. The Physical Printer profile editor opens " | ||||
|         "also when clicking on the \"cog\" icon in the Printer settings tab. The Physical Printer profiles are being stored " | ||||
|         "into PrusaSlicer/physical_printer directory."); | ||||
| 
 | ||||
|     Line line = { "", "" }; | ||||
|     line.full_width = 1; | ||||
|     line.widget = [this, description_line_text](wxWindow* parent) { | ||||
|         return description_line_widget(parent, m_presets->get_selected_preset().printer_technology() == ptFFF ? | ||||
|                                        &m_fff_print_host_upload_description_line : &m_sla_print_host_upload_description_line, | ||||
|                                        description_line_text); | ||||
|     }; | ||||
|     optgroup->append_line(line); | ||||
| } | ||||
| 
 | ||||
| void TabPrinter::build_fff() | ||||
| { | ||||
|     if (!m_pages.empty()) | ||||
|  | @ -2105,6 +2126,8 @@ void TabPrinter::build_fff() | |||
|             }); | ||||
|         }; | ||||
| 
 | ||||
|         build_print_host_upload_group(page.get()); | ||||
| 
 | ||||
|         optgroup = page->new_optgroup(L("Firmware")); | ||||
|         optgroup->append_single_option_line("gcode_flavor"); | ||||
|         optgroup->append_single_option_line("silent_mode"); | ||||
|  | @ -2266,6 +2289,8 @@ void TabPrinter::build_sla() | |||
|     optgroup->append_single_option_line("min_initial_exposure_time"); | ||||
|     optgroup->append_single_option_line("max_initial_exposure_time"); | ||||
| 
 | ||||
|     build_print_host_upload_group(page.get()); | ||||
| 
 | ||||
|     const int notes_field_height = 25; // 250
 | ||||
| 
 | ||||
|     page = add_options_page(L("Notes"), "note.png"); | ||||
|  | @ -2744,6 +2769,8 @@ void TabPrinter::update() | |||
|     m_presets->get_edited_preset().printer_technology() == ptFFF ? update_fff() : update_sla(); | ||||
|     m_update_cnt--; | ||||
| 
 | ||||
|     Layout(); | ||||
| 
 | ||||
|     if (m_update_cnt == 0) | ||||
|         wxGetApp().mainframe->on_config_changed(m_config); | ||||
| } | ||||
|  | @ -3641,8 +3668,6 @@ void TabPrinter::update_machine_limits_description(const MachineLimitsUsage usag | |||
| 	default: assert(false); | ||||
| 	} | ||||
|     m_machine_limits_description_line->SetText(text); | ||||
| 
 | ||||
|     Layout(); | ||||
| } | ||||
| 
 | ||||
| void Tab::compatible_widget_reload(PresetDependencies &deps) | ||||
|  |  | |||
|  | @ -335,8 +335,7 @@ public: | |||
| 	Field*			get_field(const t_config_option_key& opt_key, int opt_index = -1) const; | ||||
|     Field*          get_field(const t_config_option_key &opt_key, Page** selected_page, int opt_index = -1); | ||||
| 	void			toggle_option(const std::string& opt_key, bool toggle, int opt_index = -1); | ||||
| //	bool			set_value(const t_config_option_key& opt_key, const boost::any& value);
 | ||||
| 	wxSizer*		description_line_widget(wxWindow* parent, ogStaticText** StaticText); | ||||
| 	wxSizer*		description_line_widget(wxWindow* parent, ogStaticText** StaticText, wxString text = wxEmptyString); | ||||
| 	bool			current_preset_is_dirty(); | ||||
| 
 | ||||
| 	DynamicPrintConfig*	get_config() { return m_config; } | ||||
|  | @ -429,6 +428,9 @@ private: | |||
| 	ogStaticText* m_machine_limits_description_line {nullptr}; | ||||
| 	void 		update_machine_limits_description(const MachineLimitsUsage usage); | ||||
| 
 | ||||
| 	ogStaticText*	m_fff_print_host_upload_description_line {nullptr}; | ||||
| 	ogStaticText*	m_sla_print_host_upload_description_line {nullptr}; | ||||
| 
 | ||||
|     std::vector<PageShp>			m_pages_fff; | ||||
|     std::vector<PageShp>			m_pages_sla; | ||||
| 
 | ||||
|  | @ -452,6 +454,7 @@ public: | |||
| 	~TabPrinter() {} | ||||
| 
 | ||||
| 	void		build() override; | ||||
| 	void		build_print_host_upload_group(Page* page); | ||||
|     void		build_fff(); | ||||
|     void		build_sla(); | ||||
| 	void		activate_selected_page(std::function<void()> throw_if_canceled) override; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka