26 #ifndef __TERRALIB_COMMON_PROGRESS_INTERNAL_TASKPROGRESS_H
27 #define __TERRALIB_COMMON_PROGRESS_INTERNAL_TASKPROGRESS_H
30 #include "../Config.h"
69 TaskProgress(
const std::string& message =
"",
unsigned int type = UNDEFINED,
int totalSteps = 0);
The ProgressTimer is a utility class that can be used to calculate the estimated time to finish a tas...
This class can be used to inform the progress of a task.
bool m_useTimer
Flag used to indicate the timer status.
int m_currentStep
Task current step.
bool m_hasToUpdate
Flag used to indicate the update status.
void setTotalSteps(int value)
Set the task total stepes.
int getCurrentStep() const
Get the task current step.
ProgressTimer * m_timer
Progress timer instance.
unsigned int m_type
Task type.
unsigned int getType() const
Get the task type.
int getTotalSteps() const
Get the task total stepes.
TaskProgress(const std::string &message="", unsigned int type=UNDEFINED, int totalSteps=0)
Default constructor.
bool m_isMultiThread
Flag used to indicate the thread mode.
void useTimer(bool flag)
Used to define if task use progress timer information.
bool m_isActive
Flag used to indicate the task status.
void setCurrentStep(int value)
Set the task current step.
void setMessage(const std::string &message)
Set the task message.
int m_currentPropStep
Current proportinal step.
int getId() const
Get the task identification.
std::string m_message
Task message.
int getProportionalValue() const
Get the proportional value (value between 0 and 100).
bool isActive() const
Verify if the task is active.
bool hasToUpdate() const
This function is used when proportional value has changed.
const std::string & getMessage() const
Get the task message.
int m_id
Task identification.
void cancel()
Cancel task, set the task active FALSE.
int m_totalSteps
Task total steps.
void useMultiThread(bool flag)
Used to define if task is running in thread mode.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
~TaskProgress()
Destructor.
#define TECOMMONEXPORT
You can use this macro in order to export/import classes and functions from this module.