4 #include "../../src/terralib/Defines.h" 12 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 17 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 21 #define TOTAL_STEPS 3000 25 #define TOTAL_STEPS_INTERNAL 500 31 this->setWindowTitle(
"Qt Progress Bar Test");
37 m_statusBar->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
39 QSpacerItem* spacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Expanding);
58 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 59 omp_set_num_threads(omp_get_num_procs());
86 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 99 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 100 #pragma omp parallel for 106 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 108 std::cout <<
"Thread: " << omp_get_thread_num() <<
" i: " << i <<
" total: " << TOTAL_STEPS << std::endl;
122 #if TE_PLATFORM == TE_PLATFORMCODE_MSWINDOWS 124 std::cout <<
"Thread: " << omp_get_thread_num() <<
" j: " << j <<
" total: " << TOTAL_STEPS_INTERNAL << std::endl;
127 taskInternal.
pulse();
te::qt::widgets::ProgressViewerDialog * m_dlgViewer
void setMessage(const std::string &message)
Set the task message.
This class can be used to inform the progress of a task.
A singleton class used to manage tasks progresses and their viewers.
void useTimer(bool flag)
Used to define if task use progress timer information.
QPushButton * m_progressThreadPushButton
This class can be used to inform the progress of a task.
QPushButton * m_progressPushButton
QGridLayout * m_mainLayout
bool isActive() const
Verify if the task is active.
DummyWindow(QWidget *parent=0)
void setTotalSteps(int value)
Set the task total stepes.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
te::qt::widgets::ProgressViewerWidget * m_widgetViewer
void showThreadProgressBar()
#define TOTAL_STEPS_INTERNAL
te::qt::widgets::ProgressViewerBar * m_barViewer