Split the views in MainWindow into separate classes;
* Tab is a collection of the 4 main views
* TabView is a base class for all of the 4 view types
* {Analysis,Train,Diary,Home}View are all derived from
TabView and deal with specifics of those views (e.g.
Diary/Home worry about date ranges).
We should be ready to move to tabbed athletes soon.
There are a few nits left for this part of the refactor
that will need to be resolved in some fixups over the
next few days;
* tile mode segment selector has wrong segment selected
when the view is in tile mode.
* Minimum height/width of MainWindow is large for some
reason
* the Train view controls (play, ffwd etc) have nowhere
to go at present -- need to fix that !!!
* When you resize the mainwindow width the sidebars expand
and should remain a fixed width
* not sure if it will build on Windows or Mac!
Further MainWindow updates, this time moving the code
for working with intervals to the AnalysisSidebar and the
associate menus.
Ultimately, the functions for working with Activities and
their Intervals will move from MainWindow and Sidebars to
the ActivityCollection classes.
This is a step as we strip out MainWindow to just GUI
aspects.
Moving the code intertwined into MainWindow for
the analysis view sidebar; activity list, intervals
and calendar into a new AnalysisSidebar class.
WARNING!
This is a work in progress checkpoint commit
as the sidebar menus and context menus have
not yet been migrated out -- this will be done
in the next commit or two.
Slowly migrating code and data from the MainWindow
class to Athlete and Context classes.
This update moves the ride and interval lists and
data structures from MainWindow to Athlete.
Decoupled classes from MainWindow to reference Context
and Athlete (and introduced a couple of new headers).
We no longer pass around a MainWindow pointer to children
but pass a context instead.
There are still a few pieces left in MainWindow that need
to move to a better place;
* Setting/clearing filter selection
* Working with Intervals
* Adding/Deleting Rides
* Save on Exit
As mentioned previously there are lots of other parts to
this refactor left to do;
* break MainWindow Gui elements into Toolbar and Views
* migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
* introduce Application Context and AthleteCollection
Breaking the MainWindow 'god object' into
separate classes for Athlete and Context.
Further updates will need to;
- break MainWindow Gui elements into Toolbar and Views
- migrate from RideItem and Ridelist to ActivityCollection
and Activity classes that are not tied into gui elements.
- introduce Application Context and AthleteCollection
Once these are done we will be in a position to decouple
most classes from mainwindow and also introduce tabbed
athletes.
Because the chart settings are modal its a really bad
idea to open up a column chooser from there. So, by
default, we don't have a column chooser option on the
search/filter box -- it must be explicitly requested.
We therefore explicity set the column chooser from the
mainwindow and also from the ride navigator window.
The visual headings are not reset when the view is reset, for
example after startup. This means the wrong columns are offered
on the activity popup menu for group by.
The resetView() function needed to call columnsChanged() to get
the visual headings reset.
All are harmless but for the sake of clarity have
fixed them all bar a couple;
- Lucene grumbles about signed/unsigned conversion which
is/isn't valid depending upon the version of CLucene you
compile with. Either way it is harmless.
- QxtScheduleView has a bunch of issues, but since it is a
third party widget its better to leave it unchanged.
column names from xml file need to be translated to match translated headings,
other posibility would be to match before translation, but this option needed
fewer changes.
Workaround that by putting new columns at the left
not at the right and the problem goes away. Suspect
it is related to issues with QT and expandLastColumn()
which also displayed issues.
RideNavigator set the GCBubble to the wrong position on
screen which can be confusing when you have a narrow list
of rides. The bubble appeared to be displaying for a totally
different ride.
When adjusting column widths take into account the
contents margins. Also shows sort indicator on the
columns when not on a mac (this was changed as part
of the recent Mac native polish commits).
Adjustment sneaked in by accident to reduce the
font size was hard to track down, but this patch
fixes it and also removes some errant (but harmless)
code in the navigator too.
Thanks to Claus Assmann for the fixups;
- RideNavigator double foreach loops used same name for iterator
- N_TTY line discipline is not defined on OpenBSD (possibly)
Would be nice to have a better fix for the line discipline
stuff, but 0 is usually the TTY line discipline. Bit of a
hack, but ok for now.
Part of a series of commits to adjust the UI on a Mac to
look more native and conform better to the Mac UI design
guidelines.
This patch introduces a unified title and toolbar which hosts
a search field and buttons for commonly used functions like
import, split ride, delete etc.
Since it is not possible (or more importantly good practice) to
hide and show toolbar items the Train View controls have now been
moved to the sidebar on a Mac. This is a temporary measure and
will be resolved in future updates.
Further updates planned are;
Part 2 - fixup the preferences pane to be more Mac-like
Part 3 - Spit and Polish around the charts; drop shadows, controls etc
The ride navigator has 0 contents margins which made
grabbing and resizing impossible in paned mode. This
was done to make it look beter when it is a ride list.
It now has a constructor argument to specify if its
being put into mainwindow as the ride list or its being
added to a view.
The ride list / navigator gets a horizontal scrollbar
every time it is shown as the columns are resized but
not taking into account the need for a vertical scrollbar.
The reasons behind this are more complicated but this
patch fixes this annoyance.
An annoying bug that has been around for far too long.. the ride
list headings are resizable and the user can adjust them. But
when GC restarts the sizes are lost.
This was caused by an error in the code that saved away to column
widths -- it failed to use the logical index for each column (since
columns can be re-arranged).
Now upon restart the columns will be the right size -- but for the
very first launch after this bug is fixed the sizes will still be wrong.
They will need to be reorganised and then restart GC one more time.
The sidebar elements all get a blue focus rectangle on
Mac OSX. This is a platform specific setting. This patch
removes the focus rectangle for sidebar components only.
Last part of the search/filter functionality;
* SearchBox now incorporates filter and search
with a new widget. We can update this widget
to include more fancy UI/Interactions without
having to change the ride list or charts etc.
* Added search/filter widget to the relevant charts
and screens; Metrics, TreeMap, CP, Histogram,
Activity Log, Ride list (refactored out of MainWindow)
* Added namedsearches.xml and adding/selecting them
from a drop down menu on the search box.
* Fixed some performance bugs related to duplicate
signals and redraw/reprocessing. Also ensured that
CLucene remains optional -- but means no search or
filter functionality unless it is available.
More complex than I had hoped for, to add
Temperature I needed to;
* introduce two new metrics Avg/Max temperature
* adjust metric conversion to include a conversionSum
for the C to F conversion
* handle temperature as a metadata field as well as a
ride data series
* handle the RideFile::noTemp value rather than just
averaging or calculating max.
Fixes#603.
Linux build using the 4.8 qt rc uncovered a couple
of bugs in the new ride navigator code. This fixes
that, but needs to be tested in earlier versions,
e.g. 4.6, 4.7.
You can now place a ride navigator on the chart layouts, this allows
the user to configure many more columns and use the navigator to
browse and order the activity history in a log/journal format.
The default diary layout now has two tabs; one for the calendar and
another for the activity history.
There appears to be a few minor bugs related to column/chart resizing
that have been present for a while, but are more obvious now the navigator
is a chart in its own right. These will be resolved later.
A popup bubble when hovering over the activity
history or an entry on the calendar.
It is a pre-cursor for the activity bar for
selecting rides and is available for any
widget to call (it is a member of mainwindow).
To support the data series indicator icons a
new metadata field 'Data' has been added to
store a string to represent the data series
that are present.
In addition, the Sport code is used to decide
if a bike/run/swim icon should be shown instead
of a string (but needs translation support when
we get round to that).
Lastly, it has been coded for horizontal alignment
but will need to be updated for the activity bar
to support vertical alignment.
This is an experimental feature and will develop
over time, specifically;
* you cannot define which metrics are show in the
bubble -- they are hardcoded at present
* the coloring is hardcoded, as is the font size
* Only the activity list and diary use it.