Commit Graph

56 Commits

Author SHA1 Message Date
Mark Liversedge
aa8605e8d5 QT5 -- 1 of 3
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.
2013-12-09 09:57:13 +00:00
Mark Liversedge
d33f07661a Add Filter Sidebar
To allow selection of filters aka Named Searches when
plotting charts.

Fixes #732
2013-12-05 14:30:42 +00:00
Mark Liversedge
237e51a48d Histogram aPower
Added aPower to histogram, although not zoned.
2013-11-06 18:50:29 +00:00
Mark Liversedge
0a51fdebb5 Move filters from MainWindow to Context
.. we notify search/filter updates via context rather
   than MainWindow
2013-07-27 13:51:09 +01:00
Mark Liversedge
2f056ea938 More MainWindow tidy
.. reduce the number of public members
2013-07-19 15:28:29 +01:00
Mark Liversedge
d21ca376be MainWindow Refactor Part 3 of 5
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.
2013-07-13 19:46:03 +01:00
Mark Liversedge
05f1d577db Refactor MainWindow Part 2 of 5
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
2013-07-11 14:02:02 +01:00
Mark Liversedge
e407237ac0 MainWindow Refactor Part 1 of 5
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.
2013-07-07 15:50:28 +01:00
Mark Liversedge
42325ea193 Fixup CLucene OPTIONAL!
.. CLucene is optional, but some recent updates didn't
   honour that and cause compile time errors if CLucene support
   is not available.
2013-04-26 13:21:08 +01:00
Mark Liversedge
fdf2149087 Visual cue for filter
.. 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).
2013-04-26 12:44:51 +01:00
Mark Liversedge
a57a2fd50f Metric Distribution
Show BlankState when no results for date selection.
2013-04-20 11:18:01 +01:00
Mark Liversedge
10ed9af555 Metric Histogram Plot
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
2013-04-20 10:35:44 +01:00
Mark Liversedge
01c4b436e6 Search/Filter on toolbar applies to Charts
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.
2013-04-05 16:23:16 +01:00
Mark Liversedge
89703f69d0 Fix Histogram window custom date selection
.. it wasn't updated properly when fixing custom
date ranges in LTM.

Fixes #509.
2013-03-11 10:06:27 +00:00
Mark Liversedge
102a35a00d Don't hide Histogram when in range mode
When plotting distribution for a date range instead of
for a specific activity we should not hide when the current
ride has no data (since we are plotting a range not the current
ride).
2013-02-05 13:35:34 +00:00
Damien
754e293da4 BlankState: No data available for HistogramWindow
Use the default blank state in HistogramWindow where data not present
2013-02-04 21:54:37 +01:00
Damien
f1ffb45a4f Hide reveal control after animation
Update HistogramWindow reveal controls
2013-01-28 08:04:29 +01:00
Mark Liversedge
dd4735be31 Reveal experiment, faster and in-sync. 2013-01-26 17:25:09 +00:00
Mark Liversedge
3f1ecd2fbf Reveal experiment with Histogram 2013-01-26 17:16:15 +00:00
Mark Liversedge
fe2f96e25c Reveal: Add an easing curve
Just to try different effects. InSine seems the most pleasing.
2013-01-25 18:13:47 +00:00
Mark Liversedge
543e33c6ba Add animation in more charts
Added Damien's animation to;
- Distribution (PowerHist)
- QA (PfPv)
- 2d (Scatter)
2013-01-25 16:05:28 +00:00
Mark Liversedge
40e527d022 UI Nits: Reveal Controls Cosmetics
After discussion with Damien;

* solid white background for the controls looks best
* CP on chart labels need to be less obtrusive
* keep the controls to a simple but useful set

