Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ChecksumsListView::ChecksumProgress Class Reference

Displays the progression of the process of computing of a checksum. More...

Inheritance diagram for ChecksumsListView::ChecksumProgress:

Inheritance graph
[legend]
Collaboration diagram for ChecksumsListView::ChecksumProgress:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ChecksumProgress (const wxString &message, const wxString &title, wxWindow *parent, const BytesDisplayer &total)
 Constructor.

void finished ()
 Indicates that the process is finished (hides the progress dialog).

wxString getFileName () const
 Gets the current file that is processed.

void setFileName (const wxString &curFileName)
 Sets the current file that is processed.

virtual void update (size_t read, bool &canceled)
 Updates the progression of the computing of a checksum.

virtual ~ChecksumProgress ()
 Destructor.


Protected Member Functions

 ChecksumProgress ()
 Default constructor. Don't call it.

void init ()
 Initializes the instance.


Protected Attributes

wxDateTime ct
 Current time.

BytesDisplayer current
 numbers of preceeded bytes.

double dTotal
 Total of bytes to process.

wxString fileName
 Name of the current file.

wxDateTime lt
 Last saved time.

int maxProgress
 Maximal value of the progress dialog.

double maxProgressD
 Maximal value of the progress dialog (double).

int maxProgressM1
 Maximal value of the progress dialog - 1.

wxString msg
 Message to display.

int p
 Progress in .

dlgProgressprogress
 Progress dialog.

wxString sTotal
 Total of bytes to process.

wxTimeSpan timeSpan
 Time between to updates of the progress dialog.


Detailed Description

Displays the progression of the process of computing of a checksum.

Definition at line 184 of file lvwSums.cpp.


Constructor & Destructor Documentation

ChecksumsListView::ChecksumProgress::ChecksumProgress  )  [inline, protected]
 

Default constructor. Don't call it.

Definition at line 202 of file lvwSums.cpp.

References init().

ChecksumsListView::ChecksumProgress::ChecksumProgress const wxString &  message,
const wxString &  title,
wxWindow *  parent,
const BytesDisplayer total
 

Constructor.

Parameters:
message Message that will be displayed in the progress dialog. It should have the following from : "Proceeding %s, %s on %s read."
title Title of the progress dialog.
parent Parent of the progress dialog.
total Total of bytes to process.

Definition at line 249 of file lvwSums.cpp.

References dTotal, init(), lt, maxProgress, maxProgressD, maxProgressM1, msg, progress, sTotal, timeSpan, BytesDisplayer::toDouble(), BytesDisplayer::toString(), and UPDATE_PROGRESS_DLG.

ChecksumsListView::ChecksumProgress::~ChecksumProgress  )  [virtual]
 

Destructor.

Reimplemented from ChecksumProgress.

Definition at line 270 of file lvwSums.cpp.

References progress.


Member Function Documentation

void ChecksumsListView::ChecksumProgress::finished  ) 
 

Indicates that the process is finished (hides the progress dialog).

Definition at line 313 of file lvwSums.cpp.

References maxProgress, progress, and dlgProgress::Update().

Referenced by ChecksumsListView::addFiles(), ChecksumsListView::check(), and ChecksumsListView::recompute().

wxString ChecksumsListView::ChecksumProgress::getFileName  )  const
 

Gets the current file that is processed.

Returns:
The current file that is processed.

Definition at line 325 of file lvwSums.cpp.

References fileName.

void ChecksumsListView::ChecksumProgress::init  )  [protected]
 

Initializes the instance.

Definition at line 232 of file lvwSums.cpp.

References progress.

Referenced by ChecksumProgress().

void ChecksumsListView::ChecksumProgress::setFileName const wxString &  curFileName  ) 
 

Sets the current file that is processed.

Parameters:
curFileName New name of the current file which is processed.

Definition at line 337 of file lvwSums.cpp.

References fileName, and setFileName().

Referenced by ChecksumsListView::addFiles(), ChecksumsListView::check(), ChecksumsListView::recompute(), and setFileName().

void ChecksumsListView::ChecksumProgress::update size_t  read,
bool &  canceled
[virtual]
 

Updates the progression of the computing of a checksum.

Parameters:
read Number of bytes read.
canceled Set it to true if the user want to cancel the calculation. The caller should call it with its value set to false.

Implements ChecksumProgress.

Definition at line 289 of file lvwSums.cpp.

References ct, current, dTotal, fileName, dlgProgress::isPaused(), lt, maxProgress, maxProgressD, maxProgressM1, msg, p, progress, sTotal, timeSpan, BytesDisplayer::toDouble(), BytesDisplayer::toString(), dlgProgress::Update(), and update().

Referenced by update().


Member Data Documentation

wxDateTime ChecksumsListView::ChecksumProgress::ct [protected]
 

Current time.

Definition at line 195 of file lvwSums.cpp.

Referenced by update().

BytesDisplayer ChecksumsListView::ChecksumProgress::current [protected]
 

numbers of preceeded bytes.

Definition at line 189 of file lvwSums.cpp.

Referenced by update().

double ChecksumsListView::ChecksumProgress::dTotal [protected]
 

Total of bytes to process.

Definition at line 190 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

wxString ChecksumsListView::ChecksumProgress::fileName [protected]
 

Name of the current file.

Definition at line 187 of file lvwSums.cpp.

Referenced by getFileName(), setFileName(), and update().

wxDateTime ChecksumsListView::ChecksumProgress::lt [protected]
 

Last saved time.

Definition at line 194 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

int ChecksumsListView::ChecksumProgress::maxProgress [protected]
 

Maximal value of the progress dialog.

Definition at line 197 of file lvwSums.cpp.

Referenced by ChecksumProgress(), finished(), and update().

double ChecksumsListView::ChecksumProgress::maxProgressD [protected]
 

Maximal value of the progress dialog (double).

Definition at line 199 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

int ChecksumsListView::ChecksumProgress::maxProgressM1 [protected]
 

Maximal value of the progress dialog - 1.

Definition at line 198 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

wxString ChecksumsListView::ChecksumProgress::msg [protected]
 

Message to display.

Definition at line 188 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

int ChecksumsListView::ChecksumProgress::p [protected]
 

Progress in .

Definition at line 192 of file lvwSums.cpp.

Referenced by update().

dlgProgress* ChecksumsListView::ChecksumProgress::progress [protected]
 

Progress dialog.

Definition at line 196 of file lvwSums.cpp.

Referenced by ChecksumProgress(), finished(), init(), update(), and ~ChecksumProgress().

wxString ChecksumsListView::ChecksumProgress::sTotal [protected]
 

Total of bytes to process.

Definition at line 191 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().

wxTimeSpan ChecksumsListView::ChecksumProgress::timeSpan [protected]
 

Time between to updates of the progress dialog.

Definition at line 193 of file lvwSums.cpp.

Referenced by ChecksumProgress(), and update().


The documentation for this class was generated from the following file:
Generated on Sun May 30 13:38:03 2004 for wxChecksums by doxygen 1.3.7