mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Code cleanup
This commit is contained in:
parent
371fa13bc6
commit
367427b26a
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user