1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-07 18:53:02 +02:00
GPXSee/src/GUI/speedgraph.h
Martin Tůma 8de6bbe4fb Fixed maximal speed info
Display the maximum of all primary graphs, not the maximum of all graphs.
2025-03-16 17:14:14 +01:00

45 lines
814 B
C++

#ifndef SPEEDGRAPH_H
#define SPEEDGRAPH_H
#include <QList>
#include "graphtab.h"
class SpeedGraphItem;
class Track;
class SpeedGraph : public GraphTab
{
Q_OBJECT
public:
SpeedGraph(QWidget *parent = 0);
~SpeedGraph();
QString label() const {return tr("Speed");}
QList<GraphItem*> loadData(const Data &data, Map *map);
void clear();
void setUnits(Units units);
void setTimeType(TimeType type);
void showTracks(bool show);
private:
GraphItem *loadGraph(const Graph &graph, const Track &track,
const QColor &color, bool primary);
qreal avg() const;
qreal max() const;
void setYUnits();
void setInfo();
QVector<QPointF> _avg;
QVector<QPointF> _mavg;
QVector<QPointF> _max;
Units _units;
TimeType _timeType;
bool _showTracks;
QList<SpeedGraphItem *> _tracks;
};
#endif // SPEEDGRAPH_H