-
Notifications
You must be signed in to change notification settings - Fork 0
/
LineChart.h
46 lines (36 loc) · 1008 Bytes
/
LineChart.h
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
44
45
46
#ifndef LINECHART_H
#define LINECHART_H
#include <QVector>
#include <qwt_plot.h>
#include <qwt_plot_picker.h>
#include <qwt_plot_grid.h>
#include <qwt_plot_marker.h>
class LineChart : public QwtPlot
{
Q_OBJECT
QVector<QString> vectorDateToChart; // Do not use
QVector<QVector<double> > vectorSensorReadings2DToChart;
size_t row;
size_t col;
QwtPlotPicker *plotPicker;
QwtLegend *legend;
QwtPlotGrid *gridToPlot;
/* Markers */
QwtPlotMarker *mY;
QwtPlotMarker *mX;
void updateWidgetGradient();
void plotAssay();
protected:
virtual void resizeEvent(QResizeEvent *);
private slots:
void showItem(QwtPlotItem *, bool on);
public slots:
void exportPlotToImage();
void printPlot();
public:
LineChart(const QVector<QString> &vectorDate,
const QVector<QVector<double> > &vectorSensorReadings2D,
QWidget *parent = 0);
~LineChart();
};
#endif // LINECHART_H