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
... adds "What's this" to (hopefully) most of the widgets (please report
on missing ones)
... defines draft "Whats' this" texts including a
context specific WikiLink
.. Help Key for all platforms is <Shift>+<F1> + in some widgets
"RightMouse - Click"
... Tested on Win and Mac (On Mac QtMacButton seems not supporting
"What's this") - so here <Shift>+<F1> has no result.
... ToDo: Create final texts and links based on the to be updated 3.11
Wiki
.. 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.
... multiple tr() added for Intervals. Compare Pane
... in Compare Pane - in time metrics check for both "seconds" and
translated tr(seconds) (following the concept for time as at most other
places where units == "seconds" are checked
(cherry picked from commit 6c78b00b65a1d794eb99038f21d6e705d119d29e)
The 4 views have been shown to be confusing -- it is not clear
to new users what their purpose is, and hence how or why they
are different.
So in an effort to reduce the confusion I've renamed a few
things to be much more explicit and specific.
.. We embrace the fact we are a cycling program and use the term
RIDES not ACTIVITIES for all files
.. HOME is confusing, renamed to TRENDS
.. the ANALYSIS view name is confusing, its all about ANALYSIS
to renamed to RIDES
There will no doubt be areas that are not renamed properly we
can fix those when the arise.
.. another method for find intervals to find the ascents
in a ride. Uses the hysteresis as defined in options
which means a climb ends if there is a descent of that
or more (by default only 3m).
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.
By 3.1 we will have eradicated assert from the code.
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.
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
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.
Further updates will need to;
- 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
Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
.. added to the splitter handle context menu
.. also took IntervalItem.h and IntervalTreeView.h from MainWindow.h
coz I was getting pissed with recompiling everything when changing it.
Thats why so many other files have been changed in this commit.
Fixes#338.
All are harmless but for the sake of clarity have
fixed them all bar a couple;
- Lucene grumbles about signed/unsigned conversion which
is/isn't valid depending upon the version of CLucene you
compile with. Either way it is harmless.
- QxtScheduleView has a bunch of issues, but since it is a
third party widget its better to leave it unchanged.
Find interval dialog will now allow you to add
intervals by time or distance (e.g. add interval for
every 10 minutes or every kilometer).
Since there were three menu options all doing similar
things, they have now been consolidated into a single
dialog.