~ubuntu-branches/ubuntu/saucy/goldencheetah/saucy

« back to all changes in this revision

Viewing changes to src/RideMetric.cpp

  • Committer: Package Import Robot
  • Author(s): KURASHIKI Satoru
  • Date: 2013-08-18 07:02:45 UTC
  • mfrom: (4.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20130818070245-zgdvb47e1k3mtgil
Tags: 3.0-3
debian/control: remove needless dependency. (Closes: #719571)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
 
1
/*
2
2
 * Copyright (c) 2008 Sean C. Rhea (srhea@srhea.net)
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify it
5
5
 * under the terms of the GNU General Public License as published by the Free
6
6
 * Software Foundation; either version 2 of the License, or (at your option)
7
7
 * any later version.
8
 
 * 
 
8
 *
9
9
 * This program is distributed in the hope that it will be useful, but WITHOUT
10
10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12
12
 * more details.
13
 
 * 
 
13
 *
14
14
 * You should have received a copy of the GNU General Public License along
15
15
 * with this program; if not, write to the Free Software Foundation, Inc., 51
16
16
 * Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24
24
QVector<QString> RideMetricFactory::noDeps;
25
25
 
26
26
QHash<QString,RideMetricPtr>
27
 
RideMetric::computeMetrics(const RideFile *ride, const Zones *zones, const HrZones *hrZones,
 
27
RideMetric::computeMetrics(const MainWindow *main, const RideFile *ride, const Zones *zones, const HrZones *hrZones,
28
28
                           const QStringList &metrics)
29
29
{
30
30
    int zoneRange = zones->whichRange(ride->startTime().date());
47
47
        }
48
48
        if (ready) {
49
49
            RideMetric *m = factory.newMetric(symbol);
50
 
            if (!ride->dataPoints().isEmpty())
51
 
                m->compute(ride, zones, zoneRange, hrZones, hrZoneRange, done);
 
50
            //if (!ride->dataPoints().isEmpty())
 
51
                m->compute(ride, zones, zoneRange, hrZones, hrZoneRange, done, main);
52
52
            if (ride->metricOverrides.contains(symbol))
53
53
                m->override(ride->metricOverrides.value(symbol));
54
54
            done.insert(symbol, m);
67
67
        delete done.value(symbol);
68
68
    return result;
69
69
}
70