mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-18 12:54:23 +02:00
Redesigned track data filtering
This commit is contained in:
17
src/graph.h
17
src/graph.h
@ -27,7 +27,22 @@ private:
|
||||
qreal _y;
|
||||
};
|
||||
|
||||
typedef QVector<GraphPoint> Graph;
|
||||
class Graph : public QVector<GraphPoint>
|
||||
{
|
||||
public:
|
||||
Graph() : QVector<GraphPoint>() {_time = true;}
|
||||
void append(const GraphPoint &p)
|
||||
{
|
||||
if (std::isnan(p.t()))
|
||||
_time = false;
|
||||
QVector<GraphPoint>::append(p);
|
||||
}
|
||||
|
||||
bool hasTime() const {return _time;}
|
||||
|
||||
private:
|
||||
bool _time;
|
||||
};
|
||||
|
||||
Q_DECLARE_TYPEINFO(GraphPoint, Q_PRIMITIVE_TYPE);
|
||||
|
||||
|
Reference in New Issue
Block a user