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

dlgMultiCheck Class Reference

Dialog which displays results of multiple files checking. More...

#include <dlgMultiCheck.hpp>

Inheritance diagram for dlgMultiCheck:

Inheritance graph
[legend]
Collaboration diagram for dlgMultiCheck:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void createControls ()
 Creates and initializes the controls of the dialog.

 dlgMultiCheck ()
 Creates a new dialog.

unsigned long getFileInChecksumsFile () const
 Gets the number of the current file in the current checksums' file.

unsigned long getFilesInChecksumsFile () const
 Gets the number of files in the current checksums' file.

unsigned long getFilesToCheck () const
 Gets the number of files to check.

unsigned long getFileToBeChecked () const
 Gets the number of the current checksum's file to be check.

BytesDisplayer getReadBytes () const
 Gets the number of bytes read of the current checked file in the current checked checksums' file.

BytesDisplayer getTotalBytes () const
 Gets the number of bytes of the current checked file in the current checked checksums' file.

void setFileInChecksumsFile (unsigned long nbInChecksumsFiles)
 Sets the number of the current file in the current checksums' file.

void setFilesInChecksumsFile (unsigned long nbTotalInChecksumsFiles)
 Sets the number of files in the current checksums' file.

void setFilesToCheck (unsigned long nbTotalChecksumsFiles)
 Sets the number of checksums' files to check.

void setFileToBeChecked (unsigned long nbChecksumsFiles)
 Sets the number of the current checksum's files to check.

void setReadBytes (const BytesDisplayer &bytes)
 Sets the number of bytes read of the current checked file in the current checked checksums' file.

void setTotalBytes (const BytesDisplayer &bytes)
 Sets the number of bytes of the current checked file in the current checked checksums' file.


Static Public Member Functions

void checkChecksumsFiles (const wxArrayString &files, wxWindow *parent=NULL)
 Checks multiple checksums' files.


Protected Member Functions

void btnCancelClick (wxCommandEvent &event)
 Processes button Cancel.

 dlgMultiCheck (wxWindow *parent)
 Creates a new dialog.

void updateCurrentCheckedFile ()
 Update the information of the current checked file.

void updateFilesInChecksumsFiles ()
 Update the information of the files in the checksums' files to be checked.

void updateTotalChecksumsFiles ()
 Update the information of the total of the checksums' files to be checked.


Static Protected Member Functions

void checkFile (const wxFileName &fileName, Checksum *cc, const wxString &checksum, dlgMultiCheck &dlgPrg, FilesStatistics &stats)
 Checks a file.


Protected Attributes

BytesDisplayer bytesRead
 Number of read bytes in the current checked file.

unsigned long fileChecked
 Number of the current file to be checked.

unsigned long fileInChecksumsFile
 Number of the current file in the current checksums' file.

unsigned long filesInChecksumsFile
 Number of files in the current checksums' file.

unsigned long filesToCheck
 Number of files to check.

wxGauge * gauChecksumFile
 Current file in checksums' file (gauge).

wxGauge * gauFile
 Current file (gauge).

wxGauge * gauTotal
 Current checksum file (gauge).

wxStaticText * lblChecksumFile
 Current file in checksums' file (number/total).

wxStaticText * lblFile
 Current file (bytes read/total).

wxStaticText * lblTotal
 Current checksum file (number/total).

BytesDisplayer totalBytes
 Number of bytes of the current checked file.


Detailed Description

Dialog which displays results of multiple files checking.

Definition at line 51 of file dlgMultiCheck.hpp.


Constructor & Destructor Documentation

dlgMultiCheck::dlgMultiCheck  ) 
 

Creates a new dialog.

Definition at line 262 of file dlgMultiCheck.cpp.

References createControls().

dlgMultiCheck::dlgMultiCheck wxWindow *  parent  )  [protected]
 

Creates a new dialog.

Parameters:
parent Parent of the dialog.

Definition at line 275 of file dlgMultiCheck.cpp.

References createControls(), AppPrefs::get(), and AppPrefs::readSize().


Member Function Documentation

void dlgMultiCheck::btnCancelClick wxCommandEvent &  event  )  [protected]
 

Processes button Cancel.

Parameters:
event The event's parameters

Reimplemented from dlgResultsProgress.

Definition at line 367 of file dlgMultiCheck.cpp.

References btnCancelClick(), AppPrefs::get(), dlgResultsProgress::getState(), and AppPrefs::write().

Referenced by btnCancelClick().

void dlgMultiCheck::checkChecksumsFiles const wxArrayString &  files,
wxWindow *  parent = NULL
[static]
 

