Add Temperature and Slope Data Series

This patch adds support for temperature and slope
across the ridefile readers.

For the most part their is no functional change
although it is now possible to view and edit these
data series in the editor.

File formats that can provide temp or slope include;
.bin, .fit, .srm, .sync, .wko

Further updates will be required to display the data
in the ride plot and histograms.
This commit is contained in:
Damien Grauser
2011-12-03 23:17:11 +00:00
committed by Mark Liversedge
parent bd6d578d43
commit 70c8f0223c
32 changed files with 147 additions and 66 deletions

View File

@@ -113,6 +113,14 @@ RideFileTableModel::setHeadings(RideFile::SeriesType series)
headings_ << tr("Headwind");
headingsType << RideFile::headwind;
}
if (series == RideFile::slope || ride->areDataPresent()->slope) {
headings_ << tr("Slope");
headingsType << RideFile::slope;
}
if (series == RideFile::temp || ride->areDataPresent()->temp) {
headings_ << tr("Temperature");
headingsType << RideFile::temp;
}
if (series == RideFile::interval || ride->areDataPresent()->interval) {
headings_ << tr("Interval");
headingsType << RideFile::interval;
@@ -137,8 +145,9 @@ RideFileTableModel::data(const QModelIndex & index, int role) const
if (index.row() >= ride->dataPoints().count() || index.column() >= headings_.count())
return QVariant();
else
return ride->getPointValue(index.row(), headingsType[index.column()]);
else {
return ride->getPoint(index.row(), headingsType[index.column()]);
}
}
QVariant