1 #ifndef HISTOGRAMVIEW_H
2 #define HISTOGRAMVIEW_H
7 * Histogram graph view.
9 * When the view is zoomed such that there is more than one item occupying
10 * a single pixel the one with the highest value will be displayed.
12 class HistogramView : public GraphView {
14 HistogramView(QWidget* parent);
16 void setDataProvider(GraphDataProvider* data);
17 void setSelectionState(SelectionState* state);
19 /* Gradient colours for selected and unselected items */
20 void setSelectedGradient(const QLinearGradient& gradient);
21 void setUnelectedGradient(const QLinearGradient& gradient);
23 virtual void mouseMoveEvent(QMouseEvent *e);
24 virtual void mouseDoubleClickEvent(QMouseEvent *e);
26 virtual void update();
27 virtual void resizeEvent(QResizeEvent *e);
28 virtual void paintEvent(QPaintEvent *e);
31 qint64 itemAtPosition(QPoint pos);
32 qint64 valueAtPosition(QPoint pos);
35 QLinearGradient m_gradientSelected;
36 QLinearGradient m_gradientUnselected;
38 GraphDataProvider* m_data;