+/****************************************************************************
+**
+** Copyright (C) 2011 Tito Eritja Real <jtitoo@gmail.com>
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
#include "activityinfo.h"
#include "ui_activityinfo.h"
#include "track.h"
// this is for yesterday... so it has to be
// corrected some day!
- if(trk->getNumPoints()<=0)
+ if(trk->getNumPoints()<=0)
return;
- setWindowTitle(trk->getName());
+ setWindowTitle(nameFromFile(trk->getFileName()));
//ui->windowTitle(trk->getName());
ui->startTimeValue->setText(trk->getStartTime().toString(CLEAN_DATE_FORMAT));
double duration=trk->getDuration();
double duration_2=trk->getStartTime().secsTo(trk->getEndTime());
+
ui->timeValue->setText(stringDateFromSeconds(duration));
ui->distanceValue->setText(QString::number(trk->getDistance(),'f',2).append(" m"));
ui->elevationValue->setText(QString::number(trk->getElevationGain(),'f',2).append(" m"));
ui->elevationLossValue->setText(QString::number(trk->getElevationLoss(),'f',2).append(" m"));
ui->minElevationValue->setText(QString::number(trk->getMinElevation(),'f',2).append(" m"));
ui->maxElevationValue->setText(QString::number(trk->getMaxElevation(),'f',2).append(" m"));
+ ui->lastElevationValue->setText(QString::number(trk->getLastElevation(),'f',2).append(" m"));
}