In this part we have now reinstated the sidebar interval tree
but it is refactored out of athlete and into AnalysisSidebar
where it belongs.
* you can hover and select/deselect intervals in the sidebar
Left to do;
* All the interval operations like sort, drag and drop, find
delete etc do not work at present and will require some work
* Add a color button to the tree to let the user change the color
for USER defined intervals
* Add more types of intervals to the discovery; esp routes and
sustained intervals
In this part we have updated all the charts to reference
the RideItem::intervals() members instead of the TreeWidget
and RideFile::intervals().
The code to create/change/delete intervals is not included
so selecting and editing on charts/sidebar is disabled til
part 3 of the update, but hover should work properly.
Still left todo in future updates;
* Updates to the interval sidebar to list intervals
in a tree (by interval type) with a color selector
* Code to create, edit, delete etc the intervals via
the rideitem/intervalitem and see them reflected in
the ridefile
* Update to search for all the different types of
IntervalItems including routes and sustained intervals
Now allows you to add intervals and select them and
change colors they will use.
It will maintain the data as a CompareInterval which
also includes a RideFile representation of the interval.
This is stored in Context in a QList as compareIntervals
and can therefore be re-used across all charts.
We now need to think about putting some widgets onto the
Compare 'bar' for turning compare mode on and off and
deleting / reordering / clearing items.
.. this allows us to drag and drop between athletes or
to switch athlete if dropping from outside of GC.
.. also added context to the mime data so the compare pane
will know where the dragged object has come from (ie. it
may be from a different athlete).
We have two new mime data types;
application/x-gc-intervals
application/x-gc-seasons
With packing routines into QMimeData declared
in IntervalTreeView and SeasonTreeView.
To get around an issue with overwrite mode on
drag and drop from the seasons / interval trees
we DO NOT ACCEPT the drop (even though we do
actually process the data).
All we need to do now is unpack the QMimeData in
ComparePane and then add the GUI elements to it etc.
Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).
We no longer pass around a MainWindow pointer to children
but pass a context instead.
There are still a few pieces left in MainWindow that need
to move to a better place;
* Setting/clearing filter selection
* Working with Intervals
* Adding/Deleting Rides
* Save on Exit
As mentioned previously there are lots of other parts to
this refactor left to do;
* break MainWindow Gui elements into Toolbar and Views
* migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
* introduce Application Context and AthleteCollection
The sidebar elements all get a blue focus rectangle on
Mac OSX. This is a platform specific setting. This patch
removes the focus rectangle for sidebar components only.
The interval view now allows the user to drag and drop intervals
up and down in the list.
We could extend the drag and drop of intervals to support analysis
of segments/intervals from multiple rides in the future too.
Fixes#405.