Commit Graph

58 Commits

Author SHA1 Message Date
Mark Liversedge
8664f2b105 Workout Editor Reset Hover Indexes
.. in ::fromQwkcode()
2016-01-19 17:53:18 +00:00
Mark Liversedge
0bac511391 Workout Editor QWKCODE round-trip
.. ensure duplicate points survive the round-trip
   from points -> qwkcode -> points to enable editing
   of qwkcode and mixing with undo/redo.

.. point data now stored as ints not doubles and use
   integer arithmetic etc. Makes things more consistent
   and a hell of a lot faster.
2016-01-19 17:15:52 +00:00
Mark Liversedge
86db9e78a4 Workout Editor Qwkcode Edit
.. update the workout when the user edits the qwkcode
   in the properties sidebar.
2016-01-19 14:15:51 +00:00
Mark Liversedge
ea11ae92ec Workout Editor Fix QT4 plus highlighting
.. QT code supplied was QT5 only, fixed up to compile
   on QT4 by including relevant headers

.. moved the responsibility for code highlighting back
   to the editor as it is the sensible place to do it.
2016-01-19 08:52:49 +00:00
Mark Liversedge
8fed460543 Workout Editor Qwikcode highlight aesthetics
.. use block format on the text edit, much nicer.
2016-01-18 21:54:15 +00:00
Mark Liversedge
477f413553 Workout Editor qwkcode follow cursor
.. when hovering over sections of a workout hover highlight
   in the qwkcode and ensure it is visible.
2016-01-18 19:42:25 +00:00
Mark Liversedge
cba2c3ee43 Workout Editor Hover QWKCode
.. as you hover over the workout plot it will highlight the
   line in the qwkcode (shown via properties) that this block
   is being defined by.
2016-01-18 16:02:27 +00:00
Mark Liversedge
6d0b523189 QStringList::join() QT4 compatibility
.. don't pass a char, pass a string to use in the join.
2016-01-18 14:08:09 +00:00
Mark Liversedge
846727dd94 Workout Editor Properties aka qwkcode
.. add a text edit to edit the workout quickly
   without having to use a gui or work with the
   ERG file format.

.. need to make it round-trip, hover highlight
   and generally make it easier on the eye.
2016-01-18 13:45:12 +00:00
Mark Liversedge
a7ed36cff7 Workout Editor this->ergFile SEGV
.. always a bad idea to use method parameter names that
   hide membor variables. Hey-ho.
2016-01-17 22:47:28 +00:00
Mark Liversedge
94b6521918 Workout Editor Fix ErgFile SEGV on Duration
.. when updating an ergfile after edit if the duration of
   the workout has changed the "Duration" member needs to be
   updated to reflect the change since it is used by
   wattsAt() to decide if at the last section of the erg file.
2016-01-17 21:03:58 +00:00
Mark Liversedge
dfb398dd81 Workout Editor Notify Plots when ErgFile Upated
.. so other plots see changes we made (without saving).

.. the reason we don't insist on saving the erg file is
   because we often increase intensity or repeat sections
   just for a one off run.
2016-01-17 19:31:48 +00:00
Mark Liversedge
421ee3b128 Workout Editor Apply Edits when Workout Starts
.. the changes made within the editor are applied to the in-memory
   representation when the workout is started -- that way the edits
   are executed.

.. the workout changes are not saved (yet).
2016-01-17 18:47:14 +00:00
Mark Liversedge
ab17f42596 Workout Editor Realtime Plotting
.. will now plot telemetry as you are recording so can be
   used as a drop in replacement for ErgFilePlot.

.. bear in mind it does not support slope mode yet, so
   cannot be used for CRS, MRC and PGMF workouts.
2016-01-17 16:43:55 +00:00
Mark Liversedge
92b9c9736d Workout Editor Size Sensitive
.. will adjust what is shown when resized to a small size

.. will hide toolbar whilst recording

.. getting ready to plot telemetry when recording so we
   can replace the workout plot.
2016-01-17 12:23:23 +00:00
Mark Liversedge
cfcffc88d8 Workout Editor Filter Events
.. we should filter keyboard events that we grab since
   cursor keys cause the view to be scrolled up and down
   when in tiled view (!)
