diff options
Diffstat (limited to 'plotwidget.h')
-rw-r--r-- | plotwidget.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/plotwidget.h b/plotwidget.h new file mode 100644 index 0000000..8031549 --- /dev/null +++ b/plotwidget.h @@ -0,0 +1,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 |