Commit Graph

56 Commits

Author SHA1 Message Date
Mark Liversedge
8cfd02f8b5 Notify config changed - APPEARANCE
.. Needed to move about some of the color config
   methods and remove the unneeded object from
   mainwindow and initialise global color settings
   in main() instead.
2014-12-31 12:36:18 +00:00
Joern
230f028037 AthleteDirectory - Folder Structure Part 2 of 2 + Always create .JSON
... create folder structure for existing and new athletes
... upgrade existing athlete to new structure when opening / incl.
logging and error handling
... convert any "Downloaded" file to .JSON directly - store source file
in /downloads
... convert any "Imported" file to .JSON directly - store source file in
/imports
2014-11-02 19:55:01 +01:00
Joern
809696d9b3 Auto/Stealth Ride Import when opening an Athlete
...  import Ride Files automatically from a defined Directory per
Athlete
...  runs silently/without "Import Rides" Widget if the files can be
imported/copied/... without error or warning
...  Preferences->Athlete- defines
... the directory - per Athlete and- if the function is active at all
(default is OFF)
... the error handling
... report back ALL errors and warnings by opening the RideImportWizard
popup
... report back Errors and Warnings - but ignore the "File exists"
warning (so that the import directory can be continously supplied with
new files, without the need to remove the already imported ones)
2014-10-12 19:28:16 +02:00
Mark Liversedge
1cb483654e remove global QApplication *application
.. it is available from the macro qApp anyway.
2014-08-07 22:25:03 +01:00
Mark Liversedge
5cd379ef00 Fatal Dialog not QDebug
.. if we cannot start due to permissions / create library folder
   we now output a dialog rather than a qDebug -- this is better
   for Windows or those that start from a menu etc
2014-07-27 21:16:42 +01:00
Mark Liversedge
ca49c67515 Fix up Library/GoldenCheetah and GC_HOMEDIR
.. fix the prior fix. ugh.
2014-06-25 11:47:30 +01:00
Mark Liversedge
7f1fa84827 Fixup a few string literal from QVariant issues
.. bug related to appsettings and "0" string occurred in a
   few places -- this fixes and post fixes that.
2014-06-24 19:29:56 +01:00
Mark Liversedge
0fc75b4493 Fix Library/GoldenCheetah bug
.. its complicated .. basically, if a local directory exists it will
   *always* be used for application settings.

.. when you run GC for the first time with a local Library/GoldenCheetah
   then the HOMEDIR_GC will not be set as there is no config in there

.. the code checks this setting for blanks (but that fails because the
   value actually returned is "0") and so the local library is set to the
   value returned "0"

.. but the local library doesn't exist so it falls back to opening from
   the default location but using config from Library/GoldenCheetah !

.. the next time you launch all this gets resolved and you use
   Library/GoldenCheetah with the settings you set the last time.

Fixes #936
2014-06-24 19:13:09 +01:00
Mark Liversedge
86db79a385 Clear Web caches between restarts
.. stops lots of LEAK warnings that are related to the
   javascript garbage collector (QT5).
2014-06-23 09:52:59 +01:00
Mark Liversedge
776a59a5c6 Fix Windows QT5 Paths
.. no longer need to append 'GoldenCheetah' to the location
   since on QT 5 the executable name is used, which is GoldenCheetah

.. by sticking with this we can rename the binary to use a different
   location, which may be useful for testing
2014-06-22 22:01:52 +01:00
Mark Liversedge
517743f5d6 Default font size should be 10 not 12
.. Thanks to Jörn Rischmüller for highlighting
   this issue.
2014-05-26 20:37:54 +01:00
Mark Liversedge
d19ae6ac43 Fix gcc compile time warnings
.. in preparation for 3.1 release
.. but still need to fixup for Mac clang too
2014-05-12 09:07:07 +01:00
Mark Liversedge
4f8e344d38 Don't auto open athlete that crashed
.. instead offer the cyclist menu
2014-01-09 22:02:54 +00:00
Mark Liversedge
9963904fa3 MainWindow Refactor Part 5 of 5 - TABBED ATHLETES
The final part (and one of the reasons) for the mainwindow
refactoring -- we now support tabbed athletes rather than
having a new mainwindow for each athlete opened.

Context is saved/restored and there are new functions for
opening and closing tabs and windows of tabs.

The tabbar itself is fugly -- the next few days will spend
some time looking at making it prettier on Linux/Win and
more native on Mac (see MMTabBar).
2013-12-26 01:03:32 +00:00
Mark Liversedge
192a2e27df Move Cocoa release pool to main
.. because mainwindows come and go and we need to persist
   across them all.
2013-12-23 10:38:18 +00:00
Mark Liversedge
e6ccd840f2 QT5 -- Enable build on 4.8.4 -OR- 5.2.0
New strategy to enable build on QT5 or QT4.8 is quite
simple to enact as most of the fixes for QT5 can be
applied to earlier releases.

