-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathCustomPlot.h
More file actions
31 lines (25 loc) · 786 Bytes
/
Copy pathCustomPlot.h
File metadata and controls
31 lines (25 loc) · 786 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
#ifndef CUSTOMPLOT_H
#define CUSTOMPLOT_H
#include "qcustomplot.h"
#include "customgraph.h"
class CustomPlot : public QCustomPlot
{
Q_OBJECT
bool m_incrementalDraw = false;
int m_graphCount;
QRect m_clipRect;
QMutex m_drawMutex;
public:
explicit CustomPlot(int _numGraphs, QWidget *parent = 0);
QPixmap& paintBuffer() { return mPaintBuffer; }
QCPGraph *addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0);
CustomGraph *graph(int index) const;
CustomGraph *graph() const;
void setIncremental(bool _mode);
void setGraphCount(int _count) { m_graphCount = _count; }
QRect getClipRect() { return m_clipRect; }
virtual void drawIncrementally();
protected:
virtual void paintEvent(QPaintEvent *event);
};
#endif // CUSTOMPLOT_H