Commit Graph

106 Commits

Author SHA1 Message Date
Mark Liversedge
68e7fcacb4 Perspectives - Part 4a of 4
.. Import and Export perspectives to an '.gchartset' file
   as XML data.

.. Added to MainWindow's View menu and the Manage Perspectives
   dialog.
2021-07-05 11:06:02 +01:00
Mark Liversedge
1026145f9b Perspectives - Part 3 of 4
.. New dialog to rename, add and remove perspectives, re-order them
   and move charts from one perspective to another.

.. The focus is on managing perspectives and not the general UI
   layout (ie. add/remove charts and rename things etc) this is
   likely to be something this morphs into, but for now lets
   keep it simple (this was complicated enough !)

.. also found a SEGV in CP chart when hover in allplot before the
   CP chart has been notified in another perspective-- there are
   likely to be a few of these kinds of bugs around.
2021-07-04 15:34:40 +01:00
Mark Liversedge
07d835e076 Perspectives - Part 2 of 4
.. Perspectives can now be added and are saved and restored on
   startup and close.

.. A new config file 'xxx-perspectives.xml' replaces the old
   'xxx-layout.xml'.

.. HomeWindow has been renamed Perspective across the code.
   With TabView now taking responsibility for loading and
   saving configuration.

.. This is a fairly big refactor that touches upon a number
   of events at startup, including how sidebar events are
   propagated across charts and tabs. And will need a reasonable
   amount of testing before release.

.. Separately, I also fixed a SEGV in the Python chart when
   no ride is selected (an old bug not related to this).
2021-06-22 14:51:13 +01:00
Mark Liversedge
3888246b42 Perspectives - Part 1 of 4
The user will be able to create collections of charts as opposed to
the single long list of charts in each of the four views.

This first update:

.. update toolbar to include a perspective selector

.. also updated aesthetics of toolbar (mostly icons on hidpi)

Further updates pending will:

.. part 2 will introduce code to add, save and restore perspectives

.. part 3 will introduce code to manage and rename perspectives

.. part 4 will introduce new defaults for each perspective