2016-01-17 11:28:32 +00:00
Mark Liversedge
74c75e11d1 Workout Editor Reset Hover Nit 2016-01-16 19:49:16 +00:00
Mark Liversedge
18d795be74 Workout Editor Lap Markers
.. and wip for save/properties.
2016-01-13 16:06:26 +00:00
Mark Liversedge
4e1867b823 Workout Editor Red TTE, Amber 85% TTE
.. graduated to give insight into how tough the workout
   is related to TTE, but not just a binary can/can't do it!
2016-01-12 18:59:37 +00:00
Mark Liversedge
eabc80b84e Workout Editor Warn Impossible Intervals
.. using the sustained interval algorithm we can now
   find sections of a ride that are impossible to
   complete according to the 2 parameter model.

.. only looks at durations > 2 mins.
2016-01-12 13:17:59 +00:00
Mark Liversedge
04768ebeca Wokout Editor Paste (raw)
.. this pastes a 'block' that has been copy/cut
   but needs to be updated to work in an expected
   way -- it pastes points, not blocks which leads
   to situations that will confuse users.

.. one fix would be to be paste intelligently to
   avoid duplicate points and "join" the pasted
   blocks to the existing blocks.
2016-01-10 17:13:55 +00:00
Mark Liversedge
e60554f958 Workout Editor Cut/Copy
.. to cut and copy the block selection to the clipboard.
   this is very different to delete points since it will
   shift the remaining points to fill the gap.

.. from a UX perspective the cut/copy/paste functions will
   work with BLOCKS not POINTS. This may cause a bit of
   confusion.... not sure how to deal with that.
2016-01-09 11:41:40 +00:00
Mark Liversedge
ccaff70a40 Workout Editor Scale Y-Axis
.. automatically.
2016-01-08 22:02:20 +00:00
Mark Liversedge
01c8da904f Workout Editor Selection Block nit
.. fix window resize paint artefacts on the cursor
   and selection block geometry.
2016-01-08 12:02:31 +00:00
Mark Liversedge
1b5b700ace Workout Editor Selection Block
.. now have a selection block which is rendered onto
   the editor. this will be what gets copied and pasted
   with ^x ^c ^ y etc.
2016-01-08 10:50:34 +00:00
Mark Liversedge
89b5aff954 Workout Editor Align Move Block
.. align indicators now appear when drag moving a block
   in the same fashion as when dragging a point.
2016-01-07 18:01:59 +00:00
Mark Liversedge
d92b7baf50 Workout Widget Smart Guide Y-Axis
.. now shows markers on Y-axis when moving / dragging
   points etc around.
2016-01-05 13:05:07 +00:00
Mark Liversedge
6c707fd94f Workout Editor Create Block 'glitch'
.. when directly under a point it created a nasty
   glitch. This was caused by bounds checking > <
   and not = to.
2016-01-04 15:19:55 +00:00
Mark Liversedge
ec3e38158f Workout Editor ^A Select all
.. forgot when doing other things.
2016-01-04 14:14:38 +00:00
Mark Liversedge
aa0cf5b2d6 Workout Editor Power and Duration Label
.. when hovering over blocks.
2016-01-04 11:01:37 +00:00
Mark Liversedge
7958cd7cce Workout Editor Create Block Drag
.. when you create a block (by pressing and holding the mouse
   button) it now enters dragging mode (dragblock state) to allow
   the user to move it around before releasing the mouse button
   to create.

.. we DESPERATELY need guides to appear whilst dragging (!)
2016-01-04 09:55:10 +00:00
Mark Liversedge
1a5f0780a1 Workout Editor MMP Curve
.. now shows MMP curve as you edit.

.. WIP code for block selection is also in there but
   needs some work done to it !
2016-01-03 23:09:11 +00:00
Mark Liversedge
414c9eb15f Cut and Paste
.. so far
2016-01-03 21:17:06 +00:00
Mark Liversedge
f470803ac2 Workout Editor SEGV
.. when click and hold to create a block when the cursor
   is directly above a point.
2016-01-03 15:55:05 +00:00
Mark Liversedge
2b6af76527 Workout Editor Create Block
.. press and hold a mouse button to create a block
   whilst in draw mode (or shifted in select mode).

.. will add a block in the middle or at the end of
   the workout depending on where you click.
