From aac9bf024b385686c951ed4ac20fb64d6c3e4bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 5 Nov 2016 20:00:14 +0100 Subject: [PATCH] Debug stuff --- gpxsee.pro | 3 ++- src/graph.cpp | 9 +++++++++ src/graph.h | 7 +++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/graph.cpp diff --git a/gpxsee.pro b/gpxsee.pro index 76be18b7..60cc5f12 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -111,7 +111,8 @@ SOURCES += src/main.cpp \ src/coordinates.cpp \ src/kmlparser.cpp \ src/fitparser.cpp \ - src/format.cpp + src/format.cpp \ + src/graph.cpp RESOURCES += gpxsee.qrc TRANSLATIONS = lang/gpxsee_cs.ts macx { diff --git a/src/graph.cpp b/src/graph.cpp new file mode 100644 index 00000000..8b34aec4 --- /dev/null +++ b/src/graph.cpp @@ -0,0 +1,9 @@ +#include "graph.h" + +QDebug operator<<(QDebug dbg, const GraphPoint &graphpoint) +{ + dbg.nospace() << "GraphPoint(" << graphpoint.s() << ", " + << graphpoint.t() << ", " << graphpoint.y() << ")"; + + return dbg.maybeSpace(); +} diff --git a/src/graph.h b/src/graph.h index d6880341..76265a1d 100644 --- a/src/graph.h +++ b/src/graph.h @@ -2,6 +2,7 @@ #define GRAPH_H #include +#include #include enum GraphType {Distance, Time}; @@ -27,6 +28,10 @@ private: qreal _y; }; +Q_DECLARE_TYPEINFO(GraphPoint, Q_PRIMITIVE_TYPE); +QDebug operator<<(QDebug dbg, const GraphPoint &graphpoint); + + class Graph : public QVector { public: @@ -44,6 +49,4 @@ private: bool _time; }; -Q_DECLARE_TYPEINFO(GraphPoint, Q_PRIMITIVE_TYPE); - #endif // GRAPH_H