1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Project structure refactoring

This commit is contained in:
Martin Tůma 2017-11-26 18:54:03 +01:00
parent 443b916301
commit 56e4c80999
182 changed files with 500 additions and 529 deletions

View File

@ -7,181 +7,182 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
lessThan(QT_VERSION, 5.4): QT += opengl lessThan(QT_VERSION, 5.4): QT += opengl
macx: QT += opengl macx: QT += opengl
INCLUDEPATH += ./src
HEADERS += src/config.h \ HEADERS += src/config.h \
src/icons.h \ src/common/staticassert.h \
src/gui.h \ src/common/coordinates.h \
src/poi.h \ src/common/range.h \
src/rtree.h \ src/common/rectc.h \
src/axisitem.h \ src/common/wgs84.h \
src/keys.h \ src/GUI/app.h \
src/slideritem.h \ src/GUI/icons.h \
src/markeritem.h \ src/GUI/gui.h \
src/infoitem.h \ src/GUI/axisitem.h \
src/elevationgraph.h \ src/GUI/keys.h \
src/speedgraph.h \ src/GUI/slideritem.h \
src/sliderinfoitem.h \ src/GUI/markeritem.h \
src/filebrowser.h \ src/GUI/infoitem.h \
src/map.h \ src/GUI/elevationgraph.h \
src/onlinemap.h \ src/GUI/speedgraph.h \
src/downloader.h \ src/GUI/sliderinfoitem.h \
src/units.h \ src/GUI/filebrowser.h \
src/scaleitem.h \ src/GUI/units.h \
src/waypoint.h \ src/GUI/scaleitem.h \
src/track.h \ src/GUI/graphview.h \
src/graphview.h \ src/GUI/waypointitem.h \
src/trackpoint.h \ src/GUI/palette.h \
src/waypointitem.h \ src/GUI/heartrategraph.h \
src/palette.h \ src/GUI/trackinfo.h \
src/heartrategraph.h \ src/GUI/exportdialog.h \
src/range.h \ src/GUI/fileselectwidget.h \
src/cpuarch.h \ src/GUI/margins.h \
src/settings.h \ src/GUI/temperaturegraph.h \
src/app.h \ src/GUI/graphtab.h \
src/trackinfo.h \ src/GUI/trackitem.h \
src/exportdialog.h \ src/GUI/tooltip.h \
src/fileselectwidget.h \ src/GUI/routeitem.h \
src/margins.h \ src/GUI/graphitem.h \
src/temperaturegraph.h \ src/GUI/pathitem.h \
src/graphtab.h \ src/GUI/pathview.h \
src/misc.h \ src/GUI/griditem.h \
src/trackitem.h \ src/GUI/format.h \
src/tooltip.h \ src/GUI/cadencegraph.h \
src/route.h \ src/GUI/powergraph.h \
src/routeitem.h \ src/GUI/optionsdialog.h \
src/graphitem.h \ src/GUI/colorbox.h \
src/graph.h \ src/GUI/stylecombobox.h \
src/pathitem.h \ src/GUI/opengl.h \
src/pathview.h \ src/GUI/timetype.h \
src/griditem.h \ src/GUI/percentslider.h \
src/data.h \ src/GUI/elevationgraphitem.h \
src/gpxparser.h \ src/GUI/speedgraphitem.h \
src/tcxparser.h \ src/GUI/heartrategraphitem.h \
src/parser.h \ src/GUI/temperaturegraphitem.h \
src/csvparser.h \ src/GUI/cadencegraphitem.h \
src/coordinates.h \ src/GUI/powergraphitem.h \
src/tile.h \ src/GUI/oddspinbox.h \
src/rd.h \ src/GUI/settings.h \
src/wgs84.h \ src/GUI/nicenum.h \
src/kmlparser.h \ src/GUI/cpuarch.h \
src/trackdata.h \ src/GUI/searchpointer.h \
src/routedata.h \ src/map/projection.h \
src/fitparser.h \ src/map/ellipsoid.h \
src/format.h \ src/map/datum.h \
src/path.h \ src/map/mercator.h \
src/assert.h \ src/map/transversemercator.h \
src/cadencegraph.h \ src/map/latlon.h \
src/powergraph.h \ src/map/utm.h \
src/igcparser.h \ src/map/lambertconic.h \
src/nmeaparser.h \ src/map/lambertazimuthal.h \
src/optionsdialog.h \ src/map/albersequal.h \
src/colorbox.h \ src/map/map.h \
src/stylecombobox.h \ src/map/maplist.h \
src/opengl.h \ src/map/onlinemap.h \
src/timetype.h \ src/map/downloader.h \
src/emptymap.h \ src/map/tile.h \
src/offlinemap.h \ src/map/emptymap.h \
src/matrix.h \ src/map/offlinemap.h \
src/tar.h \ src/map/tar.h \
src/atlas.h \ src/map/ozf.h \
src/projection.h \ src/map/atlas.h \
src/mercator.h \ src/map/matrix.h \
src/transversemercator.h \ src/map/misc.h \
src/latlon.h \ src/data/graph.h \
src/utm.h \ src/data/poi.h \
src/lambertconic.h \ src/data/waypoint.h \
src/ellipsoid.h \ src/data/track.h \
src/ozf.h \ src/data/route.h \
src/datum.h \ src/data/trackpoint.h \
src/maplist.h \ src/data/data.h \
src/albersequal.h \ src/data/parser.h \
src/oddspinbox.h \ src/data/trackdata.h \
src/rectc.h \ src/data/routedata.h \
src/searchpointer.h \ src/data/path.h \
src/percentslider.h \ src/data/rtree.h \
src/elevationgraphitem.h \ src/data/gpxparser.h \
src/speedgraphitem.h \ src/data/tcxparser.h \
src/heartrategraphitem.h \ src/data/csvparser.h \
src/temperaturegraphitem.h \ src/data/kmlparser.h \
src/cadencegraphitem.h \ src/data/fitparser.h \
src/powergraphitem.h \ src/data/igcparser.h \
src/lambertazimuthal.h src/data/nmeaparser.h \
src/data/str2int.h
SOURCES += src/main.cpp \ SOURCES += src/main.cpp \
src/gui.cpp \ src/common/coordinates.cpp \
src/poi.cpp \ src/common/rectc.cpp \
src/axisitem.cpp \ src/common/range.cpp \
src/slideritem.cpp \ src/GUI/app.cpp \
src/markeritem.cpp \ src/GUI/gui.cpp \
src/infoitem.cpp \ src/GUI/axisitem.cpp \
src/elevationgraph.cpp \ src/GUI/slideritem.cpp \
src/speedgraph.cpp \ src/GUI/markeritem.cpp \
src/sliderinfoitem.cpp \ src/GUI/infoitem.cpp \
src/filebrowser.cpp \ src/GUI/elevationgraph.cpp \
src/onlinemap.cpp \ src/GUI/speedgraph.cpp \
src/downloader.cpp \ src/GUI/sliderinfoitem.cpp \
src/scaleitem.cpp \ src/GUI/filebrowser.cpp \
src/track.cpp \ src/GUI/scaleitem.cpp \
src/graphview.cpp \ src/GUI/graphview.cpp \
src/waypointitem.cpp \ src/GUI/waypointitem.cpp \
src/palette.cpp \ src/GUI/palette.cpp \
src/heartrategraph.cpp \ src/GUI/heartrategraph.cpp \
src/range.cpp \ src/GUI/trackinfo.cpp \
src/app.cpp \ src/GUI/exportdialog.cpp \
src/trackinfo.cpp \ src/GUI/fileselectwidget.cpp \
src/exportdialog.cpp \ src/GUI/temperaturegraph.cpp \
src/fileselectwidget.cpp \ src/GUI/trackitem.cpp \
src/temperaturegraph.cpp \ src/GUI/tooltip.cpp \
src/trackpoint.cpp \ src/GUI/routeitem.cpp \
src/misc.cpp \ src/GUI/graphitem.cpp \
src/waypoint.cpp \ src/GUI/pathitem.cpp \
src/trackitem.cpp \ src/GUI/pathview.cpp \
src/tooltip.cpp \ src/GUI/griditem.cpp \
src/route.cpp \ src/GUI/format.cpp \
src/routeitem.cpp \ src/GUI/cadencegraph.cpp \
src/graphitem.cpp \ src/GUI/powergraph.cpp \
src/pathitem.cpp \ src/GUI/optionsdialog.cpp \
src/pathview.cpp \ src/GUI/colorbox.cpp \
src/griditem.cpp \ src/GUI/stylecombobox.cpp \
src/data.cpp \ src/GUI/oddspinbox.cpp \
src/gpxparser.cpp \ src/GUI/percentslider.cpp \
src/tcxparser.cpp \ src/GUI/elevationgraphitem.cpp \
src/csvparser.cpp \ src/GUI/speedgraphitem.cpp \
src/coordinates.cpp \ src/GUI/heartrategraphitem.cpp \
src/kmlparser.cpp \ src/GUI/temperaturegraphitem.cpp \
src/fitparser.cpp \ src/GUI/cadencegraphitem.cpp \
src/format.cpp \ src/GUI/powergraphitem.cpp \
src/graph.cpp \ src/GUI/nicenum.cpp \
src/cadencegraph.cpp \ src/map/maplist.cpp \
src/powergraph.cpp \ src/map/onlinemap.cpp \
src/igcparser.cpp \ src/map/downloader.cpp \
src/path.cpp \ src/map/emptymap.cpp \
src/nmeaparser.cpp \ src/map/offlinemap.cpp \
src/optionsdialog.cpp \ src/map/tar.cpp \
src/colorbox.cpp \ src/map/atlas.cpp \
src/stylecombobox.cpp \ src/map/ozf.cpp \
src/emptymap.cpp \ src/map/matrix.cpp \
src/offlinemap.cpp \ src/map/ellipsoid.cpp \
src/matrix.cpp \ src/map/datum.cpp \
src/tar.cpp \ src/map/projection.cpp \
src/atlas.cpp \ src/map/mercator.cpp \
src/mercator.cpp \ src/map/transversemercator.cpp \
src/transversemercator.cpp \ src/map/utm.cpp \
src/utm.cpp \ src/map/lambertconic.cpp \
src/lambertconic.cpp \ src/map/albersequal.cpp \
src/ellipsoid.cpp \ src/map/lambertazimuthal.cpp \
src/ozf.cpp \ src/data/data.cpp \
src/datum.cpp \ src/data/poi.cpp \
src/maplist.cpp \ src/data/track.cpp \
src/albersequal.cpp \ src/data/route.cpp \
src/oddspinbox.cpp \ src/data/path.cpp \
src/rectc.cpp \ src/data/gpxparser.cpp \
src/percentslider.cpp \ src/data/tcxparser.cpp \
src/elevationgraphitem.cpp \ src/data/csvparser.cpp \
src/speedgraphitem.cpp \ src/data/kmlparser.cpp \
src/heartrategraphitem.cpp \ src/data/fitparser.cpp \
src/temperaturegraphitem.cpp \ src/data/igcparser.cpp \
src/cadencegraphitem.cpp \ src/data/nmeaparser.cpp \
src/powergraphitem.cpp \ src/data/str2int.cpp
src/lambertazimuthal.cpp
RESOURCES += gpxsee.qrc RESOURCES += gpxsee.qrc
TRANSLATIONS = lang/gpxsee_cs.ts \ TRANSLATIONS = lang/gpxsee_cs.ts \
lang/gpxsee_sv.ts \ lang/gpxsee_sv.ts \

