Commit Graph

77 Commits

Author SHA1 Message Date
Mark Liversedge
796ecf7aaa New chart dialog no stay on top
.. to avoid clashing with dialogs opened from the chart
   settings.

Fixes #562.
2013-04-08 19:45:06 +01:00
Mark Liversedge
d3e6b3cf6c Code Cleanup: Home and GcWindows
Tidy up code, removing XXX and comemnted out blocks
of code in preparation for V3.0 release.
2013-02-07 13:21:15 +00:00
Mark Liversedge
f08e83210b UI Nits: Tile Mode cleaner
Made the spacing in tile mode smaller and cleaned up
the decorations to make them cleaner and more in line
with modern UIs like Win 8 and OSX.

Also parameterised the spacing / margins in HomeWindow
in case we want to add a slidebar to adjust them or
maybe even a zooming.
2013-01-20 12:58:23 +00:00
Damien
00e9187d05 Transparent background for reveal controls
Add controls for HrPwWindow
2013-01-15 23:40:39 +01:00
Mark Liversedge
1b5fcdd84a Change 'hotspot' for reveal/unreveal 2013-01-14 23:12:28 +00:00
Mark Liversedge
26821226f3 Chart settings reveal adjust mouse positions
.. have a larger area to activate and deactivate the
revealed chart controls.
2013-01-13 18:30:13 +00: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
3a5ce262cf UI Nits: Reformat allplot chart settings
To be a little easier on the eye. But still some
room for improvement.
2013-01-10 21:17:10 +00:00
Mark Liversedge
559ad9e672 Fix date selection in Tile Mode
Fixes #424.
2013-01-06 19:02:00 +00:00
Mark Liversedge
ee36317b0f Chart Dates: Part 1 of 3
An update to allow users to define a specific date
range for a chart on the home window. This update
only applies to the LTM chart and only allows a
date range from/to to be defined.

It would be nice to also support a last 'n' 'period'
selection too (i.e. last n days/weeks/months).

Also, further updates are required to add similar
functionality to TreeMap, CP, Dist and Summary charts
when they are on the home window.
2013-01-02 14:34:17 +00:00
Mark Liversedge
c04066e29f Add Chart on Scope Bar
Put a button on the scope bar to add a chart. This is more
intuitive than the right click menu. The style could be
better but ok for now.

Deprecated the right-click menu option since it is unintuitive
and hidden from the user (i.e. bad UX).
2012-12-24 19:13:12 +00:00
Mark Liversedge
29e8236b27 UX: Chart Setup simplified
Don't ask about height/width factor, no-one knows
what they mean and ou can adjust it once added to
the view anyway.

Also, if there are not chart controls don't reserve
the space for them.
2012-12-20 19:57:58 +00:00
Mark Liversedge
6abbda2f89 Merge pull request #378 from amtriathlon/home
Enable HomeWindow Translations
2012-12-16 14:08:48 -08:00
Alejandro Martinez
5b7131b283 Translate metrics names and units 2012-12-16 18:41:23 -03:00
Damien
6ed7585eec Remove some warnings 2012-12-15 17:18:44 +01:00
Alejandro Martinez
ac44836414 New metricsDetails method in LTMTools 2012-12-12 10:56:28 -03:00
Alejandro Martinez
32c53fcdca Enable HomeWindow Translations 2012-12-10 23:49:51 -03:00
Mark Liversedge
cf8d3b4bd8 UI Nits: LTM add chart use a default date range
When adding a chart to the home view no date range is set.
This update ensures that the last selected date range is
used, so when a chart is selected/configured some data
will be shown.
2012-12-02 18:10:26 +00:00
Mark Liversedge
e822d5b029 Fix SEGV on cancel remove chart
Recent update to use deleteLater() when removing
a chart in the event loop /always/ deletes the chart
regardless of the user selection, this is because it
is deleted in the wrong place.

It was deleted when the user selected the close menu
option (in GoldenCheetah.cpp) rather than after the
user had confirmed (in HomeWindow.cpp).
2012-12-01 22:19:46 +00:00
Mark Liversedge
ce83db017f UI Nits: Fix fugly LTM settings dialog
Slightly better. Still room for improvement in the
workflow for working with the preset charts.
2012-12-01 22:02:59 +00:00
Mark Liversedge
6568a05703 UI Nits: LTMSidebar performance
Remove the double update from HomeWindow and only
update in CP and Histogram when visible.

Still need to:

1. get CP/Histogram to remember what the last update
was to not bother unless something has changed.

2. get RideFileCache to have a cache of recent aggregations.
   Since (a) the same ranges will be called over and over by
   different charts when a season is selected and (b) there
   are only likely to be 20-30 seasons defined in total, so
   lets cache them instead of recalculating every time.
2012-11-26 22:11:46 +00:00
Mark Liversedge
2dea77e1ae UI Nits: LTM Sidebar (Part 1 of 3)
We now have a date range selector in the sidebar.  The
sidebar has a date range selector and summary. It is
used to set the date range for the charts in the view.

As a result we can now add summary charts to the home view
and LTM/CP/Histogram charts to the Diary view. The weekly
summary chart is now deprecated.

Creating seasons has also been disabled on metric charts. We
will need to decide what clicking on an LTM chart should do,
and look at whether we want to keep the popup bubble or
adjust it.

There are some unfortunate performance degradations as a result
of this patch when selecting date ranges and switching between
charts in tab view. This needs to be addressed as a priority.

Follow up patches, part 2 and 3 will need to;
1. address performance degradations & cache results
2. introduce events in sidebar and as annotations on charts
3. implement click functionality on LTM charts (annotate vs
  define a new season/range)

NOTE: existing HOME, ANALYSIS and DIARY chart setups will need
      to be rebuilt since chart ids and properties have changed
      in this patch -- do not raise a bug until you have deleted
      and re-added the offending chart.
2012-11-26 20:20:36 +00:00
Mark Liversedge
3559c79434 Fix SEGV on close chart in HomeWindow
Needed to delete outside of the event loop, fortunately this
can be done with QObject::deleteLater().
2012-11-24 20:12:26 +00:00
Mark Liversedge
33d2358277 Revert "UI Nits: Reinstate drop shadow option"
This reverts commit 3c57f01674.

It just doesn't work. Painting and UI responses are lost
and the price is not worth paying for some eye candy.
2012-11-13 16:35:46 +00:00
Mark Liversedge
3c57f01674 UI Nits: Reinstate drop shadow option
But NOT for win32 and ONLY on the sidebar and tabwidget (for
performance reasons). Since most users prefer the tabbed look
anyway this should be ok.

Performance of the graphicseffect has improved remarkably in
the 2 years since we tried it before. Worth experimenting with
since it adds a bit of polish to the look and feel.

Users turn it on and off in options, it is off by default.
2012-11-13 15:22:38 +00:00
Mark Liversedge
d22777ed74 UI Nits: Daily/Weekly/Monthly Summary
You can now add the summary chart to the diary
view to get a summary of the date range currently
being summarised on that view.

Once the Home view has its own sidebar that selects
date ranges you will be able to add it there too
and summarise seasons etc.
2012-11-13 13:27:36 +00:00
Mark Liversedge
0427d022c9 UI Nits: Chart settings and Chart Close Menu
The chart settings are no longer in the side bar and can be selected
from a drop down menu on the chart. This works in tiled and tabbed
mode and allows for further enhancements e.g. custom menu options
for commonly use config options (ala Android).

This is part of a series of updates to migrate away from a sidebar
that is a toolbox of ridelist etc and move back towards a context
sensitive sidebar.
2012-11-07 10:10:56 +00:00
Mark Liversedge
575d56e2e8 Chart settings dialog no longer fixed size
Fixes #619.
2012-01-30 15:51:33 +00:00
Mark Liversedge
0c89278b22 Add Chart Menus
Allow the user to add a chart from the top-level
view menu, or by right clicking on the home page.

I did not implement as right click on toolbar since
there is already an add chart icon on the toolbar
and adding right click is kind of redundant in that
case.

Fixes #606.
2012-01-24 22:09:29 +00:00
Mark Liversedge
64fd91f685 Reinstate Chart Setup Dialog
It was removed when we had a serious bug
that caused a crash when adding a chart.
That turned out to be related to mouse
event processing and drop shadow graphic
effects.

We can remove this is folks don't like it.
2012-01-12 16:00:35 +00:00
Mark Liversedge
8dd6da0027 Add Chart from Toolbar menu
The drag and drop function for adding charts may
be functionally appropriate, but it is not intuitive
for new users.

This patch moves the add chart function to the toolbar
as a drop down menu. it also makes the chart selection
context sensitive - so on training view only realtime
charts are listed.

Fixes #517.
2011-11-19 14:27:55 +00:00
Mark Liversedge
3f7b28489c Spacing around tab bar. 2011-11-13 19:41:13 +00:00
Mark Liversedge
3dfee75d0f Move tab/tile to Toolbar
To switch between tab/tiled mode the selector has
been moved from the homewindow to the toolbar. A
menu option to select tab/tiled mode has been
added to the view menu.

I have also added icons (that change) for show/hide
sidebar and tab/tile select. The show/hide sidebar
check was not being changed when you use the toolbar
button, this has also been fixed.

The scroll view mode has been deprecated. (But the code
has been retained in case we decide to re-introduce it).

Fixes #512.
2011-11-13 19:03:03 +00:00
Greg Lonnon
adba64578b added reset window layout to all the HomeWindows. 2011-10-16 19:22:42 -06:00
Mark Liversedge
52c2391c75 More compact controls
The controls in the sidebar are inconsistent; the interval
selector has no spacing or border for a clean look.

This patch updates LTMTool and TrainTool to be more
efficient with the limited space.

A more extensive update is still required to unify all the
chart controls look and feel and get rid of the clunky
layouts with ugly wide buttons.
2011-09-04 01:42:36 +01:00
Mark Liversedge
9cd0212097 Pretty Toolbar
Fixups for a GC toolbar and the first pass at trying
to make the look and feel more professional. Whilst the
overall usefulness of the toolbar is moot, the grpahics
show the way for greater attention to detail.

Specifically;
* The sidebar should adopt a similar look/feel
* Chart title bars should adopt a similar look/feel
* Sidebar panes should be unified with the same look
* The style selector needs to move - it is cluttering
  up the general clean look.

The code is a little ghetto in places, but will fix up
as the cosmetics are sorted.
2011-09-04 00:19:26 +01:00
Jamie Kimberley
d68e27390f V3-force use of no elide and scrollbars in tabbed view
depending on the style used on a given system the text in the tab bar for
selection of different charts (summary, ride plot...) may be elided on
screens with small resoulution.   This overrides the use of scrollbars
which is was set explicitly in the v2.x code. this patch forces
the use of non-elided text in the the tabs so that scroll bars appear
regardless of the defaults for a selected style.

Fixes #433.
2011-08-28 23:07:55 +01:00
Mark Liversedge
1debc38e98 Eradicate QGraphicsDropShadowEffect from HomeWindow
Left in by mistake and is to blame for the
QTabBat redraw issues and add chart crash.
2011-08-23 22:40:51 +01:00
Mark Liversedge
3fd2448893 Fix Style selection change resize bug
The previous commit hide/show of QTabWidget caused
an errant incremental resize of the tab widget. Not
at all sure why, but this fixes it.

We may want to move to a QTabBar and manage the stack
of widgets separately as QTabWidget seems to be displaying
some weird behaviours.
2011-08-23 22:13:25 +01:00
Mark Liversedge
ad7683bce6 Avoid QTabWidget setUpdatesEnabled bug
For some strange reason, if you startup in tiled
view and switch to tabbed view then back to tiled
view QTabWidget didn't honour setUpdateEnabled
for the QTabBar.

There is a related QT BUG number 9010 that seems
related to this but was closed without being fixes.

We hide/show the QTabWidget in HomeWindow during
a style change and it seems to avoid the screen
flicker issue.

