Commit Graph

65 Commits

Author SHA1 Message Date
Mark Liversedge
e8077cd578 Merge pull request #378 from amtriathlon/home
Enable HomeWindow Translations
2012-12-16 14:08:48 -08:00
Alejandro Martinez
9e917123af Translate metrics names and units 2012-12-16 18:41:23 -03:00
Damien
fca4c27d2c Remove some warnings 2012-12-15 17:18:44 +01:00
Alejandro Martinez
3daf2097fa New metricsDetails method in LTMTools 2012-12-12 10:56:28 -03:00
Alejandro Martinez
a7988337f2 Enable HomeWindow Translations 2012-12-10 23:49:51 -03:00
Mark Liversedge
f32e1a8536 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
cd2145504a 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
b5300181ce 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
09c5e1e59e 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
d74bc19ac8 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
4bdd953bad 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
f68d9f2e43 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
79efd4181b 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
fe5fb53870 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
caaa10bca6 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
94b0ae6376 Chart settings dialog no longer fixed size
Fixes #619.
2012-01-30 15:51:33 +00:00
Mark Liversedge
078a3ec450 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
494a4adfbe 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
63994e2ac4 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
3e069ce3dd Spacing around tab bar. 2011-11-13 19:41:13 +00:00
Mark Liversedge
4f1eb0aee2 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
eddae9521b added reset window layout to all the HomeWindows. 2011-10-16 19:22:42 -06:00
Mark Liversedge
9cffed3d16 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
f63573645f 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
39946aa21e 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
a7121bc726 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
8684cc4029 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
a4340d1197 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
b77f4385be 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
14b26bc11c 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
dde08ceb38 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
0cb5008d8e Fix title edit when no charts on HomeWindow
Fixes #409.
2011-08-19 17:57:43 +01:00
Mark Liversedge
7fba789826 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
bbc98a55bd 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
3f2096efde 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
0af5f0befd 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
2acc670fea 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
8f06fc6a17 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
Mark Liversedge
44ab9fc5fd Further UI fixups
More work to unify the tab view with the overall
UI look-and-feel, allowing you to remove and add
tabs via mouse over rather than the close tab
icon. Also added a number of cosmetic adjustments.

Fixed up PerformanceManager and ScatterPlot to
pick up on the chart fonts and tick size etc.

Removed some erroneous static members in the
ScatterPlot that caused a SEGV when adding multiple
charts (or cancelling an add then adding again).
2011-06-10 23:27:51 +01:00
Mark Liversedge
1462da2046 Potential fix for Add Chart crash
New charts are created in the GUI thread and
the Dialog is not deleted until after the chart
has been reparented.

This modification will need testing on Windows.
2011-06-05 15:56:48 +01:00
Mark Liversedge
acf023c973 Ride Plot Axis coloring
The legend wasted screen estate and was removed, this patch
colors the axis labels/ticks so no legend is required. This
approach could be adopted for other charts.

Also includes a fix to hide realtime view controls which
left a screen glitch because they should have been hidden.
2011-06-05 01:51:45 +01:00
Mark Liversedge
d1c9ff83b6 Possible fix for Add Chart crash
I have not been able to reproduce the crash, but reading
through the code related to the chart add dialog I have spotted
an error where the chart could be destroyed when you click the
OK button, but still referenced.

This modification also appears to fix an issue with chart
controls not working when you first add a new chart.

Requires testing before the associated defect in GoldenTracker
can be closed.
2011-06-04 21:51:56 +01:00
Mark Liversedge
e9bc1f5f2f Re-introduce Dropshadow on Win/Mac
QGraphicsDropShadowEffect needs Qt 4.7.3 to
be guaranteed to work correctly. This is inline
with the statement that Qt 4.6 is mandatory
whilst later releases are desirable.
2011-06-04 21:08:27 +01:00
Mark Liversedge
a34b52d9cb Fixup Tab mode for Mac
Style selector was not displayed and the
paint event handler allocated two painters
which is not allowed by Qt.
2011-06-04 20:05:36 +01:00
Mark Liversedge
4b567a7681 Reinstate Tab view
After discussion on the list the utility and popularity of
the original tab view was restated. This patch reinstates
the tab view and attempts to unify the Qt tab widget with
the general look and feel of the application.
2011-06-04 17:12:17 +01:00
Mark Liversedge
f737579964 UI Cosmetics & Nits
Added a dropshadow effect for window tiles and made the
title embossed for a more professional look.

Also fixed a couple more compile time nits introduced
by recent commits.
2011-06-03 18:07:01 +01:00
Mark Liversedge
55c5c27131 Remove superfluous heading
The heading on the homewindow pages is superfluous since the
user is well aware what page they are on by the fact they
selected it and also the contents displayed.

This also has the effect of making tiled view the standard
and only view. Will need to add options to maximise a chart
to fullscreen later.
2011-06-01 22:05:45 +01:00
Mark Liversedge
cb3f752fa7 Simplify and Clean UI
Less jarring UI with simple use of color and
no pixmaps to make a clean look. Will need
more work to get consistent across the code
base.

A simple and clean UI is starting to emerge.
2011-06-01 21:46:31 +01:00
Mark Liversedge
f39c3361c8 Sidebar, Ride List and Aeshetics
An update to the ride list on the left hand side
to enable the user to choose and sort or group-by
metrics, metadata fields and ride information.

In addition, the sidebar has been 'improved'
cosmetically and to require less screen estate.

Also, the ticks and frames on plots have been
adjusted to be more aesthtically appealling.

There is more to come on the look-and-feel front,
but this patch heralds some work on the sidebar
which needs to be resolved.
2011-06-01 16:34:24 +01:00
Mark Liversedge
5e1c5897f7 Make Analysis view configurable
You can now configure the Analysis view to drag and drop
charts on the page and lay them out etc. A default setup
displays basic data such as ride summary, histograms and
ride plot.

MainWindow still needs a bit of a tidy-up as the basic
code has been edited and re-edited by a cast of thousands
and its a bit of a mess as a result.
2011-05-15 14:34:34 +01:00