diff --git a/mainwindow.h b/mainwindow.h --- a/mainwindow.h +++ b/mainwindow.h @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include "portcontrol.h" #include "ui_about_dialog.h" @@ -80,7 +82,7 @@ private: DataArray dataX; // array that simply contains numbers 0..numberOfSamples QList channelsData; - // `data` contains channel specific data + // `data` contains i th channels data void addChannelData(unsigned int channel, DataArray data); NumberFormat numberFormat; @@ -92,10 +94,16 @@ private: bool skipByteRequested; + const int SPS_UPDATE_TIMEOUT = 1; // second + QLabel spsLabel; + unsigned int sampleCount; + QTimer spsTimer; + // demo QTimer demoTimer; int demoCount; bool isDemoRunning(); + QwtPlotTextLabel demoIndicator; QColor makeColor(unsigned int channelIndex); @@ -117,6 +125,8 @@ private slots: void clearPlot(); + void spsTimerTimeout(); + void demoTimerTimeout(); void enableDemo(bool enabled);