27 #include "../../../core/translator/Translator.h" 34 #include <QtCore/QCoreApplication> 35 #include <QApplication> 55 m_layout->setContentsMargins(0, 0, 0, 0);
67 m_tasks.insert(std::map<int, te::common::TaskProgress*>::value_type(
id, t));
74 std::map<int, te::common::TaskProgress*>::iterator it =
m_tasks.find(taskId);
91 QCoreApplication::processEvents();
97 std::map<int, te::common::TaskProgress*>::iterator it =
m_tasks.find(taskId);
130 double currentStep = 0;
132 std::map<int, te::common::TaskProgress*>::iterator it;
135 currentStep += it->second->getCurrentStep();
139 double aux =
static_cast<double>(currentStep) / static_cast<double>(
m_totalSteps);
141 int val =
static_cast<int>(100.0 * aux);
147 QCoreApplication::processEvents();
164 m_progressBar->setValue(static_cast<ProgressSetValueEvent*>(e)->m_value);
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.
The ProgressResetEvent is a custom event used to reset a progress bar.
A class that defines the interface of a qt bar progress viewer.