-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot.h
More file actions
51 lines (40 loc) · 951 Bytes
/
Copy pathplot.h
File metadata and controls
51 lines (40 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <qwt_plot.h>
#include <qwt_interval.h>
#include <qwt_system_clock.h>
class QwtPlotCurve;
class QwtPlotMarker;
class QwtPlotDirectPainter;
class Plot: public QwtPlot
{
Q_OBJECT
public:
Plot( QWidget * = NULL );
virtual ~Plot();
void start();
//重绘
virtual void replot();
//事件过滤器
virtual bool eventFilter( QObject *, QEvent * );
public Q_SLOTS:
//设置间隔时间
void setIntervalLength( double );
protected:
//显示事件
virtual void showEvent( QShowEvent * );
//重绘事件
virtual void resizeEvent( QResizeEvent * );
//定时器事件
virtual void timerEvent( QTimerEvent * );
private:
//更新曲线
void updateCurve();
//增加间隔量
void incrementInterval();
QwtPlotMarker *d_origin;
QwtPlotCurve *d_curve;
int d_paintedPoints;
QwtPlotDirectPainter *d_directPainter;
QwtInterval d_interval;
int d_timerId;
QwtSystemClock d_clock;
};