... more tr() changes
... added comparison for both "seconds" OR tr("seconds") to all other
occurences found
... added "Lap" text for Intervalls imported in Garmin FIT format (this
is what Garmin delivers)
(cherry picked from commit ad790f05a386e3ae5c5b9dc129a216ac451b8cfc)
I had a trainer file as the second file in my history. Opening this ride, and selecting the speed histogram made GC crash.
I narrowed it down to line 905 in src/PowerHist.cpp. The code was trying to do a resize on a QVector with a negative value. count was -7.
Making sure that count is always 0 or greater fixed the crash.
Note that opening another ride file, with speed information before this one, selecting the speed histogram and only after that selecting the ride without speed information, did not crash the application. I'm suspecting that there might be some resetting of values, perhaps in the "standards" arrays, that is not done when a data series is missing.
.. Fix polarised zones being ZERO when recIntSecs is
sub-second (e.g. 0.5s with an SRM).
.. the polarised zones were being updated to hold time
rather than a count of samples. This was fine when
recIntSecs is 1s but a problem when it was 0.5
.. because is is an integer!
.. when plotting in zones its helpful to have
data labels to show the percentage or
absolute values each bar represents rather
than having to hover over it.
.. the with zero option didn't work with polarised zones
and there was a silly bug with the settings being applied
after the setData() call which mean't they were ignored!
.. now can show in zones but using the polarised zones
rather than user defined zones.
.. we may need to revisit this since it uses zone 2 rather
than estimate LT1 from CP.
NOTE: The compare mode needs updating to support this option.
.. SEGV caused by referencing data->isChecked when
not in range mode
.. Speed plotting broken because line setting the
array length in setData was accidentally deleted
.. on the histogram charts when comparing multiple
intervals we group using a golden ratio to make
it easier to read.
.. this is less about the histogram and more about
establishing the aesthetic in time for the LTM
updates for compare date ranges.
.. remember we can plot for a season and recognise that
when checking for isCompareIntervals in PowerHist.
.. fixes a SEGV when looking at a histogram in the trends
view whilst compare intervals is active in ride view.
.. still needs tidying up for some combinations of show/hide
tab switch and adjusting chart parameters but is 99% there
.. still need to apply the same compare update for when comparing
seasons not intervals
When an interval is added to the compare pane we now
compute the RideFileCache so it can be re-used in the
Histogram and CP charts without computing it each time.
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.
Reverted the update to the QWT 6.1 code to make QwtPlot::canvas()
return a QwtPlotCanvas -- it now returns QWidget.
This means our local copy of Qwt is the same as the published version
so we should be able to stop maintaining our own copy when Uwe pushes
the multiaxis stuff with 6.2.
Also fixed the LTM tooltip - the zoomer has been removed.
Fixup all the GC code to use the QWT 6.1 code.
It needed canvas() to be patched to return a
QwtPlotCanvas and not a QWidget.
We could probably get round that with a cast.
When we switch to QWT 6.2 with the multiaxis
support formally baked in we can fix the code
as needed.
Now compiles and links without issues.
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.
.. double to int conversion rounded up and caused an
array bounds segv. just added 1 to the initial resize
of the array to avoid.
.. annoying since I performed considerable testing of the
metric histogram on Mac, but this crashed almost immediately
on Linux. Bah.
Update to the histogram plot to now plot long term metrics.
It enables you to plot distribution of say, Intensity Factor
for a season or cycle.
You can select the y-axis metric too, so rather than just
plotting duration you could plot say, TSS accumulated for
different ride intensities.
Fixes#560
.. go back to more GC-like color defaults, which became a little
too vibrant in a recent update to introduce linear gradients to
the CP, Histogram and LTM plots.
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.