#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/PluginProgressDialog.hpp>
Public Types | |
| using | CloseHandler = std::function<void()> |
| enum | State { Uncancelable = -1 , Canceled , Continue , Finished , Dismissed } |
Public Member Functions | |
| PluginProgressDialog (wxWindow *parent, const wxString &title, const wxString &message, int maximum, int style, CloseHandler on_destroyed=nullptr) | |
| ~PluginProgressDialog () override | |
| bool | pulse (const wxString &message=wxEmptyString) |
| bool | update (int value, const wxString &message=wxEmptyString) |
| void | start_pulse (int interval_ms, const wxString &message=wxEmptyString) |
| void | stop_pulse () |
| void | close () |
| bool | is_open () const |
| void | OnPaint (wxPaintEvent &evt) |
| virtual void | DoSetSize (int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO) override |
| bool | Create (const wxString &title, const wxString &message, int maximum=100, wxWindow *parent=NULL, int style=wxPD_APP_MODAL|wxPD_AUTO_HIDE) |
| virtual bool | Update (int value, const wxString &newmsg=wxEmptyString, bool *skip=NULL) |
| virtual void | Update () wxOVERRIDE |
| virtual bool | Pulse (const wxString &newmsg=wxEmptyString, bool *skip=NULL) |
| bool | WasCanceled () const |
| virtual void | Resume () |
| virtual int | GetValue () const |
| virtual int | GetRange () const |
| virtual wxString | GetMessage () const |
| virtual void | SetRange (int maximum) |
| virtual bool | WasCancelled () const |
| virtual bool | WasSkipped () const |
| virtual void | OnCancel () |
| virtual bool | Show (bool show=true) wxOVERRIDE |
Static Public Member Functions | |
| static PluginProgressDialog * | create_dialog (wxWindow *parent, const wxString &title, const wxString &message, int maximum, int style, CloseHandler on_destroyed) |
| static bool | pulse (PluginProgressDialog *dialog, const wxString &message=wxEmptyString) |
| static bool | update (PluginProgressDialog *dialog, int value, const wxString &message=wxEmptyString) |
| static void | start_pulse (PluginProgressDialog *dialog, int interval_ms, const wxString &message=wxEmptyString) |
| static void | stop_pulse (PluginProgressDialog *dialog) |
| static void | request_close (PluginProgressDialog *dialog) |
Public Attributes | |
| int | m_mode = 0 |
| bool | m_adaptive = {false} |
| wxSizer * | m_sizer_main = {nullptr} |
| wxPanel * | m_top_line = {nullptr} |
| wxSimplebook * | m_simplebook = {nullptr} |
| wxPanel * | m_panel_2line = {nullptr} |
| wxPanel * | m_panel_1line = {nullptr} |
| Button * | m_button_cancel = {nullptr} |
| wxScrolledWindow * | m_msg_scrolledWindow = {nullptr} |
Protected Member Functions | |
| void | OnCancel (wxCommandEvent &) |
| void | SetMaximum (int maximum) |
| bool | HasPDFlag (int flag) const |
| int | GetPDStyle () const |
| void | SetPDStyle (int pdStyle) |
| void | set_panel_height (int height) |
| void | UpdateTimeEstimates (int value, unsigned long &elapsedTime, unsigned long &estimatedTime, unsigned long &remainingTime) |
| void | EnsureActiveEventLoopExists () |
| void | OnSkip (wxCommandEvent &) |
| void | OnClose (wxCloseEvent &) |
| void | DisableOtherWindows () |
| void | ReenableOtherWindows () |
| void | SetTopParent (wxWindow *parent) |
| wxString | FormatString (wxString title) |
| wxWindow * | GetTopParent () const |
Static Protected Member Functions | |
| static wxString | GetElapsedLabel () |
| static wxString | GetEstimatedLabel () |
| static wxString | GetRemainingLabel () |
| static wxString | GetFormattedTime (unsigned long timeInSec) |
Protected Attributes | |
| State | m_state |
| int | m_maximum |
| unsigned long | m_timeStart |
| unsigned long | m_timeStop |
| unsigned long | m_break |
Private Member Functions | |
| void | on_timer (wxTimerEvent &event) |
| void | Init () |
| wxStaticText * | CreateLabel (const wxString &text, wxSizer *sizer) |
| void | UpdateMessage (const wxString &newmsg) |
| bool | DoBeforeUpdate (bool *skip) |
| void | DoAfterUpdate () |
| void | EnableClose () |
| void | EnableSkip (bool enable=true) |
| void | EnableAbort (bool enable=true) |
| void | DisableSkip () |
| void | DisableAbort () |
| wxDECLARE_NO_COPY_CLASS (ProgressDialog) | |
Static Private Member Functions | |
| static void | SetTimeLabel (unsigned long val, wxStaticText *label) |
Private Attributes | |
| bool | m_open {true} |
| wxString | m_pulse_message |
| std::unique_ptr< wxTimer > | m_timer |
| CloseHandler | m_on_destroyed |
| wxGauge * | m_gauge |
| wxStaticText * | m_msg |
| wxStaticText * | m_msg_2line |
| wxStaticText * | m_elapsed |
| wxStaticText * | m_estimated |
| wxStaticText * | m_remaining |
| wxWindowRef | m_parentTop |
| int | m_pdStyle |
| bool | m_skip |
| wxButton * | m_btnAbort |
| wxButton * | m_btnSkip |
| unsigned long | m_last_timeupdate |
| int | m_delay |
| int | m_ctdelay |
| unsigned long | m_display_estimated |
| wxWindowDisabler * | m_winDisabler |
| wxEventLoop * | m_tempEventLoop |
| using Slic3r::GUI::PluginProgressDialog::CloseHandler = std::function<void()> |
|
inherited |
| Slic3r::GUI::PluginProgressDialog::PluginProgressDialog | ( | wxWindow * | parent, |
| const wxString & | title, | ||
| const wxString & | message, | ||
| int | maximum, | ||
| int | style, | ||
| CloseHandler | on_destroyed = nullptr ) |
References Slic3r::GUI::ProgressDialog::ProgressDialog(), m_on_destroyed, m_pulse_message, and style.
Referenced by create_dialog(), pulse(), request_close(), start_pulse(), stop_pulse(), and update().
|
override |
References m_on_destroyed, and stop_pulse().
| void Slic3r::GUI::PluginProgressDialog::close | ( | ) |
References m_open, and stop_pulse().
Referenced by request_close().
|
inherited |
References _L, Label::Body_14, Canceled, Choice, Continue, CreateLabel(), StateColor::darkModeColorFor(), DisableAbort(), DisableOtherWindows(), DisableSkip(), Slic3r::Enable, EnsureActiveEventLoopExists(), Finished, FormatString(), GetElapsedLabel(), GetEstimatedLabel(), GetRemainingLabel(), HasPDFlag(), m_adaptive, m_button_cancel, m_elapsed, m_estimated, m_gauge, m_msg, m_msg_2line, m_msg_scrolledWindow, m_panel_1line, m_panel_2line, m_parentTop, m_pdStyle, m_remaining, m_simplebook, m_sizer_main, m_state, m_timeStop, m_top_line, OnCancel(), PROGRESSDIALOG_DEF_BK, PROGRESSDIALOG_GAUGE_SIZE, PROGRESSDIALOG_GREY_700, PROGRESSDIALOG_SIMPLEBOOK_SIZE, Regular, SetMaximum(), SetTimeLabel(), SetTopParent(), Show(), style, Uncancelable, Update(), wxGauge, Slic3r::GUI::wxMouseEvent, wxPD_NO_PROGRESS, and wxStaticText.
Referenced by ProgressDialog().
|
static |
References PluginProgressDialog(), and style.
Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::ui_create_progress_dialog().
|
privateinherited |
References _L, Label::Body_13, LAYOUT_MARGIN, PROGRESSDIALOG_GREY_700, and wxStaticText.
Referenced by Create().
|
inlineprivateinherited |
References EnableAbort().
Referenced by Create(), OnCancel(), and OnClose().
|
protectedinherited |
References HasPDFlag(), m_parentTop, m_winDisabler, and wxWindowDisabler.
Referenced by Create().
|
inlineprivateinherited |
References EnableSkip().
Referenced by Create(), OnCancel(), OnClose(), OnSkip(), and Update().
|
privateinherited |
Referenced by Pulse(), and Update().
|
privateinherited |
References Canceled, EnableSkip(), m_skip, m_state, and Update().
Referenced by Pulse(), and Update().
|
overridevirtualinherited |
|
privateinherited |
References HasPDFlag(), and m_btnAbort.
Referenced by DisableAbort(), and Resume().
|
privateinherited |
References HasPDFlag(), and m_btnAbort.
Referenced by Update().
|
privateinherited |
References HasPDFlag(), and m_btnSkip.
Referenced by DisableSkip(), DoBeforeUpdate(), and Resume().
|
protectedinherited |
References m_tempEventLoop, and wxEventLoop.
Referenced by Create().
|
protectedinherited |
References m_adaptive, m_mode, m_msg, m_msg_2line, m_msg_scrolledWindow, m_simplebook, PROGRESSDIALOG_GAUGE_SIZE, PROGRESSDIALOG_SIMPLEBOOK_SIZE, and set_panel_height().
Referenced by Create(), and UpdateMessage().
|
inlinestaticprotectedinherited |
|
inlinestaticprotectedinherited |
|
staticprotectedinherited |
Referenced by SetTimeLabel().
|
virtualinherited |
|
inlineprotectedinherited |
|
virtualinherited |
References m_maximum.
|
inlinestaticprotectedinherited |
|
inlineprotectedinherited |
References m_parentTop.
|
virtualinherited |
|
inlineprotectedinherited |
References m_pdStyle.
Referenced by Create(), DisableOtherWindows(), EnableAbort(), EnableClose(), EnableSkip(), ReenableOtherWindows(), Update(), WasCancelled(), and WasSkipped().
|
privateinherited |
References m_break, m_btnAbort, m_btnSkip, m_ctdelay, m_delay, m_display_estimated, m_elapsed, m_estimated, m_gauge, m_last_timeupdate, m_maximum, m_msg, m_parentTop, m_pdStyle, m_remaining, m_skip, m_state, m_tempEventLoop, m_timeStart, m_timeStop, m_winDisabler, and Uncancelable.
Referenced by ProgressDialog(), and ProgressDialog().
|
inline |
|
private |
References m_open, m_pulse_message, and Slic3r::GUI::ProgressDialog::Pulse().
Referenced by start_pulse(), and stop_pulse().
|
inlinevirtualinherited |
Reimplemented in Slic3r::GUI::MediaProgressDialog.
Referenced by Create(), OnCancel(), and OnClose().
|
protectedinherited |
References Canceled, DisableAbort(), DisableSkip(), Finished, m_state, m_timeStop, and OnCancel().
|
protectedinherited |
References Canceled, DisableAbort(), DisableSkip(), Finished, m_state, m_timeStop, OnCancel(), and Uncancelable.
Referenced by ProgressDialog().
|
inherited |
|
protectedinherited |
|
virtualinherited |
References Canceled, DoAfterUpdate(), DoBeforeUpdate(), m_elapsed, m_estimated, m_gauge, m_msg, m_remaining, m_state, m_timeStart, SetTimeLabel(), and UpdateMessage().
Referenced by Slic3r::GUI::PluginProgressDialog::on_timer(), Slic3r::GUI::PluginProgressDialog::pulse(), and Slic3r::GUI::GUI_App::recreate_GUI().
| bool Slic3r::GUI::PluginProgressDialog::pulse | ( | const wxString & | message = wxEmptyString | ) |
References m_open, m_pulse_message, and Slic3r::GUI::ProgressDialog::Pulse().
|
static |
References PluginProgressDialog(), and pulse().
Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::progress_pulse(), and pulse().
|
protectedinherited |
References HasPDFlag(), m_parentTop, and m_winDisabler.
Referenced by ~ProgressDialog(), Show(), and Update().
|
static |
References PluginProgressDialog(), and close().
Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::progress_close().
|
virtualinherited |
References Continue, EnableAbort(), EnableSkip(), m_break, m_button_cancel, m_ctdelay, m_delay, m_skip, m_state, and m_timeStop.
|
protectedinherited |
References m_msg_2line, m_panel_2line, m_simplebook, and PROGRESSDIALOG_SIMPLEBOOK_SIZE.
Referenced by FormatString().
|
protectedinherited |
References m_maximum.
Referenced by Create(), and SetRange().
|
inlineprotectedinherited |
|
virtualinherited |
References m_gauge, and SetMaximum().
|
staticprivateinherited |
References GetFormattedTime(), and wxStaticText.
Referenced by Create(), Pulse(), and Update().
|
protectedinherited |
|
virtualinherited |
References ReenableOtherWindows().
Referenced by Create().
| void Slic3r::GUI::PluginProgressDialog::start_pulse | ( | int | interval_ms, |
| const wxString & | message = wxEmptyString ) |
References m_open, m_pulse_message, m_timer, on_timer(), and stop_pulse().
|
static |
References PluginProgressDialog(), and start_pulse().
Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::progress_start_pulse(), and start_pulse().
| void Slic3r::GUI::PluginProgressDialog::stop_pulse | ( | ) |
References m_timer, and on_timer().
Referenced by ~PluginProgressDialog(), close(), Slic3r::anonymous_namespace{PluginHostUi.cpp}::progress_stop_pulse(), and start_pulse().
|
static |
References PluginProgressDialog(), and stop_pulse().
Referenced by stop_pulse().
|
inlinevirtualinherited |
Referenced by Create(), DoBeforeUpdate(), Update(), and Slic3r::GUI::PluginProgressDialog::update().
|
virtualinherited |
References _L, Canceled, DisableSkip(), DoAfterUpdate(), DoBeforeUpdate(), EnableClose(), Finished, HasPDFlag(), m_display_estimated, m_elapsed, m_estimated, m_gauge, m_maximum, m_msg, m_remaining, m_state, ReenableOtherWindows(), SetTimeLabel(), Update(), UpdateMessage(), and UpdateTimeEstimates().
Referenced by Slic3r::GUI::MediaFilePanel::doAction(), Slic3r::fix_model_with_cgal_gui(), Slic3r::GUI::ObjectList::fix_through_cgal(), Slic3r::GUI::ScoreDialog::get_button_sizer(), Slic3r::GUI::Plater::import_model_id(), Slic3r::GUI::Plater::priv::load_files(), Slic3r::GUI::ObjectList::load_modifier(), Slic3r::GUI::GUI_App::on_user_login_handle(), and Slic3r::GUI::GUI_App::recreate_GUI().
| bool Slic3r::GUI::PluginProgressDialog::update | ( | int | value, |
| const wxString & | message = wxEmptyString ) |
References m_open, m_pulse_message, and Slic3r::GUI::ProgressDialog::Update().
|
static |
References PluginProgressDialog(), and update().
Referenced by Slic3r::anonymous_namespace{PluginHostUi.cpp}::progress_update(), and update().
|
privateinherited |
References FormatString(), and m_msg.
Referenced by Pulse(), and Update().
|
protectedinherited |
References m_break, m_ctdelay, m_delay, m_display_estimated, m_last_timeupdate, m_maximum, and m_timeStart.
Referenced by Update().
|
inherited |
|
virtualinherited |
References Canceled, HasPDFlag(), and m_state.
Referenced by Slic3r::GUI::Plater::priv::load_files().
|
virtualinherited |
|
privateinherited |
|
inherited |
Referenced by ProgressDialog(), Create(), and FormatString().
|
protectedinherited |
Referenced by Init(), Resume(), and UpdateTimeEstimates().
|
privateinherited |
Referenced by EnableAbort(), EnableClose(), and Init().
|
privateinherited |
Referenced by EnableSkip(), and Init().
|
privateinherited |
Referenced by Init(), Resume(), and UpdateTimeEstimates().
|
privateinherited |
Referenced by Init(), Resume(), and UpdateTimeEstimates().
|
privateinherited |
Referenced by Init(), Update(), and UpdateTimeEstimates().
|
privateinherited |
|
privateinherited |
|
privateinherited |
Referenced by Create(), GetValue(), Init(), Pulse(), SetRange(), and Update().
|
privateinherited |
Referenced by Init(), and UpdateTimeEstimates().
|
protectedinherited |
Referenced by GetRange(), Init(), SetMaximum(), Update(), and UpdateTimeEstimates().
|
inherited |
Referenced by FormatString().
|
privateinherited |
Referenced by Create(), FormatString(), GetMessage(), Init(), Pulse(), Update(), and UpdateMessage().
|
privateinherited |
Referenced by Create(), FormatString(), and set_panel_height().
|
inherited |
Referenced by Create(), and FormatString().
|
private |
Referenced by PluginProgressDialog(), and ~PluginProgressDialog().
|
private |
Referenced by close(), is_open(), on_timer(), pulse(), start_pulse(), and update().
|
inherited |
Referenced by Create().
|
inherited |
Referenced by Create(), and set_panel_height().
|
privateinherited |
Referenced by Create(), DisableOtherWindows(), GetTopParent(), Init(), ReenableOtherWindows(), and SetTopParent().
|
privateinherited |
Referenced by Create(), GetPDStyle(), HasPDFlag(), Init(), and SetPDStyle().
|
private |
Referenced by PluginProgressDialog(), on_timer(), pulse(), start_pulse(), and update().
|
privateinherited |
|
inherited |
Referenced by Create(), FormatString(), and set_panel_height().
|
inherited |
Referenced by Create().
|
privateinherited |
Referenced by DoBeforeUpdate(), Init(), OnSkip(), Resume(), and WasSkipped().
|
protectedinherited |
Referenced by Create(), DoBeforeUpdate(), Init(), OnCancel(), OnClose(), Pulse(), Resume(), Update(), WasCanceled(), and WasCancelled().
|
privateinherited |
Referenced by ~ProgressDialog(), EnsureActiveEventLoopExists(), and Init().
|
private |
Referenced by start_pulse(), and stop_pulse().
|
protectedinherited |
Referenced by Init(), Pulse(), and UpdateTimeEstimates().
|
protectedinherited |
Referenced by Create(), Init(), OnCancel(), OnClose(), and Resume().
|
inherited |
Referenced by Create().
|
privateinherited |
Referenced by DisableOtherWindows(), Init(), and ReenableOtherWindows().