SpikeStream Application Library  0.2
ProgressWidget.h
Go to the documentation of this file.
00001 #ifndef PROGRESSWIDGET_H
00002 #define PROGRESSWIDGET_H
00003 
00004 //Qt includes
00005 #include <QLabel>
00006 #include <QLayout>
00007 #include <QHash>
00008 #include <QProgressBar>
00009 #include <QWidget>
00010 #include <QMutex>
00011 
00012 namespace spikestream {
00013 
00016     class ProgressWidget : public QWidget {
00017                 Q_OBJECT
00018 
00019                 public:
00020                         ProgressWidget(QWidget* parent);
00021                         ~ProgressWidget();
00022                         void reset();
00023 
00024 
00025                 private slots:
00026                         void timeStepComplete(unsigned int timeStep);
00027                         void updateProgress(const QString& msg, unsigned int timeStep, unsigned int stepsCompleted, unsigned int totalSteps);
00028 
00029 
00030                 private:
00031                         //===================  VARIABLES  ======================
00033                         QHash<unsigned int, QProgressBar*> progressBarMap;
00034 
00036                         QHash<unsigned int, QLabel*> progressDetailsMap;
00037 
00039                         QGridLayout* gridLayout;
00040 
00042                         QMutex mutex;
00043 
00044 
00045                         //====================  METHODS  =======================
00046                         void addProgressBar(unsigned int timeStep, unsigned int stepsCompleted, unsigned int totalSteps);
00047     };
00048 
00049 }
00050 
00051 #endif//PROGRESSWIDGET_H
 All Classes Files Functions Variables Typedefs Friends Defines