Reinstate CP/AWC CP curve parameters on CP plot

This commit is contained in:
Mark Liversedge
2011-08-20 17:24:06 +01:00
parent 79c915d649
commit 8c65721333
2 changed files with 8 additions and 0 deletions

View File

@@ -76,6 +76,10 @@ CpintPlot::CpintPlot(MainWindow *main, QString p, const Zones *zones) :
grid->enableX(true);
grid->attach(this);
curveTitle.attach(this);
curveTitle.setXValue(5);
curveTitle.setYValue(20);
zoomer = new penTooltip(this->canvas());
zoomer->setMousePattern(QwtEventPattern::MouseSelect1,
Qt::LeftButton, Qt::ShiftModifier);
@@ -341,6 +345,7 @@ CpintPlot::plot_CP_curve(CpintPlot *thisPlot, // the plot we're currently di
#else
curve_title.sprintf("CP=%.0f W; AWC=%.0f kJ", cp, cp * tau * 60.0 / 1000.0);
#endif
if (series == RideFile::watts) curveTitle.setLabel(QwtText(curve_title, QwtText::PlainText));
CPCurve = new QwtPlotCurve(curve_title);
if (appsettings->value(this, GC_ANTIALIAS, false).toBool() == true)
@@ -506,6 +511,7 @@ CpintPlot::calculate(RideItem *rideItem)
//
// PLOT MODEL CURVE (DERIVED)
//
curveTitle.setLabel(QwtText("", QwtText::PlainText)); // default to no title
if (series == RideFile::xPower || series == RideFile::NP || series == RideFile::watts || series == RideFile::none) {
if (bests->meanMaxArray(series).size() > 1) {

View File

@@ -24,6 +24,7 @@
#include <qwt_plot.h>
#include <qwt_plot_zoomer.h>
#include <qwt_plot_marker.h>
#include <QtGui>
class QwtPlotCurve;
@@ -108,6 +109,7 @@ class CpintPlot : public QwtPlot
QwtPlotCurve *CPCurve;
QList<QwtPlotCurve*> allCurves;
QwtPlotCurve *allCurve; // bests but not zoned
QwtPlotMarker curveTitle;
QList<QwtPlotMarker*> allZoneLabels;
void clear_CP_Curves();
QStringList filterForSeason(QStringList cpints, QDate startDate, QDate endDate);