Compare commits
221 Commits
Author | SHA1 | Date | |
---|---|---|---|
fc8fda7a82 | |||
18392db8f0 | |||
4aa1f7a557 | |||
bb71cfc426 | |||
8807c37770 | |||
e2eec179d5 | |||
1f5922685b | |||
dc70af3f3c | |||
e499574a50 | |||
5840e6832f | |||
463ac2d243 | |||
481138ec6e | |||
a320231dff | |||
a7ab72c564 | |||
7f7d7a916a | |||
a9ddd4d20f | |||
2e036279bb | |||
dea135d9df | |||
12f3c252bb | |||
a1ef211d0f | |||
3d0c36b459 | |||
eb2af0fb5c | |||
2da8efd497 | |||
c0e55ec25c | |||
a2b8cec3be | |||
064928f844 | |||
693cce4da3 | |||
a7570faed7 | |||
4ccb57ffd7 | |||
cece8002e2 | |||
451c0c757f | |||
e13bded88f | |||
9887151bfd | |||
b535ed239b | |||
9f43594abd | |||
87cbd7bdb1 | |||
d49420e88d | |||
d9d8588d8d | |||
a0eacedf3a | |||
e04179e63e | |||
79ecc565eb | |||
aaf8c12084 | |||
4ab4ff9bf1 | |||
d5367ccf34 | |||
54d0eea43e | |||
6543de4ca3 | |||
b06ce107af | |||
47c408703f | |||
3033ce2d6c | |||
1444a88ad0 | |||
ec9d81c65a | |||
a777008fe4 | |||
a73c96996d | |||
d168fd8cd5 | |||
a8df2f68d1 | |||
be07640634 | |||
9924702ba7 | |||
6ee2322033 | |||
08f2d4e4d2 | |||
69d635be10 | |||
a6b327f773 | |||
143f53fbd9 | |||
5432a835f9 | |||
cd74b0d43e | |||
94374e748b | |||
a882d1fe68 | |||
4a8be940a1 | |||
f379da61e3 | |||
9f1b697bcf | |||
0308dbbb09 | |||
516ca53ff0 | |||
3c112b0b6f | |||
54f24880cf | |||
67168b8063 | |||
4854bff31b | |||
50306ecb84 | |||
91e633e9fa | |||
cf495a9eda | |||
57cb74cc3d | |||
b7690f76dc | |||
ec594fca61 | |||
355ea3b4cf | |||
8042e8c520 | |||
09c9e5c401 | |||
6598cfe7ec | |||
2012d0ead8 | |||
d07adee931 | |||
d9441eccc0 | |||
e30e6d2f0f | |||
4b9f20a72f | |||
92e3eba861 | |||
5c3fd0872d | |||
d818be4cd6 | |||
bc5c8ab42c | |||
1447f43a70 | |||
a176f041ab | |||
dc6bf244cf | |||
7eb5816240 | |||
a8e5f35b47 | |||
fcbe24291d | |||
ab9e40d4c2 | |||
40d8324703 | |||
f6172a6f93 | |||
d45a16e0b2 | |||
9baa7a592b | |||
0ebe684f4c | |||
a693a6a7a6 | |||
e3c0bced83 | |||
bbea24af9f | |||
73ccb427db | |||
7b83bae582 | |||
dcd4666f59 | |||
7f5aeb2429 | |||
c3dce28bb4 | |||
8b3e354354 | |||
e4601b401e | |||
584f2cd8e3 | |||
0411bba02c | |||
fd1f6db52c | |||
63cc33bd7f | |||
6de877829f | |||
442f4deee2 | |||
98c4fb2037 | |||
87f0448ac7 | |||
bb3e4d8769 | |||
4fb0bfefc2 | |||
b7414f54e2 | |||
4f4c206acb | |||
25a21ac5f9 | |||
c3554def8f | |||
4669e1dd80 | |||
05d73b2b4c | |||
b4d294e23f | |||
26f406d2ae | |||
6636bf9f3f | |||
87f51f3c54 | |||
8c5dc7e05b | |||
e88c0c34d0 | |||
ec87213ce0 | |||
735159fc79 | |||
6cd1c5de1f | |||
c05637e608 | |||
b7725fff55 | |||
9be7b21ac2 | |||
91fb5cfe4f | |||
91d2119f48 | |||
bd4af8c7e5 | |||
b8a2b76d7c | |||
9d5725f732 | |||
fec5780da2 | |||
edb80dd11f | |||
ea92d4d817 | |||
760b7d8ec2 | |||
f0dee9d657 | |||
580c854a1f | |||
be4bf8fc09 | |||
7f8b7297cf | |||
d780ded7a4 | |||
9fc9e24c01 | |||
7bf471f0ba | |||
7a49f01c95 | |||
e56111b5f6 | |||
589c85b504 | |||
73a99b3be8 | |||
3f0aa6c641 | |||
6f08dc4015 | |||
bb0f559c69 | |||
8c8fedd7f7 | |||
e95716e494 | |||
2d7209e1d8 | |||
93fd6ae9a9 | |||
e5685035da | |||
e983562f38 | |||
1f02c5a5ef | |||
3ccc7b7cb0 | |||
35309ef452 | |||
1b9ed37cd8 | |||
e6c9fb1971 | |||
837c57ddc1 | |||
fc858d6b68 | |||
4fd4135025 | |||
c16f33abce | |||
9b3da6a73c | |||
ff37b91bc5 | |||
896ebe9eb4 | |||
be87677ddf | |||
b40586c80f | |||
9f0fcdc13e | |||
6ca51f0ec6 | |||
3e03ecc9fe | |||
d94b189fed | |||
eec96cca62 | |||
7bc2c68a5c | |||
5b21d550af | |||
6f4259298b | |||
2c1a9f88c4 | |||
48438f9b4d | |||
9b7651bad4 | |||
b6ef1d36d6 | |||
d3cbdb8b92 | |||
a98e9a9784 | |||
3c6ce2dde2 | |||
4c88414677 | |||
ac5476868d | |||
bf6d7616ba | |||
9842214bb6 | |||
b6e9400392 | |||
c1a217847f | |||
409ce889cd | |||
09242841e3 | |||
a299207e5d | |||
efc773d04b | |||
16c95334a0 | |||
49ccb508a0 | |||
9c6c574443 | |||
f762013e1e | |||
f6b1344ee2 | |||
9f3129f899 | |||
f05ff372e7 | |||
c0adabe3f1 | |||
4a612f12bb |
@ -1,4 +1,4 @@
|
||||
version: 6.3.{build}
|
||||
version: 7.3.{build}
|
||||
configuration: Release
|
||||
platform: Any CPU
|
||||
environment:
|
||||
|
1
.gitignore
vendored
@ -11,3 +11,4 @@ Makefile*
|
||||
|
||||
# Binary
|
||||
GPXSee
|
||||
gpxsee
|
||||
|
@ -1,18 +1,18 @@
|
||||
# GPXSee
|
||||
GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.
|
||||
GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common GPS log file formats.
|
||||
|
||||
## Features
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
|
||||
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
|
||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
|
||||
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
||||
* Support for DEM files (SRTM HGT).
|
||||
* Support for multiple tracks in one view.
|
||||
* Support for POI files.
|
||||
* Print/export to PDF.
|
||||
* Full-screen mode.
|
||||
* HiDPI/Retina displays & maps support.
|
||||
* Native GUI for Windows, Mac OS X and Linux.
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
|
||||
|
||||

