-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathqmlplot.h
More file actions
43 lines (31 loc) · 1018 Bytes
/
qmlplot.h
File metadata and controls
43 lines (31 loc) · 1018 Bytes
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
40
41
42
43
#ifndef QMLPLOT_H
#define QMLPLOT_H
#include <QtQuick>
class QCustomPlot;
class QCPAbstractPlottable;
class CustomPlotItem : public QQuickPaintedItem
{
Q_OBJECT
public:
CustomPlotItem( QQuickItem* parent = 0 );
virtual ~CustomPlotItem();
void paint( QPainter* painter );
Q_INVOKABLE void initCustomPlot();
protected:
void routeMouseEvents( QMouseEvent* event );
void routeWheelEvents( QWheelEvent* event );
virtual void mousePressEvent( QMouseEvent* event );
virtual void mouseReleaseEvent( QMouseEvent* event );
virtual void mouseMoveEvent( QMouseEvent* event );
virtual void mouseDoubleClickEvent( QMouseEvent* event );
virtual void wheelEvent( QWheelEvent *event );
virtual void timerEvent(QTimerEvent *event);
private:
QCustomPlot* m_CustomPlot;
int m_timerId;
private slots:
void graphClicked( QCPAbstractPlottable* plottable );
void onCustomReplot();
void updateCustomPlotSize();
};
#endif // QMLPLOT_H