9 * The generic base class for a graph's view, this is the component that
10 * displays the actual data for the graph.
12 * - Stores the view area within the graph
13 * - Simple user interaction such as translating and zooming with mouse
14 * - Selection tracking synchronised with axis
16 class GraphView : public QWidget {
19 GraphView(QWidget* parent = 0);
20 virtual ~GraphView(){}
22 virtual void update();
24 virtual void resizeEvent(QResizeEvent *);
26 virtual void wheelEvent(QWheelEvent *e);
27 virtual void mouseMoveEvent(QMouseEvent *e);
28 virtual void mousePressEvent(QMouseEvent *e);
29 virtual void mouseDoubleClickEvent(QMouseEvent *e);
31 virtual void setSelectionState(SelectionState* state);
33 void setHorizontalView(qint64 start, qint64 end);
34 void setVerticalView(qint64 start, qint64 end);
37 void setDefaultView(qint64 min, qint64 max);
40 void selectionChanged();
42 void verticalViewChanged(qint64 start, qint64 end);
43 void verticalRangeChanged(qint64 min, qint64 max);
45 void horizontalRangeChanged(qint64 min, qint64 max);
46 void horizontalViewChanged(qint64 start, qint64 end);
61 /* Viewport width (m_viewRight - m_viewLeft), used for zoom */
63 qint64 m_viewWidthMin;
64 qint64 m_viewWidthMax;
66 /* Viewport height (m_viewTop - m_viewBottom), used for zoom */
68 qint64 m_viewHeightMin;
69 qint64 m_viewHeightMax;
72 QPoint m_mousePressPosition;
73 qint64 m_mousePressViewLeft;
74 qint64 m_mousePressViewBottom;
77 SelectionState* m_selectionState;
79 /* State from the last update() call */
80 struct PreviousUpdate {