mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +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();
|
return (_data.size()) ? _data.first().timestamp() : QDateTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
Path Track::track() const
|
Path Track::path() const
|
||||||
{
|
{
|
||||||
Path ret;
|
Path ret;
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class Track
|
|||||||
public:
|
public:
|
||||||
Track(const TrackData &data);
|
Track(const TrackData &data);
|
||||||
|
|
||||||
Path track() const;
|
Path path() const;
|
||||||
Graph elevation() const;
|
Graph elevation() const;
|
||||||
Graph speed() const;
|
Graph speed() const;
|
||||||
Graph heartRate() const;
|
Graph heartRate() const;
|
||||||
|
@ -30,13 +30,13 @@ TrackItem::TrackItem(const Track &track, QGraphicsItem *parent)
|
|||||||
: PathItem(parent)
|
: PathItem(parent)
|
||||||
{
|
{
|
||||||
QPointF p;
|
QPointF p;
|
||||||
QVector<Coordinates> t = track.track();
|
const Path &path = track.path();
|
||||||
Q_ASSERT(t.count() >= 2);
|
Q_ASSERT(path.count() >= 2);
|
||||||
|
|
||||||
p = t.first().toMercator();
|
p = path.first().toMercator();
|
||||||
_path.moveTo(QPointF(p.x(), -p.y()));
|
_path.moveTo(QPointF(p.x(), -p.y()));
|
||||||
for (int i = 1; i < t.size(); i++) {
|
for (int i = 1; i < path.size(); i++) {
|
||||||
p = t.at(i).toMercator();
|
p = path.at(i).toMercator();
|
||||||
_path.lineTo(QPointF(p.x(), -p.y()));
|
_path.lineTo(QPointF(p.x(), -p.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user