.. LTM chart now has a 'use sidebar settings' checkbox
and will display the chart that is selected in the sidebar
.. as the sidebar selection changes the window will plot it
using data for the current date range configured / selected
.. part 3 will now come later to let you manage the charts from
the sidebar menu (it is already in the LTM tool).
.. but the read and write functions are so far out
of date that applying a saved chart causes a crash
.. so we need to fix the read/write functions for charts.xml
.. lots of work to do to clean this up, especially
keeping the presets updated when renaming is done.
.. also need to save away after changes.
.. also need to create a much better default set of
presets taking into account the more recent additions
such as Estimates amd Bests and new metrics
... 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)
.. Further updates to the charts to honour the background
color preferences:
* Google Maps
* Ride Summary
* Scatter
* Details (Metadata)
* LTM Data View
* Editor
.. still a few left to do and not entirely happy with how
things look on the editor but we can fix this up over
time.
.. show event and season markers on the compare plot
helps to provide context against the week/month offsets
.. also fixed up how bars are lined up and that each plot
in the compare stack has the same x-axis
You can now compare seasons / date ranges across or between
athletes on the LTM charts.
This is only shown on the stack chart as we need one chart
per data series - in a similar vein to the AllPlot chart.
There are some tidy ups left to do over the next few days;
- Data table needs updating to support compare mode
- Event markers need to be shown and in the right color
- PMC curve data is slow, needs some kind of optimisation
- The tooltip is missing and needs to be put back
- Ensure the new stack frame looks correct when using a
dark plot background (or anything other than white)
- Consider how to handle zooming when there is only one
data series and hence only one chart for compare
.. mostly in preparation for compatre date ranges
on an LTM chart, but also for plotting lots of
values at once without having too busy a chart.
NOTE: Need to sort out tooltips and optimising the
refresh as well as making it possible for the
user to set the plot height like in AllPlot.
.. to use uname not name and also to avoid duplicating units
when they are the same as the metric name (e.g. the metric
'Relative Intensity' has units 'Relative Intensity').
.. show the metric data as a table as well as a chart, its quite
useful to configure a summary table of metrics.
Ironically, the ability to configure the summary page in WKO+ was
one of the things that pissed me off and started me down the road
of extracting data from .wko files. I then found the data I wanted
wasn't even in the files and started developing for GoldenCheetah
.. the rest, as they say, is history.
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 crashes and major issues created by porting
to QT5. These have included;
* Fix CP plot log scale
* AllPlot axes and tooltip
* DBAccess prepare/bind bug
* LTMSettings crash
* LTMWindow zoomer/picker crash
* LTMPlot axes hack
There are still issues remaining but we can start
working through them at leisure -- the product now
builds and runs.
Porting the codebase to QT 5 (5.2) to get the
latest bug fixes, performance and improved platform
support.
This first part is to fixup the codebase to compile
on Qt 5, but some aspects have been broken (video).
The second part is to migrate from Qwt 6.0.1 to the
latest Qwt for multiaxis support.
The third part will be to fixup any platform specific
issues or issues identified at runtime.
.. don't refresh when not visible!
This is a side effect of the code updates added
to handle filtering in chart settings or the global
search/datafilter box.
Updated RideFileCache and LTMWindow/Plot to
plot the user defined durations for peak power.
Actually we support all the different meanmax
measures available in the CP chart, so you can
now track peaks for user defined durations of;
* Power
* Watts per Kg
* xPower
* NP
* Heartrate
* Speed
* Cadence
* Torque
* VAM
I have not spent much time optimising for performance
but reusing the same 'seek' approach used by the recent
update for best() and tiz() functions in the datafilter.
Fixes#322.
.. to make sure the v2 LTMSettings
uses the bestSymbol.
Just pushing this (WIP) to make sure
we don't get half baked LTM settings
from people building against the previous
commit.
The definition of curves is rationalised to match the
new design mockups in readiness for introducing user
defined peak durations for power et al.
For now this patch cleans the UX and makes it much
easier to add/edit/remove curves.
Fixes#548
Simplified selecting and managing preset charts
in the LTM chart settings.
Need to now move the 'Add' button to the custom
tab, but that is the next pending update.
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.
.. by highlighting chart title too if a filter is
being applied.
This is important to warn users that the data being plotted
is adjusted to the search/filter (either globally or in the
chart settings).
When the user free text searches or applies a data filter in
the top right toolbar search box it gets applied to any charts
that plot data from many rides, including;
- CP curve
- Calendar
- Histogram
- LTM
- TreeMap
- Summary
I need to update on a Mac to no longer use a Mac text search box
but now use a search filter box on the top right.
.. the start date would progressively change as you selected a
date range in the sidebar. This is because the code to set the date
range to the start of a week looked at the wrong date variable when
using a custom date range.
Fixes#500.
As a personal habit I tend to use the C pre-processor to
comment out code blocks I don't want to remove. This is in
case the code will be required in the future.
I think it is now safe to say the code commented out is not
required -- most of it is legacy and marks the transition from
earlier designs or legacy code.
I've done this in one big commit since in theory it has no
functional change, and in future can look in this commit for any
code we may want to reinstate.
.. it needs to be applied every time a
date range is selected, so need a new bool
useToToday to flag that up.
Will need to fix the other date range charts
to do the same.
Updated LTM chart date range to allow the
user to specify a number of alternative
ranges;
- use current selected
- use current selected thru today
- between x and y
- last n days/weeks/months/years
- from - today
An update to allow users to define a specific date
range for a chart on the home window. This update
only applies to the LTM chart and only allows a
date range from/to to be defined.
It would be nice to also support a last 'n' 'period'
selection too (i.e. last n days/weeks/months).
Also, further updates are required to add similar
functionality to TreeMap, CP, Dist and Summary charts
when they are on the home window.
When optimising for performance the measures
refresh was lost in LTMPlot. This reinstates
them.
Additionally, measures are now shown on the
metric list with a "(m)" after their name to
help differentiate them.
Only refresh when dateRange actually changes
within dateRangeChanged() since it is a signal
used by the HomeWindow to ask a replot when
a tab is selected.
Should speed up navigation across diary and
home view.