View File

@ -4,10 +4,10 @@
#include <QFileOpenEvent> #include <QFileOpenEvent>
#include <QNetworkProxyFactory> #include <QNetworkProxyFactory>
#include <QLibraryInfo> #include <QLibraryInfo>
#include "map/onlinemap.h"
#include "map/downloader.h"
#include "opengl.h" #include "opengl.h"
#include "gui.h" #include "gui.h"
#include "onlinemap.h"
#include "downloader.h"
#include "app.h" #include "app.h"

View File

@ -1,7 +1,7 @@
#include <cmath> #include <cmath>
#include <QPainter> #include <QPainter>
#include "config.h" #include "config.h"
#include "misc.h" #include "nicenum.h"
#include "axisitem.h" #include "axisitem.h"

View File

@ -2,7 +2,7 @@
#define AXISITEM_H #define AXISITEM_H
#include <QGraphicsItem> #include <QGraphicsItem>
#include "range.h" #include "common/range.h"
class AxisItem : public QGraphicsItem class AxisItem : public QGraphicsItem
{ {

View File

@ -1,4 +1,4 @@
#include "data.h" #include "data/data.h"
#include "cadencegraphitem.h" #include "cadencegraphitem.h"
#include "cadencegraph.h" #include "cadencegraph.h"

View File

@ -1,6 +1,6 @@
#include <cmath> #include <cmath>
#include "data/data.h"
#include "config.h" #include "config.h"
#include "data.h"
#include "tooltip.h" #include "tooltip.h"
#include "elevationgraphitem.h" #include "elevationgraphitem.h"
#include "elevationgraph.h" #include "elevationgraph.h"

View File

@ -1,5 +1,5 @@
#include <QApplication> #include <QApplication>
#include "coordinates.h" #include "common/coordinates.h"
#include "format.h" #include "format.h"
QString Format::timeSpan(qreal time, bool full) QString Format::timeSpan(qreal time, bool full)

View File

@ -3,8 +3,8 @@
#include <QGraphicsObject> #include <QGraphicsObject>
#include <QPen> #include <QPen>
#include "data/graph.h"
#include "units.h" #include "units.h"
#include "graph.h"
class GraphItem : public QGraphicsObject class GraphItem : public QGraphicsObject
{ {

View File

@ -3,6 +3,7 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QPaintEngine> #include <QPaintEngine>
#include <QPaintDevice> #include <QPaintDevice>
#include "data/graph.h"
#include "opengl.h" #include "opengl.h"
#include "config.h" #include "config.h"
#include "axisitem.h" #include "axisitem.h"
@ -10,7 +11,6 @@
#include "sliderinfoitem.h" #include "sliderinfoitem.h"
#include "infoitem.h" #include "infoitem.h"
#include "griditem.h" #include "griditem.h"
#include "graph.h"
#include "graphitem.h" #include "graphitem.h"
#include "pathitem.h" #include "pathitem.h"
#include "format.h" #include "format.h"

View File

@ -4,7 +4,7 @@
#include <QGraphicsView> #include <QGraphicsView>
#include <QList> #include <QList>
#include <QSet> #include <QSet>
#include "graph.h" #include "data/graph.h"
#include "palette.h" #include "palette.h"
#include "units.h" #include "units.h"

View File

@ -22,16 +22,16 @@
#include <QMimeData> #include <QMimeData>
#include <QUrl> #include <QUrl>
#include <QPixmapCache> #include <QPixmapCache>
#include "data/data.h"
#include "map/ellipsoid.h"
#include "map/datum.h"
#include "map/map.h"
#include "map/maplist.h"
#include "map/emptymap.h"
#include "config.h" #include "config.h"
#include "icons.h" #include "icons.h"
#include "keys.h" #include "keys.h"
#include "settings.h" #include "settings.h"
#include "data.h"
#include "ellipsoid.h"
#include "datum.h"
#include "map.h"
#include "maplist.h"
#include "emptymap.h"
#include "elevationgraph.h" #include "elevationgraph.h"
#include "speedgraph.h" #include "speedgraph.h"
#include "heartrategraph.h" #include "heartrategraph.h"

View File

@ -6,14 +6,13 @@
#include <QList> #include <QList>
#include <QDate> #include <QDate>
#include <QPrinter> #include <QPrinter>
#include "data/graph.h"
#include "data/poi.h"
#include "units.h" #include "units.h"
#include "timetype.h" #include "timetype.h"
#include "graph.h"
#include "poi.h"
#include "exportdialog.h" #include "exportdialog.h"
#include "optionsdialog.h" #include "optionsdialog.h"
class QMenu; class QMenu;
class QToolBar; class QToolBar;
class QTabWidget; class QTabWidget;

View File

@ -1,4 +1,4 @@
#include "data.h" #include "data/data.h"
#include "heartrategraphitem.h" #include "heartrategraphitem.h"
#include "heartrategraph.h" #include "heartrategraph.h"

View File

@ -1,7 +1,5 @@
#include <cmath> #include <cmath>
#include <cctype> #include "nicenum.h"
#include "misc.h"
double niceNum(double x, int round) double niceNum(double x, int round)
{ {
@ -34,23 +32,3 @@ double niceNum(double x, int round)
return nf * pow(10.0, expv); return nf * pow(10.0, expv);
} }
int str2int(const char *str, int len)
{
int res = 0;
for (const char *sp = str; sp < str + len; sp++) {
if (::isdigit(*sp))
res = res * 10 + *sp - '0';
else
return -1;
}
return res;
}
QRectF scaled(const QRectF &rect, qreal factor)
{
return QRectF(QPointF(rect.left() * factor, rect.top() * factor),
QSizeF(rect.width() * factor, rect.height() * factor));
}

6
src/GUI/nicenum.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef MISC_H
#define MISC_H
double niceNum(double x, int round);
#endif // MISC_H

View File

@ -2,9 +2,9 @@
#include <QApplication> #include <QApplication>
#include <QCursor> #include <QCursor>
#include <QPainter> #include <QPainter>
#include "map/map.h"
#include "tooltip.h" #include "tooltip.h"
#include "map.h" #include "nicenum.h"
#include "misc.h"
#include "pathitem.h" #include "pathitem.h"

View File

@ -3,9 +3,8 @@
#include <QGraphicsObject> #include <QGraphicsObject>
#include <QPen> #include <QPen>
#include "data/path.h"
#include "markeritem.h" #include "markeritem.h"
#include "path.h"
class Map; class Map;

View File

@ -4,11 +4,10 @@
#include <QApplication> #include <QApplication>
#include <QPixmapCache> #include <QPixmapCache>
#include <QScrollBar> #include <QScrollBar>
#include "data/poi.h"
#include "data/data.h"
#include "map/map.h"
#include "opengl.h" #include "opengl.h"
#include "misc.h"
#include "poi.h"
#include "data.h"
#include "map.h"
#include "trackitem.h" #include "trackitem.h"
#include "routeitem.h" #include "routeitem.h"
#include "waypointitem.h" #include "waypointitem.h"
@ -116,7 +115,8 @@ PathItem *PathView::addTrack(const Track &track)
ti->setDigitalZoom(_digitalZoom); ti->setDigitalZoom(_digitalZoom);
_scene->addItem(ti); _scene->addItem(ti);
addPOI(_poi->points(ti->path())); if (_showTracks)
addPOI(_poi->points(ti->path()));
return ti; return ti;
} }
@ -141,7 +141,8 @@ PathItem *PathView::addRoute(const Route &route)
ri->setDigitalZoom(_digitalZoom); ri->setDigitalZoom(_digitalZoom);
_scene->addItem(ri); _scene->addItem(ri);
addPOI(_poi->points(ri->path())); if (_showRoutes)
addPOI(_poi->points(ri->path()));
return ri; return ri;
} }
@ -162,9 +163,10 @@ void PathView::addWaypoints(const QList<Waypoint> &waypoints)
wi->setVisible(_showWaypoints); wi->setVisible(_showWaypoints);
wi->setDigitalZoom(_digitalZoom); wi->setDigitalZoom(_digitalZoom);
_scene->addItem(wi); _scene->addItem(wi);
}
addPOI(_poi->points(waypoints)); if (_showWaypoints)
addPOI(_poi->points(w));
}
} }
QList<PathItem *> PathView::loadData(const Data &data) QList<PathItem *> PathView::loadData(const Data &data)
@ -320,16 +322,20 @@ void PathView::updatePOI()
} }
_pois.clear(); _pois.clear();
for (int i = 0; i < _tracks.size(); i++) if (_showTracks)
addPOI(_poi->points(_tracks.at(i)->path())); for (int i = 0; i < _tracks.size(); i++)
for (int i = 0; i < _routes.size(); i++) addPOI(_poi->points(_tracks.at(i)->path()));
addPOI(_poi->points(_routes.at(i)->path())); if (_showRoutes)
addPOI(_poi->points(_waypoints)); for (int i = 0; i < _routes.size(); i++)
addPOI(_poi->points(_routes.at(i)->path()));
if (_showWaypoints)
for (int i = 0; i< _waypoints.size(); i++)
addPOI(_poi->points(_waypoints.at(i)->waypoint()));
updatePOIVisibility(); updatePOIVisibility();
} }
void PathView::addPOI(const QVector<Waypoint> &waypoints) void PathView::addPOI(const QList<Waypoint> &waypoints)
{ {
for (int i = 0; i < waypoints.size(); i++) { for (int i = 0; i < waypoints.size(); i++) {
const Waypoint &w = waypoints.at(i); const Waypoint &w = waypoints.at(i);
@ -586,6 +592,8 @@ void PathView::showTracks(bool show)
for (int i = 0; i < _tracks.count(); i++) for (int i = 0; i < _tracks.count(); i++)
_tracks.at(i)->setVisible(show); _tracks.at(i)->setVisible(show);
updatePOI();
} }
void PathView::showRoutes(bool show) void PathView::showRoutes(bool show)
@ -594,6 +602,8 @@ void PathView::showRoutes(bool show)
for (int i = 0; i < _routes.count(); i++) for (int i = 0; i < _routes.count(); i++)
_routes.at(i)->setVisible(show); _routes.at(i)->setVisible(show);
updatePOI();
} }
void PathView::showWaypoints(bool show) void PathView::showWaypoints(bool show)
@ -602,6 +612,8 @@ void PathView::showWaypoints(bool show)
for (int i = 0; i < _waypoints.count(); i++) for (int i = 0; i < _waypoints.count(); i++)
_waypoints.at(i)->setVisible(show); _waypoints.at(i)->setVisible(show);
updatePOI();
} }
void PathView::showWaypointLabels(bool show) void PathView::showWaypointLabels(bool show)