A future enhancement may allow the perspective to be aligned to a
specific sport in activity view, so the perspective can be selected
based upon the sport of the activity being analysed. But that will
not be part of these changes.
2021-06-18 16:15:56 +01:00
Ale Martinez
133364e597 Fix startup crash on Windows/Linux with HighDPI monitors
The problem is setStyle being applied before button creation...
This bug was introduced in c15d1bc, sorry.
2021-04-20 19:07:55 -03:00
Ale Martinez
cb04baf734 Update Context Help for Options/Preferences and ScopeBar
Includes separation of Global/Athlete Options and New SideBar.
[publish binaries]
2021-04-14 12:52:31 -03:00
Ale Martinez
c15d1bc33b Add What's This to Help Menu and Toolbar
To make context help easier to access and promote the use of the wiki.
2021-04-12 18:26:32 -03:00
Ale Martinez
06914d9446 Add Athlete > Delete menu
Allows to delete a closed athlete without the need to exit the program,
it re-uses the logic in ChooseCyclistDialog and removes the AthleteCard
from AthleteView.
2021-03-03 22:27:17 -03:00
Alejandro Martinez
453b05a188 Enable Athlete Open menu to allow creation of new athletes (#3836)
Objective is to allow creation of new athletes, without the need to
exit GoldenCheetah, using Athlete > Open > New Athlete like in v3.5
When a new athlete is created MainWindow emits newAthlete signal
so AthleteView can create the corresponding AthleteCard.
2021-03-03 19:27:43 -03:00
Ale Martinez
759c6593cf Measures Download tidy up
Next step would be to refactor MeasuresDownload for simplification
and generalization
2020-12-22 12:36:41 -03:00
Mark Liversedge
8e84ed280d Only create OpenGL context on Linux
.. MacOS Qt crashes when destroying it, OpenGL is *that*
   broken by Apple.

.. applied to Windows too, despite it not being an issue
   reported there is no value in doing it so removed.

[publish binaries]
2020-09-15 10:58:56 +01:00
Mark Liversedge
8b651b50dc OpenGL rendering
.. Fetch the version of OpenGL available at startup and use it in
   ChartSpace to decide if we want to enable openGL rendering.

.. some fixups for X11 builds, which are not needed on the main
   OS combinations we use (Linux, Mac, Windows) but may prove
   useful when building for X11 vs Wayland in the future
2020-09-01 15:29:37 +01:00
Mark Liversedge
fbd095a2d4 Split Global and Athlete configuration
.. Global settings (themes, metadata etc) are now maintained
   in the config dialog as in the past, whilst athlete settings
   (such as zones, measures etc) are now maintained in a new
   config dialog accessible from the athlete view (gear icon).

.. Config changes are communicated via two signals;
   * Context::configChanged(qint32)
   * GlobalContext::configChanged(qint32)

   Crucially, all global context signals are cascaded through
   the athlete contexts-- so athlete specific widgets only
   need to connect to the athlete context signal (and will get
   athlete and global config change notifications).

   Whilst global widgets such as the sidebar and mainwindow
   need only connect to the globalcontext signal since they
   are not interested in athlete specific details.

[publish binaries]
2020-08-22 11:36:24 +01:00
Mark Liversedge
80ba487153 Fix SEGV configChanged after athlete closed
.. the views were not being deleted, so the global context connection
   to configChanged signal was still called, but the athlete and
   context were long gone - so SEGV (!)

.. the reason this didn't get triggered in earlier releases is due to
   the fact the event was disconnected when the athlete context was
   deleted.
2020-08-14 13:43:41 +01:00
Alejandro Martinez
c52d260949 Generalize Body/Hrv Measures and add Nutrition data as example (#3564)
measures.ini is looked for in Athlete's config folder,
it should have a section for each measures group,
nutrition data with Energy and Macros is provided as example.
Moved default weight to About and removed RiderPhysPage and created
a tab for each measures group under Measures.
MeasuresPage handles conversion between metric and imperial units
Generalized CSV import with configurable headers.
MeasuresDownload enables download from Withings/Todays Plan only for Body
measures.
This is Part 1/2 of #2872
2020-08-11 21:02:19 -03:00
Mark Liversedge
1d9f570ed8 Introduce a Global Context
.. GlobalContext::context() provides a global context that is not
   tied to an athlete or MainWindow.

.. At present it just offers signals for config changes but will
   likely see more context move across as the application preferences
   and athlete configuration are separated as we enhance support
   for multiple athletes.
2020-08-11 22:16:13 +01:00
Ale Martinez
c49180460d Avoid multiple ConfigDialog creation and close on exit
configdialog_ptr is already maintained to handle raise event,
cleanup is moved to destructor to ensure it is always called,
and it is used to ensure:
1) only one instance is created from MainWindow
2) it is closed on MainWindow destructor
Fixes #1918
2020-08-09 15:38:08 -03:00
Mark Liversedge
8150d5b7ce Protect against closing first athlete opened
.. since the context of the first athlete is used as a partial
   application context across the code we now prohibit closing
   the first athlete opened.

.. we will separate out the app and athlete context shortly
   but this will at least protect against SEGV.

[publish binaries]
2020-08-04 07:47:22 +01:00
Mark Liversedge
edec952b86 Athlete View 2 of 3
.. Show days since last activity and disable config icon since there
   isn't an appropriate action for now

.. Athletes can be opened and closed via the tiles and a reusable
   'Button' overview widget is available for re-use elsewhere.

.. Part 3 will enable checking for downloadable data to show an
   indicator on the tile for e.g. coaches with multiple athletes.

NOTE:

   There are a few issues regarding application context separation
   from athlete context that need fixing up (if you close the first
   athlete loaded expect crashes). Will look at this as a separate
   update since its been there for some time and is not related to
   the new view per se.
2020-08-03 20:09:47 +01:00
Mark Liversedge
11092bf436 Athlete View 1 of 3
.. introducing the athlete view

.. at startup the first athlete is loaded as normal, but once the
   mainwindow is open the athletes are managed from the athlete view

.. athlete ride cache restore happen in background (via a thread) to
   enable the GUI to remain responsive whilst it takes place (since
   for most non-trivial cases it can take 30 seconds or more).

.. multiple mainwindows has been deprecated and whilst each open
   athlete is selected via a tab, this will change to a combobox
   in later commits.

.. the tiles in the athlete view do very little apart from show the
   avatar and progress/load status when an athlete is being loaded.

.. future commits will introduce more detail and actions for the
   athlete tile and deprecate the athlete tab bar for a combo on
   the toolbar (amongst other things).
