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.
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.
1. Use the whitespace analyzer so its easier to search for
tokens that are a mix of letters and numbers e.g. workout
codes and TT route names.
2. Search as you type. Since we have very small collections
to search across (typically no more than a couple of thousand)
there is no major overhead in searching as you type.
3. Search all texts by default not just the Notes field. This is
a more appropriate default and is less likely to confuse new
users. In addition, it is most likely what most users want to
do anyway.
There are some issues with document deletion and support for
the latest release of CLucene which may be related to having
concurrent IndexWriters and IndexReaders.
This refactoring works fine on Linux. Pushed for safety for
any users that may be experiencing issues when deleting rides.
Further investigation is required on mac and windows builds.
QT crashes if exceptions are raised in the event loop. This was
happenning during program exit and also when deleting rides with
a right click.
This patch traps those exceptions and also, since Macports will
install 0.9.23 we can use IndexWriter to deleteDocuments.