ErgFile now supports 'named' intervals

As a precursor to more sophisticated workout
creation and config, the ergfile format and
plot now supports named intervals.

This is so we can identify blocks of the workout
and reuse them by name (rather than having to
select a section, which should also be supported).
This commit is contained in:
Mark Liversedge
2012-01-06 19:49:11 +00:00
parent 16ca7e4667
commit 43d0452dc3
3 changed files with 6 additions and 3 deletions

View File

@@ -225,7 +225,7 @@ ErgFilePlot::setData(ErgFile *ergfile)
for(int i=0; i < ergFile->Laps.count(); i++) {
// Show Lap Number
QwtText text(QString::number(ergFile->Laps.at(i).LapNum));
QwtText text(ergFile->Laps.at(i).name != "" ? ergFile->Laps.at(i).name : QString::number(ergFile->Laps.at(i).LapNum));
text.setFont(QFont("Helvetica", 10, QFont::Bold));
text.setColor(GColor(CPLOTMARKER));