Compare commits
193 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
8f4ce8d38c | |||
b73072795a | |||
57d3d9c965 | |||
d97a8c03a7 | |||
58b44d33a7 | |||
5c6f405795 | |||
156467a261 | |||
f4d5f8d057 | |||
b3655f6a1f | |||
f819840aff | |||
46bf281644 | |||
49470f22b2 | |||
078b272828 | |||
ed03e31949 | |||
605b09c195 | |||
ce41409713 | |||
0898953674 | |||
fd0401a4a6 | |||
869fdf5982 | |||
7fe518966c | |||
e568806366 | |||
aa32415adb | |||
c1a64d2c0b | |||
31bbdba548 | |||
0e4a5abc2b | |||
7a2f6b96a9 | |||
24c03fc15b | |||
f9af06267a | |||
2f9751672e | |||
140e975524 | |||
e6a39b5146 | |||
937251fbdc | |||
6e92557806 | |||
a3625ac89d | |||
a7e02bdc8b | |||
ed4e201b08 | |||
06901d8d7a | |||
698f14c835 | |||
f8806417d4 | |||
52e8eb1f6e | |||
0483d393ac | |||
5aa21380cb | |||
254deae04a | |||
076a091a5b | |||
bb7787b001 | |||
bc6d48d1fe | |||
9bae94f30d | |||
351fc0309a | |||
d8116c7f5d |
@ -1,4 +1,4 @@
|
||||
version: 6.0.{build}
|
||||
version: 7.2.{build}
|
||||
configuration: Release
|
||||
platform: Any CPU
|
||||
environment:
|
||||
@ -34,6 +34,8 @@ build_script:
|
||||
|
||||
copy pkg\%NSI% installer
|
||||
|
||||
copy pkg\macros.nsh installer
|
||||
|
||||
xcopy pkg\csv installer\csv /i
|
||||
|
||||
xcopy pkg\maps installer\maps /i
|
||||
|
1
.gitignore
vendored
@ -11,3 +11,4 @@ Makefile*
|
||||
|
||||
# Binary
|
||||
GPXSee
|
||||
gpxsee
|
||||
|
@ -3,8 +3,8 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.
|
||||
|
||||
## Features
|
||||
* User-definable online maps (OSM/Google tiles, WMTS, WMS).
|
||||
* Offline maps (OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
|
||||
* 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 multiple tracks in one view.
|
||||
* Support for POI files.
|
||||
@ -42,4 +42,4 @@ http://www.gpxsee.org
|
||||
[GPXSee maps repository](https://github.com/tumic0/GPXSee-maps)
|
||||
|
||||
## Translations
|
||||
GPXSee uses [Weblate](https://hosted.weblate.org/projects/gpxsee) for translations.
|
||||
GPXSee uses [Weblate](https://hosted.weblate.org/projects/gpxsee/translations/) for translations.
|
||||
|
172
gpxsee.pro
@ -1,10 +1,15 @@
|
||||
TARGET = GPXSee
|
||||
VERSION = 6.0
|
||||
unix:!mac {
|
||||
TARGET = gpxsee
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 7.2
|
||||
|
||||
QT += core \
|
||||
gui \
|
||||
network \
|
||||
sql
|
||||
sql \
|
||||
concurrent
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT += widgets
|
||||
QT += printsupport
|
||||
@ -13,14 +18,17 @@ 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 \
|
||||
src/common/rectc.h \
|
||||
src/common/wgs84.h \
|
||||
src/common/str2int.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 \
|
||||
@ -70,10 +78,10 @@ HEADERS += src/config.h \
|
||||
src/GUI/gearratiographitem.h \
|
||||
src/GUI/oddspinbox.h \
|
||||
src/GUI/settings.h \
|
||||
src/GUI/nicenum.h \
|
||||
src/GUI/cpuarch.h \
|
||||
src/GUI/searchpointer.h \
|
||||
src/GUI/mapview.h \
|
||||
src/GUI/font.h \
|
||||
src/map/projection.h \
|
||||
src/map/ellipsoid.h \
|
||||
src/map/datum.h \
|
||||
@ -114,6 +122,15 @@ 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/data/graph.h \
|
||||
src/data/poi.h \
|
||||
src/data/waypoint.h \
|
||||
@ -133,24 +150,17 @@ 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/GUI/kv.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/map/polarstereographic.h
|
||||
SOURCES += src/main.cpp \
|
||||
src/common/coordinates.cpp \
|
||||
src/common/rectc.cpp \
|
||||
src/common/range.cpp \
|
||||
src/common/str2int.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,7 +202,6 @@ SOURCES += src/main.cpp \
|
||||
src/GUI/cadencegraphitem.cpp \
|
||||
src/GUI/powergraphitem.cpp \
|
||||
src/GUI/gearratiographitem.cpp \
|
||||
src/GUI/nicenum.cpp \
|
||||
src/GUI/mapview.cpp \
|
||||
src/map/maplist.cpp \
|
||||
src/map/onlinemap.cpp \
|
||||
@ -229,6 +238,15 @@ 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/data/data.cpp \
|
||||
src/data/poi.cpp \
|
||||
src/data/track.cpp \
|
||||
@ -242,18 +260,19 @@ 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/map/polarstereographic.cpp \
|
||||
src/map/rectd.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,53 +282,80 @@ TRANSLATIONS = lang/gpxsee_en.ts \
|
||||
lang/gpxsee_ru.ts \
|
||||
lang/gpxsee_fi.ts \
|
||||
lang/gpxsee_fr.ts \
|
||||
lang/gpxsee_pl.ts
|
||||
lang/gpxsee_pl.ts \
|
||||
lang/gpxsee_nb.ts \
|
||||
lang/gpxsee_da.ts \
|
||||
lang/gpxsee_tr.ts \
|
||||
lang/gpxsee_es.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 \
|
||||
lang/gpxsee_fr.qm \
|
||||
lang/gpxsee_ru.qm \
|
||||
lang/gpxsee_sv.qm \
|
||||
lang/gpxsee_pl.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
|
||||
lang/gpxsee_pl.qm \
|
||||
lang/gpxsee_nb.qm \
|
||||
lang/gpxsee_da.qm \
|
||||
lang/gpxsee_tr.qm \
|
||||
lang/gpxsee_es.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
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||
DEFINES *= QT_USE_QSTRINGBUILDER
|
||||
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
|
||||
|
1459
lang/gpxsee_da.ts
@ -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>
|
||||
<numerusform>%n file</numerusform>
|
||||
<numerusform>%n files</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
1784
lang/gpxsee_nb.ts
Normal file
1782
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,21 +8,23 @@
|
||||
<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 and OziExplorer files.</p>
|
||||
KML, FIT, IGC, NMEA, SLF, LOC, GeoJSON and OziExplorer files.</p>
|
||||
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>User-definable online maps (OSM/Google tiles, WMTS, WMS).</li>
|
||||
<li>Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF
|
||||
images).</li>
|
||||
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
|
||||
WMS, TMS).</li>
|
||||
<li>Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases,
|
||||
GeoTIFF images).</li>
|
||||
<li>Elevation, speed, heart rate, cadence, power and temperature
|
||||
graphs.</li>
|
||||
<li>Support for multiple tracks in one view.</li>
|
||||
<li>Support for POI files.</li>
|
||||
<li>Print/export to PDF.</li>
|
||||
<li>Full-screen mode.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, OziExplorer (PLT, WPT, RTE)
|
||||
and Garmin CSV files.</li>
|
||||
<li>HiDPI/Retina displays & maps support.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
|
||||
WPT, RTE), GeoJSON and Garmin CSV files.</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
@ -38,6 +40,10 @@
|
||||
<categories>
|
||||
<category>Graphics</category>
|
||||
<category>Viewer</category>
|
||||
<category>Maps</category>
|
||||
<category>Geoscience</category>
|
||||
<category>Geography</category>
|
||||
<category>DataVisualization</category>
|
||||
</categories>
|
||||
|
||||
<url type="homepage">http://www.gpxsee.org</url>
|
||||
@ -58,5 +64,8 @@
|
||||
<mimetype>application/vnd.oziexplorer.plt</mimetype>
|
||||
<mimetype>application/vnd.oziexplorer.rte</mimetype>
|
||||
<mimetype>application/vnd.oziexplorer.wpt</mimetype>
|
||||
<mimetype>application/loc+xml</mimetype>
|
||||
<mimetype>application/slf+xml</mimetype>
|
||||
<mimetype>application/geo+json</mimetype>
|
||||
</mimetypes>
|
||||
</component>
|
||||
|
@ -859,6 +859,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,,,,,,,,,
|
||||
@ -1085,6 +1087,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,,,,,,
|
||||
@ -1161,6 +1182,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,,,
|
||||
@ -1608,6 +1630,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 +1640,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 +1872,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,,,,,,
|
||||
@ -3682,3 +3706,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;
|
||||
|
@ -1,36 +1,13 @@
|
||||
!include "MUI2.nsh"
|
||||
!include "x64.nsh"
|
||||
!include "WinVer.nsh"
|
||||
|
||||
|
||||
; Macros
|
||||
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
||||
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}" "" "${DESC}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,${ICON}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||
!macroend
|
||||
|
||||
!macro FILE_ASSOCIATION_REMOVE EXT
|
||||
DeleteRegKey HKCR "GPXSee.${EXT}"
|
||||
DeleteRegKey HKCR ".${EXT}"
|
||||
!macroend
|
||||
|
||||
!macro LOCALIZATION LANG CODE
|
||||
Section "${LANG}"
|
||||
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
|
||||
!include "macros.nsh"
|
||||
|
||||
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.0"
|
||||
!define VERSION "7.2"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}.exe"
|
||||
@ -129,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
|
||||
@ -154,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"
|
||||
@ -203,12 +182,16 @@ SectionEnd
|
||||
|
||||
SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "Czech" "cs"
|
||||
!insertmacro LOCALIZATION "Danish" "da"
|
||||
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||
!insertmacro LOCALIZATION "French" "fr"
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Spanish" "es"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
!insertmacro LOCALIZATION "Turkish" "tr"
|
||||
SectionGroupEnd
|
||||
|
||||
;--------------------------------
|
||||
@ -242,6 +225,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
|
||||
|
@ -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>
|
||||
|
@ -1,36 +1,13 @@
|
||||
!include "MUI2.nsh"
|
||||
!include "x64.nsh"
|
||||
!include "WinVer.nsh"
|
||||
|
||||
|
||||
; Macros
|
||||
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
||||
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}" "" "${DESC}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,${ICON}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||
!macroend
|
||||
|
||||
!macro FILE_ASSOCIATION_REMOVE EXT
|
||||
DeleteRegKey HKCR "GPXSee.${EXT}"
|
||||
DeleteRegKey HKCR ".${EXT}"
|
||||
!macroend
|
||||
|
||||
!macro LOCALIZATION LANG CODE
|
||||
Section "${LANG}"
|
||||
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
|
||||
!include "macros.nsh"
|
||||
|
||||
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.0"
|
||||
!define VERSION "7.2"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
@ -136,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
|
||||
@ -161,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"
|
||||
@ -205,12 +184,16 @@ SectionEnd
|
||||
|
||||
SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "Czech" "cs"
|
||||
!insertmacro LOCALIZATION "Danish" "da"
|
||||
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||
!insertmacro LOCALIZATION "French" "fr"
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Spanish" "es"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
!insertmacro LOCALIZATION "Turkish" "tr"
|
||||
SectionGroupEnd
|
||||
|
||||
;--------------------------------
|
||||
@ -245,6 +228,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
|
||||
|
24
pkg/macros.nsh
Normal file
@ -0,0 +1,24 @@
|
||||
; File association
|
||||
!macro FILE_ASSOCIATION_ADD EXT DESC ICON
|
||||
WriteRegStr HKCR ".${EXT}" "" "GPXSee.${EXT}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}" "" "${DESC}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,${ICON}"
|
||||
WriteRegStr HKCR "GPXSee.${EXT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||
!macroend
|
||||
|
||||
!macro FILE_ASSOCIATION_REMOVE EXT
|
||||
DeleteRegKey HKCR "GPXSee.${EXT}"
|
||||
DeleteRegKey HKCR ".${EXT}"
|
||||
!macroend
|
||||
|
||||
; Translations
|
||||
!macro LOCALIZATION LANG CODE
|
||||
Section "${LANG}"
|
||||
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
|
@ -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>
|
||||
|
@ -5,26 +5,37 @@
|
||||
#include <QNetworkProxyFactory>
|
||||
#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));
|
||||
@ -34,13 +45,27 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
#ifdef Q_OS_MAC
|
||||
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
Downloader::setNetworkAccessManager(new QNetworkAccessManager(this));
|
||||
/* 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());
|
||||
#endif // ENABLE_HTTP2
|
||||
Downloader::setTimeout(settings.value(CONNECTION_TIMEOUT_SETTING,
|
||||
CONNECTION_TIMEOUT_DEFAULT).toInt());
|
||||
settings.endGroup();
|
||||
|
||||
_gui = new GUI();
|
||||
}
|
||||
|
||||
@ -49,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)
|
||||
@ -71,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;
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <cmath>
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "nicenum.h"
|
||||
#include "common/util.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);
|
||||
|
@ -7,9 +7,14 @@ CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
_max = graph.first().y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
qreal y = graph.at(i).y();
|
||||
sum += y * (graph.at(i).s() - graph.at(i-1).s());
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
}
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
|
@ -11,13 +11,13 @@ public:
|
||||
CadenceGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal max() const {return _max;}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
qreal _avg, _max;
|
||||
};
|
||||
|
||||
#endif // CADENCEGRAPHITEM_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"
|
||||
|
@ -7,6 +7,7 @@ ElevationGraphItem::ElevationGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
_ascent = _descent = 0;
|
||||
_min = _max = graph.first().y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++) {
|
||||
qreal cur = graph.at(j).y();
|
||||
@ -16,6 +17,11 @@ ElevationGraphItem::ElevationGraphItem(const Graph &graph, GraphType type,
|
||||
_ascent += cur - prev;
|
||||
if (cur < prev)
|
||||
_descent += prev - cur;
|
||||
|
||||
if (cur < _min)
|
||||
_min = cur;
|
||||
if (cur > _max)
|
||||
_max = 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 min() const {return _min;}
|
||||
qreal max() const {return _max;}
|
||||
|
||||
void setUnits(Units units);
|
||||
|
||||
private:
|
||||
QString toolTip(Units units) const;
|
||||
|
||||
qreal _ascent, _descent;
|
||||
qreal _ascent, _descent, _min, _max;
|
||||
};
|
||||
|
||||
#endif // ELEVATIONGRAPHITEM_H
|
||||
|
@ -22,7 +22,8 @@ ExportDialog::ExportDialog(Export *exp, QWidget *parent)
|
||||
int index;
|
||||
|
||||
_fileSelect = new FileSelectWidget();
|
||||
_fileSelect->setFilter(tr("PDF files (*.pdf);;All files (*)"));
|
||||
_fileSelect->setFilter(tr("PDF files") + " (*.pdf);;" + tr("All files")
|
||||
+ " (*)");
|
||||
_fileSelect->setFile(_export->fileName);
|
||||
|
||||
_paperSize = new QComboBox();
|
||||
|
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
|
@ -8,11 +8,18 @@ GearRatioGraphItem::GearRatioGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent), _top(NAN)
|
||||
{
|
||||
qreal val = NAN;
|
||||
_min = _max = graph.first().y();
|
||||
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
const GraphPoint &p = graph.at(i);
|
||||
|
||||
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()));
|
||||
_map.insert(p.y(), val + (p.s() - graph.at(i-1).s()));
|
||||
|
||||
if (p.y() < _min)
|
||||
_min = p.y();
|
||||
if (p.y() > _max)
|
||||
_max = p.y();
|
||||
}
|
||||
|
||||
for (QMap<qreal, qreal>::const_iterator it = _map.constBegin();
|
||||
|
@ -12,8 +12,8 @@ public:
|
||||
GearRatioGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal min() const {return -bounds().bottom();}
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal min() const {return _min;}
|
||||
qreal max() const {return _max;}
|
||||
qreal top() const {return _top;}
|
||||
|
||||
const QMap<qreal, qreal> &map() const {return _map;}
|
||||
@ -22,7 +22,7 @@ private:
|
||||
QString toolTip() const;
|
||||
|
||||
QMap<qreal, qreal> _map;
|
||||
qreal _top;
|
||||
qreal _top, _min, _max;
|
||||
};
|
||||
|
||||
#endif // GEARRATIOGRAPHITEM_H
|
||||
|
@ -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,11 +27,11 @@ 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);
|
||||
@ -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;
|
||||
|
||||
|
169
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"
|
||||
@ -108,14 +109,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 +120,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()));
|
||||
}
|
||||
|
||||
@ -147,44 +138,47 @@ void GUI::createMapActions()
|
||||
_mapsActionGroup = new QActionGroup(this);
|
||||
_mapsActionGroup->setExclusive(true);
|
||||
|
||||
for (int i = 0; i < _ml->maps().count(); i++) {
|
||||
QAction *a = new QAction(_ml->maps().at(i)->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
|
||||
_mapsSignalMapper->setMapping(a, i);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
|
||||
_mapActions.append(a);
|
||||
}
|
||||
for (int i = 0; i < _ml->maps().count(); i++)
|
||||
createMapAction(_ml->maps().at(i));
|
||||
|
||||
connect(_mapsSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SLOT(mapChanged(int)));
|
||||
}
|
||||
|
||||
QAction *GUI::createMapAction(const Map *map)
|
||||
{
|
||||
QAction *a = new QAction(map->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
|
||||
_mapActions.append(a);
|
||||
_mapsSignalMapper->setMapping(a, _mapActions.size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
void GUI::createPOIFilesActions()
|
||||
{
|
||||
_poiFilesSignalMapper = new QSignalMapper(this);
|
||||
|
||||
for (int i = 0; i < _poi->files().count(); i++)
|
||||
createPOIFileAction(i);
|
||||
createPOIFileAction(_poi->files().at(i));
|
||||
|
||||
connect(_poiFilesSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SLOT(poiFileChecked(int)));
|
||||
}
|
||||
|
||||
QAction *GUI::createPOIFileAction(int index)
|
||||
QAction *GUI::createPOIFileAction(const QString &fileName)
|
||||
{
|
||||
QAction *a = new QAction(QFileInfo(_poi->files().at(index)).fileName(),
|
||||
this);
|
||||
QAction *a = new QAction(QFileInfo(fileName).fileName(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
|
||||
_poiFilesSignalMapper->setMapping(a, index);
|
||||
connect(a, SIGNAL(triggered()), _poiFilesSignalMapper, SLOT(map()));
|
||||
|
||||
_poiFilesActions.append(a);
|
||||
_poiFilesSignalMapper->setMapping(a, _poiFilesActions.size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _poiFilesSignalMapper, SLOT(map()));
|
||||
|
||||
return a;
|
||||
}
|
||||
@ -641,14 +635,15 @@ void GUI::about()
|
||||
QUrl homepage(APP_HOMEPAGE);
|
||||
|
||||
msgBox.setWindowTitle(tr("About GPXSee"));
|
||||
msgBox.setText("<h2>" + QString(APP_NAME) + "</h2><p><p>" + tr("Version ")
|
||||
+ APP_VERSION + " (" + CPU_ARCH + ", Qt " + QT_VERSION_STR + ")</p>");
|
||||
msgBox.setText("<h2>" + QString(APP_NAME) + "</h2><p><p>" + tr("Version %1")
|
||||
.arg(QString(APP_VERSION) + " (" + CPU_ARCH + ", Qt " + QT_VERSION_STR
|
||||
+ ")") + "</p>");
|
||||
msgBox.setInformativeText("<table width=\"300\"><tr><td>"
|
||||
+ tr("GPXSee is distributed under the terms of the GNU General Public "
|
||||
"License version 3. For more info about GPXSee visit the project "
|
||||
"homepage at ") + "<a href=\"" + homepage.toString() + "\">"
|
||||
+ homepage.toString(QUrl::RemoveScheme).mid(2)
|
||||
+ "</a>.</td></tr></table>");
|
||||
"homepage at %1.").arg("<a href=\"" + homepage.toString() + "\">"
|
||||
+ homepage.toString(QUrl::RemoveScheme).mid(2) + "</a>")
|
||||
+ "</td></tr></table>");
|
||||
|
||||
QIcon icon = msgBox.windowIcon();
|
||||
QSize size = icon.actualSize(QSize(64, 64));
|
||||
@ -698,19 +693,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();
|
||||
@ -754,11 +747,11 @@ 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();
|
||||
@ -838,7 +831,15 @@ bool GUI::openPOIFile(const QString &fileName)
|
||||
if (fileName.isEmpty() || _poi->files().contains(fileName))
|
||||
return false;
|
||||
|
||||
if (!_poi->loadFile(fileName)) {
|
||||
if (_poi->loadFile(fileName)) {
|
||||
_mapView->showPOI(true);
|
||||
_showPOIAction->setChecked(true);
|
||||
QAction *action = createPOIFileAction(fileName);
|
||||
action->setChecked(true);
|
||||
_poiFilesMenu->addAction(action);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
QString error = tr("Error loading POI file:") + "\n\n"
|
||||
+ fileName + "\n\n" + _poi->errorString();
|
||||
if (_poi->errorLine())
|
||||
@ -846,14 +847,6 @@ bool GUI::openPOIFile(const QString &fileName)
|
||||
QMessageBox::critical(this, APP_NAME, error);
|
||||
|
||||
return false;
|
||||
} else {
|
||||
_mapView->showPOI(true);
|
||||
_showPOIAction->setChecked(true);
|
||||
QAction *action = createPOIFileAction(_poi->files().indexOf(fileName));
|
||||
action->setChecked(true);
|
||||
_poiFilesMenu->addAction(action);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -882,6 +875,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;
|
||||
@ -921,20 +919,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)
|
||||
@ -1294,18 +1299,11 @@ bool GUI::loadMap(const QString &fileName)
|
||||
return false;
|
||||
|
||||
if (_ml->loadFile(fileName)) {
|
||||
QAction *a = new QAction(_ml->maps().last()->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
_mapsSignalMapper->setMapping(a, _ml->maps().size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
_mapActions.append(a);
|
||||
QAction *a = createMapAction(_ml->maps().last());
|
||||
_mapMenu->insertAction(_mapsEnd, a);
|
||||
_showMapAction->setEnabled(true);
|
||||
_clearMapCacheAction->setEnabled(true);
|
||||
_mapActions.last()->trigger();
|
||||
|
||||
a->trigger();
|
||||
return true;
|
||||
} else {
|
||||
QString error = tr("Error loading map:") + "\n\n"
|
||||
@ -1618,7 +1616,7 @@ void GUI::dropEvent(QDropEvent *event)
|
||||
|
||||
void GUI::writeSettings()
|
||||
{
|
||||
QSettings settings(APP_NAME, APP_NAME);
|
||||
QSettings settings(qApp->applicationName(), qApp->applicationName());
|
||||
settings.clear();
|
||||
|
||||
settings.beginGroup(WINDOW_SETTINGS_GROUP);
|
||||
@ -1770,8 +1768,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
|
||||
@ -1813,7 +1815,7 @@ 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());
|
||||
@ -2008,10 +2010,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
|
||||
@ -2063,7 +2069,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++) {
|
||||
@ -2085,14 +2092,12 @@ 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);
|
||||
Downloader::setTimeout(_options.connectionTimeout);
|
||||
#ifdef ENABLE_HTTP2
|
||||
Downloader::enableHTTP2(_options.enableHTTP2);
|
||||
#endif // ENABLE_HTTP2
|
||||
|
||||
settings.endGroup();
|
||||
}
|
||||
@ -2150,7 +2155,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)));
|
||||
@ -2166,6 +2172,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
|
||||
}
|
||||
|
@ -96,7 +96,8 @@ private:
|
||||
void closeFiles();
|
||||
void plot(QPrinter *printer);
|
||||
|
||||
QAction *createPOIFileAction(int index);
|
||||
QAction *createPOIFileAction(const QString &fileName);
|
||||
QAction *createMapAction(const Map *map);
|
||||
void createPOIFilesActions();
|
||||
void createMapActions();
|
||||
void createActions();
|
||||
|
@ -7,9 +7,14 @@ HeartRateGraphItem::HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
_max = graph.first().y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
qreal y = graph.at(i).y();
|
||||
sum += y * (graph.at(i).s() - graph.at(i-1).s());
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
}
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
|
@ -11,13 +11,13 @@ public:
|
||||
HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal max() const {return _max;}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
qreal _avg, _max;
|
||||
};
|
||||
|
||||
#endif // HEARTRATEGRAPHITEM_H
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "infoitem.h"
|
||||
|
||||
#define PADDING 10
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include "kv.h"
|
||||
#include "common/kv.h"
|
||||
|
||||
class InfoItem : public QGraphicsItem
|
||||
{
|
||||
|
@ -18,9 +18,10 @@
|
||||
|
||||
#define MAX_DIGITAL_ZOOM 2
|
||||
#define MIN_DIGITAL_ZOOM -3
|
||||
#define MARGIN 10.0
|
||||
#define MARGIN 10
|
||||
#define SCALE_OFFSET 7
|
||||
|
||||
|
||||
MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
: QGraphicsView(parent)
|
||||
{
|
||||
@ -72,7 +73,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;
|
||||
@ -145,7 +147,7 @@ PathItem *MapView::addRoute(const Route &route)
|
||||
return ri;
|
||||
}
|
||||
|
||||
void MapView::addWaypoints(const QList<Waypoint> &waypoints)
|
||||
void MapView::addWaypoints(const QVector<Waypoint> &waypoints)
|
||||
{
|
||||
for (int i = 0; i < waypoints.count(); i++) {
|
||||
const Waypoint &w = waypoints.at(i);
|
||||
@ -270,7 +272,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()));
|
||||
|
||||
@ -438,10 +440,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 +507,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
|
||||
@ -566,7 +568,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);
|
||||
@ -844,19 +846,21 @@ 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++)
|
||||
@ -877,6 +881,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,12 @@
|
||||
#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"
|
||||
|
||||
class Data;
|
||||
class POI;
|
||||
@ -69,7 +69,7 @@ public slots:
|
||||
void showRouteWaypoints(bool show);
|
||||
void clearMapCache();
|
||||
void setCoordinatesFormat(CoordinatesFormat format);
|
||||
void setDevicePixelRatio(qreal ratio);
|
||||
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
||||
|
||||
private slots:
|
||||
void updatePOI();
|
||||
@ -78,7 +78,7 @@ private slots:
|
||||
private:
|
||||
PathItem *addTrack(const Track &track);
|
||||
PathItem *addRoute(const Route &route);
|
||||
void addWaypoints(const QList<Waypoint> &waypoints);
|
||||
void addWaypoints(const QVector<Waypoint> &waypoints);
|
||||
void addPOI(const QList<Waypoint> &waypoints);
|
||||
void loadPOI();
|
||||
void clearPOI();
|
||||
@ -140,7 +140,8 @@ private:
|
||||
bool _plot;
|
||||
|
||||
#ifdef ENABLE_HIDPI
|
||||
qreal _ratio;
|
||||
qreal _deviceRatio;
|
||||
qreal _mapRatio;
|
||||
#endif // ENABLE_HIDPI
|
||||
bool _opengl;
|
||||
};
|
||||
|
@ -1,6 +0,0 @@
|
||||
#ifndef MISC_H
|
||||
#define MISC_H
|
||||
|
||||
double niceNum(double x, int round);
|
||||
|
||||
#endif // MISC_H
|
@ -345,31 +345,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 +431,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);
|
||||
@ -603,13 +655,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;
|
||||
@ -49,8 +48,10 @@ struct Options {
|
||||
qreal pauseSpeed;
|
||||
int pauseInterval;
|
||||
bool useReportedSpeed;
|
||||
bool dataUseDEM;
|
||||
// POI
|
||||
int poiRadius;
|
||||
bool poiUseDEM;
|
||||
// System
|
||||
bool useOpenGL;
|
||||
#ifdef ENABLE_HTTP2
|
||||
@ -123,10 +124,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;
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include <cmath>
|
||||
#include <QApplication>
|
||||
#include <QCursor>
|
||||
#include <QPainter>
|
||||
#include "common/greatcircle.h"
|
||||
#include "map/map.h"
|
||||
#include "tooltip.h"
|
||||
#include "nicenum.h"
|
||||
#include "pathitem.h"
|
||||
|
||||
|
||||
@ -50,6 +47,7 @@ void PathItem::updateShape()
|
||||
void PathItem::addSegment(const Coordinates &c1, const Coordinates &c2)
|
||||
{
|
||||
if (fabs(c1.lon() - c2.lon()) > 180.0) {
|
||||
// Split segment on date line crossing
|
||||
QPointF p;
|
||||
|
||||
if (c2.lon() < 0) {
|
||||
|
@ -7,9 +7,14 @@ PowerGraphItem::PowerGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
_max = graph.first().y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
qreal y = graph.at(i).y();
|
||||
sum += y * (graph.at(i).s() - graph.at(i-1).s());
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
}
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip());
|
||||
|
@ -11,13 +11,13 @@ public:
|
||||
PowerGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal max() const {return _max;}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg;
|
||||
qreal _avg, _max;
|
||||
};
|
||||
|
||||
#endif // POWERGRAPHITEM_H
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include <cmath>
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "nicenum.h"
|
||||
#include "common/util.h"
|
||||
#include "font.h"
|
||||
#include "scaleitem.h"
|
||||
|
||||
|
||||
|
@ -126,8 +126,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"
|
||||
|
@ -13,6 +13,13 @@ SpeedGraphItem::SpeedGraphItem(const Graph &graph, GraphType type,
|
||||
_avg = graph.last().s() / graph.last().t();
|
||||
_mavg = graph.last().s() / movingTime;
|
||||
|
||||
_max = graph.first().y();
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
qreal y = graph.at(i).y();
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
}
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ public:
|
||||
SpeedGraphItem(const Graph &graph, GraphType type, qreal movingTime,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal max() const {return _max;}
|
||||
qreal avg() const {return _avg;}
|
||||
qreal mavg() const {return _mavg;}
|
||||
|
||||
@ -22,7 +22,7 @@ public:
|
||||
private:
|
||||
QString toolTip() const;
|
||||
|
||||
qreal _avg, _mavg;
|
||||
qreal _avg, _mavg, _max;
|
||||
|
||||
Units _units;
|
||||
TimeType _timeType;
|
||||
|
@ -9,28 +9,32 @@
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*a))
|
||||
|
||||
|
||||
static Qt::PenStyle styles[] = {Qt::SolidLine, Qt::DashLine, Qt::DotLine,
|
||||
Qt::DashDotLine, Qt::DashDotDotLine};
|
||||
|
||||
QIcon StyleComboBox::icon(Qt::PenStyle style)
|
||||
{
|
||||
QPixmap pm(iconSize());
|
||||
pm.fill(Qt::transparent);
|
||||
|
||||
QBrush brush(QPalette().brush(QPalette::Active, QPalette::WindowText));
|
||||
QPen pen(brush, pm.height() / LINE_WIDTH_RATIO, style);
|
||||
|
||||
QPainter painter(&pm);
|
||||
painter.setPen(pen);
|
||||
painter.drawLine(0, pm.height() / 2, pm.width(), pm.height() / 2);
|
||||
|
||||
return QIcon(pm);
|
||||
}
|
||||
|
||||
StyleComboBox::StyleComboBox(QWidget *parent) : QComboBox(parent)
|
||||
{
|
||||
Qt::PenStyle styles[] = {Qt::SolidLine, Qt::DashLine, Qt::DotLine,
|
||||
Qt::DashDotLine, Qt::DashDotDotLine};
|
||||
|
||||
QSize is = iconSize();
|
||||
setIconSize(QSize(MIN_LINE_LENGTH, is.height()));
|
||||
is = iconSize();
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(styles); i++) {
|
||||
QPixmap pm(is);
|
||||
pm.fill(Qt::transparent);
|
||||
|
||||
QBrush brush(Qt::black);
|
||||
QPen pen(brush, is.height() / LINE_WIDTH_RATIO, styles[i]);
|
||||
|
||||
QPainter painter(&pm);
|
||||
painter.setPen(pen);
|
||||
painter.drawLine(0, is.height() / 2, is.width(), is.height() / 2);
|
||||
|
||||
addItem(QIcon(pm), QString(), QVariant((int)styles[i]));
|
||||
}
|
||||
for (size_t i = 0; i < ARRAY_SIZE(styles); i++)
|
||||
addItem(icon(styles[i]), QString(), QVariant((int)styles[i]));
|
||||
}
|
||||
|
||||
void StyleComboBox::setValue(Qt::PenStyle value)
|
||||
@ -42,3 +46,12 @@ void StyleComboBox::setValue(Qt::PenStyle value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StyleComboBox::changeEvent(QEvent *e)
|
||||
{
|
||||
if (e->type() == QEvent::PaletteChange)
|
||||
for (int i = 0; i < count(); i++)
|
||||
setItemIcon(i, icon(styles[i]));
|
||||
|
||||
QComboBox::changeEvent(e);
|
||||
}
|
||||
|
@ -11,6 +11,12 @@ public:
|
||||
StyleComboBox(QWidget *parent = 0);
|
||||
|
||||
void setValue(Qt::PenStyle value);
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
private:
|
||||
QIcon icon(Qt::PenStyle style);
|
||||
};
|
||||
|
||||
#endif // STYLECOMBOBOX_H
|
||||
|
@ -7,9 +7,18 @@ TemperatureGraphItem::TemperatureGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||
{
|
||||
qreal sum = 0;
|
||||
_min = _max = graph.first().y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++) {
|
||||
qreal y = graph.at(j).y();
|
||||
|
||||
for (int j = 1; j < graph.size(); j++)
|
||||
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
if (y < _min)
|
||||
_min = y;
|
||||
}
|
||||
_avg = sum/graph.last().s();
|
||||
|
||||
setToolTip(toolTip(Metric));
|
||||
|
@ -11,8 +11,8 @@ public:
|
||||
TemperatureGraphItem(const Graph &graph, GraphType type,
|
||||
QGraphicsItem *parent = 0);
|
||||
|
||||
qreal max() const {return -bounds().top();}
|
||||
qreal min() const {return -bounds().bottom();}
|
||||
qreal max() const {return _max;}
|
||||
qreal min() const {return _min;}
|
||||
qreal avg() const {return _avg;}
|
||||
|
||||
void setUnits(Units units);
|
||||
@ -20,7 +20,7 @@ public:
|
||||
private:
|
||||
QString toolTip(Units units) const;
|
||||
|
||||
qreal _avg;
|
||||
qreal _avg, _min, _max;
|
||||
};
|
||||
|
||||
#endif // TEMPERATUREGRAPHITEM_H
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
void ToolTip::insert(const QString &key, const QString &value)
|
||||
{
|
||||
QPair<QString, QString> entry(key, value);
|
||||
_list.append(entry);
|
||||
_list.append(KV(key, value));
|
||||
}
|
||||
|
||||
QString ToolTip::toString()
|
||||
@ -11,8 +10,8 @@ QString ToolTip::toString()
|
||||
QString ret = "<table>";
|
||||
|
||||
for (int i = 0; i < _list.count(); i++)
|
||||
ret += "<tr><td align=\"right\"><b>" + _list.at(i).first
|
||||
+ ": </b></td><td>" + _list.at(i).second + "</td></tr>";
|
||||
ret += "<tr><td align=\"right\"><b>" + _list.at(i).key()
|
||||
+ ": </b></td><td>" + _list.at(i).value() + "</td></tr>";
|
||||
|
||||
ret += "</table>";
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
#include "common/kv.h"
|
||||
|
||||
class ToolTip
|
||||
{
|
||||
@ -12,7 +12,7 @@ public:
|
||||
QString toString();
|
||||
|
||||
private:
|
||||
QList<QPair<QString, QString> > _list;
|
||||
QList<KV> _list;
|
||||
};
|
||||
|
||||
#endif // TOOLTIP_H
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <QPaintEngine>
|
||||
#include <QPaintDevice>
|
||||
#include "config.h"
|
||||
#include "infoitem.h"
|
||||
#include "trackinfo.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
#include "config.h"
|
||||
#include "font.h"
|
||||
#include "tooltip.h"
|
||||
#include "waypointitem.h"
|
||||
|
||||
|
17
src/common/config.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
#define APP_NAME "GPXSee"
|
||||
#define APP_HOMEPAGE "http://www.gpxsee.org"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 1)
|
||||
#define ENABLE_HTTP2
|
||||
#endif // QT >= 5.10.1
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
#define ENABLE_HIDPI
|
||||
#endif // QT >= 5.6
|
||||
|
||||
#endif /* CONFIG_H */
|
@ -32,6 +32,8 @@ private:
|
||||
double _lat, _lon;
|
||||
};
|
||||
|
||||
Q_DECLARE_TYPEINFO(Coordinates, Q_PRIMITIVE_TYPE);
|
||||
|
||||
inline bool operator==(const Coordinates &c1, const Coordinates &c2)
|
||||
{return (c1.lat() == c2.lat() && c1.lon() == c2.lon());}
|
||||
inline bool operator!=(const Coordinates &c1, const Coordinates &c2)
|
||||
|