add bring to front/send to back to PfPvPlot

Another rightclick menu for intervals, adding a bring to front and send to
back option but only when viewing the pfPvPlot, additionally the algorithm in
PfPv plot for determining which interval a point is used for has been adjusted
to fully populate every interval curve where appropriate (and incorrect
comments and redundant code have been removed).

IntervalItems now have a display sequence number so when you have
overlapping intervals you can bring to front and send to back on the
PfPv plot. The display sequence could be used on other plots if/when
they distinguish between intervals.

Previously, the coloring of intervals on PfPvPlot was determined solely
by the order they were defined which could be quite confusing.
This commit is contained in:
Mark Liversedge
2009-12-22 13:46:03 +00:00
committed by Sean Rhea
parent 7a90ac8783
commit 32b94d954f
9 changed files with 101 additions and 42 deletions

View File

@@ -405,7 +405,8 @@ AllPlotWindow::setEndSelection(double xValue, bool newInterval, QString name)
// add average power to the end of the selection name
name += QString("(%1 watts)").arg(round((wattsTotal && arrayLength) ? wattsTotal/arrayLength : 0));
QTreeWidgetItem *last = new IntervalItem(ride->ride(), name, duration1, duration2, distance1, distance2);
QTreeWidgetItem *last = new IntervalItem(ride->ride(), name, duration1, duration2, distance1, distance2,
allIntervals->childCount()+1);
allIntervals->addChild(last);
// now update the RideFileIntervals and all the plots etc