.. if you build with qt 5.2.1 then the unified title and toolbar
is back, but its a hack to just change the gradient and use a
standard toolbar .. so we do that, but make the colours match.
The 4 views have been shown to be confusing -- it is not clear
to new users what their purpose is, and hence how or why they
are different.
So in an effort to reduce the confusion I've renamed a few
things to be much more explicit and specific.
.. We embrace the fact we are a cycling program and use the term
RIDES not ACTIVITIES for all files
.. HOME is confusing, renamed to TRENDS
.. the ANALYSIS view name is confusing, its all about ANALYSIS
to renamed to RIDES
There will no doubt be areas that are not renamed properly we
can fix those when the arise.
Fixed up to make the toolbar on a build on QT5 look a little
more like one on QT4 where they still have unified toolbar
and title support.
We should look at managing via the native NSToolbar in the
near future since Digia have made it clear that they are not
keen to reintroduce unified toolbars in QT5.
.. this allows us to drag and drop between athletes or
to switch athlete if dropping from outside of GC.
.. also added context to the mime data so the compare pane
will know where the dragged object has come from (ie. it
may be from a different athlete).
.. the save dialogs all assumed the current tab
and current context were relevant when checking
for unsaved files etc, but this was INCORRECT.
.. when window is closed each tab is checked IN TURN
so the context should have been passed (because the
current tab/context is just one of the many to save)
.. only needed when we have >1 tabs so lets hide and
show it automatically.
.. also added a setting for remembering setting but it
doesn't do anything as we auto hide/show.
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).
This reverts commit 20739ebb29.
Qt5 has a number of issues that cannot easily be resolved.
An alternative strategy of developing a custom cocoa control
for the mac toolbar is probably a better way forward.
Porting the codebase to QT 5 (5.2) to get the
latest bug fixes, performance and improved platform
support.
This first part is to fixup the codebase to compile
on Qt 5, but some aspects have been broken (video).
The second part is to migrate from Qwt 6.0.1 to the
latest Qwt for multiaxis support.
The third part will be to fixup any platform specific
issues or issues identified at runtime.
When showing / hiding the toolbar we also show / hide
the scope bar. This is so when in train mode and you go
full screen it is possible to hide all ornamentation.
This will become a moot point when the scope bar is
replaced with 'appstore style icons' in the toolbar
to switch between home, analysis, train etc.
.. it was not possibe to resize the window because
the blankstate page was too big.
.. blankstatepage is hidden for now until we fix the
logic for it in TabView
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!
A bit of a mix of stuff, but basically the Athlete
class has sql stuff in it, that DBAccess used but
also referenced a session number in MainWindow.
Removed the interdependency and moved all code to do
with DB to DBAccess and out of MainWindow and Athlete.
At the same time needed to clean up a bit of memory
management and so introduced a MainWindow and Athlete
destructor.
We are now ready to do refactor part 4 to split MainWindow
into a new View class (that will be in each tab).
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.