2016-01-03 14:56:43 +00:00
Mark Liversedge
a072163db2 Workout Editor Shift Toggles Draw/Select
.. so in draw mode shift lets you select and
   in select mode shift lets you draw.
2016-01-03 09:06:50 +00:00
Mark Liversedge
cb6fb85181 Workout Editor Block Cursor
.. better aesthetics

.. need to think about handles and showing
   %MMP for the interval (i.e 100% means this is a
   maximal effort).
2016-01-02 22:56:07 +00:00
Mark Liversedge
5591ea7bc7 Workout Editor Block Cursor Again!
.. tidy up when it is shown and refreshed.
2016-01-02 18:51:18 +00:00
Mark Liversedge
30412d5a0f Workout Editor Block Cursor Performance
.. refactor as paint based approach was awful
   from a utility and performance perspective.

   Even though it was just a UX experiment it
   bombed to CPU on Linux and Windows.
2016-01-02 18:21:39 +00:00
Mark Liversedge
c8ee808916 Workout Editor Block Cursor
.. just to get used to it and see how it might work, when
   we start working with blocks as well as points.
2016-01-02 16:17:28 +00:00
Mark Liversedge
b9bcd5fd90 Workout Editor Select/Draw Mode
.. the toolbar draw/select buttons now set the mode.

.. in select mode you can select points (same as holding
   shift whilst in draw mode).

.. this is just to make the UX less complex for casual users.
2016-01-02 15:06:24 +00:00
Mark Liversedge
012511d6c6 Workout Editor Clear Selection on Rect Select
.. when using a rectangle selection we clear all
   the currently selected points. More often than
   not this behaviour is preferred, we could add a
   keyboard modifier in the future.
2016-01-02 13:48:59 +00:00
Mark Liversedge
dfbb035971 Workout Editor Cursor Keys Move Points
.. constrained editing with the cursor keys moving
   points up down left and right
2016-01-02 13:31:56 +00:00
Mark Liversedge
b1a3cd58f9 Workout Editor RideFileCache::fastSearch()
.. added a static fastSearch() function to the
   RideFileCache class to perform a search on a
   single series of data without any data prep.

.. its super quick and will work with the workout
   editor recompute() function, but need to think
   about how we can display the MMP curve as we
   edit.
2016-01-02 10:58:46 +00:00
Mark Liversedge
bdb8d63a30 Workout Editor Key Commands undo/redo/delete
.. via ^Z, ^Y and DEL key

.. DEL will delete the selected points
2016-01-01 19:34:56 +00:00
Mark Liversedge
8e240ee661 Workout Editor Selection Tools
.. for now pressing SHIFT and CLICK will enable
   selecting points.

   shift-click when hovering on a point will toggle
   selection of that point

   shift-click in space will start a rectangle select
   tool; as it drags it will select points within it.

   hitting the ESC key will clear all selections.

.. the toolbar button "Select" needs to be integrated
   into this scheme so users don't need to know about
   the ability to select with the shift key (as we had
   this before with intervals and it wasn't intuitive
   to casual users).
2016-01-01 14:20:20 +00:00
Mark Liversedge
f7c31a78be Workout Editor Resampling Error
.. resampling is the WRONG approach for the erg points
   they need to be INTERPOLATED!

.. e.g. a ramp from 0w to 100w over 10 minutes was previously
   resampled as 10 minutes of 0w followed by a jump to 100w
   and thus W'bal was way off !!
2016-01-01 10:18:13 +00:00
Mark Liversedge
58352f4b72 Workout Editor Plot W'bal
.. as you edit the workout, its especially
   useful when scaling a workout to increase
   or decrease the intensity.
2016-01-01 00:47:49 +00:00
Mark Liversedge
dae514f586 Workout Editor Show TSS/IF
.. we calculate for ourselves since its probably
   quite expensive to calculate every metric.

.. could look to use the metric factory in the future
   if we want to make these metrics more configurable
2015-12-31 21:10:54 +00:00
Mark Liversedge
cd3474b810 Workout Editor QT4 compatibility
.. needed to create a QPoint for WorkoutWidget::scale()
   and only got an int from QWheelEvent::delta() where
   in QT5 deltaAngle() returns a QPoint.
2015-12-31 16:00:27 +00:00