This patch fixes up some of the special cases for QT5 so
they will continue to build on earlier releases.
2013-12-10 16:07:41 +00:00
Mark Liversedge
64c25192ee QT5 -- Windows Build Fixups
Fix errors on Win32

* FLOAT reserved word from yacc grammars
* toAscii() becomes toLatin1()
* ->winId() returns int (BROKEN)
2013-12-10 13:56:32 +00:00
Mark Liversedge
51b420cd4b Cut and paste-paste error in --help output 2013-12-10 00:09:18 +00:00
Mark Liversedge
a159181792 Set GC_DEBUG for debug builds
.. when building a debug build of GC with CONFIG += debug
   then we define a macros GC_DEBUG.

.. main no longer redirects to goldencheetah.log if you have
   GC_DEBUG set, so developers will continue to see debug
   messages on the terminal output (for mac/linux only).

.. we could use the GC_DEBUG macros to allow debug messages
   to be switched on / off in the code in future
2013-12-01 09:40:32 +00:00
Mark Liversedge
ec100d2923 Fix WIN32 build issue in main.cpp
.. nostderr() not supported on Windows.
2013-11-20 14:13:26 +00:00
Mark Liversedge
881f37b1ce Fix stderr redirect platform issues
.. don't use toLatin1() and fopen, use QFile and full QStrings
   so we can support directory names with unicode characters.

.. add unistd.h for dup() and close()
2013-11-20 14:08:28 +00:00
Mark Liversedge
0850f1312c Better Command Line Processing
Now accepts --debug to disable redirection of stderr to
goldencheetah.log, which is handy for developers.

Also refined the way the command line is processed to enable
new arguments to be added in the future.
2013-11-20 13:26:25 +00:00
Mark Liversedge
d705488a3a Redirect stderr to goldencheetah.log
In the home directory of GC (platform specific or configured
by the user). This is only relevant for OpenBSD, Linux and Mac.

Windows does not support applications that are GUI and console.
2013-11-20 12:48:09 +00:00
Mark Liversedge
75fa2875b6 Command line parsing
Now allows:

$ GoldenCheetah [[directory] athlete]
$ GoldenCheetah [--version|--help]
$ GoldenCheetah

Passing the athlete on its own is as before, but you can
now also pass the folder name in as well.

I've also added the option to get a help message if you
pass --version or --help.

Lastly, as before, with no command line paramaters you
open the last athlete worked on.

Since we now output the version and build info I have uplifted
the build and version numbers in GcUpgrade.h to reflect the fact
we are now developing v3.1.
2013-11-16 11:14:44 +00:00
Mark Liversedge
ab8aaee088 Restart properly when home changes
After fixing up the trainDB problem we can now restart
the mainwindows safely when the athlete directory changes.
2013-11-16 09:38:17 +00:00
Mark Liversedge
2ae36fb563 Training DB clean up gracefully
When closing down we left the training database open
and this caused problems when looking to implement
a restart function.

The problems stemmed from the way the QSqlDatabase
code was implemented in TrainDB which was modelled on
code in DBAccess that was cleaned up subsequently.

TrainDB code now mirrors the approach taken in DBAccess
and relinquishes resources correctly. The TrainDB is now
closed as well as being opened in main.cpp at startup.

Also, removed reference to obsolete dbconn member in the
DBAccess class definition since it is no longer used.
2013-11-16 08:33:11 +00:00
Mark Liversedge
c0619eadbc User definable athlete library location
Allow the user to select a directory to use for the
athlete libary. Leaving it blank will continue to use
the default location (dependent on platform).

If it is changed the user will be asked to confirm
and then GC shuts down.

Restart wouldn't work due to issues with the DBAccess
QSqlDatabase connection (which is really annoying). I
will look into this as a restart option would be much
cleaner.

Its only taken 4 years to implement this feature! (ouch).

Fixes #282.
2013-11-15 23:19:04 +00:00
Damien
16b856d9ed ShareDialog: Add ipload to www.cyclinganalytics.com 2013-10-28 23:27:33 +01:00
Mark Liversedge
a2a962120c A lot less assert
There still some assert left in the code, but removed
a fair number of the examples where, its just as easy
to handle the condition gracefully, without crashing.

By 3.1 we will have eradicated assert from the code.
2013-08-04 11:06:07 +01:00
Mark Liversedge
0fe044cc50 Autohidden chart settings framework
Setup code to enable revealed chart controls. When
in tabbed mode, if the cursor is towards the title
then the chart controls are revealed, as the cursor
moves away or off the chart the controls are hidden.

Each chart, that wants revealed controls must implement;

bool hasReveal() -- return true if controls are available
void reveal()    -- show controls (must be at top of chart and a single line)
void unrveal()   -- hide controls

