Commit Graph

29 Commits

Author SHA1 Message Date
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
d21ca376be MainWindow Refactor Part 3 of 5
Slowly migrating code  and data from the MainWindow
class to Athlete and Context classes.

This update moves the ride and interval lists and
data structures from MainWindow to Athlete.
2013-07-13 19:46:03 +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
ceed365782 Fix Editor find results sorting
.. it was sorting as a string not a number
2013-05-30 10:29:29 +01:00
Mark Liversedge
440bbd203f Refresh all curve when spikes edited and saved
.. will refresh after the metrics and cpx have been refreshed

.. it invalidates the data rather than refreshing immediately
   since thats expensive and better wait until refresh is needed.
2013-03-29 19:33:43 +00:00
Mark Liversedge
39f322ba1f Add interval sort function
.. added to the splitter handle context menu

.. also took IntervalItem.h and IntervalTreeView.h from MainWindow.h
   coz I was getting pissed with recompiling everything when changing it.
   Thats why so many other files have been changed in this commit.

Fixes #338.
2013-03-17 21:29:47 +00:00
Mark Liversedge
6450386070 RideEditor anomaly button enable/disable
.. if there are/aren't any anomalies in the ride.
2013-02-11 20:23:44 +00:00
Jaime
9ab4de339e Code Cleanup: Ride Editor memory leak
.. for LTMOutliers, now alloced on stack not heap.
2013-02-11 15:33:59 +00: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
Mark Liversedge
d341943da9 Code Cleanup: Ride Data and Friends
.. cleaning XXX and misleading comments
2013-02-10 10:57:33 +00:00
Mark Liversedge
1426ad1bc2 Fix SEGV in ride editor
When switching between a ride with datapoints and one
without, then back again. Editor data was being deleted
for previous ride edited when selecting a ride with no
data!
2013-02-06 21:48:42 +00:00
Mark Liversedge
82ecce3af6 BlankState: Analysis view more blanks
- Better handling of a NULL ride for most of the analysis charts
- Don't show activity editor if no data rows to edit
2013-02-06 11:48:52 +00:00
Mark Liversedge
41434a7fd6 RideEditor: Stop hiding controls
The find dialog and anomalies list are now available
from the ride editor toolbar and not hidden in the
chart controls.

As a result the ride editor no longer has any chart
controls and so they are removed altogether.
2013-02-05 15:55:25 +00:00
Mark Liversedge
f43ac923c5 Mac Native UI (Part 1 of 3)
Part of a series of commits to adjust the UI on a Mac to
look more native and conform better to the Mac UI design
guidelines.

This patch introduces a unified title and toolbar which hosts
a search field and buttons for commonly used functions like
import, split ride, delete etc.

Since it is not possible (or more importantly good practice) to
hide and show toolbar items the Train View controls have now been
moved to the sidebar on a Mac. This is a temporary measure and
will be resolved in future updates.

Further updates planned are;
Part 2 - fixup the preferences pane to be more Mac-like
Part 3 - Spit and Polish around the charts; drop shadows, controls etc
2012-11-18 15:55:07 +00:00
Damien Grauser
70c8f0223c Add Temperature and Slope Data Series
This patch adds support for temperature and slope
across the ridefile readers.

For the most part their is no functional change
although it is now possible to view and edit these
data series in the editor.

File formats that can provide temp or slope include;
.bin, .fit, .srm, .sync, .wko

Further updates will be required to display the data
in the ride plot and histograms.
2011-12-03 23:17:11 +00:00
Mark Liversedge
371f991545 Use strtod() to convert text to double
To get improved precision when parsing pasted
data in the ride editor.

Fixes #477.
2011-11-20 21:47:11 +00:00
Mark Liversedge
5f8907a2ff Fix RideEditor find dialog for 'between'
The find dialog expected the between values
to be small and high, this patch will find
values between regardless of whether the
search values are lo/hi or hi/lo.

Fixes #351.
2011-08-02 00:05:50 +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
da8eec1b13 Further UI fixups
More work to unify the tab view with the overall
UI look-and-feel, allowing you to remove and add
tabs via mouse over rather than the close tab
icon. Also added a number of cosmetic adjustments.

Fixed up PerformanceManager and ScatterPlot to
pick up on the chart fonts and tick size etc.

Removed some erroneous static members in the
ScatterPlot that caused a SEGV when adding multiple
charts (or cancelling an add then adding again).
2011-06-10 23:27:51 +01:00
Mark Liversedge
0cb3c444f2 Increase margins on RideEditor
Resizing the rideeditor is a bit tricky since it does not have
any margins. This patch adds a 2px margin that makes all the
difference.
2011-05-15 22:04:06 +01:00
Mark Liversedge
a48f7c00d1 Clean compile time nits
Lots of nitty fixups, largely for uninitialised temporary
variables.

I have left the use of boost::function and boost::bind in the
DownloadRideDialog alone, so it will vomit when compiled
with boost 1.46 and gcc 4.5 or higher. Will look into this
more carefully at a later stage.

I am working up to resolving issues identified from -pedantic next.
2011-05-12 22:12:36 +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
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
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
a29109343f Fix CSV parser and more checks for NULL ride
The CSV ride parser now checks for empty rides and returns
a NULL ride if there are no samples. In addition, the rideEditor
tries to set editorData even if the ride is NULL. Lastly, the
RideItem code for lazy reads of RideFile data didn't check for
NULL values (!).
2010-11-27 21:52:02 +00:00
Jamie Kimberley
a8e5777953 Modify line endings in the ride editor
On mac systems, when copying data from excel and pasting into the ride
editor GC would complain about the data ranges not being the same size.
This is a result of the fact that excel mac terminates lines with a CR
(\r) rather than a NL (\n).  This patch changes the behavior so that we
check for all three commonly occurring line endings CR, NL and CRNL.

fixes #135
2010-09-28 22:13:14 +01:00
Mark Liversedge
1a71a8a41f Fix RideEditor crash on right-click Column
RideEditor::colMapper was not initialised in the
constructor leading to an erroneous delete when
first referenced and a subsequent crash.
2010-07-18 14:12:54 +01: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