.. notify if the metadata configuration has been changed
.. also snuck in a change to take hysteresis out of the
power zones fingerprint - it should not have been there
.. Needed to move about some of the color config
methods and remove the unneeded object from
mainwindow and initialise global color settings
in main() instead.
.. notify if Athlete weight or height were changed by
the user during the config dialog
.. no longer included in zones fingerprint
.. ridecache now picks up on specific config changes
.. introduce concept of configChanged(what) to
pass details of what config has been changed
.. fixed zones changes to re-read after write
to correct the save twice to get changes to
zones bug.
.. next parts need to spot changes (part 2) and
then action appropriately (part 3)
.. needed to clean RideItem a touch
.. needed to isolate intervals code as it has some
problems and breaks metricaggregator for normal
use.
.. found a bit of Context code in MainWindow.cpp (!!)
.. its been there since the beginning at the heart of the code
as a registry of the rides (RideItem) and controlling the
selection of rides.
.. in v3.0 we stopped showing it, but it was still created and
then hidden immediately. But removing the 'spine' of the code
was seen as a step too far.
.. this is the first part of moving from SQL to a NoSQL cache
for ride metrics, metadata and measures -- RideItem is now
no longer inheriting from QTreeWidgetItem with all the issues
that brings.
.. since its right at the heart there are likely to be unforeseen
bugs as we go, especially since it affects the ride navigator.
.. add/delete has been tested a fair amount and should be reliable.
The context pointer was dereferenced after the context object was deleted. This is fixed by storing a pointer to the MainWindow in QTFullScreen, so context does not have to be dereferenced.
The logic in QTFullScreen::eventFilter is also simplified a bit.
.. Connected the compare mode on/off switch in the
compare pane to Context to notify charts
.. the scope bar and chart painting now highlight in
red when compare more is active and supported by
a particular chart.
.. each chart must implement isCompare() to return
true or false if it is supporting compare mode.
We /still/ do not have a mechanism for clearing or
reordering items in the compare pane, nor a mechanism
for choosing 'delta' compare (i.e. baseline all compares
to first item in the list).
.. now can drag and drop any date range onto the
home view compare pane to compatre different
seasons, and even across athletes.
.. we setup the metrics and measures in the context
so the charts don't have to, but we still need to
reference the source context for bests and ridefilecache
data
NOTE: We need a mechanism for 'locking' source tabs/athletes
when they are part of a compare to avoid crashing when
a context is deleted whilst we are comparing
NOTE: We till need a way to remove entries from the compare
pane, possibly call it when an athlete is closed too
(see note above).
Slowly migrating code and data from the MainWindow
class to Athlete and Context classes.
This update moves the ride and interval lists and
data structures from MainWindow to Athlete.