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.
When dateRange was implemented in LTMSidebar and the property
dateRange was introduced to LTM charts a nasty double and
triple plot bug was introduced.
This update ensures the chart is only plotted once when it is
selected.
Don't refresh CP, LTM or Histogram plots when dateRange property
is set, if the dateRange was previously plotted anyway. Will set
to stale if a ride is added or deleted too.
This means the replot of tabs is not performed when simply switching
between tabs. But will if the date range does change or a ride is
added or deleted meaning the aggregate needs to be re-calculated.
There is still one more performance improvement required;
1. get RideFileCache to have a cache of recent aggregations.
Since (a) the same ranges will be called over and over by
different charts when a season is selected and (b) there
are only likely to be 20-30 seasons defined in total, so
lets cache them instead of recalculating every time.
Remove the double update from HomeWindow and only
update in CP and Histogram when visible.
Still need to:
1. get CP/Histogram to remember what the last update
was to not bother unless something has changed.
2. get RideFileCache to have a cache of recent aggregations.
Since (a) the same ranges will be called over and over by
different charts when a season is selected and (b) there
are only likely to be 20-30 seasons defined in total, so
lets cache them instead of recalculating every time.
We now have a date range selector in the sidebar. The
sidebar has a date range selector and summary. It is
used to set the date range for the charts in the view.
As a result we can now add summary charts to the home view
and LTM/CP/Histogram charts to the Diary view. The weekly
summary chart is now deprecated.
Creating seasons has also been disabled on metric charts. We
will need to decide what clicking on an LTM chart should do,
and look at whether we want to keep the popup bubble or
adjust it.
There are some unfortunate performance degradations as a result
of this patch when selecting date ranges and switching between
charts in tab view. This needs to be addressed as a priority.
Follow up patches, part 2 and 3 will need to;
1. address performance degradations & cache results
2. introduce events in sidebar and as annotations on charts
3. implement click functionality on LTM charts (annotate vs
define a new season/range)
NOTE: existing HOME, ANALYSIS and DIARY chart setups will need
to be rebuilt since chart ids and properties have changed
in this patch -- do not raise a bug until you have deleted
and re-added the offending chart.
Last part of the search/filter functionality;
* SearchBox now incorporates filter and search
with a new widget. We can update this widget
to include more fancy UI/Interactions without
having to change the ride list or charts etc.
* Added search/filter widget to the relevant charts
and screens; Metrics, TreeMap, CP, Histogram,
Activity Log, Ride list (refactored out of MainWindow)
* Added namedsearches.xml and adding/selecting them
from a drop down menu on the search box.
* Fixed some performance bugs related to duplicate
signals and redraw/reprocessing. Also ensured that
CLucene remains optional -- but means no search or
filter functionality unless it is available.
Upgrade to QWT 6.0.1, but still uses a locally patched copy
since support for 8 axes has not been included, despite it
being a relatively simple patch.
Fixes#634.
Fixes#567.
The controls in the sidebar are inconsistent; the interval
selector has no spacing or border for a clean look.
This patch updates LTMTool and TrainTool to be more
efficient with the limited space.
A more extensive update is still required to unify all the
chart controls look and feel and get rid of the clunky
layouts with ugly wide buttons.
This is a perennial issue for new users. The default
action when click dragging on a chart is to Zoom -- this
was probably right when we had no span sliders or stack
view (and no facility for marking intervals either).
But now, most users will expect click and drag on a metric
chart or ride plot to mark an interval or date range.
We get regular feature requests and bug reports related to
this -- basically the mouse actions are not intuitive.
Where selection is not meaningful (e.g. histogram) then
left click will zoom. This should be reasonably intuitive
to most users.
Fixes#398.
This fixes issues with date range editing in the Metrics controls
and provides support for Season load planning (under development).
Creating and selecting seasons is largely managed within the
Metrics tool. This has not been changed with this patch. Athlete
seasons are now managed as a member of the MainWindow class (although
this will move to an Athlete/Cyclist class when MainWindow is
refactored).
A Season identifier (UUID) has been introduced to enable Seasons to
be referenced independently of their name or date ranges. The LTM
tool now keeps track of changes to Seasons (when new seasons are
created, changed, deleted). Additionally, the Season XML file now
supports storage of a Season Load Plan.
This patch introduces new functionality for working with
Heartrate based data.
* HR Zones can be defined, from Resting, Maximum and Lactate HR
* TRIMP metrics are calculated; TRIMP, TRIMP100 and Zonal TRIMP
* TRIMP metrics can be used to drive the PMC
* Time In Zone metrics for HR have been added
* Histogram window will now work with Power/HR zones
* User Settings have been added to record gender, weight and others
* RideFile has a new tag "Athlete" which is set to the athlete name
Fixes#140
And pay attention to MainWindow::activeTab, such that only the active
tab redraws itself when changing rides. This change really increases
GC's responsiveness when scrolling through the ride list.
A user configurable chart for showing ride metrics and
other calculated values over time.
* Uses SQLITE database to store metrics
* Supports any metric available from the metric factory
* Adds new MaxHr, VI, Peak Power and Time In Zone metric
* Also includes LTS/STS/SB for PM charting
* Aggregates in days, weeks, months or years
* Reads and Updates seasons.xml
* Adds cycles and adhoc date ranges in seasons.xml
* Date ranges can be selected on the plot with shift-left click
* Allows users to customise preferences for color, symbols et al
* Allows user to customise metric names and unit names
* Supports smooth curves and topN highlighting
* Has a linear regress trend line function
* Allows users to save charts to charts.xml
* A default charts.xml is built-in
* A chart manager to import/export/rename/delete charts etc
* Provides a tooltip to provide basic datapoint information
* Performance Manager adjusted to use the MetricDB
* User configurable setting for SB calculation (today/tomorrow)