source: ntrip/trunk/BNC/qwt/qwt_sampling_thread.h@ 8450

Last change on this file since 8450 was 8127, checked in by stoecker, 8 years ago

update qwt and qwtpolar, many QT5 fixes (unfinished)

File size: 1.1 KB
RevLine 
[4271]1#ifndef _QWT_SAMPLING_THREAD_H_
2#define _QWT_SAMPLING_THREAD_H_
3
4#include "qwt_global.h"
5#include <qthread.h>
6
7/*!
8 \brief A thread collecting samples at regular intervals.
9
[8127]10 Continuous signals are converted into a discrete signal by
[4271]11 collecting samples at regular intervals. A discrete signal
12 can be displayed by a QwtPlotSeriesItem on a QwtPlot widget.
13
[8127]14 QwtSamplingThread starts a thread calling periodically sample(),
[4271]15 to collect and store ( or emit ) a single sample.
16
17 \sa QwtPlotCurve, QwtPlotSeriesItem
18*/
19class QWT_EXPORT QwtSamplingThread: public QThread
20{
21 Q_OBJECT
22
23public:
24 virtual ~QwtSamplingThread();
25
26 double interval() const;
27 double elapsed() const;
28
29public Q_SLOTS:
30 void setInterval( double interval );
31 void stop();
32
33protected:
34 explicit QwtSamplingThread( QObject *parent = NULL );
35
36 virtual void run();
37
38 /*!
39 Collect a sample
40
[8127]41 \param elapsed Time since the thread was started in milliseconds
[4271]42 */
43 virtual void sample( double elapsed ) = 0;
44
45private:
46 class PrivateData;
47 PrivateData *d_data;
48};
49
50#endif
Note: See TracBrowser for help on using the repository browser.