Checks multiple checksums' files.

Parameters:
files List of the checksums' files to check.
parent Parent of the dialog that will be created.

Definition at line 690 of file dlgMultiCheck.cpp.

References dlgResultsProgress::addResultLine(), dlgMultiCheck::FilesStatistics::allAreCorrects(), dlgMultiCheck::FilesStatistics::allChecksumsFilesAreCorrects(), dlgResultsProgress::canContinue(), checkChecksumsFiles(), checkFile(), dlgMultiCheck::FilesStatistics::CKFullyIncorrect, dlgMultiCheck::FilesStatistics::CKInvalid, dlgMultiCheck::FilesStatistics::CKNotOpened, dlgMultiCheck::FilesStatistics::CKPartiallyCorrect, dlgMultiCheck::FilesStatistics::CKTotallyCorrect, dlgMultiCheck::FilesStatistics::FCorrect, dlgMultiCheck::FilesStatistics::FIncorrect, dlgResultsProgress::Finished(), dlgMultiCheck::FilesStatistics::FNotFound, dlgMultiCheck::FilesStatistics::FNotOpened, AppPrefs::get(), dlgMultiCheck::FilesStatistics::getCheckedFilesCount(), SumFile::getChecksumCalculator(), SumFile::getChecksumDataBegin(), SumFile::getChecksumDataCount(), SumFile::getChecksumDataEnd(), dlgMultiCheck::FilesStatistics::getChecksumsFilesChecked(), SumFile::getFileName(), dlgResultsProgress::getState(), AppPrefs::readBool(), dlgResultsProgress::removeLastResultLine(), dlgResultsProgress::replaceLastResultLine(), dlgMultiCheck::FilesStatistics::resetCkFiles(), setFileInChecksumsFile(), setFilesInChecksumsFile(), setFilesToCheck(), and setFileToBeChecked().

Referenced by checkChecksumsFiles().

void dlgMultiCheck::checkFile const wxFileName &  fileName,
Checksum cc,
const wxString &  checksum,
dlgMultiCheck dlgPrg,
FilesStatistics stats
[static, protected]
 

Checks a file.

Parameters:
fileName Name of the file to check.
cc Checksum calculator.
checksum Checksum of the file stored in the checksums' file.
dlgPrg Progress dialog to update.
stats Statistics on the files.

Definition at line 625 of file dlgMultiCheck.cpp.

References ChecksumFileCalculator::check(), checkFile(), dlgMultiCheck::FilesStatistics::FCorrect, dlgMultiCheck::FilesStatistics::FIncorrect, dlgMultiCheck::ChecksumProgress::finished(), dlgMultiCheck::FilesStatistics::FNotFound, dlgMultiCheck::FilesStatistics::FNotOpened, AppPrefs::get(), AppPrefs::readBool(), dlgResultsProgress::removeLastResultLine(), dlgResultsProgress::replaceLastResultLine(), wxCGetFileLength, and wxCOff_t.

Referenced by checkChecksumsFiles(), and checkFile().

void dlgMultiCheck::createControls  ) 
 

Creates and initializes the controls of the dialog.

Reimplemented from dlgResultsProgress.

Definition at line 306 of file dlgMultiCheck.cpp.

References CONTROL_SPACE, gauChecksumFile, gauFile, GAUGE_MAX, gauTotal, lblChecksumFile, lblFile, lblTotal, setFilesInChecksumsFile(), setFilesToCheck(), and setTotalBytes().

Referenced by dlgMultiCheck().

unsigned long dlgMultiCheck::getFileInChecksumsFile  )  const
 

Gets the number of the current file in the current checksums' file.

Returns:
The number of the current file in the current checksums' file.

Definition at line 467 of file dlgMultiCheck.cpp.

References fileInChecksumsFile.

Referenced by setFilesInChecksumsFile(), updateCurrentCheckedFile(), and updateFilesInChecksumsFiles().

unsigned long dlgMultiCheck::getFilesInChecksumsFile  )  const
 

Gets the number of files in the current checksums' file.

Returns:
The number of files in the current checksums' file.

Definition at line 439 of file dlgMultiCheck.cpp.

References filesInChecksumsFile.

Referenced by setFileInChecksumsFile(), setFilesInChecksumsFile(), updateCurrentCheckedFile(), and updateFilesInChecksumsFiles().

unsigned long dlgMultiCheck::getFilesToCheck  )  const
 

Gets the number of files to check.

Returns:
The number of files to check.

Definition at line 386 of file dlgMultiCheck.cpp.

References filesToCheck.

