QwtSamplingThread(3)
β¨ NAME β¨
QwtSamplingThread β a thread collecting samples at regular intervals. Thatβs the whole name card, bestie. π
πΈ SYNOPSIS πΈ
okay so to use it you include this:
#include <qwt_sampling_thread.h>
Inherits QThread.
π Public Slots π
void setInterval (double interval)void stop ()
π«Ά Public Member Functions π«Ά
virtual ~QwtSamplingThread ()β Destructor.double interval () constdouble elapsed () const
π§ Protected Member Functions π§
QwtSamplingThread (QObject *parent=NULL)β Constructor.virtual void run () overridevirtual void sample (double elapsed)=0
π Detailed Description π
QwtSamplingThread is a thread collecting samples at regular intervals. No cap. Continuous signals get 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. Itβs giving βmain character threadβ energy. π₯
See also: QwtPlotCurve, QwtPlotSeriesItem
Definition at line 28 of file qwt_sampling_thread.h.
π Constructor & Destructor Documentation π
QwtSamplingThread::~QwtSamplingThread () [virtual]
Destructor. Bye bestie. π
Definition at line 29 of file qwt_sampling_thread.cpp.
QwtSamplingThread::QwtSamplingThread (QObject * parent = NULL) [explicit], [protected]
Constructor. Itβs protected and explicit β iykyk. π«Ά
Definition at line 21 of file qwt_sampling_thread.cpp.
π Member Function Documentation π
double QwtSamplingThread::elapsed () const
Returns: Time (in ms) since the thread was started. β±οΈ
See also: QThread::start(), run()
Definition at line 62 of file qwt_sampling_thread.cpp.
double QwtSamplingThread::interval () const
Returns: Interval (in ms), between 2 calls of sample(). β²οΈ
See also: setInterval()
Definition at line 53 of file qwt_sampling_thread.cpp.
void QwtSamplingThread::run () [override], [protected], [virtual]
Loop collecting samples started from QThread::start(). π
See also: stop()
Definition at line 83 of file qwt_sampling_thread.cpp.
virtual void QwtSamplingThread::sample (double elapsed) [protected], [pure virtual]
Collect a sample. π
Parameters: elapsed β Time since the thread was started in seconds.
Note: Due to a bug in previous version elapsed was passed as seconds instead of miliseconds. To avoid breaking existing code we stay with seconds for now. π«
void QwtSamplingThread::setInterval (double msecs) [slot]
Change the interval (in ms), when sample() is called. The default interval is 1000.0 ( = 1s ). β°
Parameters: msecs β Interval.
See also: interval()
Definition at line 41 of file qwt_sampling_thread.cpp.
void QwtSamplingThread::stop () [slot]
Terminate the collecting thread. π
See also: QThread::start(), run()
Definition at line 74 of file qwt_sampling_thread.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code. π€β¨
okay thatβs the whole page, bestie: this was the QwtSamplingThread(3) page from the Qwt Userβs Guide, and the footer didnβt print a date, so no date to report. ππ
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms