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.
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
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.
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).
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
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.