X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=activityinfo.cpp;h=b6b0eb9ef980794a2d325e7186afd34817f317da;hb=HEAD;hp=fb06a37b58260e7872be97da01b1616b0361e588;hpb=562d093bd082a53636e18d4f07d842310984ceb4;p=gpssportsniffer diff --git a/activityinfo.cpp b/activityinfo.cpp index fb06a37..b6b0eb9 100755 --- a/activityinfo.cpp +++ b/activityinfo.cpp @@ -1,3 +1,22 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Tito Eritja Real +** +** 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 . +** +****************************************************************************/ + #include "activityinfo.h" #include "ui_activityinfo.h" #include "track.h" @@ -34,17 +53,18 @@ void ActivityInfo::getSummary(Track* trk){ // 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")); @@ -58,6 +78,7 @@ void ActivityInfo::getSummary(Track* trk){ 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")); }