1
0
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:
2016-11-05 17:33:29 +01:00
parent 584245785e
commit b9098c0dc5
7 changed files with 134 additions and 74 deletions

View File

@ -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);