Changeset 212

Show
Ignore:
Timestamp:
02/07/08 15:57:30 (4 years ago)
Author:
uncle_fungus
Message:

doxygenated progressManager

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.3.2beta3/src/include/progressManager.h

    r38 r212  
    1515*/ 
    1616 
     17/** 
     18 * \file progressManager.h 
     19 * Manages progress bar. 
     20 * \author François Ingelrest 
     21 * \author Andrew Schofield 
     22 **/ 
     23 
    1724#ifndef _PROGRESSMANAGER_H 
    1825#define _PROGRESSMANAGER_H 
     
    2229 
    2330 
    24 // This class displays some progress information to the user, thanks to a wxProgressDialog 
    25 // 
    26 // It is easier to use when different tasks have to be performed, because each of them does not have to 
    27 // know the percentage of work they represent compared to the total work to be done 
    28 // 
    29 // It is also easier to use in the case where a method will sometimes not display its progress (silent mode) 
    30 // Thus, the test does not have to be done in the method itself, making it clearer to read (and to write) 
     31/** 
     32 * Progress management class. 
     33 * This class displays some progress information to the user, thanks to a wxProgressDialog 
     34 * 
     35 * It is easier to use when different tasks have to be performed, because each of them does not have to 
     36 * know the percentage of work they represent compared to the total work to be done 
     37 * 
     38 * It is also easier to use in the case where a method will sometimes not display its progress (silent mode) 
     39 * Thus, the test does not have to be done in the method itself, making it clearer to read (and to write). 
     40 **/ 
    3141class ProgressManager 
    3242{ 
    3343protected: 
    34         bool              mIsInSilentMode; 
    35         bool              mIsATaskActive; 
    36         wxUint32          mCurrentProgress; 
    37         wxUint32          mTaskCurrentProgress; 
    38         wxUint32          mTaskPercentageOfTotal; 
    39         wxString          mCurrentText; 
    40         wxProgressDialog *mProgressDlg; 
     44        bool              mIsInSilentMode; /**< Is manager in silent mode */ 
     45        bool              mIsATaskActive; /**< Is a task active */ 
     46        wxUint32          mCurrentProgress; /**< Current overall progress */ 
     47        wxUint32          mTaskCurrentProgress;  /**< Current task progress */ 
     48        wxUint32          mTaskPercentageOfTotal; /**< How much task is worth */ 
     49        wxString          mCurrentText; /**< Text value */ 
     50        wxProgressDialog *mProgressDlg; /**< Progress Dialog object */ 
    4151 
    4252 
    4353public: 
     54        /** 
     55         * Constructor. 
     56         * 
     57         * If silent mode is on, future calls to methods won't do anything. 
     58         **/ 
    4459        ProgressManager(bool isInSilentMode); 
     60 
     61        /** 
     62         * Destructor. 
     63         **/ 
    4564        ~ProgressManager(void); 
    4665 
     66        /** 
     67         * Change the displayed text. 
     68         * 
     69         * Return false if the user wants to cancel the process 
     70         * @param text The text to set. 
     71         **/ 
    4772        bool SetText(const wxString& text); 
     73 
     74        /** 
     75         * Change the displayed progress. 
     76         * 
     77         * Return false if the user wants to cancel the process 
     78         * @param progress The progress to set. 
     79         **/ 
    4880        bool SetProgress(wxUint32 progress); 
     81 
     82        /** 
     83         * Change both text and progress, 
     84         * This is the same as calling SetText() and SetProgress() 
     85         * 
     86         * Return false if the user wants to cancel the process. 
     87         * @param text The text to set. 
     88         * @param progress The progress to set. 
     89         **/ 
    4990        bool SetTextAndProgress(const wxString& text, wxUint32 progress); 
    5091 
     92        /** 
     93         * A task is represented by the percentage of the total work it represents. 
     94         * Only one task can be active at a time (EndTask() must be called before calling CreateTask() a second time) 
     95         * @param percentageOfTotal How much the task is worth. 
     96         **/ 
    5197        void CreateTask(wxUint32 percentageOfTotal); 
     98 
     99        /** 
     100         * End a task previously created with CreateTask(). 
     101         **/ 
    52102        void EndTask(void); 
    53103}; 
  • branches/2.3.2beta3/src/progressManager.cpp

    r148 r212  
    1515*/ 
    1616 
     17/** 
     18 * \file progressManager.cpp 
     19 * Manages progress bar. 
     20 * \author François Ingelrest 
     21 * \author Andrew Schofield 
     22 **/ 
     23 
    1724#include "fahmon.h" 
    1825#include "progressManager.h" 
     
    2229 
    2330 
    24 /** 
    25 * Constructor 
    26 * 
    27 * If silent mode is on, future calls to methods won't do anything 
    28 **/ 
    2931ProgressManager::ProgressManager(bool isInSilentMode) 
    3032{ 
     
    4648 
    4749 
    48 /** 
    49 * Destructor 
    50 **/ 
    5150ProgressManager::~ProgressManager(void) 
    5251{ 
     
    5857 
    5958 
    60 /** 
    61 * Change the displayed text 
    62 * 
    63 * Return false if the user wants to cancel the process 
    64 **/ 
    6559bool ProgressManager::SetText(const wxString& text) 
    6660{ 
     
    9488 
    9589 
    96 /** 
    97 * Change the displayed progress 
    98 * 
    99 * Return false if the user wants to cancel the process 
    100 **/ 
    10190bool ProgressManager::SetProgress(wxUint32 progress) 
    10291{ 
     
    134123 
    135124 
    136 /** 
    137 * Change both text and progress 
    138 * This is the same as calling SetText() and SetProgress() 
    139 * 
    140 * Return false if the user wants to cancel the process 
    141 **/ 
    142125bool ProgressManager::SetTextAndProgress(const wxString& text, wxUint32 progress) 
    143126{ 
     
    152135 
    153136 
    154 /** 
    155 * A task is represented by the percentage of the total work it represents 
    156 * Only one task can be active at a time (EndTask() must be called before calling CreateTask() a second time) 
    157 **/ 
    158137void ProgressManager::CreateTask(wxUint32 percentageOfTotal) 
    159138{ 
     
    171150 
    172151 
    173 /** 
    174 * End a task previously created with CreateTask() 
    175 **/ 
    176152void ProgressManager::EndTask(void) 
    177153{