mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 19:55:53 +01:00
Code cleanup
This commit is contained in:
parent
cc8d237786
commit
588859ca3a
@ -984,9 +984,7 @@ void GUI::plot(QPrinter *printer)
|
|||||||
QPainter p(printer);
|
QPainter p(printer);
|
||||||
TrackInfo info;
|
TrackInfo info;
|
||||||
qreal ih, gh, mh, ratio;
|
qreal ih, gh, mh, ratio;
|
||||||
qreal d = distance();
|
|
||||||
qreal t = time();
|
|
||||||
qreal tm = movingTime();
|
|
||||||
|
|
||||||
if (!_pathName.isNull() && _options.printName)
|
if (!_pathName.isNull() && _options.printName)
|
||||||
info.insert(tr("Name"), _pathName);
|
info.insert(tr("Name"), _pathName);
|
||||||
@ -1012,12 +1010,12 @@ void GUI::plot(QPrinter *printer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d > 0 && _options.printDistance)
|
if (distance() > 0 && _options.printDistance)
|
||||||
info.insert(tr("Distance"), Format::distance(d, units()));
|
info.insert(tr("Distance"), Format::distance(distance(), units()));
|
||||||
if (t > 0 && _options.printTime)
|
if (time() > 0 && _options.printTime)
|
||||||
info.insert(tr("Time"), Format::timeSpan(t));
|
info.insert(tr("Time"), Format::timeSpan(time()));
|
||||||
if (tm > 0 && _options.printMovingTime)
|
if (movingTime() > 0 && _options.printMovingTime)
|
||||||
info.insert(tr("Moving time"), Format::timeSpan(tm));
|
info.insert(tr("Moving time"), Format::timeSpan(movingTime()));
|
||||||
|
|
||||||
qreal fsr = 1085.0 / (qMax(printer->width(), printer->height())
|
qreal fsr = 1085.0 / (qMax(printer->width(), printer->height())
|
||||||
/ (qreal)printer->resolution());
|
/ (qreal)printer->resolution());
|
||||||
|
Loading…
Reference in New Issue
Block a user