Qwt User's Guide 6.3.0
|
A thread collecting samples at regular intervals. More...
#include <qwt_sampling_thread.h>
Public Slots | |
void | setInterval (double interval) |
void | stop () |
Public Member Functions | |
virtual | ~QwtSamplingThread () |
Destructor. | |
double | interval () const |
double | elapsed () const |
Protected Member Functions | |
QwtSamplingThread (QObject *parent=NULL) | |
Constructor. | |
virtual void | run () override |
virtual void | sample (double elapsed)=0 |
A thread collecting samples at regular intervals.
Continuous signals are converted into a discrete signal by collecting samples at regular intervals. A discrete signal can be displayed by a QwtPlotSeriesItem on a QwtPlot widget.
QwtSamplingThread starts a thread calling periodically sample(), to collect and store ( or emit ) a single sample.
Definition at line 28 of file qwt_sampling_thread.h.
|
virtual |
Destructor.
Definition at line 29 of file qwt_sampling_thread.cpp.
|
explicitprotected |
Constructor.
Definition at line 21 of file qwt_sampling_thread.cpp.
double QwtSamplingThread::elapsed | ( | ) | const |
Definition at line 62 of file qwt_sampling_thread.cpp.
double QwtSamplingThread::interval | ( | ) | const |
Definition at line 53 of file qwt_sampling_thread.cpp.
|
overrideprotectedvirtual |
Loop collecting samples started from QThread::start()
Definition at line 83 of file qwt_sampling_thread.cpp.
|
protectedpure virtual |
Collect a sample
elapsed | Time since the thread was started in seconds |
|
slot |
Change the interval (in ms), when sample() is called. The default interval is 1000.0 ( = 1s )
msecs | Interval |
Definition at line 41 of file qwt_sampling_thread.cpp.
|
slot |
Terminate the collecting thread
Definition at line 74 of file qwt_sampling_thread.cpp.