Use the canonical file name also for the "already open" check
[GPXSee.git] / src / GUI / elevationgraph.h
blob46fe090ee3caa58873645335190f44a0816deb70
1 #ifndef ELEVATIONGRAPH_H
2 #define ELEVATIONGRAPH_H
4 #include "graphtab.h"
6 class ElevationGraphItem;
8 class ElevationGraph : public GraphTab
10 Q_OBJECT
12 public:
13 ElevationGraph(QWidget *parent = 0);
14 ~ElevationGraph();
16 QString label() const {return tr("Elevation");}
17 QList<GraphItem*> loadData(const Data &data);
18 void clear();
19 void setUnits(enum Units units);
20 void showTracks(bool show);
21 void showRoutes(bool show);
23 private:
24 enum PathType {TrackPath, RoutePath};
26 qreal max() const;
27 qreal min() const;
28 qreal ascent() const;
29 qreal descent() const;
31 void setYUnits(Units units);
32 void setInfo();
34 GraphItem *loadGraph(const Graph &graph, PathType type, const QColor &color,
35 bool primary);
36 void showItems(const QList<ElevationGraphItem *> &list, bool show);
38 qreal _trackAscent, _trackDescent;
39 qreal _routeAscent, _routeDescent;
40 qreal _trackMax, _routeMax;
41 qreal _trackMin, _routeMin;
43 bool _showTracks, _showRoutes;
44 QList<ElevationGraphItem *> _tracks, _routes;
47 #endif // ELEVATIONGRAPH_H