I also tidied up some of the margins since they were
also wrong.
2013-01-25 09:28:20 +00:00
Damien
5f1627bd57 Add reveal controls for CP Plot and PfPv Plot 2013-01-20 23:36:31 +01:00
Mark Liversedge
fcb5bf0a67 UI Nits:Histogram Window border
.. I broke this in an earlier commit where I set
contents margins to 0, thus making it impossible
to resize in tile mode and also making the chart
overlap with the border.
2013-01-15 23:08:32 +00:00
Damien
00e9187d05 Transparent background for reveal controls
Add controls for HrPwWindow
2013-01-15 23:40:39 +01:00
Mark Liversedge
ab0111f195 UseThruToday: Fix Histogram chart 2013-01-14 09:50:57 +00:00
Damien
07bbf8860c initialise default value for reveal control
synchronize reveal slider with standard slider
2013-01-13 22:49:57 +01:00
Mark Liversedge
bd86206b56 Reveal Controls: Histogram
Add reveal controls to the histogram window, using
the new reveal framework.

I only added a small number of controls, we should
be careful not to overload this feature with a zillion
controls "because one user wants it".
2013-01-13 18:31:10 +00:00
Mark Liversedge
8d13576fca UI Nits: Hist chart controls errant label
If we are not in date range mode (i.e. on the home or
diary view) then we shouldn't add the 'date range' label.
2013-01-10 23:16:05 +00:00
Mark Liversedge
672e442176 UI Nits: Cosmetic gui updates
- searchbox border
- LTM controls - make search box expand
- Histogram controls - make slider expand
2013-01-08 09:48:37 +00:00
Mark Liversedge
7b8eca07bb Chart Dates: Part 3d of 3 (final)
Added chart date selection to the Histogram chart.
This now completes the updates to enable custom date
ranges to be defined in charts that support date
ranges.

Any further 'ideas' for setting custom ranges can be
added into the DateRangeEdit widget and will be re-used
across all the charts.

Fixes #417
2013-01-05 11:50:04 +00:00
Damien
28faf74884 Correct binWidth if not valid for the selected series 2012-12-02 22:32:06 +01:00
Mark Liversedge
676b6ba52b UI Nits: LTM Sidebar (Part 2 of 3)
The last of a series of recent patches to address performance
degradation from the introduction of the LTMSiebar. This last
patch introduces a CPX aggregates cache to re-use aggregated
CPX data (e.g. for plotting a specific season or date range).

The cache is set to only hold 25 caches, which should be enough
for most folks list of seasons. But won't get unwieldy if they
scroll around in the diary view.

The following will be introduced in the last patch of
this series:

1. Introduce 'events' within a season and plot them on the
   LTM chart -- a form of 'annotation' but also the beginning
   of planned events in the future too.

2. Implement click functionality on LTM charts but decide if
   we use click to annotate or to define a new date range or
   both?
2012-11-27 21:03:19 +00:00
Mark Liversedge
4bd94e9411 UI Nits: LTMSidebar performance
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.
2012-11-27 13:41:36 +00:00
Mark Liversedge
6568a05703 UI Nits: LTMSidebar performance
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.
2012-11-26 22:11:46 +00:00
Mark Liversedge
2dea77e1ae UI Nits: LTM Sidebar (Part 1 of 3)
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.
2012-11-26 20:20:36 +00:00
Mark Liversedge
d0b009c922 Data Filter (Part 3 of 3)
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.
2012-11-05 15:44:01 +00:00
Damien
b116d3aac8 Add Watts/Kg in the cpx cache files and in the CP plot
modified:   src/CpintPlot.cpp
	modified:   src/CriticalPowerWindow.cpp
	modified:   src/CriticalPowerWindow.h
	modified:   src/HistogramWindow.cpp
	modified:   src/RideFile.cpp
	modified:   src/RideFile.h
	modified:   src/RideFileCache.cpp
	modified:   src/RideFileCache.h
