Commit Graph

34 Commits

Author SHA1 Message Date
Mark Liversedge
ec3c7a2b5a Less jarring use of pixmaps in look and feel. 2011-04-18 22:48:49 +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
Josef Gebel
d7d89e63e5 Fix AllPlot Show by Distance Bug
I discovered a crash of GC when doing the following:
* Load two rides (you can load the same ride for 2 different days)
* Go to the Ride Plot tab
* At the bottom, choose "x-Axis shows distance"
* Switch rides in the "All Rides" widget
* GoldenCheetah should crash. At least, it does for me when I load the attached ride file.

Fixes #242
2011-04-17 18:32:16 +01:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Mark Liversedge
02fe34216d Fix lots of SEGV in AllPlot for new cyclist (rideItem is null). 2010-07-30 06:43:54 +01:00
Robert Carlsen
081856bf64 Updating stack zoom control enabling logic. 2010-07-29 21:16:22 -04:00
Robert Carlsen
62d658c929 Disable stack zoom controls when stacked view is disabled. 2010-07-29 02:16:22 -04:00
Mark Liversedge
efd4de62a1 Fix Imperial Show By Distance on AllPlot
The recent patch for allPlot zooming does not display the full plot
properly when the user has selected imperial units and is displaying
by distance (not time). This minor fix corrects this.
2010-07-28 20:23:01 +01:00
Mark Liversedge
2962fce0b7 Scrolling AllPlot and Tooltip
Introduce a span-slider on the normal Ride Plot chart to enable
users to select a range to plot and scroll left and right. The
zoom to interval function now uses this slider rather than setting
a zoom range. Tooltips are now displayed on the normal and stacked
views to assist in reviewing specific data points.

Old style zooming still works as expected, but scrolling at a zoom
level is not yet implemented.

The qxt widget 'QxtSpanSlider' has been placed in the top
level directory (GoldenCheetah/qxt) alongside the qwt widgets to
avoid adding another dependency.

A number of optimizations have also been introduced to speed up
plotting in general. A new color setting for the thumbnail plot
has also been introduced. Refresh of the plot when data is changed
in the editor has been fixed. The zoom scale up/down widgets are
also disabled when in normal mode to avoid the bug highlighted by
Robert Carlsen.

Fixes #122.
2010-07-27 19:46:35 +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
Mark Liversedge
9ae79db4cb fix SEGV in AllPlot on manual/null rides
fixes #71
2010-05-01 10:19:46 -07:00
Sean Rhea
ac570c415c make sure "current" is initialized
Also, a nit: fix indentation of 1 line in AllPlotWindow.h.
2010-04-11 17:19:33 -04:00
Mark Liversedge
1751d8bf12 Remove update 'flicker' when tab selected
The recent patch to reduce redraws when rides are selected
causes each tab to redraw whenever the tab IS selected. This
patch reduces this by remembering the current ride plotted.

It also fixes the "double draw" in GoogleMapControl and AllPlot
when selected for the first time.
2010-04-04 17:28:07 -04: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
Sean Rhea
cd4fe5fe2e combine setActive and rideSelected
And pay attention to MainWindow::activeTab, such that only the active
tab redraws itself when changing rides.  This change really increases
GC's responsiveness when scrolling through the ride list.
2010-03-21 22:03:12 -07:00
Damien Grauser
ff3a232863 remember user's preference for stacked view
...and add zoom.

fixes #58
2010-03-12 10:45:08 -05:00
Damien GRAUSER
afdc862cc2 add ride plot stacked view 2010-03-06 11:47:55 -05:00
Mark Liversedge
32b94d954f add bring to front/send to back to PfPvPlot
Another rightclick menu for intervals, adding a bring to front and send to
back option but only when viewing the pfPvPlot, additionally the algorithm in
PfPv plot for determining which interval a point is used for has been adjusted
to fully populate every interval curve where appropriate (and incorrect
comments and redundant code have been removed).

IntervalItems now have a display sequence number so when you have
overlapping intervals you can bring to front and send to back on the
PfPv plot. The display sequence could be used on other plots if/when
they distinguish between intervals.

