Commit Graph

195 Commits

Author SHA1 Message Date
Damien
f00ab725f3 Add a TCX ride exporter 2011-08-05 15:43:05 +01:00
Mark Liversedge
aa9f6c5f3b Fix delete ride to remove .notes file
Will also remove the .cpi or .cpx if it is there.
It still renames the original to original.bak so
it doesn't actually zap the file.

Fixes #115.
2011-08-01 23:07:00 +01:00
Mark Liversedge
d86a6152bc Show anomaly list in ride editor controls
The ride editor does a pretty good job of finding anomalies
in the ride data, and to help it underlines the anomalies with
a wiggly red line and adds a tooltip to explain.

But, you have to scroll up and down the file to look for them
and when you are scrolling at high speed the wavy lines are
difficult to spot.

This patch updates the ride editor controls (which previously
only had the find dialog) and adds a list of anomalies at the
bottom. You can click on an anomaly to jump to it in the ride
data.
2011-08-01 14:46:35 +01:00
Mark Liversedge
de13fb08fe Do not allow user to open same cyclist twice
The choose cyclist dialog allows you to open
a cyclist that is already open. This is not
a great idea since the two windows will conflict.

This patch introduces a global vraiable to track
open windows (mainwindows) and MainWindow maintains
it as it opens and closes.

AthleteTool still needs to be updated to refresh
as new cyclists are created (and when its written
deleted).
2011-08-01 11:24:17 +01:00
Mark Liversedge
abd8790458 Fixup for V3 Ride List (RideNavigator)
Multiple issues fixed related to automagic
resizing of columns as the sidebar is stretched
and shrunk.

* Geometry and Columns are now cyclist specific
  since the metadata config is cyclist specific.

* Multiple 'dynamic' bugs related to setWidth() and
  columnsChanged() calling each other or being
  triggered by a signal caused conflicts

* Column widths were incorrectly calculated when
  no vertical scrollbar is visible on the ride list
  (typically when the user has just created a new cyclist)

* Incorrectly including the '*' virtual column in calculations
  when it should always have a width of 0px

The Ride Navigator should now be relatively bug free for
column resizing. More tests are needed on the interaction
with the old context menu (i.e. delete/add/save ride). Some
preliminary tests suggest it is pretty stable.
2011-07-30 22:25:31 +01:00
Mark Liversedge
e2d5e3678e Fix right-click crash on ridelist with no rides
When there are no rides to select in the ride list (e.g. when
just created a new user) right click for a context menu will
crash since it assumes there will always be a ride selected.
2011-07-30 12:13:16 +01:00
Mark Liversedge
f7a9e32170 Sidebar adjustments, wip
The sidebar activity list columns expand and
reduce as the sidebar is resized. Still a work
in progress with a number of cosmetic issues
remaining.
2011-07-16 10:58:20 +01:00
Mark Liversedge
55b323572c Fixup UI for Mac
Removed the horrible dock widget and uses same sidebar
as windows and linux. Removed segmented button for now
since there are a few issues, but retained the code for
the future.
2011-06-11 12:27:54 +01:00
Mark Liversedge
2e15d74658 Ride Plot Axis coloring
The legend wasted screen estate and was removed, this patch
colors the axis labels/ticks so no legend is required. This
approach could be adopted for other charts.

Also includes a fix to hide realtime view controls which
left a screen glitch because they should have been hidden.
2011-06-05 01:51:45 +01:00
Mark Liversedge
c820de8f57 UI Cosmetics & Nits
Added a dropshadow effect for window tiles and made the
title embossed for a more professional look.

Also fixed a couple more compile time nits introduced
by recent commits.
2011-06-03 18:07:01 +01:00
Mark Liversedge
56bcc67a0a Simplify and Clean UI
Less jarring UI with simple use of color and
no pixmaps to make a clean look. Will need
more work to get consistent across the code
base.

A simple and clean UI is starting to emerge.
2011-06-01 21:46:31 +01:00
Mark Liversedge
4ab96e16d1 Sidebar, Ride List and Aeshetics
An update to the ride list on the left hand side
to enable the user to choose and sort or group-by
metrics, metadata fields and ride information.

In addition, the sidebar has been 'improved'
cosmetically and to require less screen estate.

Also, the ticks and frames on plots have been
adjusted to be more aesthtically appealling.

