00001
00002 #include <qapp.h>
00003 #include <qwidget.h>
00004 #include <qwt_plot.h>
00005 #include <qwt_math.h>
00006 extern "C"
00007 {
00008 #include <stdlib.h>
00009 }
00010
00011 const int PLOT_SIZE = 201;
00012
00013 class plotDemo : public QWidget
00014 {
00015 public:
00016 plotDemo(QWidget *parent, const char *name, WFlags f);
00017 ~plotDemo();
00018
00019 private:
00020 QwtPlot *plot;
00021 int tid;
00022 double x[PLOT_SIZE], x2[PLOT_SIZE], y[PLOT_SIZE], z[PLOT_SIZE], err[PLOT_SIZE];
00023
00024 protected:
00025 void resizeEvent(QResizeEvent *e);
00026 void timerEvent(QTimerEvent *e);
00027 };
00028