1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2016-11-13 09:49:31 +01:00
parent 371fa13bc6
commit 367427b26a
3 changed files with 7 additions and 7 deletions

View File

@ -213,7 +213,7 @@ QDateTime Track::date() const
return (_data.size()) ? _data.first().timestamp() : QDateTime();
}
Path Track::track() const
Path Track::path() const
{
Path ret;

View File

@ -14,7 +14,7 @@ class Track
public:
Track(const TrackData &data);
Path track() const;
Path path() const;
Graph elevation() const;
Graph speed() const;
Graph heartRate() const;

View File

@ -30,13 +30,13 @@ TrackItem::TrackItem(const Track &track, QGraphicsItem *parent)
: PathItem(parent)
{
QPointF p;
QVector<Coordinates> t = track.track();
Q_ASSERT(t.count() >= 2);
const Path &path = track.path();
Q_ASSERT(path.count() >= 2);
p = t.first().toMercator();
p = path.first().toMercator();
_path.moveTo(QPointF(p.x(), -p.y()));
for (int i = 1; i < t.size(); i++) {
p = t.at(i).toMercator();
for (int i = 1; i < path.size(); i++) {
p = path.at(i).toMercator();
_path.lineTo(QPointF(p.x(), -p.y()));
}