-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvariable_data.h
More file actions
53 lines (44 loc) · 1.33 KB
/
Copy pathvariable_data.h
File metadata and controls
53 lines (44 loc) · 1.33 KB
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
51
52
53
#ifndef VARIABLEDATA_H
#define VARIABLEDATA_H
#include <QList>
#include <QString>
#include <utility>
#include <QColor>
#include "qcustomplot.h"
class VariableData
{
public:
QList<double> measurements;
QList<double> calcErrors;
QString fullNaming;
QString shortNaming;
struct Instrument
{
enum ErrorType
{
relative,
absolute,
calculated
} type = ErrorType::absolute;
double value = 0.1;
static QMap<VariableData::Instrument::ErrorType, QString> error_types;
static constexpr int FILEDS = 2;
} instrumentError;
struct VisualOptions
{
bool visible = true;
int width = 1;
Qt::PenStyle line_type = Qt::SolidLine;
QCPScatterStyle::ScatterShape point_type = QCPScatterStyle::ScatterShape::ssNone;
QColor color = "black";
static QMap<Qt::PenStyle, QString> line_types;
static QMap<QCPScatterStyle::ScatterShape, QString> point_types;
static constexpr int FILEDS = 5;
} visual;
double getError(int index = 0) const;
int getMeasurementCount();
VariableData(QString fullNaming, QString shortNaming = "",
QList<double> meas = QList<double> {}, QList<double> calcErrors = QList<double> {});
VariableData(int size);
};
#endif // VARIABLEDATA_H