-
Notifications
You must be signed in to change notification settings - Fork 3
/
qcpl_types.h
54 lines (38 loc) · 892 Bytes
/
qcpl_types.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
51
52
53
54
#ifndef QCPL_TYPES_H
#define QCPL_TYPES_H
#include <QVector>
#include <QFont>
#include <variant>
namespace QCPL {
typedef QVector<double> ValueArray;
template <typename T> struct XYPair
{
T x, y;
};
typedef XYPair<ValueArray> GraphData;
struct AxisLimits
{
double min;
double max;
AxisLimits() { min = 0; max = 0; }
AxisLimits(double min, double max) { this->min = min; this->max = max; }
bool isInvalid() const;
QString str() const;
};
struct TextVariable
{
QString name;
QString descr;
};
using TextVarGetter = std::function<QString()>;
struct PlotFormatSettings
{
QString fontName;
int axisTitleFontSize = 0;
int axisTicksFontSize = 0;
};
using AxisFactor = std::variant<int, double>;
bool isAxisFactorSet(const AxisFactor& factor);
QString axisFactorStr(const AxisFactor& factor);
} // namespace QCPL
#endif // QCPL_TYPES_H