blob: 8031549f190a795044df0b3cced197a8411edd4b (
plain)
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
|
#ifndef PLOTWIDGET_H
#define PLOTWIDGET_H
#include <QtGui>
class QKineticScroller;
class PlotWidget : public QWidget
{
Q_OBJECT
public:
PlotWidget(QKineticScroller *scroller);
public slots:
void reset();
protected:
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
private:
static void debugHook(void *user, const QPointF &releaseVelocity, const QPointF &contentPosition, const QPointF &overshootPosition);
struct PlotItem {
QPointF releaseVelocity;
QPointF contentPosition;
QPointF overshootPosition;
};
void addPlotItem(const PlotItem &pi);
QKineticScroller *m_scroller;
QList<PlotItem> m_plotitems;
qreal minMaxVelocity, minMaxPosition;
QWidget *m_clear, *m_legend;
};
#endif
|