mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Data Filter (Part 3 of 3)
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.
This commit is contained in:
@@ -869,7 +869,7 @@ static void distAggregate(QVector<double> &into, QVector<double> &other)
|
||||
|
||||
}
|
||||
|
||||
RideFileCache::RideFileCache(MainWindow *main, QDate start, QDate end)
|
||||
RideFileCache::RideFileCache(MainWindow *main, QDate start, QDate end, bool filter, QStringList files)
|
||||
: main(main), rideFileName(""), ride(0)
|
||||
{
|
||||
// resize all the arrays to zero - expand as neccessary
|
||||
@@ -905,7 +905,9 @@ RideFileCache::RideFileCache(MainWindow *main, QDate start, QDate end)
|
||||
// exist, or /might/ be out of date.
|
||||
foreach (QString rideFileName, RideFileFactory::instance().listRideFiles(main->home)) {
|
||||
QDate rideDate = dateFromFileName(rideFileName);
|
||||
if (rideDate >= start && rideDate <= end) {
|
||||
if (((filter == true && files.contains(rideFileName)) || filter == false) &&
|
||||
rideDate >= start && rideDate <= end) {
|
||||
|
||||
// get its cached values (will refresh if needed...)
|
||||
RideFileCache rideCache(main, main->home.absolutePath() + "/" + rideFileName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user