Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef EVENT_VIEWER_H
00022 #define EVENT_VIEWER_H
00023
00024 #ifdef HAVE_QWT
00025
00026 #ifdef _MSC_VER
00027 #define QWT_DLL
00028 #endif // _MSC_VER
00029
00030 #include <deque>
00031 #include <QTime>
00032
00033 #include "MainWindow.h"
00034 #include "../common/types.h"
00035
00036 class QwtPlot;
00037 class QDoubleSpinBox;
00038 class QPushButton;
00039 class QCheckBox;
00040 class QLabel;
00041
00042 namespace Aseba
00043 {
00046
00047 class EventViewer: public QWidget
00048 {
00049 Q_OBJECT
00050
00051 protected:
00052 unsigned eventId;
00053 MainWindow::EventViewers* eventsViewers;
00054 bool isCapturing;
00055 QwtPlot* plot;
00056 QLabel *status;
00057 QPushButton *pauseRunButton;
00058 QCheckBox *timeWindowCheckBox;
00059 QDoubleSpinBox *timeWindowLength;
00060
00061 std::vector<std::deque<sint16> > values;
00062 std::deque<double> timeStamps;
00063 QTime startingTime;
00064
00065 public:
00066 EventViewer(unsigned eventId, const QString& eventName, unsigned eventVariablesCount, MainWindow::EventViewers* eventsViewers);
00067 virtual ~EventViewer();
00068
00069 void detachFromMain() { eventsViewers=0; }
00070 void addData(const VariablesDataVector& data);
00071
00072 protected slots:
00073 void pauseRunCapture();
00074 void clearPlot();
00075 void saveToFile();
00076 };
00077
00079 };
00080
00081 #endif // HAVE_QWT
00082
00083 #endif // EVENT_VIEWER_H