#include <dlgResProg.hpp>
Inheritance diagram for dlgResultsProgress:
Public Types | |
enum | State { running = 1, paused, canceled, finished } |
States of the dialog. More... | |
Public Member Functions | |
void | addResultLine (const wxString &text, const unsigned int indentation=0, const wxColour &colour=*wxBLACK) |
Adds a line to the results. | |
virtual bool | canContinue () const |
Says if the process can continue. | |
void | createControls () |
Creates and initializes the controls of the dialog. | |
dlgResultsProgress (wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=wxT("ResultsProgressDialog")) | |
Creates a new dialog. | |
dlgResultsProgress () | |
Creates a new dialog. | |
void | Finished () |
Says to the dialog that the process is finished. | |
State | getState () const |
Gets the dialog state. | |
void | removeLastResultLine () |
Remove the last inserted result line. | |
void | replaceLastResultLine (const wxString &text, const unsigned int indentation=0, const wxColour &colour=*wxBLACK) |
Replace the last inserted result line. | |
virtual bool | Show (bool show=true) |
Hides or shows the dialog. | |
virtual | ~dlgResultsProgress () |
The class descructor. | |
Protected Types | |
enum | { TXT_RESULTS = wxID_HIGHEST + 1, BTN_PAUSE } |
Controls IDs. 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 others windows. | |
void | refreshDialog () |
Refreshes the dialog. | |
void | setState (State newState) |
Sets the dialog state. | |
virtual void | Update () |
Virtual function hiding supression. | |
Static Protected Member Functions | |
wxColour | getColour (PreferencesKeys pk) |
Gets a colour from the preferences. | |
Protected Attributes | |
wxButton * | btnCancel |
Cancel and close button. | |
wxButton * | btnPause |
Pause button. | |
wxBoxSizer * | infoSizer |
Sizer where informatives controls should be added. | |
long | lastInsertedPos |
Last inserted position. | |
long | lastInsertedWidth |
Last inserted width. | |
State | state |
Dialog state. | |
wxTextCtrl * | txtResults |
Text control used to display results. | |
wxWindowDisabler * | winDisabler |
Disable all others windows. |
To use it, follow these steps:
Definition at line 54 of file dlgResProg.hpp.
|
Controls IDs.
Definition at line 93 of file dlgResProg.hpp. |
|
States of the dialog.
Definition at line 111 of file dlgResProg.hpp. Referenced by getState(). |
|
Creates a new dialog.
Definition at line 57 of file dlgResProg.cpp. |
|
Creates a new dialog.
Definition at line 83 of file dlgResProg.cpp. References createControls(), lastInsertedPos, lastInsertedWidth, setState(), and winDisabler. |
|
The class descructor.
Definition at line 153 of file dlgResProg.cpp. References reenableOtherWindows(). |
|
Adds a line to the results.
Definition at line 343 of file dlgResProg.cpp. References addResultLine(), lastInsertedPos, lastInsertedWidth, and txtResults. Referenced by addResultLine(), dlgBatchCreation::batchCreation(), dlgMultiCheck::checkChecksumsFiles(), and dlgBatchCreation::saveChecksumsInFiles(). |
|
Processes button Cancel.
Reimplemented in dlgBatchCreation, and dlgMultiCheck. Definition at line 184 of file dlgResProg.cpp. References btnCancel, btnCancelClick(), btnPause, getState(), and setState(). Referenced by btnCancelClick(). |
|
Processes button Pause.
Definition at line 211 of file dlgResProg.cpp. References btnPause, btnPauseClick(), getState(), and setState(). Referenced by btnPauseClick(). |
|
Says if the process can continue. If the state of the dialog is canceled or finished the checking can't continue.
Definition at line 435 of file dlgResProg.cpp. References getState(). Referenced by dlgBatchCreation::batchCreation(), and dlgMultiCheck::checkChecksumsFiles(). |
|
Creates and initializes the controls of the dialog.
Reimplemented in dlgBatchCreation, and dlgMultiCheck. Definition at line 112 of file dlgResProg.cpp. References btnCancel, btnPause, CONTROL_SPACE, infoSizer, and txtResults. Referenced by dlgResultsProgress(). |
|
Says to the dialog that the process is finished. Sets the state to "finished" and change the caption of the Cancel button to "Close". Definition at line 271 of file dlgResProg.cpp. References btnCancel, btnPause, and setState(). Referenced by dlgBatchCreation::batchCreation(), and dlgMultiCheck::checkChecksumsFiles(). |
|
Event handler to respond to system close events.
Definition at line 237 of file dlgResProg.cpp. References FrameClose(), getState(), and setState(). Referenced by FrameClose(). |
|
Gets a colour from the preferences.
Definition at line 460 of file dlgResProg.cpp. References AppPrefs::get(), getColour(), longTowxColour(), and AppPrefs::readLong(). Referenced by getColour(). |
|
Gets the dialog state.
Definition at line 291 of file dlgResProg.cpp. Referenced by dlgBatchCreation::batchCreation(), btnCancelClick(), dlgMultiCheck::btnCancelClick(), dlgBatchCreation::btnCancelClick(), btnPauseClick(), canContinue(), dlgMultiCheck::checkChecksumsFiles(), FrameClose(), dlgMultiCheck::ChecksumProgress::update(), and dlgBatchCreation::ChecksumProgress::update(). |
|
Reenables the others windows. Must be called to reenable the other windows temporarily disabled while the dialog was shown. Definition at line 254 of file dlgResProg.cpp. References winDisabler. Referenced by Show(), and ~dlgResultsProgress(). |
|
Refreshes the dialog. Should be called on each update of a control on the dialog. Definition at line 324 of file dlgResProg.cpp. Referenced by dlgMultiCheck::updateCurrentCheckedFile(), dlgBatchCreation::updateCurrentProcessedFile(), dlgMultiCheck::updateFilesInChecksumsFiles(), dlgMultiCheck::updateTotalChecksumsFiles(), and dlgBatchCreation::updateTotalFiles(). |
|
Remove the last inserted result line.
Definition at line 405 of file dlgResProg.cpp. References lastInsertedPos, lastInsertedWidth, and txtResults. Referenced by dlgMultiCheck::checkChecksumsFiles(), and dlgMultiCheck::checkFile(). |
|
Replace the last inserted result line.
Definition at line 374 of file dlgResProg.cpp. References lastInsertedPos, lastInsertedWidth, replaceLastResultLine(), and txtResults. Referenced by dlgMultiCheck::checkChecksumsFiles(), dlgMultiCheck::checkFile(), and replaceLastResultLine(). |
|
Sets the dialog state.
Definition at line 303 of file dlgResProg.cpp. References setState(), and state. Referenced by btnCancelClick(), btnPauseClick(), dlgResultsProgress(), Finished(), FrameClose(), and setState(). |
|
Hides or shows the dialog.
Definition at line 166 of file dlgResProg.cpp. References reenableOtherWindows(), and Show(). Referenced by Show(). |
|
Virtual function hiding supression.
Definition at line 156 of file dlgResProg.hpp. |
|
Cancel and close button.
Definition at line 78 of file dlgResProg.hpp. Referenced by btnCancelClick(), createControls(), and Finished(). |
|
Pause button.
Definition at line 79 of file dlgResProg.hpp. Referenced by btnCancelClick(), btnPauseClick(), createControls(), and Finished(). |
|
Sizer where informatives controls should be added.
Definition at line 81 of file dlgResProg.hpp. Referenced by createControls(). |
|
Last inserted position.
Definition at line 141 of file dlgResProg.hpp. Referenced by addResultLine(), dlgResultsProgress(), removeLastResultLine(), and replaceLastResultLine(). |
|
Last inserted width.
Definition at line 142 of file dlgResProg.hpp. Referenced by addResultLine(), dlgResultsProgress(), removeLastResultLine(), and replaceLastResultLine(). |
|
Dialog state.
Definition at line 120 of file dlgResProg.hpp. Referenced by getState(), and setState(). |
|
Text control used to display results.
Definition at line 80 of file dlgResProg.hpp. Referenced by addResultLine(), createControls(), removeLastResultLine(), and replaceLastResultLine(). |
|
Disable all others windows.
Definition at line 77 of file dlgResProg.hpp. Referenced by dlgResultsProgress(), and reenableOtherWindows(). |