Last change
on this file since 10488 was 9383, checked in by stoecker, 4 years ago |
update to qwt verion 6.1.1 to fix build with newer Qt5
|
File size:
1.4 KB
|
Line | |
---|
1 | /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
---|
2 | * Qwt Widget Library
|
---|
3 | * Copyright (C) 1997 Josef Wilgen
|
---|
4 | * Copyright (C) 2002 Uwe Rathmann
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the Qwt License, Version 1.0
|
---|
8 | *****************************************************************************/
|
---|
9 |
|
---|
10 | #ifndef _QWT_SAMPLING_THREAD_H_
|
---|
11 | #define _QWT_SAMPLING_THREAD_H_
|
---|
12 |
|
---|
13 | #include "qwt_global.h"
|
---|
14 | #include <qthread.h>
|
---|
15 |
|
---|
16 | /*!
|
---|
17 | \brief A thread collecting samples at regular intervals.
|
---|
18 |
|
---|
19 | Continuous signals are converted into a discrete signal by
|
---|
20 | collecting samples at regular intervals. A discrete signal
|
---|
21 | can be displayed by a QwtPlotSeriesItem on a QwtPlot widget.
|
---|
22 |
|
---|
23 | QwtSamplingThread starts a thread calling periodically sample(),
|
---|
24 | to collect and store ( or emit ) a single sample.
|
---|
25 |
|
---|
26 | \sa QwtPlotCurve, QwtPlotSeriesItem
|
---|
27 | */
|
---|
28 | class QWT_EXPORT QwtSamplingThread: public QThread
|
---|
29 | {
|
---|
30 | Q_OBJECT
|
---|
31 |
|
---|
32 | public:
|
---|
33 | virtual ~QwtSamplingThread();
|
---|
34 |
|
---|
35 | double interval() const;
|
---|
36 | double elapsed() const;
|
---|
37 |
|
---|
38 | public Q_SLOTS:
|
---|
39 | void setInterval( double interval );
|
---|
40 | void stop();
|
---|
41 |
|
---|
42 | protected:
|
---|
43 | explicit QwtSamplingThread( QObject *parent = NULL );
|
---|
44 |
|
---|
45 | virtual void run();
|
---|
46 |
|
---|
47 | /*!
|
---|
48 | Collect a sample
|
---|
49 |
|
---|
50 | \param elapsed Time since the thread was started in milliseconds
|
---|
51 | */
|
---|
52 | virtual void sample( double elapsed ) = 0;
|
---|
53 |
|
---|
54 | private:
|
---|
55 | class PrivateData;
|
---|
56 | PrivateData *d_data;
|
---|
57 | };
|
---|
58 |
|
---|
59 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.