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