|
||||
|
||||
|
180
gpxsee.pro
@ -1,10 +1,15 @@
|
||||
TARGET = GPXSee
|
||||
VERSION = 6.3
|
||||
unix:!macx {
|
||||
TARGET = gpxsee
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 7.3
|
||||
|
||||
QT += core \
|
||||
gui \
|
||||
network \
|
||||
sql
|
||||
sql \
|
||||
concurrent
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += widgets
|
||||
QT += printsupport
|
||||
@ -13,7 +18,7 @@ lessThan(QT_MAJOR_VERSION, 5) {QT += opengl}
|
||||
equals(QT_MAJOR_VERSION, 5) : lessThan(QT_MINOR_VERSION, 4) {QT += opengl}
|
||||
|
||||
INCLUDEPATH += ./src
|
||||
HEADERS += src/config.h \
|
||||
HEADERS += src/common/config.h \
|
||||
src/common/staticassert.h \
|
||||
src/common/coordinates.h \
|
||||
src/common/range.h \
|
||||
@ -22,6 +27,8 @@ HEADERS += src/config.h \
|
||||
src/common/util.h \
|
||||
src/common/rtree.h \
|
||||
src/common/kv.h \
|
||||
src/common/greatcircle.h \
|
||||
src/common/programpaths.h \
|
||||
src/GUI/app.h \
|
||||
src/GUI/icons.h \
|
||||
src/GUI/gui.h \
|
||||
@ -74,6 +81,8 @@ HEADERS += src/config.h \
|
||||
src/GUI/cpuarch.h \
|
||||
src/GUI/searchpointer.h \
|
||||
src/GUI/mapview.h \
|
||||
src/GUI/font.h \
|
||||
src/GUI/areaitem.h \
|
||||
src/map/projection.h \
|
||||
src/map/ellipsoid.h \
|
||||
src/map/datum.h \
|
||||
@ -114,6 +123,16 @@ HEADERS += src/config.h \
|
||||
src/map/crs.h \
|
||||
src/map/coordinatesystem.h \
|
||||
src/map/pointd.h \
|
||||
src/map/rectd.h \
|
||||
src/map/geocentric.h \
|
||||
src/map/mercator.h \
|
||||
src/map/jnxmap.h \
|
||||
src/map/krovak.h \
|
||||
src/map/geotiffmap.h \
|
||||
src/map/image.h \
|
||||
src/map/mbtilesmap.h \
|
||||
src/map/osm.h \
|
||||
src/map/polarstereographic.h \
|
||||
src/data/graph.h \
|
||||
src/data/poi.h \
|
||||
src/data/waypoint.h \
|
||||
@ -133,23 +152,20 @@ HEADERS += src/config.h \
|
||||
src/data/igcparser.h \
|
||||
src/data/nmeaparser.h \
|
||||
src/data/oziparsers.h \
|
||||
src/map/rectd.h \
|
||||
src/map/geocentric.h \
|
||||
src/map/mercator.h \
|
||||
src/map/jnxmap.h \
|
||||
src/map/krovak.h \
|
||||
src/data/locparser.h \
|
||||
src/data/slfparser.h \
|
||||
src/map/geotiffmap.h \
|
||||
src/map/image.h \
|
||||
src/common/greatcircle.h \
|
||||
src/map/mbtilesmap.h \
|
||||
src/map/osm.h
|
||||
src/data/dem.h \
|
||||
src/data/polygon.h \
|
||||
src/data/area.h \
|
||||
src/map/obliquestereographic.h \
|
||||
src/GUI/coordinatesitem.h
|
||||
SOURCES += src/main.cpp \
|
||||
src/common/coordinates.cpp \
|
||||
src/common/rectc.cpp \
|
||||
src/common/range.cpp \
|
||||
src/common/util.cpp \
|
||||
src/common/greatcircle.cpp \
|
||||
src/common/programpaths.cpp \
|
||||
src/GUI/app.cpp \
|
||||
src/GUI/gui.cpp \
|
||||
src/GUI/axisitem.cpp \
|
||||
@ -192,6 +208,7 @@ SOURCES += src/main.cpp \
|
||||
src/GUI/powergraphitem.cpp \
|
||||
src/GUI/gearratiographitem.cpp \
|
||||
src/GUI/mapview.cpp \
|
||||
src/GUI/areaitem.cpp \
|
||||
src/map/maplist.cpp \
|
||||
src/map/onlinemap.cpp \
|
||||
src/map/downloader.cpp \
|
||||
@ -227,6 +244,17 @@ SOURCES += src/main.cpp \
|
||||
src/map/wms.cpp \
|
||||
src/map/crs.cpp \
|
||||
src/map/coordinatesystem.cpp \
|
||||
src/map/geocentric.cpp \
|
||||
src/map/mercator.cpp \
|
||||
src/map/jnxmap.cpp \
|
||||
src/map/krovak.cpp \
|
||||
src/map/map.cpp \
|
||||
src/map/geotiffmap.cpp \
|
||||
src/map/image.cpp \
|
||||
src/map/mbtilesmap.cpp \
|
||||
src/map/osm.cpp \
|
||||
src/map/polarstereographic.cpp \
|
||||
src/map/rectd.cpp \
|
||||
src/data/data.cpp \
|
||||
src/data/poi.cpp \
|
||||
src/data/track.cpp \
|
||||
@ -240,18 +268,20 @@ SOURCES += src/main.cpp \
|
||||
src/data/igcparser.cpp \
|
||||
src/data/nmeaparser.cpp \
|
||||
src/data/oziparsers.cpp \
|
||||
src/map/geocentric.cpp \
|
||||
src/map/mercator.cpp \
|
||||
src/map/jnxmap.cpp \
|
||||
src/map/krovak.cpp \
|
||||
src/map/map.cpp \
|
||||
src/data/locparser.cpp \
|
||||
src/data/slfparser.cpp \
|
||||
src/map/geotiffmap.cpp \
|
||||
src/map/image.cpp \
|
||||
src/common/greatcircle.cpp \
|
||||
src/map/mbtilesmap.cpp \
|
||||
src/map/osm.cpp
|
||||
src/data/dem.cpp \
|
||||
src/data/polygon.cpp \
|
||||
src/map/obliquestereographic.cpp \
|
||||
src/GUI/coordinatesitem.cpp
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
HEADERS += src/data/geojsonparser.h
|
||||
SOURCES += src/data/geojsonparser.cpp
|
||||
}
|
||||
|
||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||
DEFINES *= QT_USE_QSTRINGBUILDER
|
||||
|
||||
RESOURCES += gpxsee.qrc
|
||||
TRANSLATIONS = lang/gpxsee_en.ts \
|
||||
@ -263,13 +293,16 @@ TRANSLATIONS = lang/gpxsee_en.ts \
|
||||
lang/gpxsee_fr.ts \
|
||||
lang/gpxsee_pl.ts \
|
||||
lang/gpxsee_nb.ts \
|
||||
lang/gpxsee_da.ts
|
||||
lang/gpxsee_da.ts \
|
||||
lang/gpxsee_tr.ts \
|
||||
lang/gpxsee_es.ts \
|
||||
lang/gpxsee_pt_BR.ts
|
||||
|
||||
macx {
|
||||
ICON = icons/gpxsee.icns
|
||||
QMAKE_INFO_PLIST = pkg/Info.plist
|
||||
LOCALE.path = Contents/Resources/translations
|
||||
LOCALE.files = lang/gpxsee_en.qm \
|
||||
locale.path = Contents/Resources/translations
|
||||
locale.files = lang/gpxsee_en.qm \
|
||||
lang/gpxsee_cs.qm \
|
||||
lang/gpxsee_de.qm \
|
||||
lang/gpxsee_fi.qm \
|
||||
@ -278,40 +311,63 @@ macx {
|
||||
lang/gpxsee_sv.qm \
|
||||
lang/gpxsee_pl.qm \
|
||||
lang/gpxsee_nb.qm \
|
||||
lang/gpxsee_da.qm
|
||||
CSV.path = Contents/Resources
|
||||
CSV.files = pkg/csv
|
||||
MAPS.path = Contents/Resources
|
||||
MAPS.files = pkg/maps
|
||||
ICONS.path = Contents/Resources/icons
|
||||
ICONS.files = icons/gpx.icns \
|
||||
icons/tcx.icns \
|
||||
icons/kml.icns \
|
||||
icons/fit.icns \
|
||||
icons/igc.icns \
|
||||
icons/nmea.icns \
|
||||
icons/plt.icns \
|
||||
icons/rte.icns \
|
||||
icons/wpt.icns \
|
||||
icons/loc.icns \
|
||||
icons/slf.icns
|
||||
QMAKE_BUNDLE_DATA += LOCALE MAPS ICONS CSV
|
||||
}
|
||||
win32 {
|
||||
RC_ICONS = icons/gpxsee.ico \
|
||||
icons/gpx.ico \
|
||||
icons/tcx.ico \
|
||||
icons/kml.ico \
|
||||
icons/fit.ico \
|
||||
icons/igc.ico \
|
||||
icons/nmea.ico \
|
||||
icons/plt.ico \
|
||||
icons/rte.ico \
|
||||
icons/wpt.ico \
|
||||
icons/loc.ico \
|
||||
icons/slf.ico
|
||||
DEFINES += _USE_MATH_DEFINES
|
||||
lang/gpxsee_da.qm \
|
||||
lang/gpxsee_tr.qm \
|
||||
lang/gpxsee_es.qm \
|
||||
lang/gpxsee_pt_BR.qm
|
||||
csv.path = Contents/Resources
|
||||
csv.files = pkg/csv
|
||||
maps.path = Contents/Resources
|
||||
maps.files = pkg/maps
|
||||
icons.path = Contents/Resources/icons
|
||||
icons.files = icons/formats/gpx.icns \
|
||||
icons/formats/tcx.icns \
|
||||
icons/formats/kml.icns \
|
||||
icons/formats/fit.icns \
|
||||
icons/formats/igc.icns \
|
||||
icons/formats/nmea.icns \
|
||||
icons/formats/plt.icns \
|
||||
icons/formats/rte.icns \
|
||||
icons/formats/wpt.icns \
|
||||
icons/formats/loc.icns \
|
||||
icons/formats/slf.icns \
|
||||
icons/formats/json.icns
|
||||
QMAKE_BUNDLE_DATA += locale maps icons csv
|
||||
}
|
||||
|
||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||
DEFINES *= QT_USE_QSTRINGBUILDER
|
||||
win32 {
|
||||
RC_ICONS = icons/gpxsee.ico \
|
||||
icons/formats/gpx.ico \
|
||||
icons/formats/tcx.ico \
|
||||
icons/formats/kml.ico \
|
||||
icons/formats/fit.ico \
|
||||
icons/formats/igc.ico \
|
||||
icons/formats/nmea.ico \
|
||||
icons/formats/plt.ico \
|
||||
icons/formats/rte.ico \
|
||||
icons/formats/wpt.ico \
|
||||
icons/formats/loc.ico \
|
||||
icons/formats/slf.ico \
|
||||
icons/formats/json.ico
|
||||
DEFINES += _USE_MATH_DEFINES \
|
||||
NOGDI
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
isEmpty(PREFIX):PREFIX = /usr/local
|
||||
|
||||
maps.files = pkg/maps/*
|
||||
maps.path = $$PREFIX/share/gpxsee/maps
|
||||
csv.files = pkg/csv/*
|
||||
csv.path = $$PREFIX/share/gpxsee/csv
|
||||
locale.files = lang/*.qm
|
||||
locale.path = $$PREFIX/share/gpxsee/translations
|
||||
icon.files = icons/gpxsee.png
|
||||
icon.path = $$PREFIX/share/pixmaps
|
||||
desktop.files = pkg/gpxsee.desktop
|
||||
desktop.path = $$PREFIX/share/applications
|
||||
mime.files = pkg/gpxsee.xml
|
||||
mime.path = $$PREFIX/share/mime/packages
|
||||
target.path = $$PREFIX/bin
|
||||
INSTALLS += target maps csv locale icon desktop mime
|
||||
}
|
||||
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 305 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
BIN
icons/formats/json.icns
Normal file
BIN
icons/formats/json.ico
Normal file
After Width: | Height: | Size: 306 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 305 KiB |
Before Width: | Height: | Size: 305 KiB After Width: | Height: | Size: 305 KiB |
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
@ -1,6 +1,7 @@
|
||||
fit:#006600
|
||||
gpx:#003399
|
||||
igc:#ff3300
|
||||
json:#003333
|
||||
kml:#990000
|
||||
nmea:#0083d7
|
||||
plt:#66ff00
|
||||
|
@ -1,14 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>GUI</name>
|
||||
<message numerus="yes">
|
||||
<source>%n files</source>
|
||||
<translation type="vanished">
|
||||
<numerusform>%n file</numerusform>
|
||||
<numerusform>%n files</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
1835
lang/gpxsee_es.ts
Normal file
1835
lang/gpxsee_pt_BR.ts
Normal file
1835
lang/gpxsee_tr.ts
Normal file
@ -195,6 +195,22 @@
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>geojson</string>
|
||||
</array>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/geo+json</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>icons/json.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>GeoJSON</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
@ -430,7 +446,27 @@
|
||||
<string>application/vnd.oziexplorer.wpt</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>org.geojson.geojson</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.geojson.org</string>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>GeoJSON</string>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.json</string>
|
||||
</array>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>geojson</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<string>application/geo+json</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<summary>GPS log file viewer and analyzer</summary>
|
||||
<description>
|
||||
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.</p>
|
||||
KML, FIT, IGC, NMEA, SLF, LOC, GeoJSON and OziExplorer files.</p>
|
||||
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
@ -24,7 +24,7 @@
|
||||
<li>Full-screen mode.</li>
|
||||
<li>HiDPI/Retina displays & maps support.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
|
||||
WPT, RTE) and Garmin CSV files.</li>
|
||||
WPT, RTE), GeoJSON and Garmin CSV files.</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
@ -66,5 +66,6 @@
|
||||
<mimetype>application/vnd.oziexplorer.wpt</mimetype>
|
||||
<mimetype>application/loc+xml</mimetype>
|
||||
<mimetype>application/slf+xml</mimetype>
|
||||
<mimetype>application/geo+json</mimetype>
|
||||
</mimetypes>
|
||||
</component>
|
||||
|
@ -5,6 +5,7 @@ Montserrat 1958 / British West Indies Grid,2004,4604,19942,9001,9807,4400,8801,0
|
||||
St. Kitts 1955 / British West Indies Grid,2005,4605,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
|
||||
St. Lucia 1955 / British West Indies Grid,2006,4606,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
|
||||
St. Vincent 45 / British West Indies Grid,2007,4607,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS98) / New Brunswick Stereo,2036,4140,19946,9001,9809,4500,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000,9001,8807,7500000,9001,,,,,,
|
||||
NAD83(CSRS98) / UTM zone 19N,2037,4140,16019,9001,9807,4400,8801,0,9102,8802,-69,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS98) / UTM zone 20N,2038,4140,16020,9001,9807,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Israel 1993 / Israeli TM Grid,2039,4141,18204,9001,9807,4400,8801,31.4403817,9110,8802,35.1216261,9110,8805,1.0000067,9201,8806,219529.584,9001,8807,626907.39,9001,,,,,,
|
||||
@ -113,6 +114,10 @@ Pulkovo 1942(83) / Gauss Kruger zone 4,2167,4178,16264,9001,9807,4530,8801,0,910
|
||||
Pulkovo 1942(83) / Gauss Kruger zone 5,2168,4178,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
|
||||
Luxembourg 1930 / Gauss,2169,4181,19966,9001,9807,4530,8801,49.5,9110,8802,6.1,9110,8805,1,9201,8806,80000,9001,8807,100000,9001,,,,,,
|
||||
MGI / Slovenia Grid,2170,4312,19967,9001,9807,4530,8801,0,9110,8802,15,9110,8805,0.9999,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone I,2171,4179,18281,9001,9809,4530,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000,9001,8807,5647000,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone II,2172,4179,18282,9001,9809,4530,8801,53.0007,9110,8802,21.301,9110,8805,0.9998,9201,8806,4603000,9001,8807,5806000,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone III,2173,4179,18283,9001,9809,4530,8801,53.35,9110,8802,17.003,9110,8805,0.9998,9201,8806,3501000,9001,8807,5999000,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone IV,2174,4179,18284,9001,9809,4530,8801,51.4015,9110,8802,16.402,9110,8805,0.9998,9201,8806,3703000,9001,8807,5627000,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone V,2175,4179,18285,9001,9807,4530,8801,0,9110,8802,18.573,9110,8805,0.999983,9201,8806,237000,9001,8807,-4700000,9001,,,,,,
|
||||
ETRS89 / Poland CS2000 zone 5,2176,4258,18305,9001,9807,4531,8801,0,9102,8802,15,9102,8805,0.999923,9201,8806,5500000,9001,8807,0,9001,,,,,,
|
||||
ETRS89 / Poland CS2000 zone 6,2177,4258,18306,9001,9807,4531,8801,0,9102,8802,18,9102,8805,0.999923,9201,8806,6500000,9001,8807,0,9001,,,,,,
|
||||
@ -215,6 +220,7 @@ NAD83 / Washington South (ftUS),2286,4269,15368,9003,9802,4497,8821,45.2,9110,88
|
||||
NAD83 / Wisconsin North (ftUS),2287,4269,15369,9003,9802,4497,8821,45.1,9110,8822,-90,9110,8823,46.46,9110,8824,45.34,9110,8826,1968500,9003,8827,0,9003,,,
|
||||
NAD83 / Wisconsin Central (ftUS),2288,4269,15370,9003,9802,4497,8821,43.5,9110,8822,-90,9110,8823,45.3,9110,8824,44.15,9110,8826,1968500,9003,8827,0,9003,,,
|
||||
NAD83 / Wisconsin South (ftUS),2289,4269,15371,9003,9802,4497,8821,42,9110,8822,-90,9110,8823,44.04,9110,8824,42.44,9110,8826,1968500,9003,8827,0,9003,,,
|
||||
NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83),2292,4140,19960,9001,9809,4496,8801,47.15,9110,8802,-63,9110,8805,0.999912,9201,8806,400000,9001,8807,800000,9001,,,,,,
|
||||
Batavia / TM 109 SE,2308,4211,16709,9001,9807,4400,8801,0,9102,8802,109,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
WGS 84 / TM 116 SE,2309,4326,16716,9001,9807,4400,8801,0,9102,8802,116,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
WGS 84 / TM 132 SE,2310,4326,16732,9001,9807,4400,8801,0,9102,8802,132,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
@ -793,6 +799,8 @@ NAD83(CSRS) / MTM zone 7,2949,4617,17707,9001,9807,4496,8801,0,9110,8802,-70.3,9
|
||||
NAD83(CSRS) / MTM zone 8,2950,4617,17708,9001,9807,4496,8801,0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS) / MTM zone 9,2951,4617,17709,9001,9807,4496,8801,0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS) / MTM zone 10,2952,4617,17710,9001,9807,4496,8801,0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS) / New Brunswick Stereographic,2953,4617,19946,9001,9809,4500,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000,9001,8807,7500000,9001,,,,,,
|
||||
NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83),2954,4617,19960,9001,9809,4496,8801,47.15,9110,8802,-63,9110,8805,0.999912,9201,8806,400000,9001,8807,800000,9001,,,,,,
|
||||
NAD83(CSRS) / UTM zone 11N,2955,4617,16011,9001,9807,4400,8801,0,9102,8802,-117,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS) / UTM zone 12N,2956,4617,16012,9001,9807,4400,8801,0,9102,8802,-111,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
NAD83(CSRS) / UTM zone 13N,2957,4617,16013,9001,9807,4400,8801,0,9102,8802,-105,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
@ -859,6 +867,8 @@ RT90 2.5 gon V,3021,4124,19929,9001,9807,4530,8801,0,9110,8802,15.48298,9110,880
|
||||
RT90 0 gon,3022,4124,17336,9001,9807,4530,8801,0,9110,8802,18.03298,9110,8805,1,9201,8806,1500000,9001,8807,0,9001,,,,,,
|
||||
RT90 2.5 gon O,3023,4124,17337,9001,9807,4530,8801,0,9110,8802,20.18298,9110,8805,1,9201,8806,1500000,9001,8807,0,9001,,,,,,
|
||||
RT90 5 gon O,3024,4124,17338,9001,9807,4530,8801,0,9110,8802,22.33298,9110,8805,1,9201,8806,1500000,9001,8807,0,9001,,,,,,
|
||||
WGS 84 / Antarctic Polar Stereographic,3031,4326,19992,9001,9829,4490,8806,0,9001,8807,0,9001,8832,-71,9102,8833,0,9102,,,,,,,,,
|
||||
WGS 84 / Australian Antarctic Polar Stereographic,3032,4326,19993,9001,9829,4489,8806,6000000,9001,8807,6000000,9001,8832,-71,9102,8833,70,9102,,,,,,,,,
|
||||
WGS 84 / Australian Antarctic Lambert,3033,4326,19994,9001,9802,4400,8821,-50,9110,8822,70,9110,8823,-68.3,9110,8824,-74.3,9110,8826,6000000,9001,8827,6000000,9001,,,
|
||||
ETRS89 / LCC Europe,3034,4258,19985,9001,9802,4500,8821,52,9102,8822,10,9102,8823,35,9102,8824,65,9102,8826,4000000,9001,8827,2800000,9001,,,
|
||||
ETRS89 / LAEA Europe,3035,4258,19986,9001,9820,4532,8801,52,9102,8802,10,9102,8806,4321000,9001,8807,3210000,9001,,,,,,,,,
|
||||
@ -938,6 +948,7 @@ MAGNA-SIRGAS / Colombia Bogota zone,3116,4686,18057,9001,9807,4500,8801,4.354632
|
||||
MAGNA-SIRGAS / Colombia East Central zone,3117,4686,18058,9001,9807,4500,8801,4.35463215,9110,8802,-71.04390285,9110,8805,1,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
|
||||
MAGNA-SIRGAS / Colombia East zone,3118,4686,18059,9001,9807,4500,8801,4.35463215,9110,8802,-68.04390285,9110,8805,1,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
|
||||
Douala 1948 / AEF west,3119,4192,18415,9001,9807,4400,8801,0,9110,8802,10.3,9110,8805,0.999,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
|
||||
Pulkovo 1942(58) / Poland zone I,3120,4179,18280,9001,9809,4530,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000,9001,8807,5467000,9001,,,,,,
|
||||
PRS92 / Philippines zone 1,3121,4683,18171,9001,9807,4499,8801,0,9102,8802,117,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
PRS92 / Philippines zone 2,3122,4683,18172,9001,9807,4499,8801,0,9102,8802,119,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
PRS92 / Philippines zone 3,3123,4683,18173,9001,9807,4499,8801,0,9102,8802,121,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
@ -1085,6 +1096,25 @@ WGS 84 / SCAR IMW ST45-48,3271,4326,17271,9001,9802,4400,8821,-90,9102,8822,96,9
|
||||
WGS 84 / SCAR IMW ST49-52,3272,4326,17272,9001,9802,4400,8821,-90,9102,8822,120,9102,8823,-76.4,9110,8824,-79.2,9110,8826,0,9001,8827,0,9001,,,
|
||||
WGS 84 / SCAR IMW ST53-56,3273,4326,17273,9001,9802,4400,8821,-90,9102,8822,144,9102,8823,-76.4,9110,8824,-79.2,9110,8826,0,9001,8827,0,9001,,,
|
||||
WGS 84 / SCAR IMW ST57-60,3274,4326,17274,9001,9802,4400,8821,-90,9102,8822,168,9102,8823,-76.4,9110,8824,-79.2,9110,8826,0,9001,8827,0,9001,,,
|
||||
WGS 84 / SCAR IMW SU01-05,3275,4326,17275,9001,9829,4471,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-165,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU06-10,3276,4326,17276,9001,9829,4473,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-135,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU11-15,3277,4326,17277,9001,9829,4474,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-105,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU16-20,3278,4326,17278,9001,9829,4476,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-75,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU21-25,3279,4326,17279,9001,9829,4477,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-45,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU26-30,3280,4326,17280,9001,9829,4479,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-15,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU31-35,3281,4326,17281,9001,9829,4480,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,15,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU36-40,3282,4326,17282,9001,9829,4482,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,45,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU41-45,3283,4326,17283,9001,9829,4483,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,75,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU46-50,3284,4326,17284,9001,9829,4485,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,105,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU51-55,3285,4326,17285,9001,9829,4486,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,135,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SU56-60,3286,4326,17286,9001,9829,4488,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,165,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV01-10,3287,4326,17287,9001,9829,4472,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-150,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV11-20,3288,4326,17288,9001,9829,4475,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-90,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV21-30,3289,4326,17289,9001,9829,4478,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,-30,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV31-40,3290,4326,17290,9001,9829,4481,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,30,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV41-50,3291,4326,17291,9001,9829,4484,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,90,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SV51-60,3292,4326,17292,9001,9829,4487,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,150,9102,,,,,,,,,
|
||||
WGS 84 / SCAR IMW SW01-60,3293,4326,17293,9001,9829,4490,8806,0,9001,8807,0,9001,8832,-80.1419,9110,8833,0,9102,,,,,,,,,
|
||||
WGS 84 / USGS Transantarctic Mountains,3294,4326,17294,9001,9802,4400,8821,-78,9102,8822,162,9102,8823,-76.4,9110,8824,-79.2,9110,8826,0,9001,8827,0,9001,,,
|
||||
RGPF / UTM zone 5S,3296,4687,16105,9001,9807,4400,8801,0,9102,8802,-153,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
RGPF / UTM zone 6S,3297,4687,16106,9001,9807,4400,8801,0,9102,8802,-147,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
@ -1106,6 +1136,7 @@ CSG67 / UTM zone 21N,3312,4623,16021,9001,9807,4400,8801,0,9102,8802,-57,9102,88
|
||||
RGFG95 / UTM zone 21N,3313,4624,16021,9001,9807,4400,8801,0,9102,8802,-57,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Katanga 1955 / Katanga Lambert,3314,4695,17401,9001,9802,4400,8821,0,9102,8822,26,9102,8823,-6.5,9102,8824,-11.5,9102,8826,0,9001,8827,0,9001,,,
|
||||
Katanga 1955 / Katanga TM,3315,4695,17402,9001,9807,4400,8801,-9,9102,8802,26,9102,8805,0.9998,9201,8806,0,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(58) / GUGiK-80,3328,4179,18286,9001,9809,4530,8801,52.1,9110,8802,19.1,9110,8805,0.999714,9201,8806,500000,9001,8807,500000,9001,,,,,,
|
||||
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5,3329,4179,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6,3330,4179,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7,3331,4179,16267,9001,9807,4530,8801,0,9102,8802,21,9102,8805,1,9201,8806,7500000,9001,8807,0,9001,,,,,,
|
||||
@ -1161,6 +1192,7 @@ NAD83(CSRS) / Alberta 10-TM (Resource),3403,4617,19882,9001,9807,4400,8801,0,910
|
||||
NAD83(HARN) / North Carolina (ftUS),3404,4152,15346,9003,9802,4497,8821,33.45,9110,8822,-79,9110,8823,36.1,9110,8824,34.2,9110,8826,2000000,9003,8827,0,9003,,,
|
||||
VN-2000 / UTM zone 48N,3405,4756,16048,9001,9807,4400,8801,0,9102,8802,105,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
VN-2000 / UTM zone 49N,3406,4756,16049,9001,9807,4400,8801,0,9102,8802,111,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
WGS 84 / NSIDC Sea Ice Polar Stereographic North,3413,4326,19865,9001,9829,4468,8806,0,9001,8807,0,9001,8832,70,9102,8833,-45,9102,,,,,,,,,
|
||||
WGS 72BE / South China Sea Lambert,3415,4324,19863,9001,9802,4400,8821,21,9102,8822,114,9102,8823,18,9102,8824,24,9102,8826,500000,9001,8827,500000,9001,,,
|
||||
ETRS89 / Austria Lambert,3416,4258,19947,9001,9802,4530,8821,47.3,9110,8822,13.2,9110,8823,49,9110,8824,46,9110,8826,400000,9001,8827,400000,9001,,,
|
||||
NAD83 / Iowa North (ftUS),3417,4269,15377,9003,9802,4497,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,4921250,9003,8827,3280833.3333,9003,,,
|
||||
@ -1563,6 +1595,7 @@ Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10,3840,4179,16270,9001,9807,4530,
|
||||
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6,3841,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7,3842,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8,3843,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942(58) / Stereo70,3844,4179,19926,9001,9809,4530,8801,46,9102,8802,25,9102,8805,0.99975,9201,8806,500000,9001,8807,500000,9001,,,,,,
|
||||
SWEREF99 / RT90 7.5 gon V emulation,3845,4619,17339,9001,9807,4530,8801,0,9110,8802,11.18225,9110,8805,1.000006,9201,8806,1500025.141,9001,8807,-667.282,9001,,,,,,
|
||||
SWEREF99 / RT90 5 gon V emulation,3846,4619,17340,9001,9807,4530,8801,0,9110,8802,13.332256,9110,8805,1.0000058,9201,8806,1500044.695,9001,8807,-667.13,9001,,,,,,
|
||||
SWEREF99 / RT90 2.5 gon V emulation,3847,4619,17341,9001,9807,4530,8801,0,9110,8802,15.4822624306,9110,8805,1.00000561024,9201,8806,1500064.274,9001,8807,-667.711,9001,,,,,,
|
||||
@ -1608,6 +1641,7 @@ RGF93 / CC50,3950,4171,18109,9001,9802,4499,8821,50,9102,8822,3,9102,8823,49.25,
|
||||
NAD83 / Virginia Lambert,3968,4269,3967,9001,9802,4499,8821,36,9102,8822,-79.5,9102,8823,37,9102,8824,39.5,9102,8826,0,9001,8827,0,9001,,,
|
||||
NAD83(HARN) / Virginia Lambert,3969,4152,3967,9001,9802,4499,8821,36,9102,8822,-79.5,9102,8823,37,9102,8824,39.5,9102,8826,0,9001,8827,0,9001,,,
|
||||
NAD83(NSRS2007) / Virginia Lambert,3970,4759,3967,9001,9802,4499,8821,36,9102,8822,-79.5,9102,8823,37,9102,8824,39.5,9102,8826,0,9001,8827,0,9001,,,
|
||||
WGS 84 / NSIDC Sea Ice Polar Stereographic South,3976,4326,19866,9001,9829,4470,8806,0,9001,8807,0,9001,8832,-70,9102,8833,0,9102,,,,,,,,,
|
||||
NAD83 / Canada Atlas Lambert,3978,4269,3977,9001,9802,4400,8821,49,9102,8822,-95,9102,8823,49,9102,8824,77,9102,8826,0,9001,8827,0,9001,,,
|
||||
NAD83(CSRS) / Canada Atlas Lambert,3979,4617,3977,9001,9802,4400,8821,49,9102,8822,-95,9102,8823,49,9102,8824,77,9102,8826,0,9001,8827,0,9001,,,
|
||||
Katanga 1955 / Katanga Lambert,3985,4695,3980,9001,9802,4499,8821,9,9102,8822,26,9102,8823,-6.5,9102,8824,-11.5,9102,8826,500000,9001,8827,500000,9001,,,
|
||||
@ -1617,6 +1651,8 @@ Katanga 1955 / Katanga Gauss zone C,3988,4695,3983,9001,9807,4499,8801,-9,9102,8
|
||||
Katanga 1955 / Katanga Gauss zone D,3989,4695,3984,9001,9807,4499,8801,-9,9102,8802,24,9102,8805,1,9201,8806,200000,9001,8807,500000,9001,,,,,,
|
||||
Puerto Rico State Plane CS of 1927,3991,4139,15201,9003,9802,4497,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000,9003,8827,0,9003,,,
|
||||
Puerto Rico / St. Croix,3992,4139,15202,9003,9802,4497,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000,9003,8827,100000,9003,,,
|
||||
WGS 84 / Arctic Polar Stereographic,3995,4326,19842,9001,9829,4469,8806,0,9001,8807,0,9001,8832,71,9102,8833,0,9102,,,,,,,,,
|
||||
WGS 84 / IBCAO Polar Stereographic,3996,4326,19840,9001,9829,4469,8806,0,9001,8807,0,9001,8832,75,9102,8833,0,9102,,,,,,,,,
|
||||
WGS 84 / Dubai Local TM,3997,4326,19839,9001,9807,4400,8801,0,9110,8802,55.2,9110,8805,1,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
MOLDREF99 / Moldova TM,4026,4023,3999,9001,9807,4530,8801,0,9110,8802,28.24,9110,8805,0.99994,9201,8806,200000,9001,8807,-5000000,9001,,,,,,
|
||||
WGS 84 / TMzn35N,4037,4326,16035,9001,9807,4500,8801,0,9102,8802,27,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
@ -1847,7 +1883,6 @@ RSRGD2000 / PCLC2000,5481,4764,5477,9001,9802,4500,8821,-71.3,9110,8822,166,9110
|
||||
RGAF09 / UTM zone 20N,5490,5489,16020,9001,9807,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
S-JTSK / Krovak,5513,4156,5509,9001,9819,6501,1036,30.1717303,9110,8806,0,9001,8807,0,9001,8811,49.3,9110,8818,78.3,9110,8819,0.9999,9201,8833,24.5,9110
|
||||
S-JTSK / Krovak East North,5514,4156,5510,9001,1041,4499,1036,30.1717303,9110,8806,0,9001,8807,0,9001,8811,49.3,9110,8818,78.3,9110,8819,0.9999,9201,8833,24.5,9110
|
||||
S-JTSK / Krovak East North,102067,4156,5510,9001,1041,4499,1036,30.1717303,9110,8806,0,9001,8807,0,9001,8811,49.3,9110,8818,78.3,9110,8819,0.9999,9201,8833,24.5,9110
|
||||
CI1971 / Chatham Islands Map Grid,5518,4672,5517,9001,9807,4500,8801,-44,9110,8802,-176.3,9110,8805,1,9201,8806,350000,9001,8807,650000,9001,,,,,,
|
||||
CI1979 / Chatham Islands Map Grid,5519,4673,5517,9001,9807,4500,8801,-44,9110,8802,-176.3,9110,8805,1,9201,8806,350000,9001,8807,650000,9001,,,,,,
|
||||
DHDN / 3-degree Gauss-Kruger zone 1,5520,4314,16261,9001,9807,4530,8801,0,9102,8802,3,9102,8805,1,9201,8806,1500000,9001,8807,0,9001,,,,,,
|
||||
@ -2452,6 +2487,7 @@ Corrego Alegre 1970-72 / UTM zone 23S,22523,4225,16123,9001,9807,4400,8801,0,910
|
||||
Corrego Alegre 1970-72 / UTM zone 24S,22524,4225,16124,9001,9807,4400,8801,0,9102,8802,-39,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
Corrego Alegre 1970-72 / UTM zone 25S,22525,4225,16125,9001,9807,4400,8801,0,9102,8802,-33,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
Deir ez Zor / Syria Lambert,22770,4227,19948,9001,9801,4499,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000,9001,8807,300000,9001,,,,,,
|
||||
Deir ez Zor / Levant Stereographic,22780,4227,19949,9001,9809,4499,8801,38,9105,8802,43.5,9105,8805,0.9995341,9201,8806,0,9001,8807,0,9001,,,,,,
|
||||
Egypt 1907 / Blue Belt,22991,4229,18071,9001,9807,4400,8801,30,9102,8802,35,9102,8805,1,9201,8806,300000,9001,8807,1100000,9001,,,,,,
|
||||
Egypt 1907 / Red Belt,22992,4229,18072,9001,9807,4400,8801,30,9102,8802,31,9102,8805,1,9201,8806,615000,9001,8807,810000,9001,,,,,,
|
||||
Egypt 1907 / Purple Belt,22993,4229,18073,9001,9807,4400,8801,30,9102,8802,27,9102,8805,1,9201,8806,700000,9001,8807,200000,9001,,,,,,
|
||||
@ -3008,6 +3044,8 @@ Pulkovo 1942 / Gauss-Kruger 30N,28490,4284,16330,9001,9807,4530,8801,0,9102,8802
|
||||
Pulkovo 1942 / Gauss-Kruger 31N,28491,4284,16331,9001,9807,4530,8801,0,9102,8802,-177,9102,8805,1,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Pulkovo 1942 / Gauss-Kruger 32N,28492,4284,16332,9001,9807,4530,8801,0,9102,8802,-171,9102,8805,1,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Qatar 1974 / Qatar National Grid,28600,4285,19919,9001,9807,4400,8801,24.27,9110,8802,51.13,9110,8805,0.99999,9201,8806,200000,9001,8807,300000,9001,,,,,,
|
||||
Amersfoort / RD Old,28991,4289,19913,9001,9809,4499,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,0,9001,8807,0,9001,,,,,,
|
||||
Amersfoort / RD New,28992,4289,19914,9001,9809,4499,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,155000,9001,8807,463000,9001,,,,,,
|
||||
SAD69 / UTM zone 18N,29118,4291,16018,9001,9807,4400,8801,0,9102,8802,-75,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
SAD69 / UTM zone 19N,29119,4291,16019,9001,9807,4400,8801,0,9102,8802,-69,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
SAD69 / UTM zone 20N,29120,4291,16020,9001,9807,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
@ -3126,6 +3164,8 @@ DHDN / 3-degree Gauss-Kruger zone 4,31468,4314,16264,9001,9807,4530,8801,0,9102,
|
||||
DHDN / 3-degree Gauss-Kruger zone 5,31469,4314,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
|
||||
Conakry 1905 / UTM zone 28N,31528,4315,16028,9001,9807,4400,8801,0,9102,8802,-15,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Conakry 1905 / UTM zone 29N,31529,4315,16029,9001,9807,4400,8801,0,9102,8802,-9,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
Dealul Piscului 1930 / Stereo 33,31600,4316,19927,9001,9809,4499,8801,45.54,9110,8802,25.23328772,9110,8805,0.9996667,9201,8806,500000,9001,8807,500000,9001,,,,,,
|
||||
Dealul Piscului 1970/ Stereo 70,31700,4317,19926,9001,9809,4530,8801,46,9102,8802,25,9102,8805,0.99975,9201,8806,500000,9001,8807,500000,9001,,,,,,
|
||||
NGN / UTM zone 38N,31838,4318,16038,9001,9807,4400,8801,0,9102,8802,45,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
NGN / UTM zone 39N,31839,4318,16039,9001,9807,4400,8801,0,9102,8802,51,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
KUDAMS / KTM,31900,4319,19928,9001,9807,4400,8801,0,9102,8802,48,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
|
||||
@ -3682,3 +3722,4 @@ WGS 84 / UTM zone 58S,32758,4326,16158,9001,9807,4400,8801,0,9102,8802,165,9102,
|
||||
WGS 84 / UTM zone 59S,32759,4326,16159,9001,9807,4400,8801,0,9102,8802,171,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
WGS 84 / UTM zone 60S,32760,4326,16160,9001,9807,4400,8801,0,9102,8802,177,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
WGS 84 / TM 36 SE,32766,4326,16636,9001,9807,4400,8801,0,9102,8802,36,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
|
||||
S-JTSK / Krovak East North,102067,4156,5510,9001,1041,4499,1036,30.1717303,9110,8806,0,9001,8807,0,9001,8811,49.3,9110,8818,78.3,9110,8819,0.9999,9201,8833,24.5,9110
|
||||
|
Can't render this file because it is too large.
|
@ -10,5 +10,5 @@ Exec=gpxsee %F
|
||||
Icon=gpxsee
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Graphics;Viewer;Maps;Qt;
|
||||
MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/loc+xml;application/slf+xml;
|
||||
Categories=Graphics;Viewer;Education;Geography;Maps;Sports;Qt;
|
||||
MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/loc+xml;application/slf+xml;application/geo+json;
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.3"
|
||||
!define VERSION "7.3"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}.exe"
|
||||
@ -106,17 +106,18 @@ Section "GPXSee" SEC_APP
|
||||
|
||||
; Associate file formats
|
||||
DetailPrint "Associating file types..."
|
||||
!insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 4
|
||||
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 5
|
||||
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 6
|
||||
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 7
|
||||
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 8
|
||||
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 9
|
||||
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 10
|
||||
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 11
|
||||
!insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 5
|
||||
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 6
|
||||
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 7
|
||||
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 8
|
||||
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 9
|
||||
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 10
|
||||
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 11
|
||||
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 12
|
||||
!insertmacro FILE_ASSOCIATION_ADD "wpt" "OziExplorer Waypoint File" 1
|
||||
!insertmacro FILE_ASSOCIATION_ADD "loc" "Geocaching.com Waypoint File" 2
|
||||
!insertmacro FILE_ASSOCIATION_ADD "slf" "Sigma Log File" 3
|
||||
!insertmacro FILE_ASSOCIATION_ADD "geojson" "GeoJSON" 4
|
||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||
|
||||
SectionEnd
|
||||
@ -131,6 +132,7 @@ Section "QT framework" SEC_QT
|
||||
File "Qt5PrintSupport.dll"
|
||||
File "Qt5Network.dll"
|
||||
File "Qt5Sql.dll"
|
||||
File "Qt5Concurrent.dll"
|
||||
File /r "platforms"
|
||||
File /r "imageformats"
|
||||
File /r "printsupport"
|
||||
@ -186,8 +188,11 @@ SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Portuguese (Brazil)" "pt_BR"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Spanish" "es"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
!insertmacro LOCALIZATION "Turkish" "tr"
|
||||
SectionGroupEnd
|
||||
|
||||
;--------------------------------
|
||||
@ -221,6 +226,7 @@ Section "Uninstall"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "wpt"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "loc"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "slf"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "geojson"
|
||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||
|
||||
SectionEnd
|
||||
@ -251,4 +257,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
@ -77,4 +77,11 @@
|
||||
<generic-icon name="text-plain"/>
|
||||
<glob pattern="*.wpt"/>
|
||||
</mime-type>
|
||||
|
||||
<mime-type type="application/geo+json">
|
||||
<comment>GeoJSON</comment>
|
||||
<sub-class-of type="text/plain"/>
|
||||
<generic-icon name="text-plain"/>
|
||||
<glob pattern="*.geojson"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.3"
|
||||
!define VERSION "7.3"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
@ -113,17 +113,18 @@ Section "GPXSee" SEC_APP
|
||||
|
||||
; Associate file formats
|
||||
DetailPrint "Associating file types..."
|
||||
!insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 4
|
||||
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 5
|
||||
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 6
|
||||
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 7
|
||||
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 8
|
||||
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 9
|
||||
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 10
|
||||
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 11
|
||||
!insertmacro FILE_ASSOCIATION_ADD "gpx" "GPS Exchange Format" 5
|
||||
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 6
|
||||
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 7
|
||||
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 8
|
||||
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 9
|
||||
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 data" 10
|
||||
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track Point File" 11
|
||||
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 12
|
||||
!insertmacro FILE_ASSOCIATION_ADD "wpt" "OziExplorer Waypoint File" 1
|
||||
!insertmacro FILE_ASSOCIATION_ADD "loc" "Geocaching.com Waypoint File" 2
|
||||
!insertmacro FILE_ASSOCIATION_ADD "slf" "Sigma Log File" 3
|
||||
!insertmacro FILE_ASSOCIATION_ADD "geojson" "GeoJSON" 4
|
||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||
|
||||
SectionEnd
|
||||
@ -138,6 +139,7 @@ Section "QT framework" SEC_QT
|
||||
File "Qt5PrintSupport.dll"
|
||||
File "Qt5Network.dll"
|
||||
File "Qt5Sql.dll"
|
||||
File "Qt5Concurrent.dll"
|
||||
File /r "platforms"
|
||||
File /r "imageformats"
|
||||
File /r "printsupport"
|
||||
@ -188,8 +190,11 @@ SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Portuguese (Brazil)" "pt_BR"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Spanish" "es"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
!insertmacro LOCALIZATION "Turkish" "tr"
|
||||
SectionGroupEnd
|
||||
|
||||
;--------------------------------
|
||||
@ -224,6 +229,7 @@ Section "Uninstall"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "wpt"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "loc"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "slf"
|
||||
!insertmacro FILE_ASSOCIATION_REMOVE "geojson"
|
||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||
|
||||
SectionEnd
|
||||
@ -254,4 +260,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
@ -14,10 +14,11 @@
|
||||
; Translations
|
||||
!macro LOCALIZATION LANG CODE
|
||||
Section "${LANG}"
|
||||
CreateDirectory "$INSTDIR\translations"
|
||||
IfFileExists "$INSTDIR\translations" +2 0
|
||||
CreateDirectory "$INSTDIR\translations"
|
||||
File /oname=translations\gpxsee_${CODE}.qm translations\gpxsee_${CODE}.qm
|
||||
!if /FileExists translations\qt_${CODE}.qm
|
||||
File /oname=translations\qt_${CODE}.qm translations\qt_${CODE}.qm
|
||||
!endif
|
||||
SectionEnd
|
||||
!macroend
|
||||
!macroend
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<name>4UMaps</name>
|
||||
<url>https://4umaps.com/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
|
||||
|
8
pkg/maps/Antarctica.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0" type="WMTS">
|
||||
<name>Antarctica</name>
|
||||
<url type="REST">https://gis.ngdc.noaa.gov/arcgis/rest/services/antarctic/antarctic_basemap/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</url>
|
||||
<copyright>NOAA National Centers for Environmental Information (NCEI); International Bathymetric Chart of the Southern Ocean (IBCSO); General Bathymetric Chart of the Oceans (GEBCO); Natural Earth</copyright>
|
||||
<layer>antarctic_antarctic_basemap</layer>
|
||||
<set>default028mm</set>
|
||||
</map>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<name>Open Street Map</name>
|
||||
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © OpenStreetMap (CC-BY-SA)</copyright>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<name>Open Topo Map</name>
|
||||
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<name>USGS Imagery</name>
|
||||
<url>https://basemap.nationalmap.gov/ArcGIS/rest/services/USGSImageryOnly/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<name>USGS Topo</name>
|
||||
<url>https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
|
@ -6,27 +6,36 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QLibraryInfo>
|
||||
#include <QSettings>
|
||||
#include "common/programpaths.h"
|
||||
#include "common/config.h"
|
||||
#include "map/downloader.h"
|
||||
#include "map/ellipsoid.h"
|
||||
#include "map/gcs.h"
|
||||
#include "map/pcs.h"
|
||||
#include "data/dem.h"
|
||||
#include "opengl.h"
|
||||
#include "gui.h"
|
||||
#include "config.h"
|
||||
#include "settings.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
_argc(argc), _argv(argv)
|
||||
App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
{
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
setApplicationName(APP_NAME);
|
||||
#else
|
||||
setApplicationName(QString(APP_NAME).toLower());
|
||||
#endif
|
||||
setApplicationVersion(APP_VERSION);
|
||||
|
||||
QTranslator *gpxsee = new QTranslator(this);
|
||||
gpxsee->load(QLocale::system(), "gpxsee", "_", TRANSLATIONS_DIR);
|
||||
gpxsee->load(QLocale::system(), "gpxsee", "_",
|
||||
ProgramPaths::translationsDir());
|
||||
installTranslator(gpxsee);
|
||||
|
||||
QTranslator *qt = new QTranslator(this);
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_MAC)
|
||||
qt->load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
|
||||
qt->load(QLocale::system(), "qt", "_", ProgramPaths::translationsDir());
|
||||
#else // Q_OS_WIN32 || Q_OS_MAC
|
||||
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||
QLibraryInfo::TranslationsPath));
|
||||
@ -36,15 +45,19 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
#ifdef Q_OS_MAC
|
||||
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
QSettings settings(APP_NAME, APP_NAME);
|
||||
settings.beginGroup(OPTIONS_SETTINGS_GROUP);
|
||||
|
||||
/* The QNetworkAccessManager must be a child of QApplication, otherwise it
|
||||
triggers the following warning on exit (and may probably crash):
|
||||
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
|
||||
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
||||
DEM::setDir(ProgramPaths::demDir());
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
||||
QSettings settings(qApp->applicationName(), qApp->applicationName());
|
||||
settings.beginGroup(OPTIONS_SETTINGS_GROUP);
|
||||
#ifdef ENABLE_HTTP2
|
||||
Downloader::enableHTTP2(settings.value(ENABLE_HTTP2_SETTING,
|
||||
ENABLE_HTTP2_DEFAULT).toBool());
|
||||
@ -53,10 +66,6 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
CONNECTION_TIMEOUT_DEFAULT).toInt());
|
||||
settings.endGroup();
|
||||
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
||||
_gui = new GUI();
|
||||
}
|
||||
|
||||
@ -65,14 +74,15 @@ App::~App()
|
||||
delete _gui;
|
||||
}
|
||||
|
||||
void App::run()
|
||||
int App::run()
|
||||
{
|
||||
_gui->show();
|
||||
|
||||
for (int i = 1; i < _argc; i++)
|
||||
_gui->openFile(QString::fromLocal8Bit(_argv[i]));
|
||||
QStringList args(arguments());
|
||||
for (int i = 1; i < args.count(); i++)
|
||||
_gui->openFile(args.at(i));
|
||||
|
||||
exec();
|
||||
return exec();
|
||||
}
|
||||
|
||||
bool App::event(QEvent *event)
|
||||
@ -87,41 +97,27 @@ bool App::event(QEvent *event)
|
||||
|
||||
void App::loadDatums()
|
||||
{
|
||||
QString ef, df;
|
||||
QString ellipsoidsFile(ProgramPaths::ellipsoidsFile());
|
||||
QString gcsFile(ProgramPaths::gcsFile());
|
||||
|
||||
if (QFile::exists(USER_ELLIPSOID_FILE))
|
||||
ef = USER_ELLIPSOID_FILE;
|
||||
else if (QFile::exists(GLOBAL_ELLIPSOID_FILE))
|
||||
ef = GLOBAL_ELLIPSOID_FILE;
|
||||
else
|
||||
if (ellipsoidsFile.isNull())
|
||||
qWarning("No ellipsoids file found.");
|
||||
if (gcsFile.isNull())
|
||||
qWarning("No GCS file found.");
|
||||
|
||||
if (QFile::exists(USER_GCS_FILE))
|
||||
df = USER_GCS_FILE;
|
||||
else if (QFile::exists(GLOBAL_GCS_FILE))
|
||||
df = GLOBAL_GCS_FILE;
|
||||
else
|
||||
qWarning("No datums file found.");
|
||||
|
||||
if (!ef.isNull() && !df.isNull()) {
|
||||
Ellipsoid::loadList(ef);
|
||||
GCS::loadList(df);
|
||||
if (!ellipsoidsFile.isNull() && !gcsFile.isNull()) {
|
||||
Ellipsoid::loadList(ellipsoidsFile);
|
||||
GCS::loadList(gcsFile);
|
||||
} else
|
||||
qWarning("Maps based on a datum different from WGS84 won't work.");
|
||||
}
|
||||
|
||||
void App::loadPCSs()
|
||||
{
|
||||
QString file;
|
||||
QString pcsFile(ProgramPaths::pcsFile());
|
||||
|
||||
if (QFile::exists(USER_PCS_FILE))
|
||||
file = USER_PCS_FILE;
|
||||
else if (QFile::exists(GLOBAL_PCS_FILE))
|
||||
file = GLOBAL_PCS_FILE;
|
||||
else {
|
||||
if (pcsFile.isNull())
|
||||
qWarning("No PCS file found.");
|
||||
return;
|
||||
}
|
||||
|
||||
PCS::loadList(file);
|
||||
else
|
||||
PCS::loadList(pcsFile);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ class App : QApplication
|
||||
public:
|
||||
App(int &argc, char **argv);
|
||||
~App();
|
||||
void run();
|
||||
int run();
|
||||
|
||||
protected:
|
||||
bool event(QEvent *event);
|
||||
@ -21,8 +21,6 @@ private:
|
||||
void loadDatums();
|
||||
void loadPCSs();
|
||||
|
||||
int &_argc;
|
||||
char **_argv;
|
||||
GUI *_gui;
|
||||
};
|
||||
|
||||
|
155
src/GUI/areaitem.cpp
Normal file
@ -0,0 +1,155 @@
|
||||
#include <cmath>
|
||||
#include <QApplication>
|
||||
#include <QCursor>
|
||||
#include <QPainter>
|
||||
#include "map/map.h"
|
||||
#include "tooltip.h"
|
||||
#include "areaitem.h"
|
||||
|
||||
|
||||
QString AreaItem::toolTip() const
|
||||
{
|
||||
ToolTip tt;
|
||||
|
||||
if (!_area.name().isEmpty())
|
||||
tt.insert(qApp->translate("PolygonItem", "Name"), _area.name());
|
||||
if (!_area.description().isEmpty())
|
||||
tt.insert(qApp->translate("PolygonItem", "Description"),
|
||||
_area.description());
|
||||
|
||||
return tt.toString();
|
||||
}
|
||||
|
||||
AreaItem::AreaItem(const Area &area, Map *map, QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent), _area(area)
|
||||
{
|
||||
_map = map;
|
||||
_digitalZoom = 0;
|
||||
|
||||
_width = 2;
|
||||
_opacity = 0.5;
|
||||
QBrush brush(Qt::SolidPattern);
|
||||
_pen = QPen(brush, _width);
|
||||
|
||||
updatePainterPath();
|
||||
|
||||
setCursor(Qt::ArrowCursor);
|
||||
setAcceptHoverEvents(true);
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
||||
QPainterPath AreaItem::painterPath(const Polygon &polygon)
|
||||
{
|
||||
QPainterPath path;
|
||||
|
||||
const QVector<Coordinates> &lr = polygon.first();
|
||||
path.moveTo(_map->ll2xy(lr.first()));
|
||||
for (int i = 1; i < lr.size(); i++)
|
||||
path.lineTo(_map->ll2xy(lr.at(i)));
|
||||
path.closeSubpath();
|
||||
|
||||
for (int i = 1; i < polygon.size(); i++) {
|
||||
const QVector<Coordinates> &lr = polygon.at(i);
|
||||
QPainterPath hole;
|
||||
hole.moveTo(_map->ll2xy(lr.first()));
|
||||
for (int j = 1; j < lr.size(); j++)
|
||||
hole.lineTo(_map->ll2xy(lr.at(j)));
|
||||
hole.closeSubpath();
|
||||
path = path.subtracted(hole);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
void AreaItem::updatePainterPath()
|
||||
{
|
||||
_painterPath = QPainterPath();
|
||||
|
||||
for (int i = 0; i < _area.size(); i++)
|
||||
_painterPath.addPath(painterPath(_area.at(i)));
|
||||
}
|
||||
|
||||
void AreaItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
|
||||
painter->setPen(_width ? _pen : QPen(Qt::NoPen));
|
||||
painter->drawPath(_painterPath);
|
||||
painter->fillPath(_painterPath, _brush);
|
||||
|
||||
/*
|
||||
QPen p = QPen(QBrush(Qt::red), 0);
|
||||
painter->setPen(p);
|
||||
painter->drawRect(boundingRect());
|
||||
*/
|
||||
}
|
||||
|
||||
void AreaItem::setMap(Map *map)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
|
||||
_map = map;
|
||||
|
||||
updatePainterPath();
|
||||
}
|
||||
|
||||
void AreaItem::setColor(const QColor &color)
|
||||
{
|
||||
if (_pen.color() == color)
|
||||
return;
|
||||
|
||||
QColor bc(color);
|
||||
bc.setAlphaF(_opacity * color.alphaF());
|
||||
|
||||
_pen.setColor(color);
|
||||
_brush = QBrush(bc);
|
||||
update();
|
||||
}
|
||||
|
||||
void AreaItem::setOpacity(qreal opacity)
|
||||
{
|
||||
if (_opacity == opacity)
|
||||
return;
|
||||
|
||||
_opacity = opacity;
|
||||
QColor bc(_pen.color());
|
||||
bc.setAlphaF(_opacity * _pen.color().alphaF());
|
||||
_brush = QBrush(bc);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void AreaItem::setWidth(qreal width)
|
||||
{
|
||||
if (_width == width)
|
||||
return;
|
||||
|
||||
prepareGeometryChange();
|
||||
|
||||
_width = width;
|
||||
_pen.setWidthF(_width * pow(2, -_digitalZoom));
|
||||
}
|
||||
|
||||
void AreaItem::setStyle(Qt::PenStyle style)
|
||||
{
|
||||
if (_pen.style() == style)
|
||||
return;
|
||||
|
||||
_pen.setStyle(style);
|
||||
update();
|
||||
}
|
||||
|
||||
void AreaItem::setDigitalZoom(int zoom)
|
||||
{
|
||||
if (_digitalZoom == zoom)
|
||||
return;
|
||||
|
||||
prepareGeometryChange();
|
||||
|
||||
_digitalZoom = zoom;
|
||||
_pen.setWidthF(_width * pow(2, -_digitalZoom));
|
||||
}
|
46
src/GUI/areaitem.h
Normal file
@ -0,0 +1,46 @@
|
||||
#ifndef AREAITEM_H
|
||||
#define AREAITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include "data/area.h"
|
||||
|
||||
class Map;
|
||||
|
||||
class AreaItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
AreaItem(const Area &area, Map *map, QGraphicsItem *parent = 0);
|
||||
|
||||
QPainterPath shape() const {return _painterPath;}
|
||||
QRectF boundingRect() const {return _painterPath.boundingRect();}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget);
|
||||
|
||||
const Area &area() const {return _area;}
|
||||
|
||||
void setMap(Map *map);
|
||||
|
||||
void setColor(const QColor &color);
|
||||
void setOpacity(qreal opacity);
|
||||
void setWidth(qreal width);
|
||||
void setStyle(Qt::PenStyle style);
|
||||
void setDigitalZoom(int zoom);
|
||||
|
||||
private:
|
||||
QPainterPath painterPath(const Polygon &polygon);
|
||||
void updatePainterPath();
|
||||
QString toolTip() const;
|
||||
|
||||
Area _area;
|
||||
Map *_map;
|
||||
int _digitalZoom;
|
||||
|
||||
qreal _width;
|
||||
QPen _pen;
|
||||
QBrush _brush;
|
||||
qreal _opacity;
|
||||
|
||||
QPainterPath _painterPath;
|
||||
};
|
||||
|
||||
#endif // AREAITEM_H
|
@ -1,7 +1,7 @@
|
||||
#include <cmath>
|
||||
#include <QPainter>
|
||||
#include "common/util.h"
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "axisitem.h"
|
||||
|
||||
|
||||
@ -111,10 +111,11 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QFontMetrics fm(_font);
|
||||
QRect ts;
|
||||
|
||||
|
||||
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||
painter->setFont(_font);
|
||||
painter->setPen(QPen(Qt::black, AXIS_WIDTH));
|
||||
QPen pen(painter->pen());
|
||||
pen.setWidth(AXIS_WIDTH);
|
||||
painter->setPen(pen);
|
||||
|
||||
if (_type == X) {
|
||||
painter->drawLine(0, 0, _size, 0);
|
||||
|
@ -32,15 +32,16 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Graph &graph = data.tracks().at(i)->cadence();
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.cadence();
|
||||
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
CadenceGraphItem *gi = new CadenceGraphItem(graph, _graphType);
|
||||
GraphView::addGraph(gi);
|
||||
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
|
||||
_avg.append(QPointF(track.distance(), gi->avg()));
|
||||
graphs.append(gi);
|
||||
}
|
||||
}
|
||||
@ -50,6 +51,9 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
|
||||
graphs.append(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
||||
|
@ -6,12 +6,6 @@
|
||||
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,8 @@ public:
|
||||
CadenceGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
};
|
||||
|
||||
#endif // CADENCEGRAPHITEM_H
|
||||
|
57
src/GUI/coordinatesitem.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
#include <QFontMetrics>
|
||||
#include <QPainter>
|
||||
#include "font.h"
|
||||
#include "coordinatesitem.h"
|
||||
|
||||
|
||||
CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||
{
|
||||
_format = DecimalDegrees;
|
||||
|
||||
_font.setPixelSize(FONT_SIZE);
|
||||
_font.setFamily(FONT_FAMILY);
|
||||
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
void CoordinatesItem::paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(widget);
|
||||
|
||||
if (!_c.isValid())
|
||||
return;
|
||||
|
||||
QFontMetrics fm(_font);
|
||||
painter->setFont(_font);
|
||||
painter->setPen(QPen(Qt::black));
|
||||
painter->drawText(0, -fm.descent(), Format::coordinates(_c, _format));
|
||||
|
||||
/*
|
||||
painter->setPen(Qt::red);
|
||||
painter->drawRect(boundingRect());
|
||||
*/
|
||||
}
|
||||
|
||||
void CoordinatesItem::setCoordinates(const Coordinates &c)
|
||||
{
|
||||
_c = c;
|
||||
update();
|
||||
}
|
||||
|
||||
void CoordinatesItem::setFormat(const CoordinatesFormat &format)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
|
||||
_format = format;
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
void CoordinatesItem::updateBoundingRect()
|
||||
{
|
||||
QFontMetrics fm(_font);
|
||||
_boundingRect = fm.tightBoundingRect(Format::coordinates(
|
||||
Coordinates(-180, -90), _format));
|
||||
_boundingRect.moveBottom(-fm.descent());
|
||||
}
|
30
src/GUI/coordinatesitem.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef COORDINATESITEM_H
|
||||
#define COORDINATESITEM_H
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QFont>
|
||||
#include "common/coordinates.h"
|
||||
#include "format.h"
|
||||
|
||||
class CoordinatesItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
CoordinatesItem(QGraphicsItem *parent = 0);
|
||||
|
||||
QRectF boundingRect() const {return _boundingRect;}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget);
|
||||
|
||||
void setCoordinates(const Coordinates &c);
|
||||
void setFormat(const CoordinatesFormat &format);
|
||||
|
||||
private:
|
||||
void updateBoundingRect();
|
||||
|
||||
Coordinates _c;
|
||||
CoordinatesFormat _format;
|
||||
QRectF _boundingRect;
|
||||
QFont _font;
|
||||
};
|
||||
|
||||
#endif // COORDINATESITEM_H
|
@ -1,7 +1,6 @@
|
||||
#include <cmath>
|
||||
#include <QLocale>
|
||||
#include "data/data.h"
|
||||
#include "config.h"
|
||||
#include "tooltip.h"
|
||||
#include "elevationgraphitem.h"
|
||||
#include "elevationgraph.h"
|
||||
@ -70,7 +69,7 @@ void ElevationGraph::setInfo()
|
||||
|
||||
GraphItem *ElevationGraph::loadGraph(const Graph &graph, Type type)
|
||||
{
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
return 0;
|
||||
}
|
||||
@ -98,9 +97,11 @@ QList<GraphItem*> ElevationGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++)
|
||||
graphs.append(loadGraph(data.tracks().at(i)->elevation(), Track));
|
||||
graphs.append(loadGraph(data.tracks().at(i).elevation(), Track));
|
||||
for (int i = 0; i < data.routes().count(); i++)
|
||||
graphs.append(loadGraph(data.routes().at(i)->elevation(), Route));
|
||||
graphs.append(loadGraph(data.routes().at(i).elevation(), Route));
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
@ -6,16 +6,22 @@
|
||||
ElevationGraphItem::ElevationGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
_min = GraphItem::min();
|
||||
_max = GraphItem::max();
|
||||
|
||||
_ascent = _descent = 0;
|
||||
for (int i = 0; i < graph.size(); i++) {
|
||||
const GraphSegment &segment = graph.at(i);
|
||||
|
||||
for (int j = 1; j < graph.size(); j++) {
|
||||
qreal cur = graph.at(j).y();
|
||||
qreal prev = graph.at(j-1).y();
|
||||
for (int j = 1; j < segment.size(); j++) {
|
||||
qreal cur = segment.at(j).y();
|
||||
qreal prev = segment.at(j-1).y();
|
||||
|
||||
if (cur > prev)
|
||||
_ascent += cur - prev;
|
||||
if (cur < prev)
|
||||
_descent += prev - cur;
|
||||
if (cur > prev)
|
||||
_ascent += cur - prev;
|
||||
if (cur < prev)
|
||||
_descent += prev - cur;
|
||||
}
|
||||
}
|
||||
|
||||
setToolTip(toolTip(Metric));
|
||||
|
@ -13,15 +13,15 @@ public:
|
||||
|
||||
qreal ascent() const {return _ascent;}
|
||||
qreal descent() const {return _descent;}
|
||||
qreal min() const {return -bounds().bottom();}
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal max() const {return _max;}
|
||||
qreal min() const {return _min;}
|
||||
|
||||
void setUnits(Units units);
|
||||
|
||||
private:
|
||||
QString toolTip(Units units) const;
|
||||
|
||||
qreal _ascent, _descent;
|
||||
qreal _ascent, _descent, _min, _max;
|
||||
};
|
||||
|
||||
#endif // ELEVATIONGRAPHITEM_H
|
||||
|
7
src/GUI/font.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef FONT_H
|
||||
#define FONT_H
|
||||
|
||||
#define FONT_FAMILY "Arial"
|
||||
#define FONT_SIZE 12 // px
|
||||
|
||||
#endif // FONT_H
|
@ -34,9 +34,9 @@ QList<GraphItem*> GearRatioGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Graph &graph = data.tracks().at(i)->ratio();
|
||||
const Graph &graph = data.tracks().at(i).ratio();
|
||||
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
@ -55,6 +55,9 @@ QList<GraphItem*> GearRatioGraph::loadData(const Data &data)
|
||||
graphs.append(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
||||
|
@ -9,12 +9,6 @@ GearRatioGraphItem::GearRatioGraphItem(const Graph &graph, GraphType type,
|
||||
{
|
||||
qreal val = NAN;
|
||||
|
||||
for (int j = 1; j < graph.size(); j++) {
|
||||
const GraphPoint &p = graph.at(j);
|
||||
qreal val = _map.value(p.y());
|
||||
_map.insert(p.y(), val + (p.s() - graph.at(j-1).s()));
|
||||
}
|
||||
|
||||
for (QMap<qreal, qreal>::const_iterator it = _map.constBegin();
|
||||
it != _map.constEnd(); ++it) {
|
||||
if (it == _map.constBegin()) {
|
||||
|
@ -12,8 +12,6 @@ public:
|
||||
GearRatioGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal min() const {return -bounds().bottom();}
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal top() const {return _top;}
|
||||
|
||||
const QMap<qreal, qreal> &map() const {return _map;}
|
||||
|
@ -3,26 +3,17 @@
|
||||
|
||||
|
||||
GraphItem::GraphItem(const Graph &graph, GraphType type, QGraphicsItem *parent)
|
||||
: QGraphicsObject(parent)
|
||||
: QGraphicsObject(parent), _graph(graph), _type(type)
|
||||
{
|
||||
Q_ASSERT(_graph.isValid());
|
||||
|
||||
_id = 0;
|
||||
_width = 1;
|
||||
|
||||
_pen = QPen(Qt::black, _width);
|
||||
|
||||
_type = type;
|
||||
_graph = graph;
|
||||
_sx = 1.0; _sy = 1.0;
|
||||
_time = _graph.hasTime();
|
||||
|
||||
_time = true;
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
if (std::isnan(_graph.at(i).t())) {
|
||||
_time = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setZValue(1.0);
|
||||
setZValue(2.0);
|
||||
|
||||
updatePath();
|
||||
updateShape();
|
||||
@ -89,18 +80,31 @@ void GraphItem::setWidth(int width)
|
||||
updateShape();
|
||||
}
|
||||
|
||||
const GraphSegment *GraphItem::segment(qreal x, GraphType type) const
|
||||
{
|
||||
for (int i = 0; i < _graph.size(); i++)
|
||||
if (x <= _graph.at(i).last().x(type))
|
||||
return &(_graph.at(i));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
qreal GraphItem::yAtX(qreal x)
|
||||
{
|
||||
const GraphSegment *seg = segment(x, _type);
|
||||
if (!seg)
|
||||
return NAN;
|
||||
|
||||
int low = 0;
|
||||
int high = _graph.count() - 1;
|
||||
int high = seg->count() - 1;
|
||||
int mid = 0;
|
||||
|
||||
Q_ASSERT(high > low);
|
||||
Q_ASSERT(x >= _graph.at(low).x(_type) && x <= _graph.at(high).x(_type));
|
||||
if (!(x >= seg->at(low).x(_type) && x <= seg->at(high).x(_type)))
|
||||
return NAN;
|
||||
|
||||
while (low <= high) {
|
||||
mid = low + ((high - low) / 2);
|
||||
const GraphPoint &p = _graph.at(mid);
|
||||
const GraphPoint &p = seg->at(mid);
|
||||
if (p.x(_type) > x)
|
||||
high = mid - 1;
|
||||
else if (p.x(_type) < x)
|
||||
@ -110,58 +114,56 @@ qreal GraphItem::yAtX(qreal x)
|
||||
}
|
||||
|
||||
QLineF l;
|
||||
if (_graph.at(mid).x(_type) < x)
|
||||
l = QLineF(_graph.at(mid).x(_type), _graph.at(mid).y(),
|
||||
_graph.at(mid+1).x(_type), _graph.at(mid+1).y());
|
||||
if (seg->at(mid).x(_type) < x)
|
||||
l = QLineF(seg->at(mid).x(_type), seg->at(mid).y(),
|
||||
seg->at(mid+1).x(_type), seg->at(mid+1).y());
|
||||
else
|
||||
l = QLineF(_graph.at(mid-1).x(_type), _graph.at(mid-1).y(),
|
||||
_graph.at(mid).x(_type), _graph.at(mid).y());
|
||||
l = QLineF(seg->at(mid-1).x(_type), seg->at(mid-1).y(),
|
||||
seg->at(mid).x(_type), seg->at(mid).y());
|
||||
|
||||
return -l.pointAt((x - l.p1().x()) / (l.p2().x() - l.p1().x())).y();
|
||||
}
|
||||
|
||||
qreal GraphItem::distanceAtTime(qreal time)
|
||||
{
|
||||
const GraphSegment *seg = segment(time, Time);
|
||||
if (!seg)
|
||||
return NAN;
|
||||
|
||||
int low = 0;
|
||||
int high = _graph.count() - 1;
|
||||
int high = seg->count() - 1;
|
||||
int mid = 0;
|
||||
|
||||
Q_ASSERT(high > low);
|
||||
Q_ASSERT(time >= _graph.at(low).t() && time <= _graph.at(high).t());
|
||||
if (!(time >= seg->at(low).t() && time <= seg->at(high).t()))
|
||||
return NAN;
|
||||
|
||||
while (low <= high) {
|
||||
mid = low + ((high - low) / 2);
|
||||
const GraphPoint &p = _graph.at(mid);
|
||||
const GraphPoint &p = seg->at(mid);
|
||||
if (p.t() > time)
|
||||
high = mid - 1;
|
||||
else if (p.t() < time)
|
||||
low = mid + 1;
|
||||
else
|
||||
return _graph.at(mid).s();
|
||||
return seg->at(mid).s();
|
||||
}
|
||||
|
||||
QLineF l;
|
||||
if (_graph.at(mid).t() < time)
|
||||
l = QLineF(_graph.at(mid).t(), _graph.at(mid).s(), _graph.at(mid+1).t(),
|
||||
_graph.at(mid+1).s());
|
||||
if (seg->at(mid).t() < time)
|
||||
l = QLineF(seg->at(mid).t(), seg->at(mid).s(), seg->at(mid+1).t(),
|
||||
seg->at(mid+1).s());
|
||||
else
|
||||
l = QLineF(_graph.at(mid-1).t(), _graph.at(mid-1).s(),
|
||||
_graph.at(mid).t(), _graph.at(mid).s());
|
||||
l = QLineF(seg->at(mid-1).t(), seg->at(mid-1).s(),
|
||||
seg->at(mid).t(), seg->at(mid).s());
|
||||
|
||||
return l.pointAt((time - l.p1().x()) / (l.p2().x() - l.p1().x())).y();
|
||||
}
|
||||
|
||||
void GraphItem::emitSliderPositionChanged(qreal pos)
|
||||
{
|
||||
if (_type == Time) {
|
||||
if (_time) {
|
||||
if (pos >= _graph.first().t() && pos <= _graph.last().t())
|
||||
emit sliderPositionChanged(distanceAtTime(pos));
|
||||
else
|
||||
emit sliderPositionChanged(NAN);
|
||||
} else
|
||||
emit sliderPositionChanged(NAN);
|
||||
} else
|
||||
if (_type == Time)
|
||||
emit sliderPositionChanged(_time ? distanceAtTime(pos) : NAN);
|
||||
else
|
||||
emit sliderPositionChanged(pos);
|
||||
}
|
||||
|
||||
@ -197,9 +199,13 @@ void GraphItem::updatePath()
|
||||
if (_type == Time && !_time)
|
||||
return;
|
||||
|
||||
_path.moveTo(_graph.first().x(_type) * _sx, -_graph.first().y() * _sy);
|
||||
for (int i = 1; i < _graph.size(); i++)
|
||||
_path.lineTo(_graph.at(i).x(_type) * _sx, -_graph.at(i).y() * _sy);
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
const GraphSegment &segment = _graph.at(i);
|
||||
|
||||
_path.moveTo(segment.first().x(_type) * _sx, -segment.first().y() * _sy);
|
||||
for (int i = 1; i < segment.size(); i++)
|
||||
_path.lineTo(segment.at(i).x(_type) * _sx, -segment.at(i).y() * _sy);
|
||||
}
|
||||
}
|
||||
|
||||
void GraphItem::updateBounds()
|
||||
@ -211,18 +217,71 @@ void GraphItem::updateBounds()
|
||||
|
||||
qreal bottom, top, left, right;
|
||||
|
||||
QPointF p = QPointF(_graph.first().x(_type), -_graph.first().y());
|
||||
QPointF p = QPointF(_graph.first().first().x(_type),
|
||||
-_graph.first().first().y());
|
||||
bottom = p.y(); top = p.y(); left = p.x(); right = p.x();
|
||||
|
||||
for (int i = 1; i < _graph.size(); i++) {
|
||||
p = QPointF(_graph.at(i).x(_type), -_graph.at(i).y());
|
||||
bottom = qMax(bottom, p.y()); top = qMin(top, p.y());
|
||||
right = qMax(right, p.x()); left = qMin(left, p.x());
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
const GraphSegment &segment = _graph.at(i);
|
||||
|
||||
for (int j = 0; j < segment.size(); j++) {
|
||||
p = QPointF(segment.at(j).x(_type), -segment.at(j).y());
|
||||
bottom = qMax(bottom, p.y()); top = qMin(top, p.y());
|
||||
right = qMax(right, p.x()); left = qMin(left, p.x());
|
||||
}
|
||||
}
|
||||
|
||||
_bounds = QRectF(QPointF(left, top), QPointF(right, bottom));
|
||||
}
|
||||
|
||||
qreal GraphItem::max() const
|
||||
{
|
||||
qreal ret = _graph.first().first().y();
|
||||
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
const GraphSegment &segment = _graph.at(i);
|
||||
|
||||
for (int j = 0; j < segment.size(); j++) {
|
||||
qreal y = segment.at(j).y();
|
||||
if (y > ret)
|
||||
ret = y;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
qreal GraphItem::min() const
|
||||
{
|
||||
qreal ret = _graph.first().first().y();
|
||||
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
const GraphSegment &segment = _graph.at(i);
|
||||
|
||||
for (int j = 0; j < segment.size(); j++) {
|
||||
qreal y = segment.at(j).y();
|
||||
if (y < ret)
|
||||
ret = y;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
qreal GraphItem::avg() const
|
||||
{
|
||||
qreal sum = 0;
|
||||
|
||||
for (int i = 0; i < _graph.size(); i++) {
|
||||
const GraphSegment &segment = _graph.at(i);
|
||||
|
||||
for (int j = 1; j < segment.size(); j++)
|
||||
sum += segment.at(j).y() * (segment.at(j).s() - segment.at(j-1).s());
|
||||
}
|
||||
|
||||
return sum/_graph.last().last().s();
|
||||
}
|
||||
|
||||
void GraphItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
@ -21,6 +21,10 @@ public:
|
||||
|
||||
const QRectF &bounds() const {return _bounds;}
|
||||
|
||||
qreal max() const;
|
||||
qreal min() const;
|
||||
qreal avg() const;
|
||||
|
||||
void setScale(qreal sx, qreal sy);
|
||||
void setGraphType(GraphType type);
|
||||
int id() const {return _id;}
|
||||
@ -46,6 +50,7 @@ private:
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
const GraphSegment *segment(qreal x, GraphType type) const;
|
||||
void updatePath();
|
||||
void updateShape();
|
||||
void updateBounds();
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <QLocale>
|
||||
#include "data/graph.h"
|
||||
#include "opengl.h"
|
||||
#include "config.h"
|
||||
#include "axisitem.h"
|
||||
#include "slideritem.h"
|
||||
#include "sliderinfoitem.h"
|
||||
@ -28,16 +27,16 @@ GraphView::GraphView(QWidget *parent)
|
||||
_scene = new QGraphicsScene(this);
|
||||
setScene(_scene);
|
||||
|
||||
setBackgroundBrush(QBrush(Qt::white));
|
||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||
setRenderHint(QPainter::Antialiasing, true);
|
||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setBackgroundBrush(QBrush(palette().brush(QPalette::Base)));
|
||||
|
||||
_xAxis = new AxisItem(AxisItem::X);
|
||||
_xAxis->setZValue(2.0);
|
||||
_xAxis->setZValue(1.0);
|
||||
_yAxis = new AxisItem(AxisItem::Y);
|
||||
_yAxis->setZValue(2.0);
|
||||
_yAxis->setZValue(1.0);
|
||||
_slider = new SliderItem();
|
||||
_slider->setZValue(3.0);
|
||||
_sliderInfo = new SliderInfoItem(_slider);
|
||||
@ -522,3 +521,14 @@ void GraphView::setSliderColor(const QColor &color)
|
||||
_slider->setColor(color);
|
||||
_sliderInfo->setColor(color);
|
||||
}
|
||||
|
||||
void GraphView::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::PaletteChange) {
|
||||
_message->setBrush(QPalette().brush(QPalette::Disabled,
|
||||
QPalette::WindowText));
|
||||
setBackgroundBrush(QBrush(palette().brush(QPalette::Base)));
|
||||
}
|
||||
|
||||
QGraphicsView::changeEvent(e);
|
||||
}
|
||||
|
@ -70,6 +70,8 @@ protected:
|
||||
void clearInfo();
|
||||
void skipColor() {_palette.nextColor();}
|
||||
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
QList<GraphItem*> _graphs;
|
||||
GraphType _graphType;
|
||||
|
||||
|
203
src/GUI/gui.cpp
@ -1,4 +1,4 @@
|
||||
#include "config.h"
|
||||
#include "common/config.h"
|
||||
#include <QApplication>
|
||||
#include <QSplitter>
|
||||
#include <QVBoxLayout>
|
||||
@ -28,6 +28,7 @@
|
||||
#include <QScreen>
|
||||
#endif // ENABLE_HIDPI
|
||||
#include <QStyle>
|
||||
#include "common/programpaths.h"
|
||||
#include "data/data.h"
|
||||
#include "data/poi.h"
|
||||
#include "map/maplist.h"
|
||||
@ -87,6 +88,7 @@ GUI::GUI()
|
||||
_trackCount = 0;
|
||||
_routeCount = 0;
|
||||
_waypointCount = 0;
|
||||
_areaCount = 0;
|
||||
_trackDistance = 0;
|
||||
_routeDistance = 0;
|
||||
_time = 0;
|
||||
@ -108,14 +110,9 @@ GUI::GUI()
|
||||
void GUI::loadMaps()
|
||||
{
|
||||
_ml = new MapList(this);
|
||||
QString dir;
|
||||
QString mapDir(ProgramPaths::mapDir());
|
||||
|
||||
if (QFile::exists(USER_MAP_DIR))
|
||||
dir = USER_MAP_DIR;
|
||||
else if (QFile::exists(GLOBAL_MAP_DIR))
|
||||
dir = GLOBAL_MAP_DIR;
|
||||
|
||||
if (!dir.isNull() && !_ml->loadDir(dir))
|
||||
if (!mapDir.isNull() && !_ml->loadDir(mapDir))
|
||||
qWarning("%s", qPrintable(_ml->errorString()));
|
||||
|
||||
_map = new EmptyMap(this);
|
||||
@ -124,14 +121,9 @@ void GUI::loadMaps()
|
||||
void GUI::loadPOIs()
|
||||
{
|
||||
_poi = new POI(this);
|
||||
QString dir;
|
||||
QString poiDir(ProgramPaths::poiDir());
|
||||
|
||||
if (QFile::exists(USER_POI_DIR))
|
||||
dir = USER_POI_DIR;
|
||||
else if (QFile::exists(GLOBAL_POI_DIR))
|
||||
dir = GLOBAL_POI_DIR;
|
||||
|
||||
if (!dir.isNull() && !_poi->loadDir(dir))
|
||||
if (!poiDir.isNull() && !_poi->loadDir(poiDir))
|
||||
qWarning("%s", qPrintable(_poi->errorString()));
|
||||
}
|
||||
|
||||
@ -321,6 +313,11 @@ void GUI::createActions()
|
||||
_showMapAction->setEnabled(false);
|
||||
_clearMapCacheAction->setEnabled(false);
|
||||
}
|
||||
_showCoordinatesAction = new QAction(tr("Show cursor coordinates"), this);
|
||||
_showCoordinatesAction->setMenuRole(QAction::NoRole);
|
||||
_showCoordinatesAction->setCheckable(true);
|
||||
connect(_showCoordinatesAction, SIGNAL(triggered(bool)), _mapView,
|
||||
SLOT(showCoordinates(bool)));
|
||||
|
||||
// Data actions
|
||||
_showTracksAction = new QAction(tr("Show tracks"), this);
|
||||
@ -338,6 +335,11 @@ void GUI::createActions()
|
||||
_showWaypointsAction->setCheckable(true);
|
||||
connect(_showWaypointsAction, SIGNAL(triggered(bool)), _mapView,
|
||||
SLOT(showWaypoints(bool)));
|
||||
_showAreasAction = new QAction(tr("Show areas"), this);
|
||||
_showAreasAction->setMenuRole(QAction::NoRole);
|
||||
_showAreasAction->setCheckable(true);
|
||||
connect(_showAreasAction, SIGNAL(triggered(bool)), _mapView,
|
||||
SLOT(showAreas(bool)));
|
||||
_showWaypointLabelsAction = new QAction(tr("Waypoint labels"), this);
|
||||
_showWaypointLabelsAction->setMenuRole(QAction::NoRole);
|
||||
_showWaypointLabelsAction->setCheckable(true);
|
||||
@ -384,6 +386,11 @@ void GUI::createActions()
|
||||
_showGraphSliderInfoAction->setCheckable(true);
|
||||
connect(_showGraphSliderInfoAction, SIGNAL(triggered(bool)), this,
|
||||
SLOT(showGraphSliderInfo(bool)));
|
||||
_showMarkersAction = new QAction(tr("Show path markers"), this);
|
||||
_showMarkersAction->setMenuRole(QAction::NoRole);
|
||||
_showMarkersAction->setCheckable(true);
|
||||
connect(_showMarkersAction, SIGNAL(triggered(bool)), _mapView,
|
||||
SLOT(showMarkers(bool)));
|
||||
|
||||
// Settings actions
|
||||
_showToolbarsAction = new QAction(tr("Show toolbars"), this);
|
||||
@ -500,6 +507,8 @@ void GUI::createMenus()
|
||||
_mapMenu->addAction(_loadMapAction);
|
||||
_mapMenu->addAction(_clearMapCacheAction);
|
||||
_mapMenu->addSeparator();
|
||||
_mapMenu->addAction(_showCoordinatesAction);
|
||||
_mapMenu->addSeparator();
|
||||
_mapMenu->addAction(_showMapAction);
|
||||
|
||||
QMenu *graphMenu = menuBar()->addMenu(tr("&Graph"));
|
||||
@ -508,6 +517,7 @@ void GUI::createMenus()
|
||||
graphMenu->addSeparator();
|
||||
graphMenu->addAction(_showGraphGridAction);
|
||||
graphMenu->addAction(_showGraphSliderInfoAction);
|
||||
graphMenu->addAction(_showMarkersAction);
|
||||
graphMenu->addSeparator();
|
||||
graphMenu->addAction(_showGraphsAction);
|
||||
|
||||
@ -530,6 +540,7 @@ void GUI::createMenus()
|
||||
dataMenu->addSeparator();
|
||||
dataMenu->addAction(_showTracksAction);
|
||||
dataMenu->addAction(_showRoutesAction);
|
||||
dataMenu->addAction(_showAreasAction);
|
||||
dataMenu->addAction(_showWaypointsAction);
|
||||
|
||||
QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
|
||||
@ -567,6 +578,7 @@ void GUI::createToolBars()
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
_fileToolBar = addToolBar(tr("File"));
|
||||
_fileToolBar->setObjectName("File");
|
||||
_fileToolBar->setIconSize(iconSize);
|
||||
_fileToolBar->addAction(_openFileAction);
|
||||
_fileToolBar->addAction(_reloadFileAction);
|
||||
@ -574,12 +586,14 @@ void GUI::createToolBars()
|
||||
_fileToolBar->addAction(_printFileAction);
|
||||
|
||||
_showToolBar = addToolBar(tr("Show"));
|
||||
_showToolBar->setObjectName("Show");
|
||||
_showToolBar->setIconSize(iconSize);
|
||||
_showToolBar->addAction(_showPOIAction);
|
||||
_showToolBar->addAction(_showMapAction);
|
||||
_showToolBar->addAction(_showGraphsAction);
|
||||
|
||||
_navigationToolBar = addToolBar(tr("Navigation"));
|
||||
_navigationToolBar->setObjectName("Navigation");
|
||||
_navigationToolBar->setIconSize(iconSize);
|
||||
_navigationToolBar->addAction(_firstAction);
|
||||
_navigationToolBar->addAction(_prevAction);
|
||||
@ -702,19 +716,17 @@ void GUI::paths()
|
||||
msgBox.setWindowTitle(tr("Paths"));
|
||||
msgBox.setText("<h3>" + tr("Paths") + "</h3>");
|
||||
msgBox.setInformativeText(
|
||||
"<style>td {white-space: pre; padding-right: 1em;}</style><h4>"
|
||||
+ tr("Global") + "</h4><table><tr><td>" + tr("Map directory:")
|
||||
+ "</td><td><code>" + QDir::cleanPath(GLOBAL_MAP_DIR)
|
||||
+ "</code></td></tr><tr><td>" + tr("POI directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(GLOBAL_POI_DIR) + "</code></td></tr><tr><td>"
|
||||
"<style>td {white-space: pre; padding-right: 1em;}</style><table><tr><td>"
|
||||
+ tr("Map directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::mapDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("POI directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::poiDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("GCS/PCS directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(GLOBAL_CSV_DIR) + "</code></td></tr></table>"
|
||||
+ "<h4>" + tr("User-specific") + "</h4><table><tr><td>"
|
||||
+ tr("Map directory:") + "</td><td><code>" + QDir::cleanPath(USER_MAP_DIR)
|
||||
+ "</code></td></tr><tr><td>" + tr("POI directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(USER_POI_DIR) + "</code></td></tr><tr><td>"
|
||||
+ tr("GCS/PCS directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(USER_CSV_DIR) + "</code></td></tr></table>"
|
||||
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("DEM directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "</code></td></tr><tr><td>"
|
||||
+ tr("Tile cache directory:") + "</td><td><code>"
|
||||
+ QDir::cleanPath(ProgramPaths::tilesDir()) + "</code></td></tr></table>"
|
||||
);
|
||||
|
||||
msgBox.exec();
|
||||
@ -758,16 +770,17 @@ bool GUI::openFile(const QString &fileName)
|
||||
|
||||
bool GUI::loadFile(const QString &fileName)
|
||||
{
|
||||
Data data;
|
||||
Data data(fileName);
|
||||
QList<QList<GraphItem*> > graphs;
|
||||
QList<PathItem*> paths;
|
||||
|
||||
if (data.loadFile(fileName)) {
|
||||
if (data.isValid()) {
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
_trackDistance += data.tracks().at(i)->distance();
|
||||
_time += data.tracks().at(i)->time();
|
||||
_movingTime += data.tracks().at(i)->movingTime();
|
||||
const QDate &date = data.tracks().at(i)->date().date();
|
||||
const Track &track = data.tracks().at(i);
|
||||
_trackDistance += track.distance();
|
||||
_time += track.time();
|
||||
_movingTime += track.movingTime();
|
||||
const QDate &date = track.date().date();
|
||||
if (_dateRange.first.isNull() || _dateRange.first > date)
|
||||
_dateRange.first = date;
|
||||
if (_dateRange.second.isNull() || _dateRange.second < date)
|
||||
@ -776,16 +789,17 @@ bool GUI::loadFile(const QString &fileName)
|
||||
_trackCount += data.tracks().count();
|
||||
|
||||
for (int i = 0; i < data.routes().count(); i++)
|
||||
_routeDistance += data.routes().at(i)->distance();
|
||||
_routeDistance += data.routes().at(i).distance();
|
||||
_routeCount += data.routes().count();
|
||||
|
||||
_waypointCount += data.waypoints().count();
|
||||
_areaCount += data.areas().count();
|
||||
|
||||
if (_pathName.isNull()) {
|
||||
if (data.tracks().count() == 1 && !data.routes().count())
|
||||
_pathName = data.tracks().first()->name();
|
||||
_pathName = data.tracks().first().name();
|
||||
else if (data.routes().count() == 1 && !data.tracks().count())
|
||||
_pathName = data.routes().first()->name();
|
||||
_pathName = data.routes().first().name();
|
||||
} else
|
||||
_pathName = QString();
|
||||
|
||||
@ -886,6 +900,11 @@ void GUI::openOptions()
|
||||
Track::action(options.option); \
|
||||
reload = true; \
|
||||
}
|
||||
#define SET_DATA_OPTION(option, action) \
|
||||
if (options.option != _options.option) { \
|
||||
Data::action(options.option); \
|
||||
reload = true; \
|
||||
}
|
||||
|
||||
Options options(_options);
|
||||
bool reload = false;
|
||||
@ -899,8 +918,11 @@ void GUI::openOptions()
|
||||
SET_VIEW_OPTION(backgroundColor, setBackgroundColor);
|
||||
SET_VIEW_OPTION(trackWidth, setTrackWidth);
|
||||
SET_VIEW_OPTION(routeWidth, setRouteWidth);
|
||||
SET_VIEW_OPTION(areaWidth, setAreaWidth);
|
||||
SET_VIEW_OPTION(trackStyle, setTrackStyle);
|
||||
SET_VIEW_OPTION(routeStyle, setRouteStyle);
|
||||
SET_VIEW_OPTION(areaStyle, setAreaStyle);
|
||||
SET_VIEW_OPTION(areaOpacity, setAreaOpacity);
|
||||
SET_VIEW_OPTION(waypointSize, setWaypointSize);
|
||||
SET_VIEW_OPTION(waypointColor, setWaypointColor);
|
||||
SET_VIEW_OPTION(poiSize, setPOISize);
|
||||
@ -925,20 +947,27 @@ void GUI::openOptions()
|
||||
SET_TRACK_OPTION(pauseInterval, setPauseInterval);
|
||||
SET_TRACK_OPTION(useReportedSpeed, useReportedSpeed);
|
||||
|
||||
SET_DATA_OPTION(dataUseDEM, useDEM);
|
||||
|
||||
if (options.poiRadius != _options.poiRadius)
|
||||
_poi->setRadius(options.poiRadius);
|
||||
if (options.poiUseDEM != _options.poiUseDEM)
|
||||
_poi->useDEM(options.poiUseDEM);
|
||||
|
||||
if (options.pixmapCache != _options.pixmapCache)
|
||||
QPixmapCache::setCacheLimit(options.pixmapCache * 1024);
|
||||
|
||||
if (options.connectionTimeout != _options.connectionTimeout)
|
||||
Downloader::setTimeout(options.connectionTimeout);
|
||||
#ifdef ENABLE_HTTP2
|
||||
if (options.enableHTTP2 != _options.enableHTTP2)
|
||||
Downloader::enableHTTP2(options.enableHTTP2);
|
||||
#endif // ENABLE_HTTP2
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
if (options.hidpiMap != _options.hidpiMap)
|
||||
_mapView->setDevicePixelRatio(options.hidpiMap ? devicePixelRatioF()
|
||||
: 1.0);
|
||||
_mapView->setDevicePixelRatio(devicePixelRatioF(),
|
||||
options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
#endif // ENABLE_HIDPI
|
||||
|
||||
if (reload)
|
||||
@ -999,6 +1028,9 @@ void GUI::statistics()
|
||||
if (_showWaypointsAction->isChecked() && _waypointCount > 1)
|
||||
text.append("<tr><td>" + tr("Waypoints") + ":</td><td>"
|
||||
+ l.toString(_waypointCount) + "</td></tr>");
|
||||
if (_showAreasAction->isChecked() && _areaCount > 1)
|
||||
text.append("<tr><td>" + tr("Areas") + ":</td><td>"
|
||||
+ l.toString(_areaCount) + "</td></tr>");
|
||||
|
||||
if (_dateRange.first.isValid()) {
|
||||
if (_dateRange.first == _dateRange.second) {
|
||||
@ -1064,6 +1096,8 @@ void GUI::plot(QPrinter *printer)
|
||||
info.insert(tr("Routes"), l.toString(_routeCount));
|
||||
if (_showWaypointsAction->isChecked() && _waypointCount > 1)
|
||||
info.insert(tr("Waypoints"), l.toString(_waypointCount));
|
||||
if (_showAreasAction->isChecked() && _areaCount > 1)
|
||||
info.insert(tr("Areas"), l.toString(_areaCount));
|
||||
}
|
||||
|
||||
if (_dateRange.first.isValid() && _options.printDate) {
|
||||
@ -1137,6 +1171,7 @@ void GUI::reloadFile()
|
||||
_trackCount = 0;
|
||||
_routeCount = 0;
|
||||
_waypointCount = 0;
|
||||
_areaCount = 0;
|
||||
_trackDistance = 0;
|
||||
_routeDistance = 0;
|
||||
_time = 0;
|
||||
@ -1170,6 +1205,7 @@ void GUI::closeFiles()
|
||||
_trackCount = 0;
|
||||
_routeCount = 0;
|
||||
_waypointCount = 0;
|
||||
_areaCount = 0;
|
||||
_trackDistance = 0;
|
||||
_routeDistance = 0;
|
||||
_time = 0;
|
||||
@ -1205,13 +1241,11 @@ void GUI::showGraphs(bool show)
|
||||
void GUI::showToolbars(bool show)
|
||||
{
|
||||
if (show) {
|
||||
addToolBar(_fileToolBar);
|
||||
addToolBar(_showToolBar);
|
||||
addToolBar(_navigationToolBar);
|
||||
_fileToolBar->show();
|
||||
_showToolBar->show();
|
||||
_navigationToolBar->show();
|
||||
Q_ASSERT(!_windowStates.isEmpty());
|
||||
restoreState(_windowStates.last());
|
||||
_windowStates.pop_back();
|
||||
} else {
|
||||
_windowStates.append(saveState());
|
||||
removeToolBar(_fileToolBar);
|
||||
removeToolBar(_showToolBar);
|
||||
removeToolBar(_navigationToolBar);
|
||||
@ -1222,26 +1256,16 @@ void GUI::showFullscreen(bool show)
|
||||
{
|
||||
if (show) {
|
||||
_frameStyle = _mapView->frameStyle();
|
||||
_showGraphs = _showGraphsAction->isChecked();
|
||||
|
||||
statusBar()->hide();
|
||||
menuBar()->hide();
|
||||
showToolbars(false);
|
||||
showGraphs(false);
|
||||
_showGraphsAction->setChecked(false);
|
||||
_mapView->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
showFullScreen();
|
||||
} else {
|
||||
statusBar()->show();
|
||||
menuBar()->show();
|
||||
if (_showToolbarsAction->isChecked())
|
||||
showToolbars(true);
|
||||
_showGraphsAction->setChecked(_showGraphs);
|
||||
if (_showGraphsAction->isEnabled())
|
||||
showGraphs(_showGraphs);
|
||||
showToolbars(true);
|
||||
_mapView->setFrameStyle(_frameStyle);
|
||||
|
||||
showNormal();
|
||||
}
|
||||
}
|
||||
@ -1456,7 +1480,8 @@ bool GUI::updateMapView()
|
||||
if (_options.alwaysShowMap)
|
||||
_mapView->setHidden(false);
|
||||
else
|
||||
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount));
|
||||
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount
|
||||
+ _areaCount));
|
||||
|
||||
return (hidden != _mapView->isHidden());
|
||||
}
|
||||
@ -1611,11 +1636,13 @@ void GUI::dropEvent(QDropEvent *event)
|
||||
QList<QUrl> urls = event->mimeData()->urls();
|
||||
for (int i = 0; i < urls.size(); i++)
|
||||
openFile(urls.at(i).toLocalFile());
|
||||
|
||||
event->acceptProposedAction();
|
||||
}
|
||||
|
||||
void GUI::writeSettings()
|
||||
{
|
||||
QSettings settings(APP_NAME, APP_NAME);
|
||||
QSettings settings(qApp->applicationName(), qApp->applicationName());
|
||||
settings.clear();
|
||||
|
||||
settings.beginGroup(WINDOW_SETTINGS_GROUP);
|
||||
@ -1623,6 +1650,10 @@ void GUI::writeSettings()
|
||||
settings.setValue(WINDOW_SIZE_SETTING, size());
|
||||
if (pos() != WINDOW_POS_DEFAULT)
|
||||
settings.setValue(WINDOW_POS_SETTING, pos());
|
||||
if (_windowStates.isEmpty())
|
||||
settings.setValue(WINDOW_STATE_SETTING, saveState());
|
||||
else
|
||||
settings.setValue(WINDOW_STATE_SETTING, _windowStates.first());
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(SETTINGS_SETTINGS_GROUP);
|
||||
@ -1647,6 +1678,9 @@ void GUI::writeSettings()
|
||||
settings.setValue(CURRENT_MAP_SETTING, _map->name());
|
||||
if (_showMapAction->isChecked() != SHOW_MAP_DEFAULT)
|
||||
settings.setValue(SHOW_MAP_SETTING, _showMapAction->isChecked());
|
||||
if (_showCoordinatesAction->isChecked() != SHOW_COORDINATES_DEFAULT)
|
||||
settings.setValue(SHOW_COORDINATES_SETTING,
|
||||
_showCoordinatesAction->isChecked());
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(GRAPH_SETTINGS_GROUP);
|
||||
@ -1662,6 +1696,9 @@ void GUI::writeSettings()
|
||||
!= SHOW_GRAPH_SLIDER_INFO_DEFAULT)
|
||||
settings.setValue(SHOW_GRAPH_SLIDER_INFO_SETTING,
|
||||
_showGraphSliderInfoAction->isChecked());
|
||||
if (_showMarkersAction->isChecked() != SHOW_MARKERS_DEFAULT)
|
||||
settings.setValue(SHOW_MARKERS_SETTING,
|
||||
_showMarkersAction->isChecked());
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(POI_SETTINGS_GROUP);
|
||||
@ -1691,6 +1728,8 @@ void GUI::writeSettings()
|
||||
if (_showWaypointsAction->isChecked() != SHOW_WAYPOINTS_DEFAULT)
|
||||
settings.setValue(SHOW_WAYPOINTS_SETTING,
|
||||
_showWaypointsAction->isChecked());
|
||||
if (_showAreasAction->isChecked() != SHOW_AREAS_DEFAULT)
|
||||
settings.setValue(SHOW_AREAS_SETTING, _showAreasAction->isChecked());
|
||||
if (_showWaypointLabelsAction->isChecked() != SHOW_WAYPOINT_LABELS_DEFAULT)
|
||||
settings.setValue(SHOW_WAYPOINT_LABELS_SETTING,
|
||||
_showWaypointLabelsAction->isChecked());
|
||||
@ -1731,10 +1770,16 @@ void GUI::writeSettings()
|
||||
settings.setValue(TRACK_WIDTH_SETTING, _options.trackWidth);
|
||||
if (_options.routeWidth != ROUTE_WIDTH_DEFAULT)
|
||||
settings.setValue(ROUTE_WIDTH_SETTING, _options.routeWidth);
|
||||
if (_options.areaWidth != AREA_WIDTH_DEFAULT)
|
||||
settings.setValue(AREA_WIDTH_SETTING, _options.areaWidth);
|
||||
if (_options.trackStyle != TRACK_STYLE_DEFAULT)
|
||||
settings.setValue(TRACK_STYLE_SETTING, (int)_options.trackStyle);
|
||||
if (_options.routeStyle != ROUTE_STYLE_DEFAULT)
|
||||
settings.setValue(ROUTE_STYLE_SETTING, (int)_options.routeStyle);
|
||||
if (_options.areaStyle != AREA_STYLE_DEFAULT)
|
||||
settings.setValue(AREA_STYLE_SETTING, (int)_options.areaStyle);
|
||||
if (_options.areaOpacity != AREA_OPACITY_DEFAULT)
|
||||
settings.setValue(AREA_OPACITY_SETTING, (int)_options.areaOpacity);
|
||||
if (_options.waypointSize != WAYPOINT_SIZE_DEFAULT)
|
||||
settings.setValue(WAYPOINT_SIZE_SETTING, _options.waypointSize);
|
||||
if (_options.waypointColor != WAYPOINT_COLOR_DEFAULT)
|
||||
@ -1767,8 +1812,12 @@ void GUI::writeSettings()
|
||||
settings.setValue(PAUSE_INTERVAL_SETTING, _options.pauseInterval);
|
||||
if (_options.useReportedSpeed != USE_REPORTED_SPEED_DEFAULT)
|
||||
settings.setValue(USE_REPORTED_SPEED_SETTING, _options.useReportedSpeed);
|
||||
if (_options.dataUseDEM != DATA_USE_DEM_DEFAULT)
|
||||
settings.setValue(DATA_USE_DEM_SETTING, _options.dataUseDEM);
|
||||
if (_options.poiRadius != POI_RADIUS_DEFAULT)
|
||||
settings.setValue(POI_RADIUS_SETTING, _options.poiRadius);
|
||||
if (_options.poiUseDEM != POI_USE_DEM_DEFAULT)
|
||||
settings.setValue(POI_USE_DEM_SETTING, _options.poiUseDEM);
|
||||
if (_options.useOpenGL != USE_OPENGL_DEFAULT)
|
||||
settings.setValue(USE_OPENGL_SETTING, _options.useOpenGL);
|
||||
#ifdef ENABLE_HTTP2
|
||||
@ -1810,11 +1859,12 @@ void GUI::writeSettings()
|
||||
void GUI::readSettings()
|
||||
{
|
||||
int value;
|
||||
QSettings settings(APP_NAME, APP_NAME);
|
||||
QSettings settings(qApp->applicationName(), qApp->applicationName());
|
||||
|
||||
settings.beginGroup(WINDOW_SETTINGS_GROUP);
|
||||
resize(settings.value(WINDOW_SIZE_SETTING, WINDOW_SIZE_DEFAULT).toSize());
|
||||
move(settings.value(WINDOW_POS_SETTING, WINDOW_POS_DEFAULT).toPoint());
|
||||
restoreState(settings.value(WINDOW_STATE_SETTING).toByteArray());
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(SETTINGS_SETTINGS_GROUP);
|
||||
@ -1855,6 +1905,11 @@ void GUI::readSettings()
|
||||
int index = mapIndex(settings.value(CURRENT_MAP_SETTING).toString());
|
||||
_mapActions.at(index)->trigger();
|
||||
}
|
||||
if (settings.value(SHOW_COORDINATES_SETTING, SHOW_COORDINATES_DEFAULT)
|
||||
.toBool()) {
|
||||
_showCoordinatesAction->setChecked(true);
|
||||
_mapView->showCoordinates(true);
|
||||
}
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(GRAPH_SETTINGS_GROUP);
|
||||
@ -1878,6 +1933,10 @@ void GUI::readSettings()
|
||||
showGraphSliderInfo(false);
|
||||
else
|
||||
_showGraphSliderInfoAction->setChecked(true);
|
||||
if (!settings.value(SHOW_MARKERS_SETTING, SHOW_MARKERS_DEFAULT).toBool())
|
||||
_mapView->showMarkers(false);
|
||||
else
|
||||
_showMarkersAction->setChecked(true);
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup(POI_SETTINGS_GROUP);
|
||||
@ -1926,6 +1985,10 @@ void GUI::readSettings()
|
||||
_mapView->showWaypoints(false);
|
||||
else
|
||||
_showWaypointsAction->setChecked(true);
|
||||
if (!settings.value(SHOW_AREAS_SETTING, SHOW_AREAS_DEFAULT).toBool())
|
||||
_mapView->showAreas(false);
|
||||
else
|
||||
_showAreasAction->setChecked(true);
|
||||
if (!settings.value(SHOW_WAYPOINT_LABELS_SETTING,
|
||||
SHOW_WAYPOINT_LABELS_DEFAULT).toBool())
|
||||
_mapView->showWaypointLabels(false);
|
||||
@ -1971,10 +2034,16 @@ void GUI::readSettings()
|
||||
TRACK_WIDTH_DEFAULT).toInt();
|
||||
_options.routeWidth = settings.value(ROUTE_WIDTH_SETTING,
|
||||
ROUTE_WIDTH_DEFAULT).toInt();
|
||||
_options.areaWidth = settings.value(AREA_WIDTH_SETTING,
|
||||
AREA_WIDTH_DEFAULT).toInt();
|
||||
_options.trackStyle = (Qt::PenStyle) settings.value(TRACK_STYLE_SETTING,
|
||||
(int)TRACK_STYLE_DEFAULT).toInt();
|
||||
_options.routeStyle = (Qt::PenStyle) settings.value(ROUTE_STYLE_SETTING,
|
||||
(int)ROUTE_STYLE_DEFAULT).toInt();
|
||||
_options.areaStyle = (Qt::PenStyle) settings.value(AREA_STYLE_SETTING,
|
||||
(int)AREA_STYLE_DEFAULT).toInt();
|
||||
_options.areaOpacity = settings.value(AREA_OPACITY_SETTING,
|
||||
AREA_OPACITY_DEFAULT).toInt();
|
||||
_options.pathAntiAliasing = settings.value(PATH_AA_SETTING, PATH_AA_DEFAULT)
|
||||
.toBool();
|
||||
_options.waypointSize = settings.value(WAYPOINT_SIZE_SETTING,
|
||||
@ -2005,10 +2074,14 @@ void GUI::readSettings()
|
||||
PAUSE_SPEED_DEFAULT).toFloat();
|
||||
_options.useReportedSpeed = settings.value(USE_REPORTED_SPEED_SETTING,
|
||||
USE_REPORTED_SPEED_DEFAULT).toBool();
|
||||
_options.dataUseDEM = settings.value(DATA_USE_DEM_SETTING,
|
||||
DATA_USE_DEM_DEFAULT).toBool();
|
||||
_options.pauseInterval = settings.value(PAUSE_INTERVAL_SETTING,
|
||||
PAUSE_INTERVAL_DEFAULT).toInt();
|
||||
_options.poiRadius = settings.value(POI_RADIUS_SETTING, POI_RADIUS_DEFAULT)
|
||||
.toInt();
|
||||
_options.poiUseDEM = settings.value(POI_USE_DEM_SETTING,
|
||||
POI_USE_DEM_DEFAULT).toBool();
|
||||
_options.useOpenGL = settings.value(USE_OPENGL_SETTING, USE_OPENGL_DEFAULT)
|
||||
.toBool();
|
||||
#ifdef ENABLE_HTTP2
|
||||
@ -2049,8 +2122,11 @@ void GUI::readSettings()
|
||||
_mapView->setBackgroundColor(_options.backgroundColor);
|
||||
_mapView->setTrackWidth(_options.trackWidth);
|
||||
_mapView->setRouteWidth(_options.routeWidth);
|
||||
_mapView->setAreaWidth(_options.areaWidth);
|
||||
_mapView->setTrackStyle(_options.trackStyle);
|
||||
_mapView->setRouteStyle(_options.routeStyle);
|
||||
_mapView->setAreaStyle(_options.areaStyle);
|
||||
_mapView->setAreaOpacity(_options.areaOpacity);
|
||||
_mapView->setWaypointSize(_options.waypointSize);
|
||||
_mapView->setWaypointColor(_options.waypointColor);
|
||||
_mapView->setPOISize(_options.poiSize);
|
||||
@ -2060,7 +2136,8 @@ void GUI::readSettings()
|
||||
if (_options.useOpenGL)
|
||||
_mapView->useOpenGL(true);
|
||||
#ifdef ENABLE_HIDPI
|
||||
_mapView->setDevicePixelRatio(_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
_mapView->setDevicePixelRatio(devicePixelRatioF(),
|
||||
_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
#endif // ENABLE_HIDPI
|
||||
|
||||
for (int i = 0; i < _tabs.count(); i++) {
|
||||
@ -2082,8 +2159,10 @@ void GUI::readSettings()
|
||||
Track::setPauseSpeed(_options.pauseSpeed);
|
||||
Track::setPauseInterval(_options.pauseInterval);
|
||||
Track::useReportedSpeed(_options.useReportedSpeed);
|
||||
Data::useDEM(_options.dataUseDEM);
|
||||
|
||||
_poi->setRadius(_options.poiRadius);
|
||||
_poi->useDEM(_options.poiUseDEM);
|
||||
|
||||
QPixmapCache::setCacheLimit(_options.pixmapCache * 1024);
|
||||
|
||||
@ -2143,7 +2222,8 @@ void GUI::show()
|
||||
void GUI::screenChanged(QScreen *screen)
|
||||
{
|
||||
#ifdef ENABLE_HIDPI
|
||||
_mapView->setDevicePixelRatio(_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
_mapView->setDevicePixelRatio(devicePixelRatioF(),
|
||||
_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
|
||||
disconnect(SIGNAL(logicalDotsPerInchChanged(qreal)), this,
|
||||
SLOT(logicalDotsPerInchChanged(qreal)));
|
||||
@ -2159,6 +2239,7 @@ void GUI::logicalDotsPerInchChanged(qreal dpi)
|
||||
Q_UNUSED(dpi)
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
_mapView->setDevicePixelRatio(_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
_mapView->setDevicePixelRatio(devicePixelRatioF(),
|
||||
_options.hidpiMap ? devicePixelRatioF() : 1.0);
|
||||
#endif // ENBLE_HIDPI
|
||||
}
|
||||
|
@ -190,7 +190,10 @@ private:
|
||||
QAction *_showRoutesAction;
|
||||
QAction *_showWaypointsAction;
|
||||
QAction *_showWaypointLabelsAction;
|
||||
QAction *_showAreasAction;
|
||||
QAction *_showRouteWaypointsAction;
|
||||
QAction *_showMarkersAction;
|
||||
QAction *_showCoordinatesAction;
|
||||
QAction *_openOptionsAction;
|
||||
QAction *_mapsEnd;
|
||||
QList<QAction*> _mapActions;
|
||||
@ -215,20 +218,16 @@ private:
|
||||
FileBrowser *_browser;
|
||||
QList<QString> _files;
|
||||
|
||||
int _trackCount;
|
||||
int _routeCount;
|
||||
int _waypointCount;
|
||||
qreal _trackDistance;
|
||||
qreal _routeDistance;
|
||||
qreal _time;
|
||||
qreal _movingTime;
|
||||
int _trackCount, _routeCount, _areaCount, _waypointCount;
|
||||
qreal _trackDistance, _routeDistance;
|
||||
qreal _time, _movingTime;
|
||||
DateRange _dateRange;
|
||||
QString _pathName;
|
||||
|
||||
qreal _sliderPos;
|
||||
|
||||
QList<QByteArray> _windowStates;
|
||||
int _frameStyle;
|
||||
bool _showGraphs;
|
||||
|
||||
Export _export;
|
||||
Options _options;
|
||||
|
@ -32,15 +32,16 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Graph &graph = data.tracks().at(i)->heartRate();
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.heartRate();
|
||||
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
HeartRateGraphItem *gi = new HeartRateGraphItem(graph, _graphType);
|
||||
GraphView::addGraph(gi);
|
||||
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
|
||||
_avg.append(QPointF(track.distance(), gi->avg()));
|
||||
graphs.append(gi);
|
||||
}
|
||||
}
|
||||
@ -50,6 +51,9 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
|
||||
graphs.append(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
||||
|
@ -6,12 +6,6 @@
|
||||
HeartRateGraphItem::HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,8 @@ public:
|
||||
HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
};
|
||||
|
||||
#endif // HEARTRATEGRAPHITEM_H
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "infoitem.h"
|
||||
|
||||
#define PADDING 10
|
||||
|
@ -11,7 +11,9 @@
|
||||
#include "trackitem.h"
|
||||
#include "routeitem.h"
|
||||
#include "waypointitem.h"
|
||||
#include "areaitem.h"
|
||||
#include "scaleitem.h"
|
||||
#include "coordinatesitem.h"
|
||||
#include "keys.h"
|
||||
#include "mapview.h"
|
||||
|
||||
@ -20,6 +22,8 @@
|
||||
#define MIN_DIGITAL_ZOOM -3
|
||||
#define MARGIN 10
|
||||
#define SCALE_OFFSET 7
|
||||
#define COORDINATES_OFFSET SCALE_OFFSET
|
||||
|
||||
|
||||
MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
: QGraphicsView(parent)
|
||||
@ -35,10 +39,15 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setRenderHint(QPainter::Antialiasing, true);
|
||||
setAcceptDrops(false);
|
||||
setMouseTracking(true);
|
||||
|
||||
_mapScale = new ScaleItem();
|
||||
_mapScale->setZValue(2.0);
|
||||
_scene->addItem(_mapScale);
|
||||
_coordinates = new CoordinatesItem();
|
||||
_coordinates->setZValue(2.0);
|
||||
_coordinates->setVisible(false);
|
||||
_scene->addItem(_coordinates);
|
||||
|
||||
_map = map;
|
||||
_map->load();
|
||||
@ -49,19 +58,21 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
|
||||
_units = Metric;
|
||||
_coordinatesFormat = DecimalDegrees;
|
||||
_opacity = 1.0;
|
||||
_mapOpacity = 1.0;
|
||||
_backgroundColor = Qt::white;
|
||||
_markerColor = Qt::red;
|
||||
|
||||
_showMap = true;
|
||||
_showTracks = true;
|
||||
_showRoutes = true;
|
||||
_showAreas = true;
|
||||
_showWaypoints = true;
|
||||
_showWaypointLabels = true;
|
||||
_showPOI = true;
|
||||
_showPOILabels = true;
|
||||
_overlapPOIs = true;
|
||||
_showRouteWaypoints = true;
|
||||
_showMarkers = true;
|
||||
_trackWidth = 3;
|
||||
_routeWidth = 3;
|
||||
_trackStyle = Qt::SolidLine;
|
||||
@ -72,7 +83,8 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
_poiColor = Qt::black;
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
_ratio = 1.0;
|
||||
_deviceRatio = 1.0;
|
||||
_mapRatio = 1.0;
|
||||
#endif // ENABLE_HIDPI
|
||||
_opengl = false;
|
||||
_plot = false;
|
||||
@ -90,12 +102,13 @@ void MapView::centerOn(const QPointF &pos)
|
||||
QRectF vr(mapToScene(viewport()->rect()).boundingRect());
|
||||
_res = _map->resolution(vr);
|
||||
_mapScale->setResolution(_res);
|
||||
_coordinates->setCoordinates(Coordinates());
|
||||
}
|
||||
|
||||
PathItem *MapView::addTrack(const Track &track)
|
||||
{
|
||||
if (track.isNull()) {
|
||||
_palette.nextColor();
|
||||
if (!track.isValid()) {
|
||||
skipColor();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -109,6 +122,7 @@ PathItem *MapView::addTrack(const Track &track)
|
||||
ti->setVisible(_showTracks);
|
||||
ti->setDigitalZoom(_digitalZoom);
|
||||
ti->setMarkerColor(_markerColor);
|
||||
ti->showMarker(_showMarkers);
|
||||
_scene->addItem(ti);
|
||||
|
||||
if (_showTracks)
|
||||
@ -119,8 +133,8 @@ PathItem *MapView::addTrack(const Track &track)
|
||||
|
||||
PathItem *MapView::addRoute(const Route &route)
|
||||
{
|
||||
if (route.isNull()) {
|
||||
_palette.nextColor();
|
||||
if (!route.isValid()) {
|
||||
skipColor();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -137,6 +151,7 @@ PathItem *MapView::addRoute(const Route &route)
|
||||
ri->showWaypointLabels(_showWaypointLabels);
|
||||
ri->setDigitalZoom(_digitalZoom);
|
||||
ri->setMarkerColor(_markerColor);
|
||||
ri->showMarker(_showMarkers);
|
||||
_scene->addItem(ri);
|
||||
|
||||
if (_showRoutes)
|
||||
@ -145,7 +160,29 @@ PathItem *MapView::addRoute(const Route &route)
|
||||
return ri;
|
||||
}
|
||||
|
||||
void MapView::addWaypoints(const QList<Waypoint> &waypoints)
|
||||
void MapView::addArea(const Area &area)
|
||||
{
|
||||
if (!area.isValid()) {
|
||||
skipColor();
|
||||
return;
|
||||
}
|
||||
|
||||
AreaItem *ai = new AreaItem(area, _map);
|
||||
_areas.append(ai);
|
||||
_ar |= ai->area().boundingRect();
|
||||
ai->setColor(_palette.nextColor());
|
||||
ai->setWidth(_areaWidth);
|
||||
ai->setStyle(_areaStyle);
|
||||
ai->setOpacity(_areaOpacity);
|
||||
ai->setDigitalZoom(_digitalZoom);
|
||||
ai->setVisible(_showAreas);
|
||||
_scene->addItem(ai);
|
||||
|
||||
if (_showAreas)
|
||||
addPOI(_poi->points(ai->area()));
|
||||
}
|
||||
|
||||
void MapView::addWaypoints(const QVector<Waypoint> &waypoints)
|
||||
{
|
||||
for (int i = 0; i < waypoints.count(); i++) {
|
||||
const Waypoint &w = waypoints.at(i);
|
||||
@ -173,12 +210,15 @@ QList<PathItem *> MapView::loadData(const Data &data)
|
||||
int zoom = _map->zoom();
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++)
|
||||
paths.append(addTrack(*(data.tracks().at(i))));
|
||||
paths.append(addTrack(data.tracks().at(i)));
|
||||
for (int i = 0; i < data.routes().count(); i++)
|
||||
paths.append(addRoute(*(data.routes().at(i))));
|
||||
paths.append(addRoute(data.routes().at(i)));
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
addArea(data.areas().at(i));
|
||||
addWaypoints(data.waypoints());
|
||||
|
||||
if (_tracks.empty() && _routes.empty() && _waypoints.empty())
|
||||
if (_tracks.empty() && _routes.empty() && _waypoints.empty()
|
||||
&& _areas.empty())
|
||||
return paths;
|
||||
|
||||
if (fitMapZoom() != zoom)
|
||||
@ -193,7 +233,7 @@ QList<PathItem *> MapView::loadData(const Data &data)
|
||||
|
||||
int MapView::fitMapZoom() const
|
||||
{
|
||||
RectC br = _tr | _rr | _wr;
|
||||
RectC br = _tr | _rr | _wr | _ar;
|
||||
|
||||
return _map->zoomFit(viewport()->size() - QSize(2*MARGIN, 2*MARGIN),
|
||||
br.isNull() ? RectC(_map->xy2ll(_map->bounds().topLeft()),
|
||||
@ -202,7 +242,7 @@ int MapView::fitMapZoom() const
|
||||
|
||||
QPointF MapView::contentCenter() const
|
||||
{
|
||||
RectC br = _tr | _rr | _wr;
|
||||
RectC br = _tr | _rr | _wr | _ar;
|
||||
|
||||
return br.isNull() ? sceneRect().center() : _map->ll2xy(br.center());
|
||||
}
|
||||
@ -237,6 +277,8 @@ void MapView::rescale()
|
||||
_tracks.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _areas.size(); i++)
|
||||
_areas.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _waypoints.size(); i++)
|
||||
_waypoints.at(i)->setMap(_map);
|
||||
|
||||
@ -256,6 +298,8 @@ void MapView::setPalette(const Palette &palette)
|
||||
_tracks.at(i)->setColor(_palette.nextColor());
|
||||
for (int i = 0; i < _routes.count(); i++)
|
||||
_routes.at(i)->setColor(_palette.nextColor());
|
||||
for (int i = 0; i < _areas.count(); i++)
|
||||
_areas.at(i)->setColor(_palette.nextColor());
|
||||
}
|
||||
|
||||
void MapView::setMap(Map *map)
|
||||
@ -270,7 +314,7 @@ void MapView::setMap(Map *map)
|
||||
_map = map;
|
||||
_map->load();
|
||||
#ifdef ENABLE_HIDPI
|
||||
_map->setDevicePixelRatio(_ratio);
|
||||
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
|
||||
#endif // ENABLE_HIDPI
|
||||
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
|
||||
|
||||
@ -283,6 +327,8 @@ void MapView::setMap(Map *map)
|
||||
_tracks.at(i)->setMap(map);
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->setMap(map);
|
||||
for (int i = 0; i < _areas.size(); i++)
|
||||
_areas.at(i)->setMap(map);
|
||||
for (int i = 0; i < _waypoints.size(); i++)
|
||||
_waypoints.at(i)->setMap(map);
|
||||
|
||||
@ -325,6 +371,9 @@ void MapView::updatePOI()
|
||||
if (_showRoutes)
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
addPOI(_poi->points(_routes.at(i)->path()));
|
||||
if (_showAreas)
|
||||
for (int i = 0; i < _areas.size(); i++)
|
||||
addPOI(_poi->points(_areas.at(i)->area()));
|
||||
if (_showWaypoints)
|
||||
for (int i = 0; i< _waypoints.size(); i++)
|
||||
addPOI(_poi->points(_waypoints.at(i)->waypoint()));
|
||||
@ -382,6 +431,8 @@ void MapView::setCoordinatesFormat(CoordinatesFormat format)
|
||||
|
||||
_coordinatesFormat = format;
|
||||
|
||||
_coordinates->setFormat(_coordinatesFormat);
|
||||
|
||||
for (int i = 0; i < _waypoints.count(); i++)
|
||||
_waypoints.at(i)->setToolTipFormat(_units, _coordinatesFormat);
|
||||
for (int i = 0; i < _routes.count(); i++)
|
||||
@ -417,6 +468,8 @@ void MapView::digitalZoom(int zoom)
|
||||
_tracks.at(i)->setDigitalZoom(_digitalZoom);
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->setDigitalZoom(_digitalZoom);
|
||||
for (int i = 0; i < _areas.size(); i++)
|
||||
_areas.at(i)->setDigitalZoom(_digitalZoom);
|
||||
for (int i = 0; i < _waypoints.size(); i++)
|
||||
_waypoints.at(i)->setDigitalZoom(_digitalZoom);
|
||||
for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
|
||||
@ -438,10 +491,10 @@ void MapView::zoom(int zoom, const QPoint &pos)
|
||||
digitalZoom(zoom);
|
||||
} else {
|
||||
Coordinates c = _map->xy2ll(mapToScene(pos));
|
||||
qreal os = _map->zoom();
|
||||
qreal ns = (zoom > 0) ? _map->zoomIn() : _map->zoomOut();
|
||||
int oz = _map->zoom();
|
||||
int nz = (zoom > 0) ? _map->zoomIn() : _map->zoomOut();
|
||||
|
||||
if (ns != os) {
|
||||
if (nz != oz) {
|
||||
rescale();
|
||||
centerOn(_map->ll2xy(c) - (pos - viewport()->rect().center()));
|
||||
} else {
|
||||
@ -505,7 +558,7 @@ void MapView::plot(QPainter *painter, const QRectF &target, qreal scale,
|
||||
setUpdatesEnabled(false);
|
||||
_plot = true;
|
||||
#ifdef ENABLE_HIDPI
|
||||
_map->setDevicePixelRatio(1.0);
|
||||
_map->setDevicePixelRatio(_deviceRatio, 1.0);
|
||||
#endif // ENABLE_HIDPI
|
||||
|
||||
// Compute sizes & ratios
|
||||
@ -534,7 +587,7 @@ void MapView::plot(QPainter *painter, const QRectF &target, qreal scale,
|
||||
painter->device()->logicalDpiY()
|
||||
/ (qreal)metric(QPaintDevice::PdmDpiY));
|
||||
adj = QRect(0, 0, adj.width() * s.x(), adj.height() * s.y());
|
||||
_map->zoomFit(adj.size(), _tr | _rr | _wr);
|
||||
_map->zoomFit(adj.size(), _tr | _rr | _wr | _ar);
|
||||
rescale();
|
||||
|
||||
QPointF center = contentCenter();
|
||||
@ -566,7 +619,7 @@ void MapView::plot(QPainter *painter, const QRectF &target, qreal scale,
|
||||
|
||||
// Exit plot mode
|
||||
#ifdef ENABLE_HIDPI
|
||||
_map->setDevicePixelRatio(_ratio);
|
||||
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
|
||||
#endif // ENABLE_HIDPI
|
||||
_plot = false;
|
||||
setUpdatesEnabled(true);
|
||||
@ -577,17 +630,21 @@ void MapView::clear()
|
||||
_pois.clear();
|
||||
_tracks.clear();
|
||||
_routes.clear();
|
||||
_areas.clear();
|
||||
_waypoints.clear();
|
||||
|
||||
_scene->removeItem(_mapScale);
|
||||
_scene->removeItem(_coordinates);
|
||||
_scene->clear();
|
||||
_scene->addItem(_mapScale);
|
||||
_scene->addItem(_coordinates);
|
||||
|
||||
_palette.reset();
|
||||
|
||||
_tr = RectC();
|
||||
_rr = RectC();
|
||||
_wr = RectC();
|
||||
_ar = RectC();
|
||||
|
||||
digitalZoom(0);
|
||||
|
||||
@ -625,13 +682,22 @@ void MapView::showWaypoints(bool show)
|
||||
updatePOI();
|
||||
}
|
||||
|
||||
void MapView::showAreas(bool show)
|
||||
{
|
||||
_showAreas = show;
|
||||
|
||||
for (int i = 0; i < _areas.count(); i++)
|
||||
_areas.at(i)->setVisible(show);
|
||||
|
||||
updatePOI();
|
||||
}
|
||||
|
||||
void MapView::showWaypointLabels(bool show)
|
||||
{
|
||||
_showWaypointLabels = show;
|
||||
|
||||
for (int i = 0; i < _waypoints.size(); i++)
|
||||
_waypoints.at(i)->showLabel(show);
|
||||
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->showWaypointLabels(show);
|
||||
}
|
||||
@ -644,6 +710,16 @@ void MapView::showRouteWaypoints(bool show)
|
||||
_routes.at(i)->showWaypoints(show);
|
||||
}
|
||||
|
||||
void MapView::showMarkers(bool show)
|
||||
{
|
||||
_showMarkers = show;
|
||||
|
||||
for (int i = 0; i < _tracks.size(); i++)
|
||||
_tracks.at(i)->showMarker(show);
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->showMarker(show);
|
||||
}
|
||||
|
||||
void MapView::showMap(bool show)
|
||||
{
|
||||
_showMap = show;
|
||||
@ -672,6 +748,11 @@ void MapView::showPOILabels(bool show)
|
||||
updatePOIVisibility();
|
||||
}
|
||||
|
||||
void MapView::showCoordinates(bool show)
|
||||
{
|
||||
_coordinates->setVisible(show);
|
||||
}
|
||||
|
||||
void MapView::setPOIOverlap(bool overlap)
|
||||
{
|
||||
_overlapPOIs = overlap;
|
||||
@ -695,6 +776,14 @@ void MapView::setRouteWidth(int width)
|
||||
_routes.at(i)->setWidth(width);
|
||||
}
|
||||
|
||||
void MapView::setAreaWidth(int width)
|
||||
{
|
||||
_areaWidth = width;
|
||||
|
||||
for (int i = 0; i < _areas.count(); i++)
|
||||
_areas.at(i)->setWidth(width);
|
||||
}
|
||||
|
||||
void MapView::setTrackStyle(Qt::PenStyle style)
|
||||
{
|
||||
_trackStyle = style;
|
||||
@ -711,6 +800,22 @@ void MapView::setRouteStyle(Qt::PenStyle style)
|
||||
_routes.at(i)->setStyle(style);
|
||||
}
|
||||
|
||||
void MapView::setAreaStyle(Qt::PenStyle style)
|
||||
{
|
||||
_areaStyle = style;
|
||||
|
||||
for (int i = 0; i < _areas.count(); i++)
|
||||
_areas.at(i)->setStyle(style);
|
||||
}
|
||||
|
||||
void MapView::setAreaOpacity(int opacity)
|
||||
{
|
||||
_areaOpacity = opacity / 100.0;
|
||||
|
||||
for (int i = 0; i < _areas.count(); i++)
|
||||
_areas.at(i)->setOpacity(_areaOpacity);
|
||||
}
|
||||
|
||||
void MapView::setWaypointSize(int size)
|
||||
{
|
||||
_waypointSize = size;
|
||||
@ -749,7 +854,7 @@ void MapView::setPOIColor(const QColor &color)
|
||||
|
||||
void MapView::setMapOpacity(int opacity)
|
||||
{
|
||||
_opacity = opacity / 100.0;
|
||||
_mapOpacity = opacity / 100.0;
|
||||
reloadMap();
|
||||
}
|
||||
|
||||
@ -767,8 +872,8 @@ void MapView::drawBackground(QPainter *painter, const QRectF &rect)
|
||||
QRectF ir = rect.intersected(_map->bounds());
|
||||
Map::Flags flags = Map::NoFlags;
|
||||
|
||||
if (_opacity < 1.0)
|
||||
painter->setOpacity(_opacity);
|
||||
if (_mapOpacity < 1.0)
|
||||
painter->setOpacity(_mapOpacity);
|
||||
|
||||
if (_plot)
|
||||
flags = Map::Block;
|
||||
@ -792,11 +897,18 @@ void MapView::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void MapView::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPointF scenePos = mapToScene(rect().bottomRight() + QPoint(
|
||||
QPointF scaleScenePos = mapToScene(rect().bottomRight() + QPoint(
|
||||
-(SCALE_OFFSET + _mapScale->boundingRect().width()),
|
||||
-(SCALE_OFFSET + _mapScale->boundingRect().height())));
|
||||
if (_mapScale->pos() != scenePos && !_plot)
|
||||
_mapScale->setPos(scenePos);
|
||||
if (_mapScale->pos() != scaleScenePos && !_plot)
|
||||
_mapScale->setPos(scaleScenePos);
|
||||
|
||||
if (_coordinates->isVisible()) {
|
||||
QPointF coordinatesScenePos = mapToScene(rect().bottomLeft()
|
||||
+ QPoint(COORDINATES_OFFSET, -COORDINATES_OFFSET));
|
||||
if (_coordinates->pos() != coordinatesScenePos && !_plot)
|
||||
_coordinates->setPos(coordinatesScenePos);
|
||||
}
|
||||
|
||||
QGraphicsView::paintEvent(event);
|
||||
}
|
||||
@ -814,6 +926,20 @@ void MapView::scrollContentsBy(int dx, int dy)
|
||||
}
|
||||
}
|
||||
|
||||
void MapView::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
if (_coordinates->isVisible())
|
||||
_coordinates->setCoordinates(_map->xy2ll(mapToScene(event->pos())));
|
||||
|
||||
QGraphicsView::mouseMoveEvent(event);
|
||||
}
|
||||
|
||||
void MapView::leaveEvent(QEvent *event)
|
||||
{
|
||||
_coordinates->setCoordinates(Coordinates());
|
||||
QGraphicsView::leaveEvent(event);
|
||||
}
|
||||
|
||||
void MapView::useOpenGL(bool use)
|
||||
{
|
||||
_opengl = use;
|
||||
@ -844,25 +970,29 @@ void MapView::reloadMap()
|
||||
_scene->invalidate();
|
||||
}
|
||||
|
||||
void MapView::setDevicePixelRatio(qreal ratio)
|
||||
void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
|
||||
{
|
||||
#ifdef ENABLE_HIDPI
|
||||
if (_ratio == ratio)
|
||||
if (_deviceRatio == deviceRatio && _mapRatio == mapRatio)
|
||||
return;
|
||||
|
||||
_ratio = ratio;
|
||||
_deviceRatio = deviceRatio;
|
||||
_mapRatio = mapRatio;
|
||||
QPixmapCache::clear();
|
||||
|
||||
QRectF vr(mapToScene(viewport()->rect()).boundingRect()
|
||||
.intersected(_map->bounds()));
|
||||
RectC cr(_map->xy2ll(vr.topLeft()), _map->xy2ll(vr.bottomRight()));
|
||||
|
||||
_map->setDevicePixelRatio(_ratio);
|
||||
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
|
||||
_scene->setSceneRect(_map->bounds());
|
||||
|
||||
for (int i = 0; i < _tracks.size(); i++)
|
||||
_tracks.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _routes.size(); i++)
|
||||
_routes.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _areas.size(); i++)
|
||||
_areas.at(i)->setMap(_map);
|
||||
for (int i = 0; i < _waypoints.size(); i++)
|
||||
_waypoints.at(i)->setMap(_map);
|
||||
|
||||
@ -877,6 +1007,7 @@ void MapView::setDevicePixelRatio(qreal ratio)
|
||||
|
||||
reloadMap();
|
||||
#else // ENABLE_HIDPI
|
||||
Q_UNUSED(ratio);
|
||||
Q_UNUSED(deviceRatio);
|
||||
Q_UNUSED(mapRatio);
|
||||
#endif // ENABLE_HIDPI
|
||||
}
|
||||
|
@ -6,12 +6,13 @@
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include "common/rectc.h"
|
||||
#include "common/config.h"
|
||||
#include "data/waypoint.h"
|
||||
#include "searchpointer.h"
|
||||
#include "units.h"
|
||||
#include "format.h"
|
||||
#include "palette.h"
|
||||
#include "config.h"
|
||||
#include "data/polygon.h"
|
||||
|
||||
class Data;
|
||||
class POI;
|
||||
@ -22,8 +23,11 @@ class TrackItem;
|
||||
class RouteItem;
|
||||
class WaypointItem;
|
||||
class ScaleItem;
|
||||
class CoordinatesItem;
|
||||
class PathItem;
|
||||
class GraphItem;
|
||||
class AreaItem;
|
||||
class Area;
|
||||
|
||||
class MapView : public QGraphicsView
|
||||
{
|
||||
@ -46,8 +50,11 @@ public:
|
||||
void setMarkerColor(const QColor &color);
|
||||
void setTrackWidth(int width);
|
||||
void setRouteWidth(int width);
|
||||
void setAreaWidth(int width);
|
||||
void setTrackStyle(Qt::PenStyle style);
|
||||
void setRouteStyle(Qt::PenStyle style);
|
||||
void setAreaStyle(Qt::PenStyle style);
|
||||
void setAreaOpacity(int opacity);
|
||||
void setWaypointSize(int size);
|
||||
void setWaypointColor(const QColor &color);
|
||||
void setPOISize(int size);
|
||||
@ -65,11 +72,14 @@ public slots:
|
||||
void showPOILabels(bool show);
|
||||
void showTracks(bool show);
|
||||
void showRoutes(bool show);
|
||||
void showAreas(bool show);
|
||||
void showWaypoints(bool show);
|
||||
void showRouteWaypoints(bool show);
|
||||
void showMarkers(bool show);
|
||||
void showCoordinates(bool show);
|
||||
void clearMapCache();
|
||||
void setCoordinatesFormat(CoordinatesFormat format);
|
||||
void setDevicePixelRatio(qreal ratio);
|
||||
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
||||
|
||||
private slots:
|
||||
void updatePOI();
|
||||
@ -78,7 +88,8 @@ private slots:
|
||||
private:
|
||||
PathItem *addTrack(const Track &track);
|
||||
PathItem *addRoute(const Route &route);
|
||||
void addWaypoints(const QList<Waypoint> &waypoints);
|
||||
void addArea(const Area &area);
|
||||
void addWaypoints(const QVector<Waypoint> &waypoints);
|
||||
void addPOI(const QList<Waypoint> &waypoints);
|
||||
void loadPOI();
|
||||
void clearPOI();
|
||||
@ -90,6 +101,7 @@ private:
|
||||
void zoom(int zoom, const QPoint &pos);
|
||||
void digitalZoom(int zoom);
|
||||
void updatePOIVisibility();
|
||||
void skipColor() {_palette.nextColor();}
|
||||
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
@ -98,49 +110,45 @@ private:
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
void scrollContentsBy(int dx, int dy);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void leaveEvent(QEvent *event);
|
||||
|
||||
QGraphicsScene *_scene;
|
||||
ScaleItem *_mapScale;
|
||||
CoordinatesItem *_coordinates;
|
||||
QList<TrackItem*> _tracks;
|
||||
QList<RouteItem*> _routes;
|
||||
QList<WaypointItem*> _waypoints;
|
||||
QList<AreaItem*> _areas;
|
||||
QHash<SearchPointer<Waypoint>, WaypointItem*> _pois;
|
||||
|
||||
RectC _tr, _rr, _wr;
|
||||
RectC _tr, _rr, _wr, _ar;
|
||||
qreal _res;
|
||||
|
||||
Map *_map;
|
||||
POI *_poi;
|
||||
|
||||
Palette _palette;
|
||||
Units _units;
|
||||
CoordinatesFormat _coordinatesFormat;
|
||||
qreal _mapOpacity;
|
||||
|
||||
qreal _opacity;
|
||||
QColor _backgroundColor;
|
||||
bool _showMap;
|
||||
bool _showTracks;
|
||||
bool _showRoutes;
|
||||
bool _showWaypoints;
|
||||
bool _showWaypointLabels;
|
||||
bool _showPOI;
|
||||
bool _showPOILabels;
|
||||
bool _showMap, _showTracks, _showRoutes, _showAreas, _showWaypoints,
|
||||
_showWaypointLabels, _showPOI, _showPOILabels, _showRouteWaypoints,
|
||||
_showMarkers;
|
||||
bool _overlapPOIs;
|
||||
bool _showRouteWaypoints;
|
||||
int _trackWidth;
|
||||
int _routeWidth;
|
||||
Qt::PenStyle _trackStyle;
|
||||
Qt::PenStyle _routeStyle;
|
||||
int _waypointSize;
|
||||
int _poiSize;
|
||||
QColor _waypointColor;
|
||||
QColor _poiColor;
|
||||
QColor _markerColor;
|
||||
int _trackWidth, _routeWidth, _areaWidth;
|
||||
Qt::PenStyle _trackStyle, _routeStyle, _areaStyle;
|
||||
int _waypointSize, _poiSize;
|
||||
QColor _backgroundColor, _waypointColor, _poiColor, _markerColor;
|
||||
qreal _areaOpacity;
|
||||
|
||||
int _digitalZoom;
|
||||
bool _plot;
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
qreal _ratio;
|
||||
qreal _deviceRatio;
|
||||
qreal _mapRatio;
|
||||
#endif // ENABLE_HIDPI
|
||||
bool _opengl;
|
||||
};
|
||||
|
@ -93,22 +93,7 @@ QWidget *OptionsDialog::createMapPage()
|
||||
|
||||
QWidget *OptionsDialog::createAppearancePage()
|
||||
{
|
||||
// Paths
|
||||
_baseColor = new ColorBox();
|
||||
_baseColor->setColor(_options->palette.color());
|
||||
_colorOffset = new QDoubleSpinBox();
|
||||
_colorOffset->setMinimum(0);
|
||||
_colorOffset->setMaximum(1.0);
|
||||
_colorOffset->setSingleStep(0.01);
|
||||
_colorOffset->setValue(_options->palette.shift());
|
||||
QFormLayout *paletteLayout = new QFormLayout();
|
||||
paletteLayout->addRow(tr("Base color:"), _baseColor);
|
||||
paletteLayout->addRow(tr("Palette shift:"), _colorOffset);
|
||||
#ifndef Q_OS_MAC
|
||||
QGroupBox *colorBox = new QGroupBox(tr("Colors"));
|
||||
colorBox->setLayout(paletteLayout);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
// Tracks
|
||||
_trackWidth = new QSpinBox();
|
||||
_trackWidth->setValue(_options->trackWidth);
|
||||
_trackWidth->setMinimum(1);
|
||||
@ -125,6 +110,7 @@ QWidget *OptionsDialog::createAppearancePage()
|
||||
trackBox->setLayout(trackLayout);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
// Routes
|
||||
_routeWidth = new QSpinBox();
|
||||
_routeWidth->setValue(_options->routeWidth);
|
||||
_routeWidth->setMinimum(1);
|
||||
@ -141,6 +127,38 @@ QWidget *OptionsDialog::createAppearancePage()
|
||||
routeBox->setLayout(routeLayout);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
// Areas
|
||||
_areaWidth = new QSpinBox();
|
||||
_areaWidth->setValue(_options->areaWidth);
|
||||
_areaStyle = new StyleComboBox();
|
||||
_areaStyle->setValue(_options->areaStyle);
|
||||
_areaOpacity = new PercentSlider();
|
||||
_areaOpacity->setValue(_options->areaOpacity);
|
||||
QFormLayout *areaLayout = new QFormLayout();
|
||||
#ifdef Q_OS_MAC
|
||||
areaLayout->addRow(tr("Area border width:"), _areaWidth);
|
||||
areaLayout->addRow(tr("Area border style:"), _areaStyle);
|
||||
areaLayout->addRow(tr("Area fill opacity:"), _areaOpacity);
|
||||
#else // Q_OS_MAC
|
||||
areaLayout->addRow(tr("Width:"), _areaWidth);
|
||||
areaLayout->addRow(tr("Style:"), _areaStyle);
|
||||
areaLayout->addRow(tr("Fill opacity:"), _areaOpacity);
|
||||
QGroupBox *areaBox = new QGroupBox(tr("Areas"));
|
||||
areaBox->setLayout(areaLayout);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
// Palette & antialiasing
|
||||
_baseColor = new ColorBox();
|
||||
_baseColor->setColor(_options->palette.color());
|
||||
_colorOffset = new QDoubleSpinBox();
|
||||
_colorOffset->setMinimum(0);
|
||||
_colorOffset->setMaximum(1.0);
|
||||
_colorOffset->setSingleStep(0.01);
|
||||
_colorOffset->setValue(_options->palette.shift());
|
||||
QFormLayout *paletteLayout = new QFormLayout();
|
||||
paletteLayout->addRow(tr("Base color:"), _baseColor);
|
||||
paletteLayout->addRow(tr("Palette shift:"), _colorOffset);
|
||||
|
||||
_pathAA = new QCheckBox(tr("Use anti-aliasing"));
|
||||
_pathAA->setChecked(_options->pathAntiAliasing);
|
||||
QFormLayout *pathAALayout = new QFormLayout();
|
||||
@ -149,17 +167,18 @@ QWidget *OptionsDialog::createAppearancePage()
|
||||
QWidget *pathTab = new QWidget();
|
||||
QVBoxLayout *pathTabLayout = new QVBoxLayout();
|
||||
#ifdef Q_OS_MAC
|
||||
pathTabLayout->addLayout(paletteLayout);
|
||||
pathTabLayout->addWidget(line());
|
||||
pathTabLayout->addLayout(trackLayout);
|
||||
pathTabLayout->addWidget(line());
|
||||
pathTabLayout->addLayout(routeLayout);
|
||||
pathTabLayout->addWidget(line());
|
||||
pathTabLayout->addLayout(areaLayout);
|
||||
pathTabLayout->addWidget(line());
|
||||
#else // Q_OS_MAC
|
||||
pathTabLayout->addWidget(colorBox);
|
||||
pathTabLayout->addWidget(trackBox);
|
||||
pathTabLayout->addWidget(routeBox);
|
||||
pathTabLayout->addWidget(areaBox);
|
||||
#endif // Q_OS_MAC
|
||||
pathTabLayout->addLayout(paletteLayout);
|
||||
pathTabLayout->addLayout(pathAALayout);
|
||||
pathTabLayout->addStretch();
|
||||
pathTab->setLayout(pathTabLayout);
|
||||
@ -298,10 +317,6 @@ QWidget *OptionsDialog::createDataPage()
|
||||
|
||||
QFormLayout *outlierLayout = new QFormLayout();
|
||||
outlierLayout->addWidget(_outlierEliminate);
|
||||
#ifndef Q_OS_MAC
|
||||
QGroupBox *outlierBox = new QGroupBox(tr("Outlier elimination"));
|
||||
outlierBox->setLayout(outlierLayout);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
QWidget *filterTab = new QWidget();
|
||||
QVBoxLayout *filterTabLayout = new QVBoxLayout();
|
||||
@ -309,11 +324,10 @@ QWidget *OptionsDialog::createDataPage()
|
||||
filterTabLayout->addWidget(new QLabel(tr("Smoothing:")));
|
||||
filterTabLayout->addLayout(smoothLayout);
|
||||
filterTabLayout->addWidget(line());
|
||||
filterTabLayout->addLayout(outlierLayout);
|
||||
#else // Q_OS_MAC
|
||||
filterTabLayout->addWidget(smoothBox);
|
||||
filterTabLayout->addWidget(outlierBox);
|
||||
#endif // Q_OS_MAC
|
||||
filterTabLayout->addLayout(outlierLayout);
|
||||
filterTabLayout->addStretch();
|
||||
filterTab->setLayout(filterTabLayout);
|
||||
|
||||
@ -345,31 +359,78 @@ QWidget *OptionsDialog::createDataPage()
|
||||
pauseTab->setLayout(pauseLayout);
|
||||
|
||||
|
||||
_computed = new QRadioButton(tr("Computed from distance/time"));
|
||||
_reported = new QRadioButton(tr("Recorded by device"));
|
||||
_computedSpeed = new QRadioButton(tr("Computed from distance/time"));
|
||||
_reportedSpeed = new QRadioButton(tr("Recorded by device"));
|
||||
if (_options->useReportedSpeed)
|
||||
_reported->setChecked(true);
|
||||
_reportedSpeed->setChecked(true);
|
||||
else
|
||||
_computed->setChecked(true);
|
||||
_computedSpeed->setChecked(true);
|
||||
|
||||
_dataGPSElevation = new QRadioButton(tr("GPS data"));
|
||||
_dataDEMElevation = new QRadioButton(tr("DEM data"));
|
||||
if (_options->dataUseDEM)
|
||||
_dataDEMElevation->setChecked(true);
|
||||
else
|
||||
_dataGPSElevation->setChecked(true);
|
||||
|
||||
QFormLayout *sourceLayout = new QFormLayout();
|
||||
sourceLayout->addWidget(_computed);
|
||||
sourceLayout->addWidget(_reported);
|
||||
|
||||
QWidget *sourceTab = new QWidget();
|
||||
sourceTab->setLayout(sourceLayout);
|
||||
QVBoxLayout *sourceTabLayout = new QVBoxLayout();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QVBoxLayout *speedOptions = new QVBoxLayout();
|
||||
speedOptions->addWidget(_computedSpeed);
|
||||
speedOptions->addWidget(_reportedSpeed);
|
||||
|
||||
QVBoxLayout *elevationOptions = new QVBoxLayout();
|
||||
elevationOptions->addWidget(_dataGPSElevation);
|
||||
elevationOptions->addWidget(_dataDEMElevation);
|
||||
|
||||
QFormLayout *formLayout = new QFormLayout();
|
||||
formLayout->addRow(tr("Speed:"), speedOptions);
|
||||
formLayout->addRow(tr("Elevation:"), elevationOptions);
|
||||
|
||||
sourceTabLayout->addLayout(formLayout);
|
||||
#else // Q_OS_MAC
|
||||
QFormLayout *speedLayout = new QFormLayout();
|
||||
QFormLayout *elevationLayout = new QFormLayout();
|
||||
|
||||
speedLayout->addWidget(_computedSpeed);
|
||||
speedLayout->addWidget(_reportedSpeed);
|
||||
|
||||
QGroupBox *speedBox = new QGroupBox(tr("Speed"));
|
||||
speedBox->setLayout(speedLayout);
|
||||
|
||||
elevationLayout->addWidget(_dataGPSElevation);
|
||||
elevationLayout->addWidget(_dataDEMElevation);
|
||||
|
||||
QGroupBox *elevationBox = new QGroupBox(tr("Elevation"));
|
||||
elevationBox->setLayout(elevationLayout);
|
||||
|
||||
sourceTabLayout->addWidget(speedBox);
|
||||
sourceTabLayout->addWidget(elevationBox);
|
||||
#endif // Q_OS_MAC
|
||||
sourceTabLayout->addStretch();
|
||||
sourceTab->setLayout(sourceTabLayout);
|
||||
|
||||
|
||||
QTabWidget *filterPage = new QTabWidget();
|
||||
filterPage->addTab(filterTab, tr("Filtering"));
|
||||
filterPage->addTab(sourceTab, tr("Sources"));
|
||||
filterPage->addTab(pauseTab, tr("Pause detection"));
|
||||
filterPage->addTab(sourceTab, tr("Speed"));
|
||||
|
||||
return filterPage;
|
||||
}
|
||||
|
||||
QWidget *OptionsDialog::createPOIPage()
|
||||
{
|
||||
_poiGPSElevation = new QRadioButton(tr("GPS data"));
|
||||
_poiDEMElevation = new QRadioButton(tr("DEM data"));
|
||||
if (_options->poiUseDEM)
|
||||
_poiDEMElevation->setChecked(true);
|
||||
else
|
||||
_poiGPSElevation->setChecked(true);
|
||||
|
||||
_poiRadius = new QDoubleSpinBox();
|
||||
_poiRadius->setSingleStep(1);
|
||||
_poiRadius->setDecimals(1);
|
||||
@ -384,8 +445,13 @@ QWidget *OptionsDialog::createPOIPage()
|
||||
_poiRadius->setSuffix(UNIT_SPACE + tr("km"));
|
||||
}
|
||||
|
||||
QVBoxLayout *elevationLayout = new QVBoxLayout();
|
||||
elevationLayout->addWidget(_poiGPSElevation);
|
||||
elevationLayout->addWidget(_poiDEMElevation);
|
||||
|
||||
QFormLayout *poiLayout = new QFormLayout();
|
||||
poiLayout->addRow(tr("POI radius:"), _poiRadius);
|
||||
poiLayout->addRow(tr("Radius:"), _poiRadius);
|
||||
poiLayout->addRow(tr("Elevation:"), elevationLayout);
|
||||
|
||||
QWidget *poiTab = new QWidget();
|
||||
poiTab->setLayout(poiLayout);
|
||||
@ -578,6 +644,10 @@ void OptionsDialog::accept()
|
||||
_options->routeStyle = (Qt::PenStyle) _routeStyle->itemData(
|
||||
_routeStyle->currentIndex()).toInt();
|
||||
_options->pathAntiAliasing = _pathAA->isChecked();
|
||||
_options->areaWidth = _areaWidth->value();
|
||||
_options->areaStyle = (Qt::PenStyle) _areaStyle->itemData(
|
||||
_areaStyle->currentIndex()).toInt();
|
||||
_options->areaOpacity = _areaOpacity->value();
|
||||
_options->waypointSize = _waypointSize->value();
|
||||
_options->waypointColor = _waypointColor->color();
|
||||
_options->poiSize = _poiSize->value();
|
||||
@ -603,13 +673,15 @@ void OptionsDialog::accept()
|
||||
if (qAbs(pauseSpeed - _options->pauseSpeed) > 0.01)
|
||||
_options->pauseSpeed = pauseSpeed;
|
||||
_options->pauseInterval = _pauseInterval->value();
|
||||
_options->useReportedSpeed = _reported->isChecked();
|
||||
_options->useReportedSpeed = _reportedSpeed->isChecked();
|
||||
_options->dataUseDEM = _dataDEMElevation->isChecked();
|
||||
|
||||
qreal poiRadius = (_options->units == Imperial)
|
||||
? _poiRadius->value() * MIINM : (_options->units == Nautical)
|
||||
? _poiRadius->value() * NMIINM : _poiRadius->value() * KMINM;
|
||||
if (qAbs(poiRadius - _options->poiRadius) > 0.01)
|
||||
_options->poiRadius = poiRadius;
|
||||
_options->poiUseDEM = _poiDEMElevation->isChecked();
|
||||
|
||||
_options->useOpenGL = _useOpenGL->isChecked();
|
||||
#ifdef ENABLE_HTTP2
|
||||
|
@ -2,10 +2,9 @@
|
||||
#define OPTIONSDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "common/config.h"
|
||||
#include "palette.h"
|
||||
#include "units.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
class ColorBox;
|
||||
class StyleComboBox;
|
||||
@ -22,8 +21,11 @@ struct Options {
|
||||
Palette palette;
|
||||
int trackWidth;
|
||||
int routeWidth;
|
||||
int areaWidth;
|
||||
Qt::PenStyle trackStyle;
|
||||
Qt::PenStyle routeStyle;
|
||||
Qt::PenStyle areaStyle;
|
||||
int areaOpacity;
|
||||
QColor waypointColor;
|
||||
QColor poiColor;
|
||||
int waypointSize;
|
||||
@ -49,8 +51,10 @@ struct Options {
|
||||
qreal pauseSpeed;
|
||||
int pauseInterval;
|
||||
bool useReportedSpeed;
|
||||
bool dataUseDEM;
|
||||
// POI
|
||||
int poiRadius;
|
||||
bool poiUseDEM;
|
||||
// System
|
||||
bool useOpenGL;
|
||||
#ifdef ENABLE_HTTP2
|
||||
@ -100,6 +104,9 @@ private:
|
||||
StyleComboBox *_trackStyle;
|
||||
QSpinBox *_routeWidth;
|
||||
StyleComboBox *_routeStyle;
|
||||
QSpinBox *_areaWidth;
|
||||
StyleComboBox *_areaStyle;
|
||||
PercentSlider *_areaOpacity;
|
||||
QCheckBox *_pathAA;
|
||||
QSpinBox *_waypointSize;
|
||||
ColorBox *_waypointColor;
|
||||
@ -123,10 +130,14 @@ private:
|
||||
QCheckBox *_outlierEliminate;
|
||||
QDoubleSpinBox *_pauseSpeed;
|
||||
QSpinBox *_pauseInterval;
|
||||
QRadioButton *_computed;
|
||||
QRadioButton *_reported;
|
||||
QRadioButton *_computedSpeed;
|
||||
QRadioButton *_reportedSpeed;
|
||||
QRadioButton *_dataGPSElevation;
|
||||
QRadioButton *_dataDEMElevation;
|
||||
// POI
|
||||
QDoubleSpinBox *_poiRadius;
|
||||
QRadioButton *_poiGPSElevation;
|
||||
QRadioButton *_poiDEMElevation;
|
||||
// System
|
||||
QSpinBox *_pixmapCache;
|
||||
QSpinBox *_connectionTimeout;
|
||||
|
@ -8,30 +8,33 @@
|
||||
|
||||
#define GEOGRAPHICAL_MILE 1855.3248
|
||||
|
||||
static unsigned segments(qreal distance)
|
||||
static inline bool isValid(const QPointF &p)
|
||||
{
|
||||
return (!std::isnan(p.x()) && !std::isnan(p.y()));
|
||||
}
|
||||
|
||||
static inline unsigned segments(qreal distance)
|
||||
{
|
||||
return ceil(distance / GEOGRAPHICAL_MILE);
|
||||
}
|
||||
|
||||
PathItem::PathItem(const Path &path, Map *map, QGraphicsItem *parent)
|
||||
: QGraphicsObject(parent)
|
||||
: QGraphicsObject(parent), _path(path), _map(map)
|
||||
{
|
||||
Q_ASSERT(path.count() >= 2);
|
||||
Q_ASSERT(_path.isValid());
|
||||
|
||||
_path = path;
|
||||
_map = map;
|
||||
_digitalZoom = 0;
|
||||
|
||||
_width = 3;
|
||||
QBrush brush(Qt::SolidPattern);
|
||||
_pen = QPen(brush, _width);
|
||||
_showMarker = true;
|
||||
|
||||
updatePainterPath();
|
||||
updateShape();
|
||||
|
||||
_markerDistance = _path.first().first().distance();
|
||||
_marker = new MarkerItem(this);
|
||||
_marker->setPos(position(_path.at(0).distance()));
|
||||
_markerDistance = _path.at(0).distance();
|
||||
_marker->setPos(position(_markerDistance));
|
||||
|
||||
setCursor(Qt::ArrowCursor);
|
||||
setAcceptHoverEvents(true);
|
||||
@ -74,23 +77,27 @@ void PathItem::updatePainterPath()
|
||||
{
|
||||
_painterPath = QPainterPath();
|
||||
|
||||
_painterPath.moveTo(_map->ll2xy(_path.first().coordinates()));
|
||||
for (int i = 1; i < _path.size(); i++) {
|
||||
const PathPoint &p1 = _path.at(i-1);
|
||||
const PathPoint &p2 = _path.at(i);
|
||||
unsigned n = segments(p2.distance() - p1.distance());
|
||||
for (int i = 0; i < _path.size(); i++) {
|
||||
const PathSegment &segment = _path.at(i);
|
||||
_painterPath.moveTo(_map->ll2xy(segment.first().coordinates()));
|
||||
|
||||
if (n > 1) {
|
||||
GreatCircle gc(p1.coordinates(), p2.coordinates());
|
||||
Coordinates last = p1.coordinates();
|
||||
for (int j = 1; j < segment.size(); j++) {
|
||||
const PathPoint &p1 = segment.at(j-1);
|
||||
const PathPoint &p2 = segment.at(j);
|
||||
unsigned n = segments(p2.distance() - p1.distance());
|
||||
|
||||
for (unsigned j = 1; j <= n; j++) {
|
||||
Coordinates c(gc.pointAt(j/(double)n));
|
||||
addSegment(last, c);
|
||||
last = c;
|
||||
}
|
||||
} else
|
||||
addSegment(p1.coordinates(), p2.coordinates());
|
||||
if (n > 1) {
|
||||
GreatCircle gc(p1.coordinates(), p2.coordinates());
|
||||
Coordinates last = p1.coordinates();
|
||||
|
||||
for (unsigned k = 1; k <= n; k++) {
|
||||
Coordinates c(gc.pointAt(k/(double)n));
|
||||
addSegment(last, c);
|
||||
last = c;
|
||||
}
|
||||
} else
|
||||
addSegment(p1.coordinates(), p2.coordinates());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -119,7 +126,9 @@ void PathItem::setMap(Map *map)
|
||||
updatePainterPath();
|
||||
updateShape();
|
||||
|
||||
_marker->setPos(position(_markerDistance));
|
||||
QPointF pos = position(_markerDistance);
|
||||
if (isValid(pos))
|
||||
_marker->setPos(pos);
|
||||
}
|
||||
|
||||
void PathItem::setColor(const QColor &color)
|
||||
@ -167,35 +176,48 @@ void PathItem::setDigitalZoom(int zoom)
|
||||
updateShape();
|
||||
}
|
||||
|
||||
const PathSegment *PathItem::segment(qreal x) const
|
||||
{
|
||||
for (int i = 0; i < _path.size(); i++)
|
||||
if (x <= _path.at(i).last().distance())
|
||||
return &(_path.at(i));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QPointF PathItem::position(qreal x) const
|
||||
{
|
||||
const PathSegment *seg = segment(x);
|
||||
if (!seg)
|
||||
return QPointF(NAN, NAN);
|
||||
|
||||
int low = 0;
|
||||
int high = _path.count() - 1;
|
||||
int high = seg->count() - 1;
|
||||
int mid = 0;
|
||||
|
||||
Q_ASSERT(high > low);
|
||||
Q_ASSERT(x >= _path.at(low).distance() && x <= _path.at(high).distance());
|
||||
if (!(x >= seg->first().distance() && x <= seg->last().distance()))
|
||||
return QPointF(NAN, NAN);
|
||||
|
||||
while (low <= high) {
|
||||
mid = low + ((high - low) / 2);
|
||||
qreal val = _path.at(mid).distance();
|
||||
qreal val = seg->at(mid).distance();
|
||||
if (val > x)
|
||||
high = mid - 1;
|
||||
else if (val < x)
|
||||
low = mid + 1;
|
||||
else
|
||||
return _map->ll2xy(_path.at(mid).coordinates());
|
||||
return _map->ll2xy(seg->at(mid).coordinates());
|
||||
}
|
||||
|
||||
Coordinates c1, c2;
|
||||
qreal p1, p2;
|
||||
|
||||
if (_path.at(mid).distance() < x) {
|
||||
c1 = _path.at(mid).coordinates(); c2 = _path.at(mid+1).coordinates();
|
||||
p1 = _path.at(mid).distance(); p2 = _path.at(mid+1).distance();
|
||||
if (seg->at(mid).distance() < x) {
|
||||
c1 = seg->at(mid).coordinates(); c2 = seg->at(mid+1).coordinates();
|
||||
p1 = seg->at(mid).distance(); p2 = seg->at(mid+1).distance();
|
||||
} else {
|
||||
c1 = _path.at(mid-1).coordinates(); c2 = _path.at(mid).coordinates();
|
||||
p1 = _path.at(mid-1).distance(); p2 = _path.at(mid).distance();
|
||||
c1 = seg->at(mid-1).coordinates(); c2 = seg->at(mid).coordinates();
|
||||
p1 = seg->at(mid-1).distance(); p2 = seg->at(mid).distance();
|
||||
}
|
||||
|
||||
unsigned n = segments(p2 - p1);
|
||||
@ -225,11 +247,12 @@ QPointF PathItem::position(qreal x) const
|
||||
|
||||
void PathItem::moveMarker(qreal distance)
|
||||
{
|
||||
if (distance >= _path.first().distance()
|
||||
&& distance <= _path.last().distance()) {
|
||||
_marker->setVisible(true);
|
||||
_marker->setPos(position(distance));
|
||||
_markerDistance = distance;
|
||||
_markerDistance = distance;
|
||||
QPointF pos(position(distance));
|
||||
|
||||
if (isValid(pos)) {
|
||||
_marker->setVisible(_showMarker);
|
||||
_marker->setPos(pos);
|
||||
} else
|
||||
_marker->setVisible(false);
|
||||
}
|
||||
@ -252,6 +275,15 @@ void PathItem::hover(bool hover)
|
||||
update();
|
||||
}
|
||||
|
||||
void PathItem::showMarker(bool show)
|
||||
{
|
||||
if (_showMarker == show)
|
||||
return;
|
||||
|
||||
_showMarker = show;
|
||||
_marker->setVisible(show && isValid(position(_markerDistance)));
|
||||
}
|
||||
|
||||
void PathItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
void setStyle(Qt::PenStyle style);
|
||||
void setDigitalZoom(int zoom);
|
||||
void setMarkerColor(const QColor &color);
|
||||
void showMarker(bool show);
|
||||
|
||||
public slots:
|
||||
void moveMarker(qreal distance);
|
||||
@ -42,6 +43,7 @@ protected:
|
||||
MarkerItem *_marker;
|
||||
|
||||
private:
|
||||
const PathSegment *segment(qreal x) const;
|
||||
QPointF position(qreal distance) const;
|
||||
void updatePainterPath();
|
||||
void updateShape();
|
||||
@ -59,6 +61,7 @@ private:
|
||||
QPen _pen;
|
||||
QPainterPath _shape;
|
||||
QPainterPath _painterPath;
|
||||
bool _showMarker;
|
||||
};
|
||||
|
||||
#endif // PATHITEM_H
|
||||
|
@ -22,6 +22,7 @@ PercentSlider::PercentSlider(QWidget *parent) : QWidget(parent)
|
||||
QFontMetrics fm(_label->font());
|
||||
_label->setFixedWidth(fm.boundingRect(format(_slider->maximum())).width());
|
||||
_label->setAlignment(Qt::AlignRight);
|
||||
_label->setText(format(_slider->value()));
|
||||
|
||||
connect(_slider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabel(int)));
|
||||
|
||||
|
@ -32,15 +32,16 @@ QList<GraphItem*> PowerGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Graph &graph = data.tracks().at(i)->power();
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.power();
|
||||
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
PowerGraphItem *gi = new PowerGraphItem(graph, _graphType);
|
||||
GraphView::addGraph(gi);
|
||||
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
|
||||
_avg.append(QPointF(track.distance(), gi->avg()));
|
||||
graphs.append(gi);
|
||||
}
|
||||
}
|
||||
@ -50,6 +51,9 @@ QList<GraphItem*> PowerGraph::loadData(const Data &data)
|
||||
graphs.append(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
||||
|
@ -6,12 +6,6 @@
|
||||
PowerGraphItem::PowerGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
@ -11,13 +11,8 @@ public:
|
||||
PowerGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
};
|
||||
|
||||
#endif // POWERGRAPHITEM_H
|
||||
|
@ -15,7 +15,8 @@ QString RouteItem::toolTip(Units units) const
|
||||
tt.insert(tr("Name"), _name);
|
||||
if (!_desc.isEmpty())
|
||||
tt.insert(tr("Description"), _desc);
|
||||
tt.insert(tr("Distance"), Format::distance(_path.last().distance(), units));
|
||||
tt.insert(tr("Distance"), Format::distance(_path.last().last().distance(),
|
||||
units));
|
||||
|
||||
return tt.toString();
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <cmath>
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
#include "common/util.h"
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "scaleitem.h"
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define WINDOW_SIZE_DEFAULT QSize(600, 800)
|
||||
#define WINDOW_POS_SETTING "pos"
|
||||
#define WINDOW_POS_DEFAULT QPoint(10, 10)
|
||||
#define WINDOW_STATE_SETTING "state"
|
||||
|
||||
#define SETTINGS_SETTINGS_GROUP "Settings"
|
||||
#define TIME_TYPE_SETTING "timeType"
|
||||
@ -29,11 +30,15 @@
|
||||
#define SHOW_GRAPH_GRIDS_DEFAULT true
|
||||
#define SHOW_GRAPH_SLIDER_INFO_SETTING "sliderInfo"
|
||||
#define SHOW_GRAPH_SLIDER_INFO_DEFAULT true
|
||||
#define SHOW_MARKERS_SETTING "pathMarkers"
|
||||
#define SHOW_MARKERS_DEFAULT true
|
||||
|
||||
#define MAP_SETTINGS_GROUP "Map"
|
||||
#define CURRENT_MAP_SETTING "map"
|
||||
#define SHOW_MAP_SETTING "show"
|
||||
#define SHOW_MAP_DEFAULT true
|
||||
#define SHOW_COORDINATES_SETTING "coordinates"
|
||||
#define SHOW_COORDINATES_DEFAULT false
|
||||
|
||||
#define POI_SETTINGS_GROUP "POI"
|
||||
#define OVERLAP_POI_SETTING "overlap"
|
||||
@ -52,6 +57,8 @@
|
||||
#define SHOW_ROUTES_DEFAULT true
|
||||
#define SHOW_WAYPOINTS_SETTING "waypoints"
|
||||
#define SHOW_WAYPOINTS_DEFAULT true
|
||||
#define SHOW_AREAS_SETTING "areas"
|
||||
#define SHOW_AREAS_DEFAULT true
|
||||
#define SHOW_ROUTE_WAYPOINTS_SETTING "routeWaypoints"
|
||||
#define SHOW_ROUTE_WAYPOINTS_DEFAULT true
|
||||
#define SHOW_WAYPOINT_LABELS_SETTING "waypointLabels"
|
||||
@ -90,10 +97,16 @@
|
||||
#define TRACK_WIDTH_DEFAULT 3
|
||||
#define ROUTE_WIDTH_SETTING "routeWidth"
|
||||
#define ROUTE_WIDTH_DEFAULT 3
|
||||
#define AREA_WIDTH_SETTING "areaWidth"
|
||||
#define AREA_WIDTH_DEFAULT 2
|
||||
#define TRACK_STYLE_SETTING "trackStyle"
|
||||
#define TRACK_STYLE_DEFAULT Qt::SolidLine
|
||||
#define ROUTE_STYLE_SETTING "routeStyle"
|
||||
#define ROUTE_STYLE_DEFAULT Qt::DotLine
|
||||
#define AREA_STYLE_SETTING "areaStyle"
|
||||
#define AREA_STYLE_DEFAULT Qt::SolidLine
|
||||
#define AREA_OPACITY_SETTING "areaOpacity"
|
||||
#define AREA_OPACITY_DEFAULT 50
|
||||
#define WAYPOINT_SIZE_SETTING "waypointSize"
|
||||
#define WAYPOINT_SIZE_DEFAULT 8
|
||||
#define WAYPOINT_COLOR_SETTING "waypointColor"
|
||||
@ -126,8 +139,12 @@
|
||||
#define PAUSE_INTERVAL_DEFAULT 10 /* s */
|
||||
#define USE_REPORTED_SPEED_SETTING "useReportedSpeed"
|
||||
#define USE_REPORTED_SPEED_DEFAULT false
|
||||
#define DATA_USE_DEM_SETTING "dataUseDEM"
|
||||
#define DATA_USE_DEM_DEFAULT false
|
||||
#define POI_RADIUS_SETTING "poiRadius"
|
||||
#define POI_RADIUS_DEFAULT (int)(IMPERIAL_UNITS() ? MIINM : KMINM)
|
||||
#define POI_USE_DEM_SETTING "poiUseDEM"
|
||||
#define POI_USE_DEM_DEFAULT false
|
||||
#define USE_OPENGL_SETTING "useOpenGL"
|
||||
#define USE_OPENGL_DEFAULT false
|
||||
#define ENABLE_HTTP2_SETTING "enableHTTP2"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "sliderinfoitem.h"
|
||||
|
||||
|
||||
@ -49,7 +49,9 @@ void SliderInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
||||
}
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(QBrush(QColor(255, 255, 255, 196)));
|
||||
QColor bc(painter->background().color());
|
||||
bc.setAlpha(196);
|
||||
painter->setBrush(QBrush(bc));
|
||||
painter->drawRect(ry);
|
||||
painter->drawRect(rx);
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <QLocale>
|
||||
#include "data/data.h"
|
||||
#include "config.h"
|
||||
#include "tooltip.h"
|
||||
#include "format.h"
|
||||
#include "speedgraphitem.h"
|
||||
@ -41,19 +40,19 @@ QList<GraphItem*> SpeedGraph::loadData(const Data &data)
|
||||
QList<GraphItem*> graphs;
|
||||
|
||||
for (int i = 0; i < data.tracks().count(); i++) {
|
||||
const Track *track = data.tracks().at(i);
|
||||
const Graph &graph = track->speed();
|
||||
const Track &track = data.tracks().at(i);
|
||||
const Graph &graph = track.speed();
|
||||
|
||||
if (graph.size() < 2) {
|
||||
if (!graph.isValid()) {
|
||||
skipColor();
|
||||
graphs.append(0);
|
||||
} else {
|
||||
SpeedGraphItem *gi = new SpeedGraphItem(graph, _graphType,
|
||||
track->movingTime());
|
||||
track.movingTime());
|
||||
gi->setTimeType(_timeType);
|
||||
GraphView::addGraph(gi);
|
||||
_avg.append(QPointF(track->distance(), gi->avg()));
|
||||
_mavg.append(QPointF(track->distance(), gi->mavg()));
|
||||
_avg.append(QPointF(track.distance(), gi->avg()));
|
||||
_mavg.append(QPointF(track.distance(), gi->mavg()));
|
||||
graphs.append(gi);
|
||||
}
|
||||
}
|
||||
@ -63,6 +62,9 @@ QList<GraphItem*> SpeedGraph::loadData(const Data &data)
|
||||
graphs.append(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < data.areas().count(); i++)
|
||||
skipColor();
|
||||
|
||||
setInfo();
|
||||
redraw();
|
||||
|
||||
|
@ -10,8 +10,9 @@ SpeedGraphItem::SpeedGraphItem(const Graph &graph, GraphType type,
|
||||
_units = Metric;
|
||||
_timeType = Total;
|
||||
|
||||
_avg = graph.last().s() / graph.last().t();
|
||||
_mavg = graph.last().s() / movingTime;
|
||||
_max = GraphItem::max();
|
||||
_avg = graph.last().last().s() / graph.last().last().t();
|
||||
_mavg = graph.last().last().s() / movingTime;
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ public:
|
||||
SpeedGraphItem(const Graph &graph, GraphType type, qreal movingTime,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal avg() const {return _avg;}
|
||||
qreal mavg() const {return _mavg;}
|
||||
qreal max() const {return _max;}
|
||||
|
||||
void setUnits(Units units);
|
||||
void setTimeType(TimeType type);
|
||||
@ -22,7 +22,7 @@ public:
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg, _mavg;
|
||||
qreal _avg, _mavg, _max;
|
||||
|
||||
Units _units;
|
||||
TimeType _timeType;
|
||||
|