There is more to come on the look-and-feel front,
but this patch heralds some work on the sidebar
which needs to be resolved.
2011-06-01 16:34:24 +01:00
Mark Liversedge
4c6d926780 Fix First Ride File Import Crashes
When you import the very first ride into V3 it will cause
a SEGV crash when attempting to freeMemory. This is because
the first entry added to a list does not cause any selection
to be made.

This means that the very first time someone tries to use GC
version 3 it will crash! Not the best of starts.

This bug was previously reported as being related to importing
json ride files, it occurs for ANY ride file type.

Fixes #328.
2011-05-21 21:31:12 +01:00
Mark Liversedge
4801fc0b87 Make toolbar color configurable
Not generally useful but allows one to make the toolbar
menu and titlebar match for a more pleasing general effect.
Most users will not use this I imagine and use the default
window colors.
2011-05-15 21:35:21 +01:00
Mark Liversedge
c7e0d4ed8c MainWindow Housekeeping
The MainWindow.{cpp,h} code was a bit messed up after a
few years of hacks from different devs. This non-functional
patch re-organises the source files, removes a couple of
unused methods and adds a few comments to help new devs
navigate through the code.
2011-05-15 20:18:09 +01:00
Mark Liversedge
c4ce45fef9 Make Analysis view configurable
You can now configure the Analysis view to drag and drop
charts on the page and lay them out etc. A default setup
displays basic data such as ride summary, histograms and
ride plot.

MainWindow still needs a bit of a tidy-up as the basic
code has been edited and re-edited by a cast of thousands
and its a bit of a mess as a result.
2011-05-15 14:34:34 +01:00
Mark Liversedge
3ae81329d7 Make Training View Configurable
The training view (aka realtime) is now configurable
allowing users to drag and drop appropriate charts
and dials onto the main view.

The controls for this view are static and comprise the
old controls with start/stop buttons, device selections etc.

I have removed deprecated code too, the following are removed
from the repository;
* ViewSelection
* RealtimeWindow
* TrainWindow
* TrainTabs

Fixes #290.
2011-05-10 18:21:08 +01:00
Mark Liversedge
be09315d70 More 'orphaned' Widgets
RideMetadata widget in mainindow is never placed into a layout
since it is not used for user entry/display.

MetricAggregator used QWidget as a base class, this should of
course have been QObject. It uses signal/slots but has no GUI.
2011-05-07 14:10:52 +01:00
Mark Liversedge
8d3f120d4d Remove orphaned central widget in MainWindow
Been chasing this down for ages. An orphaned widget in
MainWindow caused the tick for opening the drawer on Macs
to be 'unresponsive' and on Linux made the Cyclist and Ride
menubar options similarly 'unresponsive'.

When adjusting layouts for homeWindow and others a new
widget 'central' was introduced and then not used, but the
code was left behind.

This patch removes the errant code.
2011-05-07 13:26:13 +01:00
Mark Liversedge
e8d213c444 Temporary Fix for Ride Selection after NULL ride selected
When you clicked on 'All Rides' mainwindow emits a rideSelected
signal with a ridefile of NULL. When then selecting a valid ride
a SEGV occurred.

This temporary fix removes that signal, but the underlying issue
related to actions after a NULL ride is selected need to be resolved.

Fixes #318.
2011-04-26 21:31:43 +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
ec3c7a2b5a Less jarring use of pixmaps in look and feel. 2011-04-18 22:48:49 +01:00
Mark Liversedge
15741d6017 Merge branch 'release_3.0.0dev' of github.com:/srhea/GoldenCheetah into release_3.0.0dev 2011-04-17 22:09:27 +01:00
Mark Liversedge
7a63d1f5dc More NULL ride bug fixes
The controls for the RideEditor (find) and AllPlotWindow
still try and do their thing when the current ride item
is NULL. This was either because it wasn't checked (or
expected) or the widgets in question were not notified. This
patch fixes this.