Referenced by setFilesToCheck(), setFileToBeChecked(), updateCurrentCheckedFile(), and updateTotalChecksumsFiles().

unsigned long dlgMultiCheck::getFileToBeChecked  )  const
 

Gets the number of the current checksum's file to be check.

Returns:
The number of the current checksum's file to be check.

Definition at line 414 of file dlgMultiCheck.cpp.

References fileChecked.

Referenced by setFilesToCheck(), updateCurrentCheckedFile(), and updateTotalChecksumsFiles().

BytesDisplayer dlgMultiCheck::getReadBytes  )  const
 

Gets the number of bytes read of the current checked file in the current checked checksums' file.

Returns:
The number of bytes read of the current checked file in the current checked checksums' file.

Definition at line 520 of file dlgMultiCheck.cpp.

References bytesRead.

Referenced by setTotalBytes(), and updateCurrentCheckedFile().

BytesDisplayer dlgMultiCheck::getTotalBytes  )  const
 

Gets the number of bytes of the current checked file in the current checked checksums' file.

Returns:
The number of bytes of the current checked file in the current checked checksums' file.

Definition at line 492 of file dlgMultiCheck.cpp.

References totalBytes.

Referenced by setReadBytes(), setTotalBytes(), and updateCurrentCheckedFile().

void dlgMultiCheck::setFileInChecksumsFile unsigned long  nbInChecksumsFiles  ) 
 

Sets the number of the current file in the current checksums' file.

Parameters:
nbInChecksumsFiles The number of the current file in the current checksums' file.

Definition at line 479 of file dlgMultiCheck.cpp.

References fileInChecksumsFile, getFilesInChecksumsFile(), setFileInChecksumsFile(), and updateFilesInChecksumsFiles().

Referenced by checkChecksumsFiles(), setFileInChecksumsFile(), and setFilesInChecksumsFile().

void dlgMultiCheck::setFilesInChecksumsFile unsigned long  nbTotalInChecksumsFiles  ) 
 

Sets the number of files in the current checksums' file.

Parameters:
nbTotalInChecksumsFiles The number of files in the current checksums' file.

Definition at line 451 of file dlgMultiCheck.cpp.

References filesInChecksumsFile, getFileInChecksumsFile(), getFilesInChecksumsFile(), setFileInChecksumsFile(), setFilesInChecksumsFile(), and updateFilesInChecksumsFiles().

Referenced by checkChecksumsFiles(), createControls(), and setFilesInChecksumsFile().

void dlgMultiCheck::setFilesToCheck unsigned long  nbTotalChecksumsFiles  ) 
 

Sets the number of checksums' files to check.

Parameters:
nbTotalChecksumsFiles Number of checksums' files to check.

Definition at line 398 of file dlgMultiCheck.cpp.

References filesToCheck, getFilesToCheck(), getFileToBeChecked(), setFilesToCheck(), setFileToBeChecked(), and updateTotalChecksumsFiles().

Referenced by checkChecksumsFiles(), createControls(), and setFilesToCheck().

void dlgMultiCheck::setFileToBeChecked unsigned long  nbChecksumsFiles  ) 
 

Sets the number of the current checksum's files to check.

Parameters:
nbChecksumsFiles The number of the current checksum's files to check.

Definition at line 426 of file dlgMultiCheck.cpp.

References fileChecked, getFilesToCheck(), setFileToBeChecked(), and updateTotalChecksumsFiles().

Referenced by checkChecksumsFiles(), setFilesToCheck(), and setFileToBeChecked().

void dlgMultiCheck::setReadBytes const BytesDisplayer bytes  ) 
 

Sets the number of bytes read of the current checked file in the current checked checksums' file.

Parameters:
bytes The number of bytes read of the current checked file in the current checked checksums' file.

Definition at line 532 of file dlgMultiCheck.cpp.

References bytesRead, getTotalBytes(), setReadBytes(), BytesDisplayer::toDouble(), and updateCurrentCheckedFile().

Referenced by dlgMultiCheck::ChecksumProgress::ChecksumProgress(), dlgMultiCheck::ChecksumProgress::finished(), setReadBytes(), setTotalBytes(), and dlgMultiCheck::ChecksumProgress::update().

void dlgMultiCheck::setTotalBytes const BytesDisplayer bytes  ) 
 

Sets the number of bytes of the current checked file in the current checked checksums' file.

Parameters:
bytes The number of bytes of the current checked file in the current checked checksums' file.

Definition at line 504 of file dlgMultiCheck.cpp.

References getReadBytes(), getTotalBytes(), setReadBytes(), setTotalBytes(), BytesDisplayer::toDouble(), totalBytes, and updateCurrentCheckedFile().

