diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index f7e9b685c..d323cdf87 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -293,6 +293,30 @@ AllPlotObject::AllPlotObject(AllPlot *plot) : plot(plot) npCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); npCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + rvCurve = new QwtPlotCurve(tr("Vertical Oscillation")); + rvCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + rvCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + + rcadCurve = new QwtPlotCurve(tr("Run Cadence")); + rcadCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + rcadCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + + rgctCurve = new QwtPlotCurve(tr("GCT")); + rgctCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + rgctCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + + gearCurve = new QwtPlotCurve(tr("Gear Ratio")); + gearCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + gearCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + + smo2Curve = new QwtPlotCurve(tr("SmO2")); + smo2Curve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + smo2Curve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + + thbCurve = new QwtPlotCurve(tr("tHb")); + thbCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thbCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); + xpCurve = new QwtPlotCurve(tr("xPower")); xpCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); xpCurve->setYAxis(QwtAxisId(QwtAxis::yLeft, 0)); @@ -428,7 +452,8 @@ AllPlotObject::setColor(QColor color) << wattsDCurve << cadDCurve << nmDCurve << hrDCurve << apCurve << cadCurve << tempCurve << hrCurve << torqueCurve << balanceLCurve << balanceRCurve << lteCurve << rteCurve << lpsCurve << rpsCurve - << altCurve << slopeCurve << altSlopeCurve; + << altCurve << slopeCurve << altSlopeCurve + << rvCurve << rcadCurve << rgctCurve << gearCurve << smo2Curve << thbCurve; // work through getting progresively lighter QPen pen; @@ -466,6 +491,12 @@ AllPlotObject::~AllPlotObject() atissCurve->detach(); delete atissCurve; antissCurve->detach(); delete antissCurve; npCurve->detach(); delete npCurve; + rcadCurve->detach(); delete rcadCurve; + rvCurve->detach(); delete rvCurve; + rgctCurve->detach(); delete rgctCurve; + gearCurve->detach(); delete gearCurve; + smo2Curve->detach(); delete smo2Curve; + thbCurve->detach(); delete thbCurve; xpCurve->detach(); delete xpCurve; apCurve->detach(); delete apCurve; hrCurve->detach(); delete hrCurve; @@ -500,6 +531,12 @@ AllPlotObject::setVisible(bool show) wCurve->detach(); wattsCurve->detach(); npCurve->detach(); + rcadCurve->detach(); + rvCurve->detach(); + rgctCurve->detach(); + gearCurve->detach(); + smo2Curve->detach(); + thbCurve->detach(); atissCurve->detach(); antissCurve->detach(); xpCurve->detach(); @@ -546,6 +583,12 @@ AllPlotObject::setVisible(bool show) slopeCurve->attach(plot); altSlopeCurve->attach(plot); npCurve->attach(plot); + rvCurve->attach(plot); + rcadCurve->attach(plot); + rgctCurve->attach(plot); + gearCurve->attach(plot); + smo2Curve->attach(plot); + thbCurve->attach(plot); atissCurve->attach(plot); antissCurve->attach(plot); xpCurve->attach(plot); @@ -587,6 +630,12 @@ AllPlotObject::hideUnwanted() { if (plot->showPowerState>1) wattsCurve->detach(); if (!plot->showNP) npCurve->detach(); + if (!plot->showRV) rvCurve->detach(); + if (!plot->showRCad) rcadCurve->detach(); + if (!plot->showRGCT) rgctCurve->detach(); + if (!plot->showGear) gearCurve->detach(); + if (!plot->showSmO2) smo2Curve->detach(); + if (!plot->showtHb) thbCurve->detach(); if (!plot->showATISS) atissCurve->detach(); if (!plot->showANTISS) antissCurve->detach(); if (!plot->showXP) xpCurve->detach(); @@ -758,6 +807,12 @@ AllPlot::configChanged() standard->atissCurve->setRenderHint(QwtPlotItem::RenderAntialiased); standard->antissCurve->setRenderHint(QwtPlotItem::RenderAntialiased); standard->npCurve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->rvCurve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->rcadCurve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->rgctCurve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->gearCurve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->smo2Curve->setRenderHint(QwtPlotItem::RenderAntialiased); + standard->thbCurve->setRenderHint(QwtPlotItem::RenderAntialiased); standard->xpCurve->setRenderHint(QwtPlotItem::RenderAntialiased); standard->apCurve->setRenderHint(QwtPlotItem::RenderAntialiased); standard->wCurve->setRenderHint(QwtPlotItem::RenderAntialiased); @@ -796,6 +851,17 @@ AllPlot::configChanged() QPen npPen = QPen(GColor(CNPOWER)); npPen.setWidth(width); standard->npCurve->setPen(npPen); + + // XXX XXX for now (being lazy) just reuse power for all these new ones + // can come back and add color config later !!!!!! XXX XXX + standard->rvCurve->setPen(npPen); + standard->rcadCurve->setPen(npPen); + standard->rgctCurve->setPen(npPen); + standard->gearCurve->setPen(npPen); + standard->smo2Curve->setPen(npPen); + standard->thbCurve->setPen(npPen); + // XXX XXX + QPen antissPen = QPen(GColor(CANTISS)); antissPen.setWidth(width); standard->antissCurve->setPen(antissPen); @@ -913,6 +979,30 @@ AllPlot::configChanged() p.setAlpha(64); standard->npCurve->setBrush(QBrush(p)); + p = standard->rvCurve->pen().color(); + p.setAlpha(64); + standard->rvCurve->setBrush(QBrush(p)); + + p = standard->rcadCurve->pen().color(); + p.setAlpha(64); + standard->rcadCurve->setBrush(QBrush(p)); + + p = standard->rgctCurve->pen().color(); + p.setAlpha(64); + standard->rgctCurve->setBrush(QBrush(p)); + + p = standard->gearCurve->pen().color(); + p.setAlpha(64); + standard->gearCurve->setBrush(QBrush(p)); + + p = standard->smo2Curve->pen().color(); + p.setAlpha(64); + standard->smo2Curve->setBrush(QBrush(p)); + + p = standard->thbCurve->pen().color(); + p.setAlpha(64); + standard->thbCurve->setBrush(QBrush(p)); + p = standard->xpCurve->pen().color(); p.setAlpha(64); standard->xpCurve->setBrush(QBrush(p)); @@ -1000,7 +1090,19 @@ AllPlot::configChanged() standard->wattsCurve->setBrush(Qt::NoBrush); standard->atissCurve->setBrush(Qt::NoBrush); standard->antissCurve->setBrush(Qt::NoBrush); + standard->rvCurve->setBrush(Qt::NoBrush); + standard->rcadCurve->setBrush(Qt::NoBrush); + standard->rgctCurve->setBrush(Qt::NoBrush); + standard->gearCurve->setBrush(Qt::NoBrush); + standard->smo2Curve->setBrush(Qt::NoBrush); + standard->thbCurve->setBrush(Qt::NoBrush); standard->npCurve->setBrush(Qt::NoBrush); + standard->rvCurve->setBrush(Qt::NoBrush); + standard->rcadCurve->setBrush(Qt::NoBrush); + standard->rgctCurve->setBrush(Qt::NoBrush); + standard->gearCurve->setBrush(Qt::NoBrush); + standard->smo2Curve->setBrush(Qt::NoBrush); + standard->thbCurve->setBrush(Qt::NoBrush); standard->xpCurve->setBrush(Qt::NoBrush); standard->apCurve->setBrush(Qt::NoBrush); standard->wCurve->setBrush(Qt::NoBrush); @@ -1119,15 +1221,18 @@ AllPlot::setHighlightIntervals(bool state) struct DataPoint { - double time, hr, watts, atiss, antiss, np, ap, xp, speed, cad, + double time, hr, watts, atiss, antiss, np, rv, rcad, rgct, gear, + smo2, thb, ap, xp, speed, cad, alt, temp, wind, torque, lrbalance, lte, rte, lps, rps, kphd, wattsd, cadd, nmd, hrd, slope; - DataPoint(double t, double h, double w, double at, double an, double n, double l, double x, double s, double c, + DataPoint(double t, double h, double w, double at, double an, double n, double rv, double rcad, double rgct, + double gear, double smo2, double thb, double l, double x, double s, double c, double a, double te, double wi, double tq, double lrb, double lte, double rte, double lps, double rps, double kphd, double wattsd, double cadd, double nmd, double hrd, double sl) : - time(t), hr(h), watts(w), atiss(at), antiss(an), np(n), ap(l), xp(x), speed(s), cad(c), + time(t), hr(h), watts(w), atiss(at), antiss(an), np(n), rv(rv), rcad(rcad), rgct(rgct), + gear(gear), smo2(smo2), thb(thb), ap(l), xp(x), speed(s), cad(c), alt(a), temp(te), wind(wi), torque(tq), lrbalance(lrb), lte(lte), rte(rte), lps(lps), rps(rps), kphd(kphd), wattsd(wattsd), cadd(cadd), nmd(nmd), hrd(hrd), slope(sl) {} }; @@ -1245,6 +1350,12 @@ AllPlot::recalc(AllPlotObject *objects) if (!objects->atissArray.empty()) objects->atissCurve->setSamples(data, data); if (!objects->antissArray.empty()) objects->antissCurve->setSamples(data, data); if (!objects->npArray.empty()) objects->npCurve->setSamples(data, data); + if (!objects->rvArray.empty()) objects->rvCurve->setSamples(data, data); + if (!objects->rcadArray.empty()) objects->rcadCurve->setSamples(data, data); + if (!objects->rgctArray.empty()) objects->rgctCurve->setSamples(data, data); + if (!objects->gearArray.empty()) objects->gearCurve->setSamples(data, data); + if (!objects->smo2Array.empty()) objects->smo2Curve->setSamples(data, data); + if (!objects->thbArray.empty()) objects->thbCurve->setSamples(data, data); if (!objects->xpArray.empty()) objects->xpCurve->setSamples(data, data); if (!objects->apArray.empty()) objects->apCurve->setSamples(data, data); if (!objects->wattsArray.empty()) objects->wattsCurve->setSamples(data, data); @@ -1292,6 +1403,12 @@ AllPlot::recalc(AllPlotObject *objects) double totalWatts = 0.0; double totalNP = 0.0; + double totalRCad = 0.0; + double totalRV = 0.0; + double totalRGCT = 0.0; + double totalGear = 0.0; + double totalSmO2 = 0.0; + double totaltHb = 0.0; double totalATISS = 0.0; double totalANTISS = 0.0; double totalXP = 0.0; @@ -1318,12 +1435,18 @@ AllPlot::recalc(AllPlotObject *objects) QList list; - objects->smoothWatts.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); - objects->smoothNP.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); - objects->smoothAT.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); - objects->smoothANT.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); - objects->smoothXP.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); - objects->smoothAP.resize(rideTimeSecs + 1); //(rideTimeSecs + 1); + objects->smoothWatts.resize(rideTimeSecs + 1); + objects->smoothNP.resize(rideTimeSecs + 1); + objects->smoothRV.resize(rideTimeSecs + 1); + objects->smoothRCad.resize(rideTimeSecs + 1); + objects->smoothRGCT.resize(rideTimeSecs + 1); + objects->smoothGear.resize(rideTimeSecs + 1); + objects->smoothSmO2.resize(rideTimeSecs + 1); + objects->smoothtHb.resize(rideTimeSecs + 1); + objects->smoothAT.resize(rideTimeSecs + 1); + objects->smoothANT.resize(rideTimeSecs + 1); + objects->smoothXP.resize(rideTimeSecs + 1); + objects->smoothAP.resize(rideTimeSecs + 1); objects->smoothHr.resize(rideTimeSecs + 1); objects->smoothSpeed.resize(rideTimeSecs + 1); objects->smoothAccel.resize(rideTimeSecs + 1); @@ -1358,6 +1481,12 @@ AllPlot::recalc(AllPlotObject *objects) (!objects->atissArray.empty() ? objects->atissArray[i] : 0), (!objects->antissArray.empty() ? objects->antissArray[i] : 0), (!objects->npArray.empty() ? objects->npArray[i] : 0), + (!objects->rvArray.empty() ? objects->rvArray[i] : 0), + (!objects->rcadArray.empty() ? objects->rcadArray[i] : 0), + (!objects->rgctArray.empty() ? objects->rgctArray[i] : 0), + (!objects->gearArray.empty() ? objects->gearArray[i] : 0), + (!objects->smo2Array.empty() ? objects->smo2Array[i] : 0), + (!objects->thbArray.empty() ? objects->thbArray[i] : 0), (!objects->apArray.empty() ? objects->apArray[i] : 0), (!objects->xpArray.empty() ? objects->xpArray[i] : 0), (!objects->speedArray.empty() ? objects->speedArray[i] : 0), @@ -1381,6 +1510,12 @@ AllPlot::recalc(AllPlotObject *objects) totalWatts += objects->wattsArray[i]; if (!objects->npArray.empty()) totalNP += objects->npArray[i]; + if (!objects->rvArray.empty()) totalRV += objects->rvArray[i]; + if (!objects->rcadArray.empty()) totalRCad += objects->rcadArray[i]; + if (!objects->rgctArray.empty()) totalRGCT += objects->rgctArray[i]; + if (!objects->gearArray.empty()) totalGear += objects->gearArray[i]; + if (!objects->smo2Array.empty()) totalSmO2 += objects->smo2Array[i]; + if (!objects->thbArray.empty()) totaltHb += objects->thbArray[i]; if (!objects->atissArray.empty()) totalATISS += objects->atissArray[i]; if (!objects->antissArray.empty()) totalANTISS += objects->antissArray[i]; @@ -1439,6 +1574,12 @@ AllPlot::recalc(AllPlotObject *objects) DataPoint &dp = list.front(); totalWatts -= dp.watts; totalNP -= dp.np; + totalRV -= dp.rv; + totalRCad -= dp.rcad; + totalRGCT -= dp.rgct; + totalGear -= dp.gear; + totalSmO2 -= dp.smo2; + totaltHb -= dp.thb; totalATISS -= dp.atiss; totalANTISS -= dp.antiss; totalAP -= dp.ap; @@ -1468,6 +1609,12 @@ AllPlot::recalc(AllPlotObject *objects) if (list.empty()) { objects->smoothWatts[secs] = 0.0; objects->smoothNP[secs] = 0.0; + objects->smoothRV[secs] = 0.0; + objects->smoothRCad[secs] = 0.0; + objects->smoothRGCT[secs] = 0.0; + objects->smoothGear[secs] = 0.0; + objects->smoothSmO2[secs] = 0.0; + objects->smoothtHb[secs] = 0.0; objects->smoothAT[secs] = 0.0; objects->smoothANT[secs] = 0.0; objects->smoothXP[secs] = 0.0; @@ -1496,6 +1643,12 @@ AllPlot::recalc(AllPlotObject *objects) else { objects->smoothWatts[secs] = totalWatts / list.size(); objects->smoothNP[secs] = totalNP / list.size(); + objects->smoothRV[secs] = totalRV / list.size(); + objects->smoothRCad[secs] = totalRCad / list.size(); + objects->smoothRGCT[secs] = totalRGCT / list.size(); + objects->smoothGear[secs] = totalGear / list.size(); + objects->smoothSmO2[secs] = totalSmO2 / list.size(); + objects->smoothtHb[secs] = totaltHb / list.size(); objects->smoothAT[secs] = totalATISS / list.size(); objects->smoothANT[secs] = totalANTISS / list.size(); objects->smoothXP[secs] = totalXP / list.size(); @@ -1543,6 +1696,12 @@ AllPlot::recalc(AllPlotObject *objects) // no standard->smoothing .. just raw data objects->smoothWatts.resize(0); objects->smoothNP.resize(0); + objects->smoothRV.resize(0); + objects->smoothRCad.resize(0); + objects->smoothRGCT.resize(0); + objects->smoothGear.resize(0); + objects->smoothSmO2.resize(0); + objects->smoothtHb.resize(0); objects->smoothAT.resize(0); objects->smoothANT.resize(0); objects->smoothXP.resize(0); @@ -1573,6 +1732,12 @@ AllPlot::recalc(AllPlotObject *objects) foreach (RideFilePoint *dp, rideItem->ride()->dataPoints()) { objects->smoothWatts.append(dp->watts); objects->smoothNP.append(dp->np); + objects->smoothRV.append(dp->rvert); + objects->smoothRCad.append(dp->rcad); + objects->smoothRGCT.append(dp->rcontact); + objects->smoothGear.append(dp->gear); + objects->smoothSmO2.append(dp->smo2); + objects->smoothtHb.append(dp->thb); objects->smoothAT.append(dp->atiss); objects->smoothANT.append(dp->antiss); objects->smoothXP.append(dp->xp); @@ -1646,6 +1811,30 @@ AllPlot::recalc(AllPlotObject *objects) objects->atissCurve->setSamples(xaxis.data() + startingIndex, objects->smoothAT.data() + startingIndex, totalPoints); } + if (!objects->rvArray.empty()) { + objects->rvCurve->setSamples(xaxis.data() + startingIndex, objects->smoothRV.data() + startingIndex, totalPoints); + } + + if (!objects->rcadArray.empty()) { + objects->rcadCurve->setSamples(xaxis.data() + startingIndex, objects->smoothRCad.data() + startingIndex, totalPoints); + } + + if (!objects->rgctArray.empty()) { + objects->rgctCurve->setSamples(xaxis.data() + startingIndex, objects->smoothRGCT.data() + startingIndex, totalPoints); + } + + if (!objects->gearArray.empty()) { + objects->gearCurve->setSamples(xaxis.data() + startingIndex, objects->smoothGear.data() + startingIndex, totalPoints); + } + + if (!objects->smo2Array.empty()) { + objects->smo2Curve->setSamples(xaxis.data() + startingIndex, objects->smoothSmO2.data() + startingIndex, totalPoints); + } + + if (!objects->thbArray.empty()) { + objects->thbCurve->setSamples(xaxis.data() + startingIndex, objects->smoothtHb.data() + startingIndex, totalPoints); + } + if (!objects->npArray.empty()) { objects->npCurve->setSamples(xaxis.data() + startingIndex, objects->smoothNP.data() + startingIndex, totalPoints); } @@ -1926,6 +2115,12 @@ AllPlot::setYMax() standard->atissCurve->isVisible() || standard->antissCurve->isVisible() || standard->npCurve->isVisible() || + standard->rvCurve->isVisible() || + standard->rcadCurve->isVisible() || + standard->rgctCurve->isVisible() || + standard->gearCurve->isVisible() || + standard->smo2Curve->isVisible() || + standard->thbCurve->isVisible() || standard->xpCurve->isVisible() || standard->apCurve->isVisible()); @@ -2218,6 +2413,12 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) double *smoothW = &plot->standard->smoothWatts[startidx]; double *smoothN = &plot->standard->smoothNP[startidx]; + double *smoothRV = &plot->standard->smoothRV[startidx]; + double *smoothRCad = &plot->standard->smoothRCad[startidx]; + double *smoothRGCT = &plot->standard->smoothRGCT[startidx]; + double *smoothGear = &plot->standard->smoothGear[startidx]; + double *smoothSmO2 = &plot->standard->smoothSmO2[startidx]; + double *smoothtHb = &plot->standard->smoothtHb[startidx]; double *smoothAT = &plot->standard->smoothAT[startidx]; double *smoothANT = &plot->standard->smoothANT[startidx]; double *smoothX = &plot->standard->smoothXP[startidx]; @@ -2302,6 +2503,12 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) standard->atissCurve->detach(); standard->antissCurve->detach(); standard->npCurve->detach(); + standard->rvCurve->detach(); + standard->rcadCurve->detach(); + standard->rgctCurve->detach(); + standard->gearCurve->detach(); + standard->smo2Curve->detach(); + standard->thbCurve->detach(); standard->xpCurve->detach(); standard->apCurve->detach(); standard->hrCurve->detach(); @@ -2329,6 +2536,12 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) standard->atissCurve->setVisible(rideItem->ride()->areDataPresent()->watts && showATISS); standard->antissCurve->setVisible(rideItem->ride()->areDataPresent()->watts && showANTISS); standard->npCurve->setVisible(rideItem->ride()->areDataPresent()->np && showNP); + standard->rvCurve->setVisible(rideItem->ride()->areDataPresent()->rvert && showRV); + standard->rcadCurve->setVisible(rideItem->ride()->areDataPresent()->rcad && showRCad); + standard->gearCurve->setVisible(rideItem->ride()->areDataPresent()->gear && showGear); + standard->smo2Curve->setVisible(rideItem->ride()->areDataPresent()->smo2 && showSmO2); + standard->thbCurve->setVisible(rideItem->ride()->areDataPresent()->thb && showtHb); + standard->rgctCurve->setVisible(rideItem->ride()->areDataPresent()->rcontact && showRGCT); standard->xpCurve->setVisible(rideItem->ride()->areDataPresent()->xp && showXP); standard->apCurve->setVisible(rideItem->ride()->areDataPresent()->apower && showAP); standard->wCurve->setVisible(rideItem->ride()->areDataPresent()->watts && showW); @@ -2366,6 +2579,12 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) standard->atissCurve->setSamples(xaxis,smoothAT,points); standard->antissCurve->setSamples(xaxis,smoothANT,points); standard->npCurve->setSamples(xaxis,smoothN,points); + standard->rvCurve->setSamples(xaxis,smoothRV,points); + standard->rcadCurve->setSamples(xaxis,smoothRCad,points); + standard->rgctCurve->setSamples(xaxis,smoothRGCT,points); + standard->gearCurve->setSamples(xaxis,smoothGear,points); + standard->smo2Curve->setSamples(xaxis,smoothSmO2,points); + standard->thbCurve->setSamples(xaxis,smoothtHb,points); standard->xpCurve->setSamples(xaxis,smoothX,points); standard->apCurve->setSamples(xaxis,smoothL,points); standard->hrCurve->setSamples(xaxis, smoothHR,points); @@ -2406,6 +2625,12 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) setSymbol(standard->antissCurve, points); setSymbol(standard->atissCurve, points); setSymbol(standard->npCurve, points); + setSymbol(standard->rvCurve, points); + setSymbol(standard->rcadCurve, points); + setSymbol(standard->rgctCurve, points); + setSymbol(standard->gearCurve, points); + setSymbol(standard->smo2Curve, points); + setSymbol(standard->thbCurve, points); setSymbol(standard->xpCurve, points); setSymbol(standard->apCurve, points); setSymbol(standard->hrCurve, points); @@ -2458,6 +2683,24 @@ AllPlot::setDataFromPlot(AllPlot *plot, int startidx, int stopidx) if (!plot->standard->smoothNP.empty()) { standard->npCurve->attach(this); } + if (!plot->standard->smoothRV.empty()) { + standard->rvCurve->attach(this); + } + if (!plot->standard->smoothRCad.empty()) { + standard->rcadCurve->attach(this); + } + if (!plot->standard->smoothRGCT.empty()) { + standard->rgctCurve->attach(this); + } + if (!plot->standard->smoothGear.empty()) { + standard->gearCurve->attach(this); + } + if (!plot->standard->smoothSmO2.empty()) { + standard->smo2Curve->attach(this); + } + if (!plot->standard->smoothtHb.empty()) { + standard->thbCurve->attach(this); + } if (!plot->standard->smoothXP.empty()) { standard->xpCurve->attach(this); } @@ -2547,6 +2790,12 @@ AllPlot::setDataFromPlot(AllPlot *plot) standard->atissCurve->detach(); standard->antissCurve->detach(); standard->npCurve->detach(); + standard->rvCurve->detach(); + standard->rcadCurve->detach(); + standard->rgctCurve->detach(); + standard->gearCurve->detach(); + standard->smo2Curve->detach(); + standard->thbCurve->detach(); standard->xpCurve->detach(); standard->apCurve->detach(); standard->hrCurve->detach(); @@ -2576,6 +2825,12 @@ AllPlot::setDataFromPlot(AllPlot *plot) standard->atissCurve->setVisible(false); standard->antissCurve->setVisible(false); standard->npCurve->setVisible(false); + standard->rvCurve->setVisible(false); + standard->rcadCurve->setVisible(false); + standard->rgctCurve->setVisible(false); + standard->gearCurve->setVisible(false); + standard->smo2Curve->setVisible(false); + standard->thbCurve->setVisible(false); standard->xpCurve->setVisible(false); standard->apCurve->setVisible(false); standard->hrCurve->setVisible(false); @@ -2764,6 +3019,54 @@ AllPlot::setDataFromPlot(AllPlot *plot) } break; + case RideFile::rvert: + { + ourCurve = standard->rvCurve; + thereCurve = referencePlot->standard->rvCurve; + title = tr("Vertical Oscillation"); + } + break; + + case RideFile::rcad: + { + ourCurve = standard->rcadCurve; + thereCurve = referencePlot->standard->rcadCurve; + title = tr("Run Cadence"); + } + break; + + case RideFile::rcontact: + { + ourCurve = standard->rgctCurve; + thereCurve = referencePlot->standard->rgctCurve; + title = tr("GCT"); + } + break; + + case RideFile::gear: + { + ourCurve = standard->gearCurve; + thereCurve = referencePlot->standard->gearCurve; + title = tr("Gear Ratio"); + } + break; + + case RideFile::smo2: + { + ourCurve = standard->smo2Curve; + thereCurve = referencePlot->standard->smo2Curve; + title = tr("SmO2"); + } + break; + + case RideFile::thb: + { + ourCurve = standard->thbCurve; + thereCurve = referencePlot->standard->thbCurve; + title = tr("tHb"); + } + break; + case RideFile::xPower: { ourCurve = standard->xpCurve; @@ -3015,6 +3318,12 @@ AllPlot::setDataFromPlots(QList plots) standard->atissCurve->detach(); standard->antissCurve->detach(); standard->npCurve->detach(); + standard->rvCurve->detach(); + standard->rcadCurve->detach(); + standard->rgctCurve->detach(); + standard->gearCurve->detach(); + standard->smo2Curve->detach(); + standard->thbCurve->detach(); standard->xpCurve->detach(); standard->apCurve->detach(); standard->hrCurve->detach(); @@ -3044,6 +3353,12 @@ AllPlot::setDataFromPlots(QList plots) standard->atissCurve->setVisible(false); standard->antissCurve->setVisible(false); standard->npCurve->setVisible(false); + standard->rvCurve->setVisible(false); + standard->rcadCurve->setVisible(false); + standard->rgctCurve->setVisible(false); + standard->gearCurve->setVisible(false); + standard->smo2Curve->setVisible(false); + standard->thbCurve->setVisible(false); standard->xpCurve->setVisible(false); standard->apCurve->setVisible(false); standard->hrCurve->setVisible(false); @@ -3277,6 +3592,60 @@ AllPlot::setDataFromPlots(QList plots) } break; + case RideFile::rvert: + { + ourCurve = new QwtPlotCurve(tr("Vertical Oscillation")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->rvCurve; + title = tr("Vertical Oscillation"); + } + break; + + case RideFile::rcad: + { + ourCurve = new QwtPlotCurve(tr("Run Cadence")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->rcadCurve; + title = tr("Run Cadence"); + } + break; + + case RideFile::rcontact: + { + ourCurve = new QwtPlotCurve(tr("GCT")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->rgctCurve; + title = tr("GCT"); + } + break; + + case RideFile::gear: + { + ourCurve = new QwtPlotCurve(tr("Gear Ratio")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->gearCurve; + title = tr("Gear Ratio"); + } + break; + + case RideFile::smo2: + { + ourCurve = new QwtPlotCurve(tr("SmO2")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->smo2Curve; + title = tr("SmO2"); + } + break; + + case RideFile::thb: + { + ourCurve = new QwtPlotCurve(tr("tHb")); + ourCurve->setPaintAttribute(QwtPlotCurve::FilterPoints, true); + thereCurve = referencePlot->standard->thbCurve; + title = tr("tHb"); + } + break; + case RideFile::xPower: { ourCurve = new QwtPlotCurve(tr("xPower")); @@ -3565,6 +3934,12 @@ AllPlot::setDataFromObject(AllPlotObject *object, AllPlot *reference) standard->atissCurve->detach(); standard->antissCurve->detach(); standard->npCurve->detach(); + standard->rvCurve->detach(); + standard->rcadCurve->detach(); + standard->rgctCurve->detach(); + standard->gearCurve->detach(); + standard->smo2Curve->detach(); + standard->thbCurve->detach(); standard->xpCurve->detach(); standard->apCurve->detach(); standard->hrCurve->detach(); @@ -3596,6 +3971,12 @@ AllPlot::setDataFromObject(AllPlotObject *object, AllPlot *reference) standard->atissCurve->setVisible(false); standard->antissCurve->setVisible(false); standard->npCurve->setVisible(false); + standard->rvCurve->setVisible(false); + standard->rcadCurve->setVisible(false); + standard->rgctCurve->setVisible(false); + standard->gearCurve->setVisible(false); + standard->smo2Curve->setVisible(false); + standard->thbCurve->setVisible(false); standard->xpCurve->setVisible(false); standard->apCurve->setVisible(false); standard->hrCurve->setVisible(false); @@ -3658,6 +4039,42 @@ AllPlot::setDataFromObject(AllPlotObject *object, AllPlot *reference) standard->npCurve->setVisible(true); } + if (!object->rvArray.empty()) { + standard->rvCurve->setSamples(xaxis.data(), object->smoothRV.data(), totalPoints); + standard->rvCurve->attach(this); + standard->rvCurve->setVisible(true); + } + + if (!object->rcadArray.empty()) { + standard->rcadCurve->setSamples(xaxis.data(), object->smoothRCad.data(), totalPoints); + standard->rcadCurve->attach(this); + standard->rcadCurve->setVisible(true); + } + + if (!object->rgctArray.empty()) { + standard->rgctCurve->setSamples(xaxis.data(), object->smoothRGCT.data(), totalPoints); + standard->rgctCurve->attach(this); + standard->rgctCurve->setVisible(true); + } + + if (!object->gearArray.empty()) { + standard->gearCurve->setSamples(xaxis.data(), object->smoothGear.data(), totalPoints); + standard->gearCurve->attach(this); + standard->gearCurve->setVisible(true); + } + + if (!object->smo2Array.empty()) { + standard->smo2Curve->setSamples(xaxis.data(), object->smoothSmO2.data(), totalPoints); + standard->smo2Curve->attach(this); + standard->smo2Curve->setVisible(true); + } + + if (!object->thbArray.empty()) { + standard->thbCurve->setSamples(xaxis.data(), object->smoothtHb.data(), totalPoints); + standard->thbCurve->attach(this); + standard->thbCurve->setVisible(true); + } + if (!object->xpArray.empty()) { standard->xpCurve->setSamples(xaxis.data(), object->smoothXP.data(), totalPoints); standard->xpCurve->attach(this); @@ -3787,6 +4204,12 @@ AllPlot::setDataFromObject(AllPlotObject *object, AllPlot *reference) standard->mCurve->setVisible(referencePlot->showW); standard->wattsCurve->setVisible(referencePlot->showPowerState < 2); standard->npCurve->setVisible(referencePlot->showNP); + standard->rvCurve->setVisible(referencePlot->showRV); + standard->rcadCurve->setVisible(referencePlot->showRCad); + standard->rgctCurve->setVisible(referencePlot->showRGCT); + standard->gearCurve->setVisible(referencePlot->showGear); + standard->smo2Curve->setVisible(referencePlot->showSmO2); + standard->thbCurve->setVisible(referencePlot->showtHb); standard->atissCurve->setVisible(referencePlot->showATISS); standard->antissCurve->setVisible(referencePlot->showANTISS); standard->xpCurve->setVisible(referencePlot->showXP); @@ -3876,6 +4299,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) here->atissArray.resize(dataPresent->watts ? npoints : 0); here->antissArray.resize(dataPresent->watts ? npoints : 0); here->npArray.resize(dataPresent->np ? npoints : 0); + here->rcadArray.resize(dataPresent->rcad ? npoints : 0); + here->rvArray.resize(dataPresent->rvert ? npoints : 0); + here->rgctArray.resize(dataPresent->rcontact ? npoints : 0); + here->smo2Array.resize(dataPresent->smo2 ? npoints : 0); + here->thbArray.resize(dataPresent->thb ? npoints : 0); + here->gearArray.resize(dataPresent->gear ? npoints : 0); here->xpArray.resize(dataPresent->xp ? npoints : 0); here->apArray.resize(dataPresent->apower ? npoints : 0); here->hrArray.resize(dataPresent->hr ? npoints : 0); @@ -3906,6 +4335,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) here->atissCurve->detach(); here->antissCurve->detach(); here->npCurve->detach(); + here->rcadCurve->detach(); + here->rvCurve->detach(); + here->rgctCurve->detach(); + here->gearCurve->detach(); + here->smo2Curve->detach(); + here->thbCurve->detach(); here->xpCurve->detach(); here->apCurve->detach(); here->hrCurve->detach(); @@ -3938,6 +4373,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) if (!here->atissArray.empty()) here->atissCurve->attach(this); if (!here->antissArray.empty()) here->antissCurve->attach(this); if (!here->npArray.empty()) here->npCurve->attach(this); + if (!here->rvArray.empty()) here->rvCurve->attach(this); + if (!here->rcadArray.empty()) here->rcadCurve->attach(this); + if (!here->rgctArray.empty()) here->rgctCurve->attach(this); + if (!here->gearArray.empty()) here->gearCurve->attach(this); + if (!here->smo2Array.empty()) here->smo2Curve->attach(this); + if (!here->thbArray.empty()) here->thbCurve->attach(this); if (!here->xpArray.empty()) here->xpCurve->attach(this); if (!here->apArray.empty()) here->apCurve->attach(this); if (showW && ride && !here->wprime.empty()) { @@ -3977,6 +4418,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) here->atissCurve->setVisible(dataPresent->watts && showATISS); here->antissCurve->setVisible(dataPresent->watts && showANTISS); here->npCurve->setVisible(dataPresent->np && showNP); + here->rcadCurve->setVisible(dataPresent->rcad && showRCad); + here->rvCurve->setVisible(dataPresent->rvert && showRV); + here->rgctCurve->setVisible(dataPresent->rcontact && showRGCT); + here->gearCurve->setVisible(dataPresent->gear && showGear); + here->smo2Curve->setVisible(dataPresent->smo2 && showSmO2); + here->thbCurve->setVisible(dataPresent->thb && showtHb); here->xpCurve->setVisible(dataPresent->xp && showXP); here->apCurve->setVisible(dataPresent->apower && showAP); here->hrCurve->setVisible(dataPresent->hr && showHr); @@ -4023,6 +4470,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) if (!here->atissArray.empty()) here->atissArray[arrayLength] = max(0, point->atiss); if (!here->antissArray.empty()) here->antissArray[arrayLength] = max(0, point->antiss); if (!here->npArray.empty()) here->npArray[arrayLength] = max(0, point->np); + if (!here->rvArray.empty()) here->rvArray[arrayLength] = max(0, point->rvert); + if (!here->rcadArray.empty()) here->rcadArray[arrayLength] = max(0, point->rcad); + if (!here->rgctArray.empty()) here->rgctArray[arrayLength] = max(0, point->rcontact); + if (!here->gearArray.empty()) here->gearArray[arrayLength] = max(0, point->gear); + if (!here->smo2Array.empty()) here->smo2Array[arrayLength] = max(0, point->smo2); + if (!here->thbArray.empty()) here->thbArray[arrayLength] = max(0, point->thb); if (!here->xpArray.empty()) here->xpArray[arrayLength] = max(0, point->xp); if (!here->apArray.empty()) here->apArray[arrayLength] = max(0, point->apower); @@ -4089,6 +4542,12 @@ AllPlot::setDataFromRideFile(RideFile *ride, AllPlotObject *here) here->atissCurve->detach(); here->antissCurve->detach(); here->npCurve->detach(); + here->rvCurve->detach(); + here->rcadCurve->detach(); + here->rgctCurve->detach(); + here->gearCurve->detach(); + here->smo2Curve->detach(); + here->thbCurve->detach(); here->xpCurve->detach(); here->apCurve->detach(); here->hrCurve->detach(); @@ -4180,6 +4639,84 @@ AllPlot::setShowNP(bool show) replot(); } +void +AllPlot::setShowRV(bool show) +{ + showRV = show; + standard->rvCurve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + +void +AllPlot::setShowRCad(bool show) +{ + showRCad = show; + standard->rcadCurve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + +void +AllPlot::setShowRGCT(bool show) +{ + showRGCT = show; + standard->rgctCurve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + +void +AllPlot::setShowGear(bool show) +{ + showGear = show; + standard->gearCurve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + +void +AllPlot::setShowSmO2(bool show) +{ + showSmO2 = show; + standard->smo2Curve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + +void +AllPlot::setShowtHb(bool show) +{ + showtHb = show; + standard->thbCurve->setVisible(show); + setYMax(); + + // remember the curves and colors + isolation = false; + curveColors->saveState(); + replot(); +} + void AllPlot::setShowANTISS(bool show) { @@ -4391,84 +4928,6 @@ AllPlot::setShowTemp(bool show) replot(); } -void -AllPlot::setShowRV(bool show) -{ - showRV = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - -void -AllPlot::setShowRGCT(bool show) -{ - showRGCT = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - -void -AllPlot::setShowRCad(bool show) -{ - showRCad = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - -void -AllPlot::setShowSmO2(bool show) -{ - showSmO2 = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - -void -AllPlot::setShowtHb(bool show) -{ - showtHb = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - -void -AllPlot::setShowGear(bool show) -{ - showGear = show; - //standard->windCurve->setVisible(show); - setYMax(); - - // remember the curves and colors - isolation = false; - curveColors->saveState(); - replot(); -} - void AllPlot::setShowWind(bool show) { @@ -4582,6 +5041,15 @@ AllPlot::setPaintBrush(int state) p = standard->npCurve->pen().color(); p.setAlpha(64); standard->npCurve->setBrush(QBrush(p)); + + // XXX !!! all the same + standard->rvCurve->setBrush(QBrush(p)); + standard->rgctCurve->setBrush(QBrush(p)); + standard->rcadCurve->setBrush(QBrush(p)); + standard->gearCurve->setBrush(QBrush(p)); + standard->smo2Curve->setBrush(QBrush(p)); + standard->thbCurve->setBrush(QBrush(p)); + // XXX standard->atissCurve->setBrush(QBrush(p)); standard->antissCurve->setBrush(QBrush(p)); @@ -4665,6 +5133,12 @@ AllPlot::setPaintBrush(int state) standard->wCurve->setBrush(Qt::NoBrush); standard->wattsCurve->setBrush(Qt::NoBrush); standard->npCurve->setBrush(Qt::NoBrush); + standard->rvCurve->setBrush(Qt::NoBrush); + standard->rgctCurve->setBrush(Qt::NoBrush); + standard->rcadCurve->setBrush(Qt::NoBrush); + standard->gearCurve->setBrush(Qt::NoBrush); + standard->smo2Curve->setBrush(Qt::NoBrush); + standard->thbCurve->setBrush(Qt::NoBrush); standard->atissCurve->setBrush(Qt::NoBrush); standard->antissCurve->setBrush(Qt::NoBrush); standard->xpCurve->setBrush(Qt::NoBrush); diff --git a/src/AllPlot.h b/src/AllPlot.h index 1e83dcb3a..b723ba5b3 100644 --- a/src/AllPlot.h +++ b/src/AllPlot.h @@ -338,6 +338,12 @@ class AllPlotObject : public QObject AllPlotSlopeCurve *altSlopeCurve; QwtPlotCurve *atissCurve; QwtPlotCurve *antissCurve; + QwtPlotCurve *rvCurve; + QwtPlotCurve *rcadCurve; + QwtPlotCurve *rgctCurve; + QwtPlotCurve *gearCurve; + QwtPlotCurve *smo2Curve; + QwtPlotCurve *thbCurve; QwtPlotCurve *npCurve; QwtPlotCurve *xpCurve; QwtPlotCurve *apCurve; @@ -375,6 +381,12 @@ class AllPlotObject : public QObject QVector wattsArray; QVector atissArray; QVector antissArray; + QVector rvArray; + QVector rcadArray; + QVector rgctArray; + QVector gearArray; + QVector smo2Array; + QVector thbArray; QVector npArray; QVector xpArray; QVector apArray; @@ -402,6 +414,12 @@ class AllPlotObject : public QObject QVector smoothWatts; QVector smoothAT; QVector smoothANT; + QVector smoothRV; + QVector smoothRCad; + QVector smoothRGCT; + QVector smoothGear; + QVector smoothSmO2; + QVector smoothtHb; QVector smoothNP; QVector smoothAP; QVector smoothXP; diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index 02f62a8be..bd277591c 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -608,6 +608,12 @@ AllPlotWindow::AllPlotWindow(Context *context) : connect(showTorqueD, SIGNAL(stateChanged(int)), this, SLOT(setShowTorqueD(int))); connect(showHrD, SIGNAL(stateChanged(int)), this, SLOT(setShowHrD(int))); connect(showNP, SIGNAL(stateChanged(int)), this, SLOT(setShowNP(int))); + connect(showRV, SIGNAL(stateChanged(int)), this, SLOT(setShowRV(int))); + connect(showRCad, SIGNAL(stateChanged(int)), this, SLOT(setShowRCad(int))); + connect(showRGCT, SIGNAL(stateChanged(int)), this, SLOT(setShowRGCT(int))); + connect(showGear, SIGNAL(stateChanged(int)), this, SLOT(setShowGear(int))); + connect(showSmO2, SIGNAL(stateChanged(int)), this, SLOT(setShowSmO2(int))); + connect(showtHb, SIGNAL(stateChanged(int)), this, SLOT(setShowtHb(int))); connect(showATISS, SIGNAL(stateChanged(int)), this, SLOT(setShowATISS(int))); connect(showANTISS, SIGNAL(stateChanged(int)), this, SLOT(setShowANTISS(int))); connect(showXP, SIGNAL(stateChanged(int)), this, SLOT(setShowXP(int))); @@ -959,6 +965,12 @@ AllPlotWindow::compareChanged() if (showTemp->isChecked()) { s.one = RideFile::temp; s.two = RideFile::none; wanted << s;}; if (showWind->isChecked()) { s.one = RideFile::headwind; s.two = RideFile::none; wanted << s;}; if (showNP->isChecked()) { s.one = RideFile::NP; s.two = RideFile::none; wanted << s;}; + if (showRV->isChecked()) { s.one = RideFile::rvert; s.two = RideFile::none; wanted << s;}; + if (showRCad->isChecked()) { s.one = RideFile::rcad; s.two = RideFile::none; wanted << s;}; + if (showRGCT->isChecked()) { s.one = RideFile::rcontact; s.two = RideFile::none; wanted << s;}; + if (showGear->isChecked()) { s.one = RideFile::gear; s.two = RideFile::none; wanted << s;}; + if (showSmO2->isChecked()) { s.one = RideFile::smo2; s.two = RideFile::none; wanted << s;}; + if (showtHb->isChecked()) { s.one = RideFile::thb; s.two = RideFile::none; wanted << s;}; if (showATISS->isChecked()) { s.one = RideFile::aTISS; s.two = RideFile::none; wanted << s;}; if (showANTISS->isChecked()) { s.one = RideFile::anTISS; s.two = RideFile::none; wanted << s;}; if (showXP->isChecked()) { s.one = RideFile::xPower; s.two = RideFile::none; wanted << s;}; @@ -3002,6 +3014,12 @@ AllPlotWindow::setupSeriesStackPlots() if (showTemp->isChecked() && rideItem->ride()->areDataPresent()->temp) { s.one = RideFile::temp; s.two = RideFile::none; serieslist << s; } if (showWind->isChecked() && rideItem->ride()->areDataPresent()->headwind) addHeadwind=true; //serieslist << RideFile::headwind; if (showNP->isChecked() && rideItem->ride()->areDataPresent()->watts) { s.one = RideFile::NP; s.two = RideFile::none; serieslist << s; } + if (showRV->isChecked() && rideItem->ride()->areDataPresent()->rvert) { s.one = RideFile::rvert; s.two = RideFile::none; serieslist << s; } + if (showRCad->isChecked() && rideItem->ride()->areDataPresent()->rcad) { s.one = RideFile::rcad; s.two = RideFile::none; serieslist << s; } + if (showRGCT->isChecked() && rideItem->ride()->areDataPresent()->rcontact) { s.one = RideFile::rcontact; s.two = RideFile::none; serieslist << s; } + if (showGear->isChecked() && rideItem->ride()->areDataPresent()->gear) { s.one = RideFile::gear; s.two = RideFile::none; serieslist << s; } + if (showSmO2->isChecked() && rideItem->ride()->areDataPresent()->smo2) { s.one = RideFile::smo2; s.two = RideFile::none; serieslist << s; } + if (showtHb->isChecked() && rideItem->ride()->areDataPresent()->thb) { s.one = RideFile::thb; s.two = RideFile::none; serieslist << s; } if (showATISS->isChecked() && rideItem->ride()->areDataPresent()->watts) { s.one = RideFile::aTISS; s.two = RideFile::none; serieslist << s; } if (showANTISS->isChecked() && rideItem->ride()->areDataPresent()->watts) { s.one = RideFile::anTISS; s.two = RideFile::none; serieslist << s; } if (showXP->isChecked() && rideItem->ride()->areDataPresent()->watts) { s.one = RideFile::xPower; s.two = RideFile::none; serieslist << s; } @@ -3198,6 +3216,12 @@ AllPlotWindow::setupStackPlots() _allPlot->setByDistance(comboDistance->currentIndex()); _allPlot->setShowBalance((showBalance->isEnabled()) ? ( showBalance->checkState() == Qt::Checked ) : false ); _allPlot->setShowNP((showNP->isEnabled()) ? ( showNP->checkState() == Qt::Checked ) : false ); + _allPlot->setShowRV((showRV->isEnabled()) ? ( showRV->checkState() == Qt::Checked ) : false ); + _allPlot->setShowRCad((showRCad->isEnabled()) ? ( showRCad->checkState() == Qt::Checked ) : false ); + _allPlot->setShowRGCT((showRGCT->isEnabled()) ? ( showRGCT->checkState() == Qt::Checked ) : false ); + _allPlot->setShowGear((showGear->isEnabled()) ? ( showGear->checkState() == Qt::Checked ) : false ); + _allPlot->setShowSmO2((showSmO2->isEnabled()) ? ( showSmO2->checkState() == Qt::Checked ) : false ); + _allPlot->setShowtHb((showtHb->isEnabled()) ? ( showtHb->checkState() == Qt::Checked ) : false ); _allPlot->setShowXP((showXP->isEnabled()) ? ( showXP->checkState() == Qt::Checked ) : false ); _allPlot->setShowAP((showAP->isEnabled()) ? ( showAP->checkState() == Qt::Checked ) : false ); _allPlot->setShowTE((showTE->isEnabled()) ? ( showTE->checkState() == Qt::Checked ) : false ); diff --git a/src/RideEditor.cpp b/src/RideEditor.cpp index 6dc27d574..ba99e6058 100644 --- a/src/RideEditor.cpp +++ b/src/RideEditor.cpp @@ -821,8 +821,8 @@ RideEditor::insColumn(QString name) if (name == tr("Right TE")) series = RideFile::rte; if (name == tr("Left PS")) series = RideFile::lps; if (name == tr("Right PS")) series = RideFile::rps; - if (name == tr("SmO2")) series = RideFile::smO2; - if (name == tr("tHb")) series = RideFile::tHb; + if (name == tr("SmO2")) series = RideFile::smo2; + if (name == tr("tHb")) series = RideFile::thb; if (name == tr("Vertical Oscillation")) series = RideFile::rvert; if (name == tr("Run Cadence")) series = RideFile::rcad; if (name == tr("GCT")) series = RideFile::rcontact; diff --git a/src/RideFile.cpp b/src/RideFile.cpp index a85eb5276..b5eebab03 100644 --- a/src/RideFile.cpp +++ b/src/RideFile.cpp @@ -152,8 +152,8 @@ RideFile::seriesName(SeriesType series) case RideFile::vam: return QString(tr("VAM")); case RideFile::wattsKg: return QString(tr("Watts per Kilogram")); case RideFile::wprime: return QString(tr("W' balance")); - case RideFile::smO2: return QString(tr("SmO2")); - case RideFile::tHb: return QString(tr("THb")); + case RideFile::smo2: return QString(tr("SmO2")); + case RideFile::thb: return QString(tr("THb")); case RideFile::rvert: return QString(tr("Vertical Oscillation")); case RideFile::rcad: return QString(tr("Run Cadence")); case RideFile::rcontact: return QString(tr("GCT")); @@ -193,8 +193,8 @@ RideFile::colorFor(SeriesType series) case RideFile::interval: return QColor(Qt::white); case RideFile::wattsKg: return GColor(CPOWER); case RideFile::wprime: return GColor(CWBAL); - case RideFile::smO2: return GColor(CWBAL); - case RideFile::tHb: return GColor(CSPEED); + case RideFile::smo2: return GColor(CWBAL); + case RideFile::thb: return GColor(CSPEED); case RideFile::secs: case RideFile::km: case RideFile::vam: @@ -246,8 +246,8 @@ RideFile::unitName(SeriesType series, Context *context) case RideFile::vam: return QString(tr("meters per hour")); case RideFile::wattsKg: return QString(useMetricUnits ? tr("watts/kg") : tr("watts/kg")); // always kg ! case RideFile::wprime: return QString(useMetricUnits ? tr("joules") : tr("joules")); - case RideFile::smO2: return QString(tr("%")); - case RideFile::tHb: return QString(tr("g/dL")); + case RideFile::smo2: return QString(tr("%")); + case RideFile::thb: return QString(tr("g/dL")); case RideFile::rcad: return QString(tr("spm")); case RideFile::rvert: return QString(tr("cm")); case RideFile::rcontact: return QString(tr("ms")); @@ -822,8 +822,8 @@ RideFile::setDataPresent(SeriesType series, bool value) case rte : dataPresent.rte = value; break; case lps : dataPresent.lps = value; break; case rps : dataPresent.rps = value; break; - case smO2 : dataPresent.smo2 = value; break; - case tHb : dataPresent.thb = value; break; + case smo2 : dataPresent.smo2 = value; break; + case thb : dataPresent.thb = value; break; case rcad : dataPresent.rcad = value; break; case rvert : dataPresent.rvert = value; break; case rcontact : dataPresent.rcontact = value; break; @@ -860,8 +860,8 @@ RideFile::isDataPresent(SeriesType series) case rps : return dataPresent.rps; break; case lte : return dataPresent.lte; break; case rte : return dataPresent.rte; break; - case smO2 : return dataPresent.smo2; break; - case tHb : return dataPresent.thb; break; + case smo2 : return dataPresent.smo2; break; + case thb : return dataPresent.thb; break; case rvert : return dataPresent.rvert; break; case rcad : return dataPresent.rcad; break; case rcontact : return dataPresent.rcontact; break; @@ -894,8 +894,8 @@ RideFile::setPointValue(int index, SeriesType series, double value) case rte : dataPoints_[index]->rte = value; break; case lps : dataPoints_[index]->lps = value; break; case rps : dataPoints_[index]->rps = value; break; - case smO2 : dataPoints_[index]->smo2 = value; break; - case tHb : dataPoints_[index]->thb = value; break; + case smo2 : dataPoints_[index]->smo2 = value; break; + case thb : dataPoints_[index]->thb = value; break; case rcad : dataPoints_[index]->rcad = value; break; case rvert : dataPoints_[index]->rvert = value; break; case rcontact : dataPoints_[index]->rcontact = value; break; @@ -932,8 +932,8 @@ RideFilePoint::value(RideFile::SeriesType series) const case RideFile::rte : return rte; break; case RideFile::lps : return lps; break; case RideFile::rps : return rps; break; - case RideFile::tHb : return thb; break; - case RideFile::smO2 : return smo2; break; + case RideFile::thb : return thb; break; + case RideFile::smo2 : return smo2; break; case RideFile::rcad : return rcad; break; case RideFile::rvert : return rvert; break; case RideFile::rcontact : return rcontact; break; @@ -1021,8 +1021,8 @@ RideFile::decimalsFor(SeriesType series) case rps : case lte : case rte : return 0; break; - case smO2 : return 0; break; - case tHb : return 2; break; + case smo2 : return 0; break; + case thb : return 2; break; case rcad : return 0; break; case rvert : return 1; break; case rcontact : return 1; break; @@ -1064,8 +1064,8 @@ RideFile::maximumFor(SeriesType series) case lte : case rte : case lrbalance : return 100; break; - case smO2 : return 100; break; - case tHb : return 20; break; + case smo2 : return 100; break; + case thb : return 20; break; case rcad : return 500; break; case rvert : return 50; break; case rcontact : return 1000; break; @@ -1107,8 +1107,8 @@ RideFile::minimumFor(SeriesType series) case lps : case rps : case lrbalance : return 0; break; - case smO2 : return 0; break; - case tHb : return 0; break; + case smo2 : return 0; break; + case thb : return 0; break; case rcad : return 0; break; case rvert : return 0; break; case rcontact : return 0; break; diff --git a/src/RideFile.h b/src/RideFile.h index 5385b5987..2258523ad 100644 --- a/src/RideFile.h +++ b/src/RideFile.h @@ -127,7 +127,7 @@ class RideFile : public QObject // QObject to emit signals enum seriestype { secs=0, cad, cadd, hr, hrd, km, kph, kphd, nm, nmd, watts, wattsd, alt, lon, lat, headwind, slope, temp, interval, NP, xPower, vam, wattsKg, lrbalance, lte, rte, lps, rps, - aPower, wprime, aTISS, anTISS, smO2, tHb, + aPower, wprime, aTISS, anTISS, smo2, thb, rvert, rcad, rcontact, gear, none }; enum specialValues { NoTemp = -255 }; diff --git a/src/RideFileTableModel.cpp b/src/RideFileTableModel.cpp index 0a92ec3ad..641ac1023 100644 --- a/src/RideFileTableModel.cpp +++ b/src/RideFileTableModel.cpp @@ -141,13 +141,13 @@ RideFileTableModel::setHeadings(RideFile::SeriesType series) headings_ << tr("Right PS"); headingsType << RideFile::rps; } - if (series == RideFile::smO2 || ride->areDataPresent()->smo2) { + if (series == RideFile::smo2 || ride->areDataPresent()->smo2) { headings_ << tr("SmO2"); - headingsType << RideFile::smO2; + headingsType << RideFile::smo2; } - if (series == RideFile::tHb || ride->areDataPresent()->thb) { + if (series == RideFile::thb || ride->areDataPresent()->thb) { headings_ << tr("tHb"); - headingsType << RideFile::tHb; + headingsType << RideFile::thb; } if (series == RideFile::rcad || ride->areDataPresent()->rcad) { headings_ << tr("Run Cadence");