2012-07-08 11:03:20 +01:00
Mark Liversedge
3577fde503 Fix Torque/Speed binning in Histogram Window 2011-08-28 15:36:54 +01:00
Mark Liversedge
78f683d3f4 Histogram chart refreshes when ride added/deleted
Part of a number of fixes for bug 401. This ensures
the histogram chart is updated when a ride is added or
deleted when showing aggregated data (not a single
ride). Will set a 'stale' flag if not visible and then
refresh the data the next time it becomes visible.
2011-08-07 16:49:24 +01:00
Mark Liversedge
4972f2472e Remove console error for seasons.xml
There is no need to warn about seasons.xml missing, it
is quite acceptable to have none set. Worse still sending
to the console log is next to useless for users that
don't launch from the command line.
2011-07-29 22:17:05 +01:00
Mark Liversedge
f4fb11b9c2 Plot seasons / date ranges on Histogram Plot
The recent RideFileCache patches added functions to
pre-compute mean-max and distributions. This enabled
this patch to add plotting histograms for a date
range rather than a specific ride.

It supports all the same data series as before but will
allow you to select a season from a new combo box.

I have refactored a fair amount of the code, but kept the
original code in PowerHist as close to unchanged as I could
since I did not want to disturb existing functionality.

There is no support for Zoning historic data -- this requires
an update to the RideFileCache.
2011-05-02 19:39:39 +01:00
Mark Liversedge
41eaaa866b Plot more data on the CP plot and use a binary cache file
This patch enables more data series to be plotted on a CP plot.
We can now show curves for heartrate, cadence, speed and torque
as well as the original power and energy.

The CP code is refactored into the plotting functions and a new
RideFileCache that precomputes the mean-max as well as distribution
data (for a later patch to show histograms across date ranges).

The code for computing mean-max values has been re-written and
significantly optimised by;
* computing 1s intervals up to 5mins only
* computing 20s intervals for the remainder of the ride
* downsampling data to 5s samples for longer durations
* using a binary file format (cpx) for faster read/aggregation
* using multiple threads

Testing on an old Athlon dual-core showed an increase in performance
over the old cpi code of approximately x20, but since new data series
are now computed it is only x4 faster. Quad/Octo core systems will
show a greater performance increase though.
2011-04-25 02:20:19 +01:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
87a6f9e628 Typo in HistgramWindow for checking HR/Power ranges
The code in HistogramWindow::rideSelected() to check
HR and Power zones have been configured for the
ride just selected contained a typo; the power range
would be set to HR and the hr range would be set to
power. This resulted in the wrong options being shown
in the drop down box.

This patch fixes this behaviour.
2010-11-01 13:26:44 +00:00
Damien GRAUSER
830e4efd3d HR Zones and TRIMP Metrics
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
2010-10-31 18:08:48 +00:00
Mark Liversedge
38df7c28bd User Configurable Colors
A new config pane for defining color preferences for chart
curves, shading, background and grid lines et al. Default values
echo the current hard-coded values.
2010-04-01 10:29:13 -04:00
Sean Rhea
cd4fe5fe2e combine setActive and rideSelected
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.
2010-03-21 22:03:12 -07:00
Mark Liversedge
feb111a4ff RideFile reading refactoring
With the introduction of the rideSelected signal the RideFile was
opened (as previously) by the RideSummaryWindow::htmlSummary()
member. In some cases, this signal was processed by RideSummary window
AFTER the other charts (AllPlot etc) this results in 'No data' being
shown on other charts.

This patch moves the file reading to RideItem::ride() which was previously
a public RideFile * (that is now a protected member ride_). As a happy by
product it removes the need to check if the file has already been read
across all other functions ensuring in-core values are not accidentally
overwritten. The read errors are made available by a new RideItem::errors()
member.

This modification is required to support the RideImportWizard in freeing
loaded RideFiles during batch import to ensure virtual memory is not
exhausted when large numbers of files are imported at once. This modification
is also included in this patch.
2009-12-18 19:39:29 -05:00
Mitsukuni Sato
009c013521 add calls to tr() for translation 2009-12-17 19:10:36 -05:00