Update of all metrics to work with a RideItem
not directly with a RideFile.
When iterating over the activity samples we now
use a Specification and RideFileIterator to bound
the set of samples used. This means that we can
compute metrics for intervals without having to
create a temporary ridefile.
RideItem now has first class members for zoneRange,
hrZoneRange and paceZoneRange to avoid calculating
for every metric which are stored in RideDB.json.
Compare pane continues to construct a ride file
when working with intervals since it is used lots
of charts, this is unlikely to ever change.
A SEGV in compare intervals has been fixed where
interval items were repointed to temporary compare
pane objects that are deleted - see RideItem::setFrom.
THIS COMMIT CONTAINS 3 REGRESSIONS:
1. TcxRideFile no longer computes metrics
2. FitlogRideFile no longer computes metrics
3. WorkoutWizard no longer computes metrics
-- The workout wizard will be replaced with a new
Workout editor, whilst the RideFile metrics
may be deprecated (but considering options)
.. datafilter uses a context that was used to create it
which is fine until it is used in user metrics which
are global and shared across multiple contexts.
.. so now when evaluating a ride item we use the context
for the rideitem being evaluated not the context of
the data filter performing the evaluation
.. next couple of commits will need to look at the way
we use RideItem and RideFile when computing both
Ride and Interval metrics.
.. User metrics can be created, deleted and edited
in the preferences pane.
.. A new dialog has been created to create user metrics
and will need to be updated after step 3 of this multi
part update completes the UserMetric code and integrates
it into the RideMetric factory.