logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

QwtSamplingThread - A thread collecting samples at regular intervals.

Author

       Generated automatically by Doxygen for Qwt User's Guide from the source code.

Version 6.1.4                                    Wed Jan 2 2019                             QwtSamplingThread(3)

Detailed Description

       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.

       Seealso:QwtPlotCurve, QwtPlotSeriesItem

Member Function Documentation

doubleQwtSamplingThread::elapsed()constReturns:
           Time (in ms) since the thread was started

       Seealso:
           QThread::start(), run()doubleQwtSamplingThread::interval()constReturns:
           Interval (in ms), between 2 calls of sample()Seealso:setInterval()voidQwtSamplingThread::run()[protected],[virtual]
       Loop collecting samples started from QThread::start()

       Seealso:stop()virtualvoidQwtSamplingThread::sample(doubleelapsed)[protected],[purevirtual]
       Collect a sample

       Parameters:elapsed Time since the thread was started in milliseconds

   voidQwtSamplingThread::setInterval(doubleinterval)[slot]
       Change the interval (in ms), when sample() is called. The default interval is 1000.0 ( = 1s )

       Parameters:interval Interval

       Seealso:interval()voidQwtSamplingThread::stop()[slot]
       Terminate the collecting thread

       Seealso:
           QThread::start(), run()

Name

       QwtSamplingThread - A thread collecting samples at regular intervals.

Synopsis

       #include <qwt_sampling_thread.h>

       Inherits QThread.

   PublicSlots
       void setInterval (double interval)
       void stop ()

   PublicMemberFunctions
       virtual ~QwtSamplingThread ()
           Destructor.
       double interval () const
       double elapsed () const

   ProtectedMemberFunctionsQwtSamplingThread (QObject *parent=NULL)
           Constructor.
       virtual void run ()
       virtual void sample (double elapsed)=0

See Also