1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-23 15:14:24 +02:00

Added support for track segments

This commit is contained in:
2019-02-11 23:28:08 +01:00
parent 3c112b0b6f
commit 0308dbbb09
46 changed files with 731 additions and 537 deletions

View File

@ -6,20 +6,9 @@
TemperatureGraphItem::TemperatureGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent) : GraphItem(graph, type, parent)
{
qreal sum = 0;
_min = _max = graph.first().y();
for (int j = 1; j < graph.size(); j++) {
qreal y = graph.at(j).y();
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
if (y > _max)
_max = y;
if (y < _min)
_min = y;
}
_avg = sum/graph.last().s();
_min = GraphItem::min();
_max = GraphItem::max();
_avg = GraphItem::avg();
setToolTip(toolTip(Metric));
}