Commit Graph

78 Commits

Author SHA1 Message Date
Alejandro Martinez
69e5065c67 Avoid Qt 6.5 bug when using windows11 style
Continuation of e9e8393, the bug is present in 6.5.3 too.
2025-02-11 19:42:16 -03:00
Alejandro Martinez
e9e83936d4 Avoid Qt 6.7 bug when using windows11 style
Still not fixed in 6.7.3 (https://bugreports.qt.io/browse/QTBUG-124150)
2024-12-22 21:51:23 -03:00
Joachim Kohlhammer
dc38e4a148 Changed the tab-order in the athlete selector (#4523)
* Changed the traversal order in ChooseCyclistDialog when using the
  tab-key:
  * Before this change:
    List -> New -> Open -> Cancel -> Delete -> List
  * After this change:
    List -> New -> Delete -> Cancel -> Open -> List
* Changed the default button (activated when pressing enter):
  * "New" when no athlete is available
  * "Open" when athletes are available
  * Behaviour before this change: Always "New"
* Removed the parameter allowNew from the constructor
  ChooseCyclistDialog::ChooseCyclistDialog as it was only used with
  the value true
2024-07-31 11:01:28 -03:00
Damien Grauser
154d93a8df QTBUG-32789 was resolved 2024-01-18 13:32:19 +01:00
Alejandro Martinez
f138839d0f Angle is not available on Qt6
https://doc.qt.io/qt-6/opengl-changes-qt6.html#removal-of-angle
2024-01-14 17:35:35 -03:00
Alejandro Martinez
628b74c974 QStandardPaths::DataLocation deprecated in Qt6
In Qt5 returns the same value as AppLocalDataLocation.
2024-01-13 15:34:11 -03:00
Alejandro Martinez
9761873d7a Merge branch 'replace_qdesktopwidget_usage' of https://github.com/andreasbuhr/GoldenCheetah into andreasbuhr-replace_qdesktopwidget_usage 2024-01-12 19:21:44 -03:00
Andreas Buhr
f396630f34 Some fixes around QString (#3970) 2024-01-11 14:11:15 -03:00
Mark Liversedge
c97eac67a2 Default Appearance Settings 1 of 2
.. The default appearance settings on new install or directly
   after and upgrade are terrible and create a poor impression
   for new users

.. This commit fixes up scaling, font selection and themes so
   that for a new install or directly after upgrade they are
   set to defaults that are sensible for the current release

.. It is expected that these defaults will change and extend as
   we implement new features and the UI evolves- so these should
   be used as a basis for defaulting in the future.

.. A second update is required to resolve issues with scaling in
   overview charts dependant upon the screen resolution
2023-05-25 08:44:43 +01:00
Alejandro Martinez
103c87c600 Deprecate NewMainWindow
Complements fc3de5f
2023-04-22 21:13:34 -03:00
Mark Liversedge
d7e9e305c5 Fixup color initialisation
.. color initialisation was broken by 7b93b2a5
2021-12-15 08:26:05 +00:00
Alejandro Martinez
7b93b2a533 Enable translation for Color Selector and Add Tile Wizard
registerItems is now a static member of OverviewItemConfig called from main,
and GCColor::setupColors() is called a second time, both after the translator
is installed to enable translations.
Fixes #4089
2021-12-14 18:43:10 -03:00
Mark Liversedge
5b838b4a0f Windows command line --no-angle
.. disable forcing of ANGLE for rendering, which helps where folks
   have multiple GPUs but cannot configure them for use in GC.

.. some reports in the forums of issues related to this.
2021-10-15 18:09:28 +01:00
Mark Liversedge
d56d52c01f Refactor Future's algorithm
.. from C to a C++ class.

   Moved the original code to a sundirectory for reference and
   moved all the global variables and methods into a new class
   called Voronoi.

.. the code still needs more work but wanted to remove the global
   variables as there were lots and a big risk they interact
   with other parts of the codebase and libraries.
2021-09-29 10:07:30 +01:00
Mark Liversedge
dfdf0c5898 Fixup last commit linker error (Future's algorithm)
.. last commit introduced a compiler error on missing global variables.

   the intention here is to take future's algorithm, embed into a class
   and add wrappers for user charts / datafilters.
2021-09-28 20:00:22 +01:00
Mark Liversedge
f8cdbf3e39 Force ANGLE GPU acceleration on Windows
.. we know that opengl drivers for windows can be sketchy, so rather
   than not use opengl at all we insist on ANGLE at startup.

.. this is experimental and has been included as a single commit
   in the hope it will remain, but may be reverted if there are
   significant issues.
2021-08-20 13:32:03 +01:00
Andreas Buhr
7be3df19eb move from screen()[0] to primaryScreen() 2021-07-26 13:17:11 +02:00
Andreas Buhr
85ab8211b0 Qt6: remove QDesktopWidget usage 2021-07-26 13:11:44 +02:00
Andreas Buhr
7abac2678b Usage of QDesktopWidget is deprecated. Adapt code
This patch adapts the code to not use QDesktopWidget but to
use QGuiApplication::screens instead. It defaults to screen number 0.
2021-07-26 13:11:30 +02:00
Mark Liversedge
d83041282d User Charts and the Configured Colors - Part 2 of 2
.. themes are now either light or dark, which selects the default
   color set used to set the standard colors.

.. users can of course maintain them, but when applying a theme
   there is no need to adjust now (some of the default colors looked
   poor on a light background).

.. there is a line of code in main.cpp to dump the current colors to
   stderr so it can be cut and paste into colors.cpp -- this makes it
   much easier to use the UI to maintain colors and update the code.
   this is obviously just for developers.

.. letting users define their own themes could be done later, but feels
   like overkill at this point.
2021-05-22 15:11:20 +01:00
Michel Dagenais
c474dae4b6 Facility to trace all the USB communications (#3855)
A new logging category is added gc.usb, inactive by default, to log all the USB transfers between GC and the USB trainers. It can be activated by changing the logging filter with the --debug-rules option.
2021-04-14 21:01:44 -03:00
Michel Dagenais
58617cb165 Add debugging options to select the log file, format and rules, and redirect stderr (#3837)
* Add debugging options to select the log file, format and rules, and redirect stderr even on Windows
* unistd.h does not exist on Windows use io.h instead
* STDERR_FILENO does not exist on Windows
* Different strategies and much error checking to redirect stderr on Windows
* Synchronize cerr and stderr with filedes 2 and STD_ERROR_HANDLE
* Some functions like write in Linux and Win32 have slightly different signatures
* Code cleanup, final test to check that fd=2, stderr, qDebug and cerr are redirected
* Remove the file and line number from the default logging format in release mode
2021-03-30 13:17:18 -03:00
Ale Martinez
61b5fee924 Added Start with last opened Athlete option to config
Default is checked to preserve current behavior, when cleared
the choose athlete dialog will be presented at start.
Workout library setting was moved to Train preferences
page to reduce clutter in General settings page.
[publish binaries]
2020-12-24 11:14:32 -03:00
Mark Liversedge
fc3de5f84a No --newgui as MainWindow refactored
.. the concept of a new gui as a replacement for MainWindow was dropped
   in preference for gradually adjusting MainWindow to the new design.

.. this is still in progress, but the 'newgui' concept is dead.
2020-09-08 09:40:17 +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
Ale Martinez
1a184f925d Fix Qt message handler used when API Web Service is enabled
This has been reported to produce garbled output on Windows and,
according to https://doc.qt.io/qt-5/qtglobal.html#qPrintable,
it is dangerous since the array returned by QString::toLocal8Bit()
will fall out of scope, so lets use a safer version to avoid
the risk of crashes hard to debug.
[publish binaries]
2020-08-25 14:17:30 -03:00
Ale Martinez
2a43f11c72 Revert "Windows builds log to goldencheetah.log when not debugging (#3485)"
This reverts commit 6bc48200e7.
It is crashing on Windows 8, I can't debug on that version
and it is not that useful feature, --debug gives more information.
[publish binaries]
2020-08-15 19:36:16 -03:00
Alejandro Martinez
6bc48200e7 Windows builds log to goldencheetah.log when not debugging (#3485)
Similar to Linux/macOS builds, messages are redirected to goldencheetah.log
when not output to console is requested, but instead of relying on low level
stderr redirection a message handler logging directly to the file is installed.
[publish binaries]
2020-08-10 21:21:34 -03:00
Alejandro Martinez
365848b79e On Windows attach to parent's console when no console is available
This gives a more Unix-like behavior when GC is launched from
cmd or PowerShell, including --debug output, on release builds.
Fixed #3481
[skip travis]
[publish binaries]
2020-06-05 17:59:33 -03:00
Mark Liversedge
a8473441ae GNU Scientific Library (GSL) Mandatory Dependency
.. making GSL mandatory, so we can rely on the modelling functions
   being available, amongst a few other things.

[publish binaries]
2020-05-29 15:51:58 +01: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
Mark Liversedge
f4fcc93693 Deprecate WebKit Support
.. The NOWEBKIT define is no longer required to build.
   We now only support building with Chromium QWebEngine
2020-05-25 09:00:36 +01:00
Mark Liversedge
c973328779 Introduce GNU Scientific Library (GSL) as an optional dependency
.. will become a first class dependency, but for now, whilst we
   update the build systems it is optional.

.. to enable update gcconfig.pri with
   DEFINES += GC_WANT_GSL  ## switch GSL support on
   GSL_INCLUDES =          ## the include path (no -I)
   GCL_LIBS =              ## -Lpath and -lgsl -lgslcblas -lm or others

.. see gcconfig.pri.in for examples, Linux has been tested.

.. to install this new depdendency:
   Linux: sudo apt-get install libgsl-dev
   MacOS: brew install gsl
   Windows: vcpkg install gsl
2020-05-06 18:32:16 +01:00
Ale Martinez
29fcc6aafe Add detailed version information to --version command line option
Similar to About > Version, used to provide more information after ci builds
Also --usage is added as synonimous for --help for completeness
2020-04-18 15:32:22 -03:00
Mark Liversedge
102b5dff15 NewMainWindow Protoyping
.. prototyping a new qmainwindow layout, will only be shown
   if you pass --newgui on the command line.

.. there will be lots of commits as this develops across
   different platforms and building blocks are put into
   place.

.. this is likely to take 2 months or more before it becomes
   something usable.

.. the --newgui is for developers only, since there will not
   be any usable functionality for quite some time.
2020-03-29 12:25:53 +01: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
Ale Martinez
a9bbe5dc5a Use double division to compute dpi factors
Fixes #2628
2019-08-25 14:21:18 -03:00
Mark Liversedge
f60e28e801 CP Plot Power Profile Lines (watts only)
.. need a follow up for w/kg
2018-11-13 17:49:49 +00:00
Mark Liversedge
954570fe16 Python Embedding is optional and check install
.. make python embedding optional, if it's not installed then
   disable in preferences (new checkbox similar to R).
2018-02-05 16:27:00 +00:00
Mark Liversedge
0a8d803233 Add --no-python command line option
.. just in case.
2017-12-19 10:59:02 +00:00
Mark Liversedge
0a2ac3aa6b Start Python Embedding
.. just bootstrapping, so Python is loaded and version
   number made available in the about box.

.. see gcconfig.pri.in and src.pro for settings needed

.. not considering threading etc at this point
2017-11-22 15:50:22 +00:00
Mark Liversedge
0faf4aa617 Unset QT_SCALE_FACTOR on Linux
.. there are so many QT bugs related to this with opengl and
   other aspects of scaling we should just unset it. This is
   because we now have native support for Hi-DPI so this setting
   should not be needed anyway.
2017-06-25 12:05:47 +01:00
Mark Liversedge
8153d5a5b2 Merge pull request #2152 from antoniusriha/handle_log_redirect_properly
Close and free log file object after duplicating it
2017-04-01 22:06:58 +01:00
Keith Reynolds
cebcd9a73a Move variable into scope in which it is used. 2017-03-31 00:03:54 -06:00
Mark Liversedge
0f0f1edd02 Cloud Refactor - Add Account Wizard WIP
.. further updates, closer to being complete.
2017-03-30 19:45:48 +01:00
Mark Liversedge
787d22da5c Cloud Refactor - Factory for TodaysPlan, Google et al
.. a CloudServiceFactory now has all full cloud services
   registered for service we currently support for sync
   including; Local File Store, Dropbox, Google Drive,
   Todays Plan and SixCycle.

.. need to now refactors all the other cloud services
   to use the CloudService base class: Strava, Cycling
   Analytics, Ride With GPS, Withings, Web Calendar,
   Training Stage Buch, Selfloops, Velo hero and Sports
   Plus Health.
2017-03-25 13:12:52 +00:00
Mark Liversedge
122132e85c Hi-DPI Support - Configure Font and Scale
.. just let the user choose a font and a scale.
.. we work out the base font for the display resolution
2017-03-20 20:17:56 +00:00
Mark Liversedge
81a7c6292c Hi-DPI Support - Default Font Pointsize fixup
.. should use device independent pixels !

.. VirtualBox, Windows and Linux all use different ratios
   of device pixels to device independent pixels so its
   important we stay device independent.
2017-03-14 20:44:06 +00:00
Mark Liversedge
fbbffe83fe Hi-DPI Support - Size/Space tweaking
.. various updates to make sizing more comfortable.
2017-03-14 19:33:39 +00:00
Mark Liversedge
b92bbcfd69 Hi-DPI Support - Default font use pt
.. since we re-use it in other places.
2017-03-14 16:48:28 +00:00