![]() |
Ember
|
Custom loading dialog with detailed progress information. More...
#include <LoadingDialog.h>
Public Member Functions | |
| LoadingDialog (wxWindow *parent, const wxString &title) | |
| virtual | ~LoadingDialog () |
| bool | UpdateProgress (int current, int max, const wxString &message=wxEmptyString) |
| Update progress and optionally add a log message. | |
| void | AppendLog (const wxString &message, const wxString &prefix="") |
| Add a log message without updating progress. | |
| void | ClearLog () |
| Clear all log messages. | |
| void | SetMaxProgress (int max) |
| Set the maximum value for the progress bar. | |
| bool | WasCancelled () const |
| Check if the user requested cancellation. | |
| void | MarkComplete () |
| Mark loading as complete and change button to "Close". | |
| Public Member Functions inherited from EmberUI::ScalableDialog | |
| ScalableDialog (wxWindow *parent, wxWindowID id, const wxString &title, const wxSize &logicalSize=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) | |
| Constructs the dialog with logical size for DPI scaling. | |
| virtual | ~ScalableDialog ()=default |
Private Member Functions | |
| void | CreateControls () |
| void | OnCancel (wxCommandEvent &event) |
| void | OnClose (wxCloseEvent &event) |
| wxDECLARE_EVENT_TABLE () | |
Private Attributes | |
| wxGauge * | progress_bar_ |
| wxTextCtrl * | log_text_ |
| wxButton * | cancel_button_ |
| wxStaticText * | status_label_ |
| bool | was_cancelled_ |
| bool | is_complete_ |
| int | current_progress_ |
| int | max_progress_ |
Additional Inherited Members | |
| Protected Member Functions inherited from EmberUI::ScalableDialog | |
| int | Scaled (int px) const |
| Scales a logical pixel value to physical pixels. | |
| wxSize | Scaled (const wxSize &size) const |
| Scales a logical size to physical pixels. | |
| int | Margin () const |
| Returns the standard margin in physical pixels. | |
| int | Spacing () const |
| Returns the standard spacing in physical pixels. | |
| int | Padding () const |
| Returns the standard padding in physical pixels. | |
| wxStaticBoxSizer * | CreateGroup (wxWindow *parent, const wxString &title) |
| Creates a grouped section with a title. | |
| wxBoxSizer * | CreateLabeledRow (wxWindow *parent, const wxString &label, wxWindow *control, int logicalLabelWidth=Layout::LABEL_WIDTH) |
| Creates a row with a label and control. | |
Custom loading dialog with detailed progress information.
Shows a progress bar and a scrollable terminal-like log of all parsing steps. Grays out the UI behind it (modal behavior).
Definition at line 14 of file LoadingDialog.h.
| LoadingDialog::LoadingDialog | ( | wxWindow * | parent, |
| const wxString & | title ) |
|
virtual |
Definition at line 16 of file LoadingDialog.cpp.
| void LoadingDialog::AppendLog | ( | const wxString & | message, |
| const wxString & | prefix = "" ) |
Add a log message without updating progress.
| message | Message to append to the log |
| prefix | Optional prefix (e.g., "[INFO]", "[WARN]") |
Definition at line 113 of file LoadingDialog.cpp.
| void LoadingDialog::ClearLog | ( | ) |
Clear all log messages.
Definition at line 149 of file LoadingDialog.cpp.
|
private |
Definition at line 18 of file LoadingDialog.cpp.
| void LoadingDialog::MarkComplete | ( | ) |
Mark loading as complete and change button to "Close".
Definition at line 162 of file LoadingDialog.cpp.
|
private |
Definition at line 176 of file LoadingDialog.cpp.
|
private |
Definition at line 199 of file LoadingDialog.cpp.
| void LoadingDialog::SetMaxProgress | ( | int | max | ) |
Set the maximum value for the progress bar.
Definition at line 155 of file LoadingDialog.cpp.
| bool LoadingDialog::UpdateProgress | ( | int | current, |
| int | max, | ||
| const wxString & | message = wxEmptyString ) |
Update progress and optionally add a log message.
| current | Current progress value |
| max | Maximum progress value |
| message | Message to display in the log (optional) |
Definition at line 72 of file LoadingDialog.cpp.
|
inline |
Check if the user requested cancellation.
Definition at line 48 of file LoadingDialog.h.
|
private |
|
private |
Definition at line 63 of file LoadingDialog.h.
|
private |
Definition at line 68 of file LoadingDialog.h.
|
private |
Definition at line 67 of file LoadingDialog.h.
|
private |
Definition at line 62 of file LoadingDialog.h.
|
private |
Definition at line 69 of file LoadingDialog.h.
|
private |
Definition at line 61 of file LoadingDialog.h.
|
private |
Definition at line 64 of file LoadingDialog.h.
|
private |
Definition at line 66 of file LoadingDialog.h.