mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
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:
committed by
Mark Liversedge
parent
ba3c6c11d6
commit
ac3112b286
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user