-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotwidget.h
More file actions
41 lines (31 loc) · 825 Bytes
/
plotwidget.h
File metadata and controls
41 lines (31 loc) · 825 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
#ifndef PLOTWIDGET_H
#define PLOTWIDGET_H
#include <QWidget>
#include <QVBoxLayout>
#include <QVector>
#include "libs/qcustomplot/qcustomplot.h"
class PlotWidget : public QWidget {
Q_OBJECT
public:
explicit PlotWidget(QWidget *parent = nullptr);
void setX(double currX);
double x() const;
void setYAxis(int pac, int pbc);
void setYlabel(QString label);
void clearAxes();
void setStart(double time);
double getStart() const;
void setStop();
void setData(QVector<double> xVals, QVector<double> yVals);
QVector<QVector<double>> getData();
void appendData(double x, double y);
void onChange();
private:
QCustomPlot *plot;
QCPGraph *graph;
double _x;
int yBot, yTop;
double runStart;
QVector<double> xData, yData;
};
#endif // PLOTWIDGET_H