View File

@ -5,11 +5,11 @@
#include <QVector> #include <QVector>
#include <QHash> #include <QHash>
#include <QList> #include <QList>
#include "common/rectc.h"
#include "data/waypoint.h"
#include "searchpointer.h"
#include "units.h" #include "units.h"
#include "palette.h" #include "palette.h"
#include "waypoint.h"
#include "rectc.h"
#include "searchpointer.h"
class Data; class Data;
class POI; class POI;
@ -77,7 +77,7 @@ private:
PathItem *addTrack(const Track &track); PathItem *addTrack(const Track &track);
PathItem *addRoute(const Route &route); PathItem *addRoute(const Route &route);
void addWaypoints(const QList<Waypoint> &waypoints); void addWaypoints(const QList<Waypoint> &waypoints);
void addPOI(const QVector<Waypoint> &waypoints); void addPOI(const QList<Waypoint> &waypoints);
void loadPOI(); void loadPOI();
void clearPOI(); void clearPOI();

View File

@ -1,4 +1,4 @@
#include "data.h" #include "data/data.h"
#include "powergraphitem.h" #include "powergraphitem.h"
#include "powergraph.h" #include "powergraph.h"

View File

@ -1,9 +1,9 @@
#include <QPainter> #include <QPainter>
#include "data/waypoint.h"
#include "map/map.h"
#include "format.h" #include "format.h"
#include "waypoint.h"
#include "waypointitem.h" #include "waypointitem.h"
#include "tooltip.h" #include "tooltip.h"
#include "map.h"
#include "routeitem.h" #include "routeitem.h"

