-
Notifications
You must be signed in to change notification settings - Fork 0
/
yaspgraph.h
50 lines (47 loc) · 1.28 KB
/
yaspgraph.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
47
48
49
50
#ifndef YASPGRAPH_H
#define YASPGRAPH_H
#include <qcustomplot.h>
#define INFO_TEXT_LEFT_MARGIN 50
class yaspGraph {
public:
yaspGraph(int id, QCPGraph* g, QCPItemText* info, QCPItemStraightLine* rLine, QString plotStr, QColor color, double plotTimeInMilliSeconds);
~yaspGraph();
QCPItemText* info();
// QCPItemStraightLine* rLine();
QCPGraph* plot();
void updateMinMax(double v);
void save(QTextStream& streamData);
void setOffset(double o);
double offset();
void setMult(double m);
double mult();
// double refY();
QString infoStr() {
return plotInfoStr;
}
void updateLabel(QString str, int margin);
// void updateRefLine(int dpn);
void setSelected(bool sel);
void reset();
void toggleVisibility(bool show);
void hide(bool h);
double getMin() { return minY;}
// void setMin(double m) { minY = m;}
double getMax() { return maxY; }
// void setMax(double m) { maxY = m;}
private:
int id;
QVector<qreal> plotDashPattern;
QVector<qreal> rLineDashPattern;
QCPGraph* infoGraph;
QCPItemText* infoText;
QCPItemStraightLine* refLine;
// double lastX;
double yOffset;
double yMult;
double minY;
double maxY;
QString plotInfoStr;
bool hidden;
};
#endif // YASPGRAPH_H