Commit Graph

28 Commits

Author SHA1 Message Date
Mark Liversedge
de0b28f9dc Fix gcc 4.5 compile errors
Gcc 4.5 considers explicit calls to object constructors to
be errors. This patch corrects these to enable building using
this current release of the GNU C++ compiler. This is required
to support building on Windows with the current Qt 4.6 sdk
since it includes gcc 4.5.

It is worth noting that this relese of the GNU compiler also
spots two or three uninitialised variables too, I will correct
these at a later date.
2010-08-04 21:35:09 +01: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
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
Mark Liversedge
778d651f00 User Configurable Metadata
User configurable data entry for recording information about
each workout.

FEATURES:
* Config UI for defining tabs and fields to maintain
* Config UI for defining keywords and colors
* Data maintenance UI on RideSummaryWindow
* "Special" Metadata fields are related to current variables
* Read/Write new fields/metric overrides via GcRideFile
* Metadata extraction in WKO files
* Calendar uses keyword and color config
* Numeric metadata is plottable on the Metric charts
*Metric refresh has been optimised
2010-04-01 10:29:13 -04:00
Mark Liversedge
d1d2037883 New Cyclist set first CP SEGV fix
When setting up the CP for a new cyclist the code for inserting
ranges called setCP with an unitialised range number variable. This
fix sets it to 0 for the very first range.

Also fixed the indentation of the code around the fix to make it
easier to follow.
2009-12-19 18:48:54 -05:00
Sean Rhea
71d67e2203 check that cp > 0
The commit replaces the erroneous commit a3ae0ee.  I thought the problem with
the zones file that motivated that commit was that some of the zones were of
length zero.  In fact, the problem was just that the CP is zero in the first
zone range, and a CP of zero leads to a RI of inf.
2009-12-18 09:38:22 -05:00
Mitsukuni Sato
009c013521 add calls to tr() for translation 2009-12-17 19:10:36 -05:00
Sean Rhea
a3ae0ee314 check that zone.hi > zone.lo 2009-12-17 17:34:48 -05:00
Sean Rhea
1096fb4125 make some functions const 2009-12-10 10:16:57 -08:00
Sean Rhea
90ce36f984 make some functions const 2009-12-10 10:16:57 -08:00
Sean Rhea
eb9eddfb66 zones ptr is never null 2009-12-10 10:16:56 -08:00
Sean Rhea
3bb50ec996 whitespace and other nonfunctional cleanup 2009-12-10 10:16:56 -08:00
Sean Rhea
21782c4e6f remove duplicate addZoneRange function
The cp argument wasn't being used, so just call the one that
doesn't take a cp argument.
2009-12-10 10:16:56 -08:00
Sean Rhea
27d55025ac nit: cleanup function 2009-12-10 10:16:56 -08:00
Sean Rhea
d2d0ac9f1c QList<ZoneRange*> --> QList<ZoneRange>
Again, get rid of deletes at the slight expense of a few cheap copies.
2009-12-10 10:16:56 -08:00
Sean Rhea
9cb955e9b3 QList<ZoneInfo*> --> QList<ZoneInfo>
Gets rid of some deletes, and shouldn't be much slower,
as QStrings are copy-on-write.
2009-12-10 10:16:56 -08:00
Sean Rhea
1c5b8e4168 remove printfs and cleanup whitespace
No functional change.  Note, however, that removing the printf from
addZoneRange(int cp) revealed that the cp argument was unused.
2009-12-10 10:16:55 -08:00
Sean Rhea
e7b762333d ugly fix for zones file without a BEGIN
Just attribute all earlier rides to the first zone.  We should do better in
the future, maybe by complaining to the user in a dialog, but for now,
not crashing definitely seems better than crashing.
2009-11-21 15:23:04 -05:00
Sean Rhea
cb50314915 use colors from RideList in htmlSummary
Rob Carlsen suggested that the htmlSummary should use the same colors as in
the ride list.  I agree, but they're a little to light, so bump the saturation
a bit.  While we're at it, go ahead and do the zones list, too.
2009-11-01 21:03:30 -05:00
Sean Rhea
e7e34c107e use a QVector for time_in_zone 2009-09-27 20:00:47 -04:00
Justin F. Knotzke
9fefe27a38 Dan Connelly's MEGA patch.
It includes both powerzones and weekly summary plots.

  Thanks Dan.
2009-06-22 02:22:35 +00:00
Justin F. Knotzke
7e6ee45d9a Dan found a bug in how the dates were written to file. 2009-04-17 12:03:25 +00:00
Justin F. Knotzke
bc17462c41 Fix by Daniel Connelly to ensure Zones Ranges are more continuous. 2009-04-10 14:06:18 +00:00
Robert Carlsen
1292a5f8e9 Applied JTC's P10, changing DatePickerDialog and RideFile objects to use boost::scoped_ptr to ensure that the objects are deleted. He recommends that we extend this technique to replace other raw pointer / delete methods.
Also, changed PfPvPlot so it will look for the CP from the power.zones file and use that rather than a hard coded value.
2009-01-12 17:15:54 +00:00
Sean C. Rhea
91f114f199 from Justin: more hacking on the zones editor 2008-05-18 15:11:21 +00:00
Sean C. Rhea
25b17de0e4 from Justin: nits 2008-05-14 14:57:00 +00:00
Sean C. Rhea
e6c85a12f4 from Justin: zones editor, switch from FTP to CP 2008-05-14 00:17:10 +00:00
Sean C. Rhea
6e5487ca39 everything in one directory 2008-05-12 03:28:53 +00:00