Will now work through each chart adding the controls as needed.
Will also probably end up with a 'standard' flat stylesheet for
the controls, can implement this later.

See description for this feature here:
https://github.com/GoldenCheetah/GoldenCheetah/issues/31#issuecomment-12040318
2013-01-13 14:55:16 +00:00
Mark Liversedge
2756a678c7 Workout Library Part 2 of 3
Add trainDB sqlite database of workouts and videos
found during a library search. A bit ghetto but
works well enough.

Part 3 will need to;
- update traintool to list contents from db
- allow drag-n-drop of files into db (and worry
  about copy to library vs add path).
2012-12-21 16:27:49 +00:00
Alejandro Martinez
3df4211d1f Enable chart names translation 2012-12-18 14:32:03 -03:00
Alejandro Martinez
b90c59b5ca Enable Colors translations
Includes loading translations for system dialogs and
using default units according to system settings
2012-12-08 14:22:08 -03:00
Mark Liversedge
921dd66ba0 Merge pull request #366 from amtriathlon/metrics
Enable metrics translations
2012-12-04 10:32:56 -08:00
Alejandro Martinez
2db48cc1a4 Enable metrics translations
The code setting metric names and units was moved from constructors to
an initialize method, to be called after translator initialization.
English Name is preserved as InternalName for metadata.xlm compatibility
in metric override.
Q_DECLARE_TR_FUNCTIONS(class-name) macro is used to set tr() context
when class-name is not QObject sub-class.
2012-12-04 13:59:49 -03:00
Mark Liversedge
299885d8ce UI Nits: Fix GcBubble on Mac
Painting artefacts caused by setting native window painting
in main.cpp. It was left in accidentally.
2012-12-02 19:36:57 +00:00
Alejandro Martinez
6f49bcea16 Add es and pt translation files set lang default according to system default 2012-11-29 23:34:58 +01:00
Damien
8eee2ddb25 Choose Metric/Imperial units in New Athlete dialog
fixes #34
2012-11-26 23:35:35 +01:00
Mark Liversedge
749a487915 UI Nits: No menu on list view
The menu drop down can appear on the list view. This is
now disabled via a window property "nomenu".

Also set the new attribute to set native widgets on a Mac.
2012-11-20 19:58:10 +00:00
Rainer Clasen
735de9bf18 main: allow passing athlete as argument
Allow passing initial athlete to open as command line argument.
2012-05-01 22:28:06 +02:00
Mark Liversedge
2cb07528a8 Refactor WkoRideFile reader
No functional change, but fixed up some of the coding nits
in the WKO+ ride file reader.

References to static variables removed (for thread safety)
References to global WKO_HOME variable removed (multi athlete)
WkoParser class introduced (for further code refactoring)

Updates are pending for more robust parsing when users have
customised charts or the files contain running/pace charts
since these tend to cause a crash at present.
2011-09-24 15:09:55 +01:00
Mark Liversedge
714ab730b3 Training Mode Improvements - Part 1 of 3
Update to training mode to improve the UI and overall
user experience. This initial patch introduces:

* Video Window - but ghetto and not fully functional
* Congigurable - drag and drop 'dials' onto homewindow

In future updates we need to:
* Support Video fully - Only Linux in this patch
* HomeWindow - Make Training mode the same as HomeWindow
* More Dials - Support metrics (e.g. BikeScore)
* RT Charts - Make RT plot drag/drop and support other
              types of charts (e.g. Time In Zone)
* Controls - Add more controls for FFWD/REW, Skip etc

This patch has been tested on Linux ONLY. It is being committed
to support further build/deployment work for Win32 and Mac OSX.
2011-04-03 18:30:35 +01:00
Mark Liversedge
3aba7dd788 Inital V3 Branch 2010-12-30 17:35:23 +00:00
Robert Carlsen
d543fe45f9 Adding slash in default library path for Windows 2010-01-15 09:13:26 -05:00
Sean Rhea
6b7afe3353 remove global mainwindow ptr 2009-12-13 12:50:09 -05:00
Damien Grauser
216bc6ef4b add language selector and French translations 2009-12-12 15:23:46 -05:00
Mark Liversedge
82ac0f5e1f add realtime mode
Joint work between Mark L, Justin, and Steve Gribble.
2009-11-23 10:42:48 -05:00
Justin Knotzke
e761091097 main and RideItem now use the global function that returns the correct QSettings. 2009-09-11 08:49:20 -04:00
unknown
f71d329f14 Fixes major bug putting AppData in wrong place on Vista & Win7
Signed-off-by: Robert Carlsen <robert@robertcarlsen.net>
2009-09-08 18:25:42 -04:00
Claus Assmann
debd870811 There are more than just 3 OSs, make "Unix" the default. 2009-09-01 05:29:36 -04:00