View File

@ -1,8 +1,8 @@
#ifndef ROUTEITEM_H #ifndef ROUTEITEM_H
#define ROUTEITEM_H #define ROUTEITEM_H
#include "data/route.h"
#include "pathitem.h" #include "pathitem.h"
#include "route.h"
#include "units.h" #include "units.h"
class Map; class Map;

View File

@ -1,7 +1,7 @@
#include <cmath> #include <cmath>
#include <QPainter> #include <QPainter>
#include "config.h" #include "config.h"
#include "misc.h" #include "nicenum.h"
#include "scaleitem.h" #include "scaleitem.h"

View File

@ -1,5 +1,5 @@
#include "data/data.h"
#include "config.h" #include "config.h"
#include "data.h"
#include "tooltip.h" #include "tooltip.h"
#include "speedgraphitem.h" #include "speedgraphitem.h"
#include "speedgraph.h" #include "speedgraph.h"

View File

@ -1,4 +1,4 @@
#include "data.h" #include "data/data.h"
#include "temperaturegraphitem.h" #include "temperaturegraphitem.h"
#include "temperaturegraph.h" #include "temperaturegraph.h"

View File

@ -1,7 +1,7 @@
#include <QPainter> #include <QPainter>
#include "map/map.h"
#include "format.h" #include "format.h"
#include "tooltip.h" #include "tooltip.h"
#include "map.h"
#include "trackitem.h" #include "trackitem.h"