Previously, the coloring of intervals on PfPvPlot was determined solely
by the order they were defined which could be quite confusing.
2009-12-22 09:51:02 -05:00
Mark Liversedge
feb111a4ff RideFile reading refactoring
With the introduction of the rideSelected signal the RideFile was
opened (as previously) by the RideSummaryWindow::htmlSummary()
member. In some cases, this signal was processed by RideSummary window
AFTER the other charts (AllPlot etc) this results in 'No data' being
shown on other charts.

This patch moves the file reading to RideItem::ride() which was previously
a public RideFile * (that is now a protected member ride_). As a happy by
product it removes the need to check if the file has already been read
across all other functions ensuring in-core values are not accidentally
overwritten. The read errors are made available by a new RideItem::errors()
member.

This modification is required to support the RideImportWizard in freeing
loaded RideFiles during batch import to ensure virtual memory is not
exhausted when large numbers of files are imported at once. This modification
is also included in this patch.
2009-12-18 19:39:29 -05:00
Mark Liversedge
d042f54e05 Add Average Power in Brackets to Selection Name
When a user creates a new interval by selecting a section of a ride
on AllPlotWindow the newly created selection now has the average power
for the selection placed at the end of the selection name in brackets.
2009-12-14 10:34:46 -05:00
Damien Grauser
333fe46196 add tr() for some QString and add french translation 2009-12-13 15:04:51 -05:00
Mark Liversedge
bfc0d1575a IntervalItem::name removed
The class member IntervalItem::name is redundant since it is a duplicate
of the text() member of the base class QTreeWidgetItem. By removing it
we both simplify the code and remove the need to keep name and text in
sync when renaming and creating intervals.

As a result the itemChanged signal that was connected for renames and
then disconnected when the items are cleared can be connected once
and no disconnect is neccessary.

This connect/disconnect oddity was originally to avoid a SEGV that
resulted from accessing text() whilst the QTreeWidgetItem was being
destroyed. The code for removing intervals when a new ride is selected
no longer destroys and recreats MainWindow::allIntervals (which was also an
artefact of the original code to avoid a SEGV).
2009-12-13 13:07:17 -05:00
Sean Rhea
c9aec66dcf remove global mainwindow pointer from AllPlotWindow.cpp
Also remove ugly const cast by introducing MainWindow::mutableIntervalItems.
2009-12-13 11:02:32 -05:00
Sean Rhea
01e1c22640 remove global mainwindow pointer from AllPlot.cpp 2009-12-13 11:02:32 -05:00
Sean Rhea
bef469384b just call MainWindow::rideItem 2009-12-12 22:02:02 -05:00
Mark Liversedge
29a9e41444 Interval features and new GC file format 2009-12-12 11:41:35 -05:00
Sean Rhea
2db45dc0c5 introduce MainWindow rideSelected signal
...and use it to update the various tabs when a ride is selected.
2009-12-10 13:13:10 -08:00
Sean Rhea
e7a76022bb new zonesChanged signal 2009-12-10 10:16:58 -08:00
Sean Rhea
db943fbcd6 make ride plot work for manual rides
I don't like disabling the ride plot tab when I select a manual ride,
because I frequently scroll through the ride list to search for a ride
by the shape of its ride plot, and every time I hit a manual ride I get
bounced to the CP plot tab.  So rather than disable the ride plot tab,
just make it show an empty plot.
2009-11-09 09:20:24 -08:00
Sean Rhea
79ced76347 setAllPlotWidgets doesn't need to call show*
It's only called from setData, which calls AllPlot::setData right afterwards,
and the latter will do all the things that the show* functions do.
2009-11-07 10:32:00 -05:00
Sean Rhea
aad5a337b8 areDataPresent should return a const ptr 2009-10-27 23:38:57 -04:00
Sean Rhea
7c90677655 minor AllPlotWindow cleanup 2009-10-07 08:20:35 -04:00
Berend De Schouwer
6744d4ad98 fix AllPlot zoom out with a call to setZoomBase 2009-10-03 18:11:00 -04:00
Sean Rhea
ab96f78050 abstract "Ride Plot" tab into its own class 2009-09-27 21:40:03 -04:00