Add graph animation; support for line graphs
[harbour-pedalo.git] / src / stats.cpp
index c858ccb..d8b92a9 100644 (file)
@@ -1,23 +1,79 @@
 #include "stats.h"
 
-Stats::Stats()
+Stats::Stats() :
+    title("Empty graph"),
+    units("%"),
+    minval(0.0),
+    maxval(1.0),
+    step(0.1)
 {
 
 }
 
+void Stats::update() {
+    // Do nothing
+}
+
+QString Stats::getTitle() const {
+    return title;
+}
+
 QStringList Stats::getLabels() const {
     return labels;
 }
 
-QList<float> Stats::getValues() const {
-    return values;
+QList<float> Stats::getBarValues() const {
+    return barvalues;
+}
+
+QList<float> Stats::getLineValues() const {
+    return linevalues;
+}
+
+QString Stats::getUnits() const {
+    return units;
+}
+
+float Stats::getMinVal() const {
+    return minval;
+}
+
+float Stats::getMaxVal() const {
+    return maxval;
+}
+
+float Stats::getStep() const {
+    return step;
+}
+
+void Stats::setTitle(QString &value) {
+    title = value;
 }
 
 void Stats::setLabels(QStringList &value) {
     labels = value;
 }
 
-void Stats::setValues(QList<float> &value) {
-    values = value;
+void Stats::setBarValues(QList<float> &value) {
+    barvalues = value;
+}
+
+void Stats::setLineValues(QList<float> &value) {
+    linevalues = value;
+}
+
+void Stats::setUnits(QString &value) {
+    units = value;
+}
+
+void Stats::setMinVal(float value) {
+    minval = value;
 }
 
+void Stats::setMaxVal(float value) {
+    maxval = value;
+}
+
+void Stats::setStep(float value) {
+    step = value;
+}