View File

@ -3,7 +3,7 @@
#include <QDateTime> #include <QDateTime>
#include <QPen> #include <QPen>
#include "track.h" #include "data/track.h"
#include "pathitem.h" #include "pathitem.h"
#include "units.h" #include "units.h"

View File

@ -3,9 +3,9 @@
#include <cmath> #include <cmath>
#include <QGraphicsItem> #include <QGraphicsItem>
#include "waypoint.h" #include "data/waypoint.h"
#include "map/map.h"
#include "units.h" #include "units.h"
#include "map.h"
class WaypointItem : public QGraphicsItem class WaypointItem : public QGraphicsItem
{ {

View File

@ -1,4 +1,3 @@
#include "rd.h"
#include "wgs84.h" #include "wgs84.h"
#include "coordinates.h" #include "coordinates.h"
@ -17,10 +16,9 @@ qreal Coordinates::distanceTo(const Coordinates &c) const
return (WGS84_RADIUS * (2.0 * atan2(sqrt(a), sqrt(1.0 - a)))); return (WGS84_RADIUS * (2.0 * atan2(sqrt(a), sqrt(1.0 - a))));
} }
QDebug operator<<(QDebug dbg, const Coordinates &coordinates) QDebug operator<<(QDebug dbg, const Coordinates &c)
{ {
dbg.nospace() << "Coordinates(" << coordinates.lon() << ", " dbg.nospace() << "Coordinates(" << c.lon() << ", " << c.lat() << ")";
<< coordinates.lat() << ")";
return dbg.space(); return dbg.space();
} }

View File

@ -5,6 +5,12 @@
#include <QPair> #include <QPair>
#include <QDebug> #include <QDebug>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif // M_PI
#define deg2rad(d) (((d)*M_PI)/180.0)
#define rad2deg(d) (((d)*180.0)/M_PI)
class Coordinates class Coordinates
{ {
public: public:
@ -37,6 +43,6 @@ inline bool operator==(const Coordinates &c1, const Coordinates &c2)
inline bool operator!=(const Coordinates &c1, const Coordinates &c2) inline bool operator!=(const Coordinates &c1, const Coordinates &c2)
{return !(c1 == c2);} {return !(c1 == c2);}
QDebug operator<<(QDebug dbg, const Coordinates &trackpoint); QDebug operator<<(QDebug dbg, const Coordinates &c);
#endif // COORDINATES_H #endif // COORDINATES_H

Some files were not shown because too many files have changed in this diff Show More