When I get a chance the whole codebase needs to be refactored
to gracefully handle NULL rideItems -- each plot/window should
clear state when it is notified that NO ride is selected.
2011-04-17 21:39:16 +01:00
Mark Liversedge
97053386d8 Fix RideEditor crash on last delete
If you delete the last ride and scroll down in the ride editor
GC will crash. This patch ensures the model is invalidated when
a ride is deleted.
2011-04-17 19:47:36 +01:00
Mark Liversedge
ea02242558 Merge branch 'release_3.0.0dev' of github.com:/srhea/GoldenCheetah into release_3.0.0dev 2011-04-09 11:42:55 +01:00
Mark Liversedge
6af6b347bf Version 3 - No Ridefiles Bugs Bonanza
When no ridefiles are available (new cyclist) or the last ridefile
is deleted the current ride will be null. In addition the ride
importer deletes the memory for a ride imported to ensure VM is not
exhausted on large imports.

This patch fixes a whole host of null errors across the codebase. They
were identified by creating a new cyclist, executing every menu option
and tab/chart and then importing a file choosing everything and then
deleting the file and choosing every option again.

This negative testing should be performed before every stable release since
it has identified at least 6 bugs which are almost certainly present in the
current V2 code.
2011-04-09 11:24:40 +01:00
Mark Liversedge
0d307e0c5b HomeWindow takes a name to load/save layout. 2011-04-06 21:14:36 +01:00
Eric Brandt
dd4f5ff85c Added 'interval summary' window below the interval tree
When an interval (or intervals) are selected in the
interval tree, the new window below the tree now shows
summary information for the selected interval(s). This
is beneficial for example when the Ride Plot tab is shown
and the user also wishes to see summary info about the
intervals. This fixes #77.

I think there is still room for improvement on the fields
displayed and the formatting of the summary window. For now
the fields are the same as those displayed in the Ride Summary
page.
2011-02-27 13:21:58 +00:00
Mark Liversedge
8af6973c24 Merge branch 'release_3.0.0dev' of github.com:/srhea/GoldenCheetah into release_3.0.0dev 2011-02-05 12:53:59 +00:00
Mark Liversedge
519f5fcc5e Improved Season Support
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.
2011-02-05 12:46:54 +00:00
Greg Lonnon
42508c7f88 Computrainer Workout Wizard
A wizard to create workouts based on absolute wattage and time
relative wattage and time (to CP60) slope and distance and import
an existing ride, and provide some smoothing to the ride data.

Also fixes NP calculation SEGV when recIntSecs is negative.

Fixes #249
2011-01-30 14:24:29 +00:00
Mark Liversedge
1fdf45d26d Improved Calendar Support
Fixes previous CalDAV support, as MobileMe based calendars
now work ok. Additionally, a new 'id' field has been created
to provide a persistent and immutable identifier for a ride
file (regardless of changes to date/filename).

The URL provided in the Calendar config pane can now include
'@' symbols (they are translated to %40).

The CalDAV URL should be provided for a calendar collection and
not for a principal. Examples being (trailing slash is significant):

Google  : https://www.google.com/calendar/dav/xxxx@gmail.com/events/
MobileMe: https://cal.me.com:8443/calendars/users/x.xxxxxxxxxx/home/
2011-01-22 18:54:05 +00:00
Mark Liversedge
c7b1c77fb7 Cosmetic tidy on DiaryWindow, tidy CalDAV code. 2011-01-16 20:09:29 +00:00
Mark Liversedge
696a9273dd Upload Ride to calDAV based calendars
A new menu option and associated config to integrate the
diary window (and ridefile history) with a calendar server
that supports CalDAV (iCal, Google, MobileMe).

This patch introduces an upload to calendar function and is the
first step towards adding calendar based planning functions.

It is important to note that no local calendar is maintained, we
are simply integrating with an existing calendar service.

It has been tested with Google Calendar, further testing and
enhancements are ongoing for users of Apple's MobileMe.
2011-01-16 15:04:40 +00:00
Mark Liversedge
54b8e8f571 Export Metrics to CSV
A new menu option to export the ride metric data
as a CSV format file for manipulation in tools like
Excel.

It exports all rides (no date range) and outputs the
date in US format month/day/year, with time in 24hr format.

