Commit Graph

26 Commits

Author SHA1 Message Date
Mark Liversedge
432e6ec3a9 Plot Predicted W'bal in Train mode
.. only plots predicted W'bal for the workout but at least that
   means you can see if the workout is even possible.
2014-01-28 18:32:26 +00:00
Mark Liversedge
e80243eea1 QWT 6.1 canvas() revert and LTM ToolTip fixups
Reverted the update to the QWT 6.1 code to make QwtPlot::canvas()
return a QwtPlotCanvas -- it now returns  QWidget.

This means our local copy of Qwt is the same as the published version
so we should be able to stop maintaining our own copy when Uwe pushes
the multiaxis stuff with 6.2.

Also fixed the LTM tooltip - the zoomer has been removed.
2013-12-11 17:58:35 +00:00
Mark Liversedge
c3a189b25c QT5 -- 2 of 3
Fixup all the GC code to use the QWT 6.1 code.
It needed canvas() to be patched to return a
QwtPlotCanvas and not a QWidget.

We could probably get round that with a cast.

When we switch to QWT 6.2 with the multiaxis
support formally baked in we can fix the code
as needed.

Now compiles and links without issues.
2013-12-09 12:26:55 +00:00
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
c8203fa566 A little less MainWindow.h
.. slowy removing it everywhere.
2013-07-18 09:37:32 +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
cd2fca9346 Code Cleanup: Remove #if 0 code
As a personal habit I tend to use the C pre-processor to
comment out code blocks I don't want to remove. This is in
case the code will be required in the future.

I think it is now safe to say the code commented out is not
required -- most of it is legacy and marks the transition from
earlier designs or legacy code.

I've done this in one big commit since in theory it has no
functional change, and in future can look in this commit for any
code we may want to reinstate.
2013-02-11 15:00:00 +00:00
Jaime
dfacbcb037 In ErgFilePlot(), made the X and Y axis color configurable. 2013-01-10 21:34:06 -05:00
Mark Liversedge
05c96f3265 UI Polish: Linear gradient in ErgFilePlot
Use a linear gradient to fill the load curve in the train view.
2012-12-17 11:26:40 +00:00
Damien
6ed7585eec Remove some warnings 2012-12-15 17:18:44 +01:00
Marc Boudreau
c1d8c1ca51 Fix:
- incorrect RegEx to read some CRS files
- all files were assumed to be metric - (UNITS = ENGLISH) now converts
- scaling adjusted to not clip the top when some graphs were longer
2012-03-16 12:28:32 +00:00
Damien
c44758c5ad Qwt 6.0.1 Support
Upgrade to QWT 6.0.1, but still uses a locally patched copy
since support for 8 axes has not been included, despite it
being a relatively simple patch.

Fixes #634.
Fixes #567.
2012-02-12 10:43:15 +00:00
Mark Liversedge
194f944923 ErgFile now supports 'named' intervals
As a precursor to more sophisticated workout
creation and config, the ergfile format and
plot now supports named intervals.

This is so we can identify blocks of the workout
and reuse them by name (rather than having to
select a section, which should also be supported).
2012-01-06 19:49:11 +00:00
Mark Liversedge
466b7c1a49 Fix Crash in ErgFilePlot TimeScaleDraw
The TimeScaleDraw declaration and definition in
ErgPlot.h clashes (silently) with the definition
in PerfPlot.h.

This caused a SEGV at runtime, but only with some
build tools (but notably Xcode on Lion). Not at
all sure how this has not arisen before.

ErgFilePlot now declares as HourTimeScaleDraw to
avoid the clash.
2011-11-20 14:07:47 +00:00
Mark Liversedge
ded5c2c43b Auto extend workout plot when no workout selected
If no workout is selected (and ERGO/SLOPE mode are also not
selected) then the plot does not extend once you workout
beyond the first hour.

This was due to an uninitialised variable (ergFile) this patch
fixes that.

Fixes #515.
2011-11-16 21:11:48 +00:00
Mark Liversedge
6b289dd750 Workout Plot remove gap on Load Curve. 2011-11-08 07:20:31 +00:00
Mark Liversedge
368aeba04d Remove Globals from ErgFilePlot
The original ErgFilePlot code used local static variables
to bridge between the selected ErgFile and the Qwt data
handlers.

This was not an issue when we only allowed one chart of this
type to be available at once. But now, with a more configurable
layout it is possible to have multiple.

The currently selected ErgFile can now be referenced from
MainWindow in the same manner as the current RideFile can.

This patch introduces no functional change for users.
2011-11-05 13:06:31 +00:00
Mark Liversedge
fc826ecc97 Improvements for Train View
The training view has a number of improvements, most
notable of which is the workout plot now plots the
telemetry as you ride. This enables you to view
your performance against the workout as you ride.

In developing and testing this I found and fixed a
number of other minor issues;

* The workout plot didn't have any axes
* The workout plot title didn't reflect the workout selected
* The workout plot markers didn't honour preferences
* Values didn't reset on stop/start of workout
* The rolling 30 second power plot in realtime was broken
* Lap numbers were not available for display

In addition, some minor changes were made;
* Save workout is no longer optional - it always saves
* The control buttons/margins did not resize nicely
* The workout plot uses colour to distinguish between
  workouts that are time or distance based.
* A new default train layout for new users to avoid
  having to muck about with layouts
* Removed the race servers since they are not used
  and steal screen estate. Will re-introduce when
  multi-rider or internet racing is implemented.

I have also added a few workout files into the
test/workouts directory, we should think about how
we can distribute these and allow users to share and
contribute them in the future.

Fixes #493.
2011-10-24 18:09:59 +01:00
Mark Liversedge
09a68d2c59 More Realtime colours
Ergfile plot matches and Distance is displayed
with 3 decimal places.
2011-10-22 22:08:34 +01:00
Mark Liversedge
b68cee3de5 Fix Train mode SEGV in Course/Ergo Mode
If you select an erg file then choose ergo/slope
mode in train view the workout plot will crash
when the sidebar is hidden / window resized because
the workout plot is still referencing an ergfile
that has been deleted.

This patch ensures the workout plot is notified that
NO ergfile is selected thus clearing the plot and
also ensuring no reference to the deleted ergfile
remains.
2011-10-02 11:00:20 +01:00
Mark Liversedge
f699b5f01c Fix ErgFilPlot axis setting
When you select an ergfile the axis for the workout
plot is not set, this often results in a plot with
large amounts of white space to the right of the plot.
2011-08-27 09:48:34 +01:00
Mark Liversedge
a3fa6e861c Plot Cosmetics Update
Update to a number of plots to align with
the flatter, less cluttered chart style
used elsewhere (Ride, Histogram, CP et al).

Changes made are purely cosmetic and apply
to:

* Aerolab
* HrPw
* Realtime, ErgFile
* Weekly Summary
2011-08-26 19:22:04 +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
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
82ac0f5e1f add realtime mode
Joint work between Mark L, Justin, and Steve Gribble.
2009-11-23 10:42:48 -05:00