27 #include "../../../core/translator/Translator.h" 34 #include <QtCore/QCoreApplication> 35 #include <QApplication> 39 : m_totalSteps(0), m_currentStep(0), m_propStep(0), m_message(
"")
60 m_tasks.insert(std::map<int, te::common::TaskProgress*>::value_type(
id, t));
69 std::map<int, te::common::TaskProgress*>::iterator it =
m_tasks.find(taskId);
87 QCoreApplication::processEvents();
93 std::map<int, te::common::TaskProgress*>::iterator it =
m_tasks.find(taskId);
131 std::map<int, te::common::TaskProgress*>::iterator it;
133 double currentStep = 0;
136 currentStep += it->second->getCurrentStep();
140 double aux =
static_cast<double>(currentStep) / static_cast<double>(
m_totalSteps);
142 int val =
static_cast<int>(100.0 * aux);
150 QCoreApplication::processEvents();
167 QCoreApplication::processEvents();
174 m_dlgProgress->setValue(static_cast<ProgressSetValueEvent*>(e)->m_value);
180 m_dlgProgress->setLabelText(static_cast<ProgressSetMessageEvent*>(e)->m_value.c_str());
192 std::map<int, te::common::TaskProgress*>::iterator it =
m_tasks.begin();
196 it->second->cancel();
The ProgressSetValueEvent is a custom event used to set a new value into a progress bar...
This class can be used to inform the progress of a task.
A custom event used to set a new message into a progress bar.
#define TE_TR(message)
It marks a string in order to get translated.
The ProgressResetEvent is a custom event used to reset a progress bar.