All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <LoopProgressWidget.h>
Public Member Functions | |
LoopProgressWidget (QWidget *parent=0) | |
void | setLoop (ParallelLoop *loop) |
~LoopProgressWidget () |
Brief description of class still missing.
Full description of class still missing
QGpGuiTools::LoopProgressWidget::LoopProgressWidget | ( | QWidget * | parent = 0 | ) |
void QGpGuiTools::LoopProgressWidget::setLoop | ( | ParallelLoop * | loop | ) |
References QGpGuiTools::Application::instance(), QGpCoreTools::CoreApplicationPrivate::maximumThreadCount(), TRACE, and w.
{ TRACE; // Clear all progress widgets delete widget(); _labelList.clear(); _progressList.clear(); // Create new ones QWidget * w=new QWidget(this); QVBoxLayout * layout=new QVBoxLayout(w); setWidget(w); // We setup the maximum number of possible parallel threads // Effectively some of them might not start according to system load int nProgress=Application::instance()->maximumThreadCount(); for(int i=0; i<nProgress; i++ ) { QLabel * l=new QLabel(w); _labelList.append(l); layout->addWidget(l); QProgressBar * p=new QProgressBar(w); _progressList.append(p); layout->addWidget(p); connect(loop, SIGNAL(statusChanged(int, QString)), this, SLOT(setStatus(int, QString))); connect(loop, SIGNAL(progressInit(int, int)), this, SLOT(initProgress(int, int))); connect(loop, SIGNAL(progressChanged(int, int)), this, SLOT(setProgress(int, int))); } layout->addStretch(); }