7 #include <QLinearGradient>
8 #include "trace_profiler.hpp"
15 class GraphWidget : public QWidget
20 GraphWidget(QWidget *parent = 0);
22 void setProfile(trace::Profile* profile, GraphType type);
23 const trace::Profile::Call* callAtPosition(const QPoint& pos);
26 virtual void mousePressEvent(QMouseEvent *e);
27 virtual void paintEvent(QPaintEvent *e);
28 virtual void mouseMoveEvent(QMouseEvent *e);
29 virtual void wheelEvent(QWheelEvent *e);
30 virtual void mouseDoubleClickEvent(QMouseEvent *e);
31 virtual void resizeEvent(QResizeEvent *e);
34 void jumpToCall(int no);
35 void viewChanged(int call, int width);
38 void changeView(int call, int width);
43 void paintVerticalAxis(QPainter& painter);
44 void paintHorizontalAxis(QPainter& painter);
47 trace::Profile* m_profile;
61 QPoint m_mousePressPosition;
70 QPen m_axisForeground;
71 QBrush m_axisBackground;
73 QLinearGradient m_graphGradientGpu;
74 QLinearGradient m_graphGradientCpu;
77 #endif // GRAPHWIDGET_H