Commit Graph

20 Commits

Author SHA1 Message Date
Mark Liversedge
8f034fa5b2 RideCache::refreshUpdate(QDate)
.. updated to now pass the date at which the update has
   got to. So charts on need to refresh if the data they
   need is prior.
2014-12-18 13:57:06 +00:00
Mark Liversedge
2492108d35 Progress line show()
.. called when progressUpdate() too as it may well
   miss the first signal (e.g. switch view during a
   refresh).
2014-12-12 18:13:53 +00:00
Mark Liversedge
5d13307f96 RideCache::load()
.. loads the cache/rideDB.json back on startup to avoid
   any refresh of metrics etc

.. uses a lex/bison JSON parser, not because of performance
   since its only run one at startup, but because;

   * QtJSON support is only available in QT5
   * mvjson uses a DOM model that creates a memory overhead
   * the existing bison/lex parser works well and is easy to
     use as a template for this

We now have a good mechanism for metrics and metadata refresh,
cache and recovery so can look at using it in the charts and
the ride navigator next !
2014-12-10 19:34:09 +00:00
Mark Liversedge
22584288ca Ridecace Measures deprecated from SQLite
This is quite a big patch with lots of nasty interdependencies
all collected together but essentially it deprecates;

* Measures are no longer stored in SQL tables
* Zeo support has been dropped (they went bust)

To achieve this there are a large number of updates;

* Withings json is now cached in /cache and in the Athlete
  class. So can be traversed in memory rather than SQL

* All "measures" on LTM have been removed and the only metric
  left is "Athlete Weight" that cascades from withings to ride
  "Weight" metadata value to athlete settings to a 80kg default

* RideCache is now refreshed, but only for metadata. This is needed
  to cache the "Weight" metadata from rides when calculating weight.

* JsonRideFile parser is now re-entrant since it will run in parallel
  during RideCache refreshes (using the QtConcurrent::map()
  framework).

BUT NOTE

* This is about deprecating the Measures table more than anything
  else. Functionally we are in pretty much the same place; just that
  data is stored in a different place.

  e.g. metric/imperial handling of weight is not fixed yet, no
  metrics are in the cache yet, load/save of the cache is not done
  so startup is slow etc.
2014-12-08 16:48:58 +00:00
Mark Liversedge
dc5beca607 RideCache / RideItem fixups
.. fingerprint for range should not take into account the
   start/end date as its irrelevant and will change

.. RideItem now responsible for refresh and status updating
   on the rideitem

.. framework seems good now; only rides that need to be refreshed
   will get asked for a refresh -- but need to look more closely
   at how we derive 'Weight' for each rideitem now...
2014-12-07 00:11:44 +00:00
Mark Liversedge
282ecdef63 RideCache Background Refresh Framework
.. subtle, thin progress bar on tabview to notify
   when background updates are in progress

.. background updating code created but does not
   perform a refresh yet, just sleeps for 0.2s

.. to enable 'visibility' of the code use WANT_RIDECACHE
   to the defines in gcconfig.pri
2014-12-05 20:08:32 +00:00
Mark Liversedge
a61c1e3217 Introduce the RideCache
.. just a refactor of ridelist out of Athlete for now
   but will shortly be refreshing in background and
   loading and saving to rideDB.json
2014-12-05 15:30:54 +00:00
Mark Liversedge
f148481ada Finally remove Old Ride list QTreeWidget !
.. 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.
2014-12-03 10:33:50 +00:00
Damien
6444df2178 IntervalSidebar: Add bests navigator 2014-11-16 12:33:44 +01:00
Mark Liversedge
d1334d8dff Make Intervals view optional till v3.2
.. we will develop over the next few months but it will
   not be ready for v3.11 so making it optional.
2014-11-13 08:05:04 +00:00
Damien
08987d693a IntervalView: Add a new intervals View 2014-11-12 22:29:40 +01:00
Mark Liversedge
b890459b5a Clear Interval Summary on Ride Selection
.. otherwise its left with summary from previous ride.
2014-06-09 11:27:43 +01:00
Mark Liversedge
761c78b3b2 CP Refactor 2 of 3
.. fixup ride mode, interval hover crash/bugs
.. fixup interval compare mode
.. fixup rangemode

NOTE: Compare date ranges is still broken that
      will be fixed in part 3.
2014-03-25 10:49:58 +00:00
Mark Liversedge
f631d72abe Fix RideEditor SEGV on rideselected (!)
.. When interval tree is rebuilt it can cause an issue in the
   ride editor when clearing the selection model.

.. still trying to get to the botton of a SEGV on Mac.
2014-02-27 17:07:50 +00:00
Mark Liversedge
bd37801225 DateRange Compare Pane
.. now can drag and drop any date range onto the
   home view compare pane to compatre different
   seasons, and even across athletes.

.. we setup the metrics and measures in the context
   so the charts don't have to, but we still need to
   reference the source context for bests and ridefilecache
   data

NOTE: We need a mechanism for 'locking' source tabs/athletes
      when they are part of a compare to avoid crashing when
      a context is deleted whilst we are comparing

NOTE: We till need a way to remove entries from the compare
      pane, possibly call it when an athlete is closed too
      (see note above).
2013-12-29 13:00:46 +00:00
Mark Liversedge
9963904fa3 MainWindow Refactor Part 5 of 5 - TABBED ATHLETES
The final part (and one of the reasons) for the mainwindow
refactoring -- we now support tabbed athletes rather than
having a new mainwindow for each athlete opened.

Context is saved/restored and there are new functions for
opening and closing tabs and windows of tabs.

The tabbar itself is fugly -- the next few days will spend
some time looking at making it prettier on Linux/Win and
more native on Mac (see MMTabBar).
2013-12-26 01:03:32 +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
e7afcbb028 Basic Compare Pane Hide/Show
.. just committing before adding animation and the compare pane content.
2013-11-28 21:07:43 +01:00
Mark Liversedge
c03d36202f Train Controls Temporary hack
.. to at least be able to start/stop a workout
   will fixup over the next few days to make a
   more professional controls overlay.
2013-07-28 20:34:09 +01:00
Mark Liversedge
9473e28200 MainWindow Refactor Part 4 of 5
Split the views in MainWindow into separate classes;

* Tab is a collection of the 4 main views

* TabView is a base class for all of the 4 view types

* {Analysis,Train,Diary,Home}View are all derived from
  TabView and deal with specifics of those views (e.g.
  Diary/Home worry about date ranges).

We should be ready to move to tabbed athletes soon.

There are a few nits left for this part of the refactor
that will need to be resolved in some fixups over the
next few days;

* tile mode segment selector has wrong segment selected
  when the view is in tile mode.

* Minimum height/width of MainWindow is large for some
  reason

* the Train view controls (play, ffwd etc) have nowhere
  to go at present -- need to fix that !!!

* When you resize the mainwindow width the sidebars expand
  and should remain a fixed width

* not sure if it will build on Windows or Mac!
2013-07-27 21:41:03 +01:00