2020-07-29 21:38:38 +01:00
Mark Liversedge
64da909243 Basic Navigation Model
.. back and forward buttons to navigate between views and selections.

.. currently limited to just rides, date ranges and views.

.. next step is to enable click to select from trends overviews to allow
   users to drill down from the season overview into activities and
   back again.

.. part of the shift from searching through lists to analyse data to
   exploring data visually with drill down and click through.

.. the buttons are very basic and there is no way to explore the
   history / recently viewed items etc. these will come later.

Fixes #3529
2020-07-05 16:38:30 +01:00
Mark Liversedge
8ec6d513b8 Cosmetic nits
.. toolbar searchbox match chrome colors
.. trends add chart menu had 2 entries for the user chart.
2020-06-27 16:36:20 +01:00
Ale Martinez
f18b5470ec Create Overlay Widgets with Qt::Tool flag on Linux
Michael Dagenais found this change makes the widgets to play nicer with
Windows Managers and avoids them to get on top of other programs windows.
Minimize and Restore is automatically handled now, so this commit partially
reverts b89019264e, removing MainWindow
state changes tracking, but keeping VideoWindow position tracking.
2020-05-27 18:04:41 -03:00
Alejandro Martinez
f51a6a6cb1 Remove Conditional Compilation for Qt < 5.9 (#3464)
This is a clean up to remove conditional compilation for all Qt versions
older than the last known to work: Qt 5.9 with Qt WebEngine and Qt Charts.
Includes an update note to INSTALL documents.
2020-05-27 09:26:25 -03:00
Michel Dagenais
b89019264e MeterWidgets must move / hide when main window is moved / minimized (#3458)
When the main window is minimized on Linux, the MeterWidgets stay on the desktop.
A signal were added to the main window for state changes.
The VideoWindow connects to that signal and hide/shows the MeterWidgets accordingly.

Currently, when you move the main window, the MeterWidgets do not follow
and become out of place. 
On every Telemetry update, check if the real position on screen of the
video window has changed in order to update the position of the meter
widgets. The Video Window can move for several reasons like when
scrolled or when the Main Window is moved. The Meter Widgets are not
clipped like the Video Window by its scroll area parent though.
2020-05-25 12:44:54 -03:00
Mark Liversedge
562cde58f4 Remove call to MainWindow::searchFocusOut on MacOS Build
.. it was deprecated.
2020-04-15 07:29:09 +01:00
Mark Liversedge
e5b756b060 Align View menu with NewSideBar
.. need to keep in sync.
2020-04-13 13:26:02 +01:00
Mark Liversedge
7eeb4f9179 Remove debug output
.. errant code from debugging during development.
2020-04-12 14:10:52 +01:00
Mark Liversedge
c7515e040b Reinstate head toolbar color
.. Theme colors for chrome were not being applied to the main toolbar
   after the last commit. A couple of temporary hacks got left into the
   commit.
2020-04-11 21:29:57 +01:00
Mark Liversedge
587c631b82 Deprecate ScopeBar code, cleaner ChartBar
.. the chart bar used some of the code from the old scopebar widget so
   decoupled that and made it a little more modern.

.. GcScopeBar now deprecated
2020-04-11 20:56:59 +01:00
Mark Liversedge
28b242815b New Sidebar and deprecate Scope Bar
.. remove the old scope bar in favour of a more modern sidebar as we
   transition the UI to a new design.

.. the newmainwindow approach is not practical, as making 2 UX coexist
   at the same time was impossible and would lead to major issues.

.. note a number of views are on the sidebar but disabled, they will
   be added over time.
2020-04-11 15:34:22 +01:00
Alejandro Martinez
43150e7c17 CloudDB sharing of Custom Metrics (#3370)
Upload/Download are similar to Export/Import in User Metrics config dialog.
Admin interfaces are similar to CloudDB charts for both user (edit/delete)
and curator (set curated/edit/delete).
Name and Description are initialized to the corresponding items for the metric
but both can be edited to provide different/more complete information for the
CloudDB interfase.
Fixes #3361
2020-03-26 15:03:44 -03:00
Ale Martinez
3cae9815c4 Enable workout import via Drag and Drop only in Train View
Fixes a copy/pase problem preventing workout import via Drag and Drop
and allows to import GPX files as workouts or activities according to
active view.
Fixes #3337
2020-02-11 13:23:35 -03:00
Mark Liversedge
835f7cff92 Add Sync from Cloud for new athlete
.. when a new athlete is created and opened the blankstate page
   currently provides options to get data by importing files or
   downloading from a device.

.. this update adds the ability to configure a cloud service and
   start a sync straight away

.. this UX is introduced since cloud services are now much
   more ubiquitous and v3.5 introduced broad support for a wide
   range of services.
2020-01-20 18:50:42 +00:00
Alejandro Martinez
ba2213bb73 Remove ampersand from menu and button text before compare (#3298)
To avoid issues with kde injecting them, it is not pretty
but simple and safe.
Fixes #1852
Fixes #2930
2020-01-16 15:53:07 -03:00
riccioclista
9f1187390f Python data processors (#2951)
* Initial implementation of Python data processors
* Add RideEditor to PyFIx script editor
* Enable write-access to activity data for python fixes
* Add GC.deleteActivitySample method
* Add GC.deleteSeries method
* Check for python fix for changes before close
* Build python fixes menu dynamically
* Make python fixes first class data processors
* Add GC.postProcess method
* Check GC_WANT_PYTHON and "Enable Python" setting for python fixes
* Add GC.createXDataSeries method
* Clean up ScriptContext ctor mess
* Support editing xdata series
* PDP: Implement xdata append/remove methods
2019-12-19 22:05:51 -03:00
Alejandro Martinez
600a9cfb43 Add Import Chart menu to Main Window and Chart Bar (#3146)
It allows to import .gchart files from menus as an alternative
to drag&drop, for completeness and to reduce end user questions.
2019-08-22 09:52:52 -03:00
Mark Liversedge
fc9fb7ba24 Import Workouts from WebPageWindow
.. so we can open ergdb as a chart window and browse and
   select workouts to import.
2019-04-15 08:31:22 +01:00
Mark Liversedge
db2ebb63fa Disable OpenData if Secret not defined
.. developer builds will try and post and continue to try to
   post despite the fact it will never work.
2018-04-07 09:29:22 +01:00
Joern
12545a4f3f Merge pull request #2825 from Joern-R/Sync2
Cloud Upload/Sync - check for unsaved activities
2018-03-19 18:37:37 +01:00
Mark Liversedge
0860fe771f OpenData prompt for permission and post
.. at startup we ask the user for permission to share

.. once permission is granted the upload is performed and
   re-done every year, so long as > 100 workouts have been
   collected since the last time.
2018-03-18 19:51:45 +00:00
Joern
701b6b721e Cloud Upload/Sync - check for unsaved activities
... check for unsaved activities and allow saving before starting sync/upload
2018-03-18 15:09:10 +01:00
Mark Liversedge
f54b4ebbb1 Kent University Part 2 of 3
.. custom uploader, using CSV.

.. requires updating to support custom fields like RPE/ROF
   but committing whilst trying to resolve a bug related
   to the FOLDER_ID configuration setting.
2017-09-22 11:49:21 +01:00
Alejandro Martinez
2888b27e16 Adds HRV Measures - Part 1
Implements #2568 part 1, 2, 3, and 4
2017-07-26 17:17:21 -03:00
Joern
29dde46244 CloudService - Fix Translation related problem (Part 2 of 2)
... fix QT build error (QAction signature changes)
2017-05-14 11:40:00 +02:00
Joern
2df01a0a45 CloudService - Fix Translation related problem (Part 2 of 2)
... introduce translatable "uiName" for each CloudService
... differentiate between "id" and "uiName" where needed
2017-05-14 10:19:15 +02:00
Mark Liversedge
0aaf9f3e5a Share Menu Again
.. check looks at autoimport too (e.g. when checking a
   directory that is mounted when connecting device).

.. changed the titles to make it clearer which are about
   activities and which are about measurements.
2017-05-10 09:18:15 +01:00
Joern
0246d7c57c Share Menu
... move "Body Measurement Download" from "Tools" to "Share"
... enable "Check for New Data" menu action
2017-05-07 19:26:19 +02:00
Mark Liversedge
e1dcd0dd68 Share menu manually check for new data
.. sometimes we just want to get the data that was
   just posted without having to restart.
2017-05-07 16:25:14 +01:00
Mark Liversedge
f645df8040 Deprecate ShareDialog and Friends
.. they are now replaced via CloudService.
2017-04-24 20:32:37 +01:00