#include <dlgProgress.hpp>
Public Member Functions | |
void | createControls (const wxString &message=wxEmptyString) |
Creates and initializes the controls of the dialog. | |
dlgProgress (const wxString &title, const wxString &message, int maximum=100, wxWindow *parent=NULL, int style=wxPD_APP_MODAL|wxPD_AUTO_HIDE) | |
Creates and displays dialog, disables event handling for other frames or parent frame to avoid recursion problems. | |
bool | isPaused () const |
Is the user has clicked on Pause ? | |
void | Resume () |
Can be called to continue after the Cancel button has been pressed. | |
bool | Show (bool show=true) |
Shows the dialog. | |
bool | Update (int value, const wxString &newmsg=wxEmptyString) |
Update the status bar to the new value. | |
virtual | ~dlgProgress () |
The class descructor. | |
Protected Types | |
enum | { BTN_PAUSE } |
Controls IDs. More... | |
enum | State { Uncancelable = -1, Paused, Canceled, Continue, Finished } |
Continue processing or not (return value for Update()). More... | |
Protected Member Functions | |
void | btnCancelClick (wxCommandEvent &event) |
Processes button Cancel. | |
void | btnPauseClick (wxCommandEvent &event) |
Processes button Pause. | |
void | FrameClose (wxCloseEvent &event) |
Event handler to respond to system close events. | |
void | ReenableOtherWindows () |
Reenables the other windows temporarily disabled while the dialog was shown. | |
void | SetTimeLabel (unsigned long val, wxStaticText *label) |
Updates the label to show the given time (in seconds). | |
Protected Attributes | |
wxButton * | btnCancel |
Cancel and close button. | |
wxButton * | btnPause |
Pause button. | |
wxWindow * | ctrParentTop |
Parent top level window (may be NULL). | |
wxGauge * | gauProgress |
Progress bar. | |
wxStaticText * | lblElapsed |
Elapsed time. | |
wxStaticText * | lblEstimated |
Estimated time. | |
wxStaticText * | lblMessage |
The message displayed. | |
wxStaticText * | lblRemaining |
Remaining time. | |
int | maximum |
The maximum value. | |
enum dlgProgress::State | state |
Continue processing or not (return value for Update()). | |
unsigned long | timeStart |
Time when the dialog was created. | |
wxWindowDisabler * | winDisabler |
Disable all others windows (for wxPD_APP_MODAL case). | |
Private Member Functions | |
dlgProgress () | |
Default constructor. Don't use it. | |
virtual void | Update () |
Virtual function hiding supression. |
Taken from wxWidgets.
Definition at line 50 of file dlgProgress.hpp.
|
Controls IDs.
Definition at line 84 of file dlgProgress.hpp. |
|
Continue processing or not (return value for Update()).
Definition at line 97 of file dlgProgress.hpp. |
|
Creates and displays dialog, disables event handling for other frames or parent frame to avoid recursion problems.
Definition at line 66 of file dlgProgress.cpp. |
|
The class descructor.
Definition at line 281 of file dlgProgress.cpp. References ReenableOtherWindows(). |
|
Default constructor. Don't use it.
Definition at line 140 of file dlgProgress.hpp. |
|
Processes button Cancel.
Definition at line 452 of file dlgProgress.cpp. References btnCancel, btnCancelClick(), btnPause, and state. Referenced by btnCancelClick(). |
|
Processes button Pause.
Definition at line 480 of file dlgProgress.cpp. References btnPause, btnPauseClick(), and state. Referenced by btnPauseClick(). |
|
Creates and initializes the controls of the dialog.
Definition at line 138 of file dlgProgress.cpp. References btnCancel, btnPause, CONTROL_SPACE, createControls(), gauProgress, lblElapsed, lblEstimated, lblMessage, lblRemaining, and maximum. Referenced by createControls(). |
|
Event handler to respond to system close events.
Definition at line 510 of file dlgProgress.cpp. References FrameClose(), and state. Referenced by FrameClose(). |
|
Is the user has clicked on Pause ?
Definition at line 539 of file dlgProgress.cpp. References state. Referenced by getFilesInSubdirectoriesRec(), ChecksumsListView::removeFilesInList(), and ChecksumsListView::ChecksumProgress::update(). |
|
Reenables the other windows temporarily disabled while the dialog was shown. Must be called to reenable the other windows temporarily disabled while the dialog was shown. Definition at line 295 of file dlgProgress.cpp. References ctrParentTop, and winDisabler. Referenced by Show(), Update(), and ~dlgProgress(). |
|
Can be called to continue after the Cancel button has been pressed.
Definition at line 410 of file dlgProgress.cpp. |
|
Updates the label to show the given time (in seconds).
Definition at line 552 of file dlgProgress.cpp. References SetTimeLabel(). Referenced by SetTimeLabel(), and Update(). |
|
Shows the dialog.
Definition at line 434 of file dlgProgress.cpp. References ReenableOtherWindows(), and Show(). Referenced by Show(). |
|
Update the status bar to the new value.
Definition at line 316 of file dlgProgress.cpp. References btnCancel, btnPause, gauProgress, lblElapsed, lblEstimated, lblMessage, lblRemaining, maximum, ReenableOtherWindows(), SetTimeLabel(), state, and timeStart. |
|
Virtual function hiding supression.
Definition at line 117 of file dlgProgress.hpp. Referenced by ChecksumsListView::ChecksumProgress::finished(), getFilesInSubdirectories(), getFilesInSubdirectoriesRec(), ChecksumsListView::removeFilesInList(), and ChecksumsListView::ChecksumProgress::update(). |
|
Cancel and close button.
Definition at line 71 of file dlgProgress.hpp. Referenced by btnCancelClick(), createControls(), Resume(), and Update(). |
|
Pause button.
Definition at line 72 of file dlgProgress.hpp. Referenced by btnCancelClick(), btnPauseClick(), createControls(), Resume(), and Update(). |
|
Parent top level window (may be NULL).
Definition at line 106 of file dlgProgress.hpp. Referenced by ReenableOtherWindows(). |
|
Progress bar.
Definition at line 66 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
Elapsed time.
Definition at line 68 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
Estimated time.
Definition at line 69 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
The message displayed.
Definition at line 67 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
Remaining time.
Definition at line 70 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
The maximum value.
Definition at line 108 of file dlgProgress.hpp. Referenced by createControls(), and Update(). |
|
Continue processing or not (return value for Update()).
Referenced by btnCancelClick(), btnPauseClick(), FrameClose(), isPaused(), Resume(), and Update(). |
|
Time when the dialog was created.
Definition at line 107 of file dlgProgress.hpp. Referenced by Update(). |
|
Disable all others windows (for wxPD_APP_MODAL case).
Definition at line 65 of file dlgProgress.hpp. Referenced by ReenableOtherWindows(). |