.. this removes the dependencies on liboauth and friends
and replaces it with a single lib.
.. the library is available from http://github.com/kypeli/kQOAuth
.. the only current feature that requires OAuth is tweet
your ride, but this lib will provide the services for
future oauth services.
... adds "What's this" to (hopefully) most of the widgets (please report
on missing ones)
... defines draft "Whats' this" texts including a
context specific WikiLink
.. Help Key for all platforms is <Shift>+<F1> + in some widgets
"RightMouse - Click"
... Tested on Win and Mac (On Mac QtMacButton seems not supporting
"What's this") - so here <Shift>+<F1> has no result.
... ToDo: Create final texts and links based on the to be updated 3.11
Wiki
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.
.. needed to clean RideItem a touch
.. needed to isolate intervals code as it has some
problems and breaks metricaggregator for normal
use.
.. found a bit of Context code in MainWindow.cpp (!!)
.. 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
.. to fix long standing bug with saving whilst editing
a field. But still leaves a problem if exiting whilst
editing a field (which is a bit weird tbh).
.. 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.
... but limit what individual services are build/offered based on oauth
availability (Strava, CyclingAnalytics). Load's of ifdef... making me
think about alternative solutions - especially now that the common
uploader base class allows to stuff them in a List/map/vector/whatever.
.. added Edit for all ride data processors now we
have quite a few to select from
.. shifted a few things around to make important
options more prominent (e.g. Share) and less important
ones less prominent (e.g. Heat Map)
.. data can be sourced from file, download or list
.. next to update the mode (join or merge) and the
merge strategy and parameters.
.. will also need to update the download dialog to
allow you to specify which downloaded rides to
process -- at present the merge tool assumes that
the download dialog will only return 1 result
.. pleased with the way the download dialog is embedded
within the wizard, will use that for other things!
... multiple pathes per Athlete (on Athlete-Preferences - AutoImport
TAB) - option per Path if Import shall be done or not (e.g. for
temporary de-activation without removig a path)
... configuration stored in XML file in /config subdir
... no "stealth" mode any more - but full log of Rides to be imported
with option to "Abort" the import process at any time
... create folder structure for existing and new athletes
... upgrade existing athlete to new structure when opening / incl.
logging and error handling
... convert any "Downloaded" file to .JSON directly - store source file
in /downloads
... convert any "Imported" file to .JSON directly - store source file in
/imports
... introduce new "home" Folder structure object representing the
previous flat-folder
... adjust relevant QDir home - access to use the sub-folder method of
the new object
Note: the new structure is not yet active ! - everything is written to
the main folder still
To Do:
... add upgrade procedure for existing folder content to merge to the
new folders
... import Ride Files automatically from a defined Directory per
Athlete
... runs silently/without "Import Rides" Widget if the files can be
imported/copied/... without error or warning
... Preferences->Athlete- defines
... the directory - per Athlete and- if the function is active at all
(default is OFF)
... the error handling
... report back ALL errors and warnings by opening the RideImportWizard
popup
... report back Errors and Warnings - but ignore the "File exists"
warning (so that the import directory can be continously supplied with
new files, without the need to remove the already imported ones)
.. if the default athlete weight is changed then all ride
metrics need to be recalculated to reflect the new default
.. any cached values need to be invalidated so interval metrics
reflect the new weight (if needed)
It would be better for users to maintain weight either against the
ride in the "Weight" field, or via Withings !
.. getting the upgrade code going, this just adds new functions
for changing colors and themes and doesn't perform an upgrade
.. Part 2 will deal with W' and power.zones changes
.. Part 3 will deal with chart setup changes
.. some regressions in there (setting only saved on move)
.. will check the positioning and geometry are sensible regardless
of whether they come from appsettings or defaults.
.. no doubt we will extend and refine this but at least you
can select some basic prebuilt themes.
.. will need to add more as its a limited list but the basics
are in place for now.
Fixes#855.
.. so at least chart adding should be easier and no more
UX issues.
.. need to look to add other menu options there; add page, athlete,
chart settings.
The context pointer was dereferenced after the context object was deleted. This is fixed by storing a pointer to the MainWindow in QTFullScreen, so context does not have to be dereferenced.
The logic in QTFullScreen::eventFilter is also simplified a bit.