Additionally, a 'hack' to export all rides in GC format has
been removed since it was erroneously included in the initial
v3 branch.
2011-01-11 19:28:35 +00:00
Damien Grauser
6ac75fda3a SRMWIN Style HrPw Plot
Added a plot of heartrate to power showing
histograms of power on y-axis, heartrate on
the x-axis and overlaid hr/power scatter.
2011-01-07 22:07:23 +00:00
Mark Liversedge
0ef63a51a4 Make libical optional
If ICAL_INSTALL is not defined in gcconfig.pri
then diary/calendar functions are not compiled. This makes
libical an optional dependency, like libkml, libqwtplot3d et al.
2011-01-03 11:30:56 +00:00
Mark Liversedge
1db39c5536 Fix homewindow bugs
Fixes;
- drag and drop ride works again
- segv on an empty measures curve in metric plot
- remembers all LTMsettings
- further cosmetic/visual tweaks
2011-01-02 13:14:34 +00:00
Mark Liversedge
4e1cde69bc Julian Candy 2011-01-02 13:14:30 +00:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
532fe0d26c Disable Ride Editor for manual or null rides. 2010-11-27 22:00:23 +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
Justin Knotzke
899e6eb362 Support for OAuth for the Twitter feature. Metric adjectives by Robert Carlsen. 2010-08-26 14:06:25 -04:00
Mark Liversedge
f6eb97ec0f Add support for Google Earth (KML)
This patch adds an 'Export to KML' option to the ride
menu. It will create a .kml file including power, hr,
torque etc. These can be viewed alongside the map view
in Google Earth 5.2.

Please note this requires libkml. The features of libkml
that are required were introduced in revision 852 which
means that as of Aug 2010 you will need to checkout from
the SVN source repo and build;

svn checkout http://libkml.googlecode.com/svn/trunk/ libkml-read-only

and the ./configure mantra that worked successfully for
me on Mac OS X was;

./configure CC="gcc -arch i386" CXX="g++ -arch i386" --disable-swig

Building on WIN32 is currently fraught with issues, unless
you build via MSVC 2010. Linux is straight forward but you will
need to install / apt-get libcurl.

Fixes #133.
2010-08-26 10:47:49 +01:00
Mark Liversedge
fef237f138 PWX Ride file support
Support for Training peaks new .pwx file format. This
is an XML format (and is particularly verbose). Support
has been added to enable interoperability with WKO+ v3,
TrainingPeaks.com and Device Agent.
2010-08-06 19:48:51 +01:00
Justin Knotzke
e1d69f71e1 Tweet your ride. You can now tweet your ride from GC 2010-07-18 15:15:26 -04:00
Mark Liversedge
cd3bbc4e64 Ride editor and tools
A new tab 'Editor' for manually editing ride file data points and
associated menu options under 'Tools' for fixing spikes, gaps, GPS
errors and adjusting torque values. A revert to saved ride option
is also included to 'undo' all changes.

The ride editor supports undo/redo as well as cut and paste and
"paste special" (to append points or swap columns/overwrite
selected data series). The editor also supports search and will
automatically highlight anomalous data.

When a file is saved, the changes are recorded in a new metadata
special field called "Change History" which can be added as a
Textbox in the metadata config.

The data processors can be run manually or automatically when a
ride is opened - these are configured on the ride data tab in
the config pane.

Significant changes have been introduced in the codebase, the most
significant of which are; a RideFileCommand class for modifying
ride data has been introduced (as a member of RideFile) and the
RideItem class is now a QObject as well as QTreeWidgetItem to
enable signalling. The Ride Editor uses a RideFileTableModel that
can be re-used in other parts of the code. LTMoutliers class has been
introduced in support of anomaly detection in the editor (which
highlights anomalies with a wiggly red line).

Fixes #103.
2010-07-17 14:33:39 +01:00
Mark Liversedge
06e44b8d47 Fix drag slider from Maps tab
When viewing the maps tab it is possible to drag and drop
the slider causing a file import dialog to pop-up and fail.
This patch rejects any drop events where the url is http.

Fixes #97.
2010-06-06 18:43:22 -07:00
Mark Liversedge
c4f82e19b6 Better Zones Configuration Page
The zone ranges configuration page caused a SEGV when deleting the
last zone. On inspection the zone configuration needed to be
revised since the UI was confusing and didn't allow fine grained
user editing (relying upon manual editing of the power.zones file).

The UI has been redesigned and fine grained editing of ranges, zones
and default zones is now supported.

The Zones class has been slightly modified to support the new UI and
existing members are better commented. In addition, the read/write
functions have been updated to always include the DEFAULTS section and
to set defaults according to manual zone setups when it is not present
(legacy support).

There are now 10 TimeInZone metrics to match the maximum of 10 zones
the user can define.

Fixes #78.

Fixes #34.
2010-06-06 18:36:50 -07:00