.TH "QwtSamplingThread" 3 "Mon Jun 1 2020" "Version 6.1.5" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtSamplingThread \- A thread collecting samples at regular intervals\&.  

.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_sampling_thread\&.h>\fP
.PP
Inherits QThread\&.
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBsetInterval\fP (double \fBinterval\fP)"
.br
.ti -1c
.RI "void \fBstop\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "virtual \fB~QwtSamplingThread\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "double \fBinterval\fP () const"
.br
.ti -1c
.RI "double \fBelapsed\fP () const"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtSamplingThread\fP (QObject *parent=NULL)"
.br
.RI "Constructor\&. "
.ti -1c
.RI "virtual void \fBrun\fP ()"
.br
.ti -1c
.RI "virtual void \fBsample\fP (double \fBelapsed\fP)=0"
.br
.in -1c
.SH "Detailed Description"
.PP 
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 \fBQwtPlotSeriesItem\fP on a \fBQwtPlot\fP widget\&.
.PP
\fBQwtSamplingThread\fP starts a thread calling periodically \fBsample()\fP, to collect and store ( or emit ) a single sample\&.
.PP
\fBSee also\fP
.RS 4
\fBQwtPlotCurve\fP, \fBQwtPlotSeriesItem\fP 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "double QwtSamplingThread::elapsed () const"

.PP
\fBReturns\fP
.RS 4
Time (in ms) since the thread was started 
.RE
.PP
\fBSee also\fP
.RS 4
QThread::start(), \fBrun()\fP 
.RE
.PP

.SS "double QwtSamplingThread::interval () const"

.PP
\fBReturns\fP
.RS 4
Interval (in ms), between 2 calls of \fBsample()\fP 
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetInterval()\fP 
.RE
.PP

.SS "void QwtSamplingThread::run ()\fC [protected]\fP, \fC [virtual]\fP"
Loop collecting samples started from QThread::start() 
.PP
\fBSee also\fP
.RS 4
\fBstop()\fP 
.RE
.PP

.SS "virtual void QwtSamplingThread::sample (double elapsed)\fC [protected]\fP, \fC [pure virtual]\fP"
Collect a sample
.PP
\fBParameters\fP
.RS 4
\fIelapsed\fP Time since the thread was started in milliseconds 
.RE
.PP

.SS "void QwtSamplingThread::setInterval (double interval)\fC [slot]\fP"
Change the interval (in ms), when \fBsample()\fP is called\&. The default interval is 1000\&.0 ( = 1s )
.PP
\fBParameters\fP
.RS 4
\fIinterval\fP Interval 
.RE
.PP
\fBSee also\fP
.RS 4
\fBinterval()\fP 
.RE
.PP

.SS "void QwtSamplingThread::stop ()\fC [slot]\fP"
Terminate the collecting thread 
.PP
\fBSee also\fP
.RS 4
QThread::start(), \fBrun()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.