Referenced by dlgMultiCheck::ChecksumProgress::ChecksumProgress(), createControls(), and setTotalBytes().

void dlgMultiCheck::updateCurrentCheckedFile  )  [protected]
 

Update the information of the current checked file.

Definition at line 582 of file dlgMultiCheck.cpp.

References DGAUGE_MAX, gauChecksumFile, gauFile, gauTotal, getFileInChecksumsFile(), getFilesInChecksumsFile(), getFilesToCheck(), getFileToBeChecked(), getReadBytes(), getTotalBytes(), lblFile, dlgResultsProgress::refreshDialog(), and BytesDisplayer::toDouble().

Referenced by setReadBytes(), and setTotalBytes().

void dlgMultiCheck::updateFilesInChecksumsFiles  )  [protected]
 

Update the information of the files in the checksums' files to be checked.

Definition at line 562 of file dlgMultiCheck.cpp.

References DGAUGE_MAX, gauChecksumFile, getFileInChecksumsFile(), getFilesInChecksumsFile(), lblChecksumFile, and dlgResultsProgress::refreshDialog().

Referenced by setFileInChecksumsFile(), and setFilesInChecksumsFile().

void dlgMultiCheck::updateTotalChecksumsFiles  )  [protected]
 

Update the information of the total of the checksums' files to be checked.

Definition at line 543 of file dlgMultiCheck.cpp.

References DGAUGE_MAX, gauTotal, getFilesToCheck(), getFileToBeChecked(), lblTotal, and dlgResultsProgress::refreshDialog().

Referenced by setFilesToCheck(), and setFileToBeChecked().


Member Data Documentation

BytesDisplayer dlgMultiCheck::bytesRead [protected]
 

Number of read bytes in the current checked file.

Definition at line 90 of file dlgMultiCheck.hpp.

Referenced by getReadBytes(), and setReadBytes().

unsigned long dlgMultiCheck::fileChecked [protected]
 

Number of the current file to be checked.

Definition at line 86 of file dlgMultiCheck.hpp.

Referenced by getFileToBeChecked(), and setFileToBeChecked().

unsigned long dlgMultiCheck::fileInChecksumsFile [protected]
 

Number of the current file in the current checksums' file.

Definition at line 88 of file dlgMultiCheck.hpp.

Referenced by getFileInChecksumsFile(), and setFileInChecksumsFile().

unsigned long dlgMultiCheck::filesInChecksumsFile [protected]
 

Number of files in the current checksums' file.

Definition at line 87 of file dlgMultiCheck.hpp.

Referenced by getFilesInChecksumsFile(), and setFilesInChecksumsFile().

unsigned long dlgMultiCheck::filesToCheck [protected]
 

Number of files to check.

Definition at line 85 of file dlgMultiCheck.hpp.

Referenced by getFilesToCheck(), and setFilesToCheck().

wxGauge* dlgMultiCheck::gauChecksumFile [protected]
 

Current file in checksums' file (gauge).

Definition at line 72 of file dlgMultiCheck.hpp.

Referenced by createControls(), updateCurrentCheckedFile(), and updateFilesInChecksumsFiles().

wxGauge* dlgMultiCheck::gauFile [protected]
 

Current file (gauge).

Definition at line 74 of file dlgMultiCheck.hpp.

Referenced by createControls(), and updateCurrentCheckedFile().

wxGauge* dlgMultiCheck::gauTotal [protected]
 

Current checksum file (gauge).

Definition at line 70 of file dlgMultiCheck.hpp.

Referenced by createControls(), updateCurrentCheckedFile(), and updateTotalChecksumsFiles().

wxStaticText* dlgMultiCheck::lblChecksumFile [protected]
 

Current file in checksums' file (number/total).

Definition at line 71 of file dlgMultiCheck.hpp.

Referenced by createControls(), and updateFilesInChecksumsFiles().

wxStaticText* dlgMultiCheck::lblFile [protected]
 

Current file (bytes read/total).

Definition at line 73 of file dlgMultiCheck.hpp.

Referenced by createControls(), and updateCurrentCheckedFile().

wxStaticText* dlgMultiCheck::lblTotal [protected]
 

Current checksum file (number/total).

Definition at line 69 of file dlgMultiCheck.hpp.

Referenced by createControls(), and updateTotalChecksumsFiles().

BytesDisplayer dlgMultiCheck::totalBytes [protected]
 

Number of bytes of the current checked file.

Definition at line 89 of file dlgMultiCheck.hpp.

Referenced by getTotalBytes(), and setTotalBytes().


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