Weirdly, if you startup in Tabbed view the problem
does not occur. It is possibly caused by having a
QTabWidget with no tabs before calling show().

Either way this patch gets 'around' the issue.
2011-08-23 20:21:21 +01:00
Mark Liversedge
949a6dd1a0 HomeWindow block updates on rideselected
By blocking updates when a ride is selected through
to all the charts being updated we optimise the display
and reduce 'flicker'.
2011-08-22 22:04:59 +01:00
Mark Liversedge
80c51ef246 Change style turn updates off
When changing from tab to tile view the updates
are processed during the transition. This is ugly
and unneccessary.

This patch turns off updates during the transition
and then refreshes at the end. As a result it is
faster and you don't see nasty transitions to the tab
bar.
2011-08-22 21:54:30 +01:00
Mark Liversedge
80bfe6b6cd Remove unneccessary methods from MainWindow
A couple of members in mainwindow should have been
removed a while back (chartFoundry trying to fix
add chart crash) and getSplitter (hack for resizing
the sidebar).

This patch removes them. No functional change.
2011-08-21 11:35:20 +01:00
Mark Liversedge
2ae255b2f0 Fix title edit when no charts on HomeWindow
Fixes #409.
2011-08-19 17:57:43 +01:00
Mark Liversedge
7f007c1cea Allow user to rename chart
Control settings now have a text edit for renaming a chart
alongside all the other control settings. It might be more
intuitive to allow the user to click on the title to
rename it, that is for the future.

Fixes #397.
2011-08-10 16:28:54 +01:00
Mark Liversedge
78bb7eb551 Drag and Drop straight onto Layout
This patch removes the dialog box that pops up
when you drag a chart onto a layout and sets the
title of the chart to a default value (which is
the chart name).

This fixes the drag/drop crash on Windows 7.

However, when dragging and dropping on a 64bit
Windows 7 there is still a crash, this appears
to be in a different part of the code and will
require further investigation.

Also, since the title is now defaulted it is
important that the user has the ability to
rename charts once added. This is already
registed as bug no. 397.
2011-08-10 15:34:50 +01:00
Mark Liversedge
8a058c0db5 Show "hidden" metadata in an 'Extras' tab
The ride file readers will often set metadata fields
for device specific information, or just to store data
that has nowhere else to go.

In addition, when an athlete shares a ride with their
coach they would need to keep a common metadata setup.

To get around the 'hidden' nature of metadata that is
not configured and therefore not shown, the metadata
screen will show all tags, which are not shown elsewhere
in an tab labelled 'Extras'.

It is not possible to edit this data, we may change that
later. But for now the consequences of users changing
'internal' metadata is unquantified.

The overhead of creating and destroying widgets on the
extras tab mean that scrolling up and down the ridelist
with the Extra tab shown may be slow for some users. I
have optimised the refresh as much as possible (it has
zero impact if the extras tab is not selected).

In developing this I found that the homewindow
was sending two update signals when you were in tab
mode. This is fixed and tab mode should feel a tiny
bit snappier.

Fixes #385.
2011-08-02 22:37:52 +01:00
Mark Liversedge
a108097976 Fix window refresh when selecting tile/scroll layout
When you switch from tab view to tile or scroll view
the charts need to be loaded/refreshed since they are
now all visible.
2011-07-28 20:15:52 +01:00
Mark Liversedge
ed9f851f4b More Tab / UI fixups
A bit more love for tabs and other minor cosmetic tweaks.

* View now remembers style used (tab, scroll, tile)
* Allow user to re-order tabs
* Google Map border reduced
* Google Map refresh delay (to make UI snappy when resizing)
* Minor calendar cosmetics
* Use utf8 encoding on config files (language support)
2011-06-13 16:12:16 +01:00
Mark Liversedge
55b323572c Fixup UI for Mac
Removed the horrible dock widget and uses same sidebar
as windows and linux. Removed segmented button for now
since there are a few issues, but retained the code for
the future.
2011-06-11 12:27:54 +01:00