Add graphs generated from journey data
[harbour-pedalo.git] / src / stats.cpp
1 #include "stats.h"
2
3 Stats::Stats() :
4 title("Empty graph"),
5 units("%"),
6 minval(0.0),
7 maxval(1.0),
8 step(0.1)
9 {
10
11 }
12
13 void Stats::update() {
14 // Do nothing
15 }
16
17 QString Stats::getTitle() const {
18 return title;
19 }
20
21 QStringList Stats::getLabels() const {
22 return labels;
23 }
24
25 QList<float> Stats::getValues() const {
26 return values;
27 }
28
29 QString Stats::getUnits() const {
30 return units;
31 }
32
33 float Stats::getMinVal() const {
34 return minval;
35 }
36
37 float Stats::getMaxVal() const {
38 return maxval;
39 }
40
41 float Stats::getStep() const {
42 return step;
43 }
44
45 void Stats::setTitle(QString &value) {
46 title = value;
47 }
48
49 void Stats::setLabels(QStringList &value) {
50 labels = value;
51 }
52
53 void Stats::setValues(QList<float> &value) {
54 values = value;
55 }
56
57 void Stats::setUnits(QString &value) {
58 units = value;
59 }
60
61 void Stats::setMinVal(float value) {
62 minval = value;
63 }
64
65 void Stats::setMaxVal(float value) {
66 maxval = value;
67 }
68
69 void Stats::setStep(float value) {
70 step = value;
71 }