X-Git-Url: https://www.flypig.org.uk/git/?p=harbour-pedalo.git;a=blobdiff_plain;f=src%2Fstats.cpp;h=d8b92a9d39377f4a63ffd081914133f6159db55c;hp=c858ccb563b1939f1f38c7dff3fef7e639f1d8b1;hb=54ab3ebfadf8cb258561a4641249da8c6469dc0f;hpb=76b5f460f9a5052571d730918b2ee778753f4c59 diff --git a/src/stats.cpp b/src/stats.cpp index c858ccb..d8b92a9 100644 --- a/src/stats.cpp +++ b/src/stats.cpp @@ -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 Stats::getValues() const { - return values; +QList Stats::getBarValues() const { + return barvalues; +} + +QList 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 &value) { - values = value; +void Stats::setBarValues(QList &value) { + barvalues = value; +} + +void Stats::setLineValues(QList &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; +}