mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
PhysicalPrinter improvements:
* implemented PresetForPrinter class
This commit is contained in:
parent
6d4a0d91fc
commit
0b88e86634
4 changed files with 175 additions and 40 deletions
|
@ -166,32 +166,67 @@ public:
|
|||
};
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
// PresetForPrinter
|
||||
//------------------------------------------
|
||||
class PhysicalPrinterDialog;
|
||||
class PresetForPrinter
|
||||
{
|
||||
PhysicalPrinterDialog* m_parent { nullptr };
|
||||
|
||||
TabPresetComboBox* m_presets_list { nullptr };
|
||||
ScalableButton* m_delete_preset_btn { nullptr };
|
||||
wxStaticText* m_full_printer_name { nullptr };
|
||||
|
||||
wxBoxSizer* m_sizer { nullptr };
|
||||
|
||||
void DeletePreset(wxEvent& event);
|
||||
|
||||
public:
|
||||
PresetForPrinter(PhysicalPrinterDialog* parent, bool is_all_enable);
|
||||
~PresetForPrinter();
|
||||
|
||||
wxBoxSizer* sizer() { return m_sizer; }
|
||||
void update_full_printer_name();
|
||||
|
||||
void msw_rescale();
|
||||
void on_sys_color_changed() {};
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------
|
||||
// PhysicalPrinterDialog
|
||||
//------------------------------------------
|
||||
|
||||
class ConfigOptionsGroup;
|
||||
class PhysicalPrinterDialog : public DPIDialog
|
||||
{
|
||||
PhysicalPrinter m_printer;
|
||||
DynamicPrintConfig* m_config { nullptr };
|
||||
wxString m_info_string;
|
||||
|
||||
wxTextCtrl* m_printer_name { nullptr };
|
||||
wxStaticText* m_full_printer_name { nullptr };
|
||||
TabPresetComboBox* m_printer_presets { nullptr };
|
||||
std::vector<PresetForPrinter*> m_presets;
|
||||
|
||||
ConfigOptionsGroup* m_optgroup { nullptr };
|
||||
|
||||
ScalableButton* m_printhost_browse_btn;
|
||||
ScalableButton* m_printhost_test_btn;
|
||||
ScalableButton* m_printhost_cafile_browse_btn {nullptr};
|
||||
ScalableButton* m_add_preset_btn {nullptr};
|
||||
ScalableButton* m_printhost_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_test_btn {nullptr};
|
||||
ScalableButton* m_printhost_cafile_browse_btn {nullptr};
|
||||
|
||||
void build_printhost_settings(ConfigOptionsGroup* optgroup);
|
||||
void update();
|
||||
void update_printer_name();
|
||||
void OnOK(wxEvent& event);
|
||||
void AddPreset(wxEvent& event);
|
||||
|
||||
public:
|
||||
PhysicalPrinterDialog(wxString printer_name);
|
||||
~PhysicalPrinterDialog() {}
|
||||
~PhysicalPrinterDialog();
|
||||
|
||||
void update();
|
||||
wxString get_printer_name();
|
||||
void update_full_printer_names();
|
||||
PhysicalPrinter* get_printer() {return &m_printer; }
|
||||
|
||||
protected:
|
||||
void on_dpi_changed(const wxRect& suggested_rect) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue