1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-06 07:32:51 +02:00

Compare commits

...

118 Commits
9.0 ... 9.2

Author SHA1 Message Date
0935ce45b6 Localization update/fix 2021-06-29 23:11:56 +02:00
442fc24776 Merge branch 'origin/master' into Weblate. 2021-06-29 21:34:57 +02:00
2f6556dbb3 Remove the forced combobox style causing huge performance drawback 2021-06-29 21:34:00 +02:00
a54bfbadab Merge branch 'origin/master' into Weblate. 2021-06-29 21:33:12 +02:00
e9220d5526 Worldfiles OS X desktop integration 2021-06-29 21:32:27 +02:00
e90959ff34 Translated using Weblate (Polish)
Currently translated at 100.0% (399 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pl/
2021-06-29 13:33:17 +02:00
17ed28ebf7 Cosmetics 2021-06-28 23:48:02 +02:00
e9cd0963dc Finalize the projection combo box redesign 2021-06-28 23:47:20 +02:00
fa0f7f95d2 Improve map projections combo box creation time
(but make the combo box less user-friendly)
2021-06-27 22:19:19 +02:00
0dcfeeead1 Fixed error handling 2021-06-27 21:27:02 +02:00
af9ba34521 WLD files windows integration 2021-06-27 20:57:54 +02:00
8e26ed5a50 wld files association (linux) 2021-06-27 17:30:18 +02:00
141f88e46e Merge branch 'origin/master' into Weblate. 2021-06-27 16:36:05 +02:00
c84b677938 Czech translation update 2021-06-27 16:36:21 +02:00
31bd85bcc8 Version++ 2021-06-27 16:24:40 +02:00
c0c7e9046a Code cleanup 2021-06-27 16:00:27 +02:00
f5ea667f34 Improved error handling 2021-06-27 16:00:08 +02:00
04b8d015cc Merge branch 'origin/master' into Weblate. 2021-06-27 16:00:06 +02:00
3db2828874 Translated using Weblate (Polish)
Currently translated at 99.4% (397 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pl/
2021-06-25 00:09:57 +02:00
1a3660ba2f Cosmetics 2021-06-22 07:42:48 +02:00
a8b76f350d Merge branch 'origin/master' into Weblate. 2021-06-22 07:42:37 +02:00
e49351a7c9 Merge branch 'origin/master' into Weblate. 2021-06-21 23:35:43 +02:00
057c625283 Improve WKT parsing compatability 2021-06-21 23:35:31 +02:00
47d9eea1af Use propper basename in extension replace 2021-06-21 23:34:29 +02:00
c60aa8876b Translated using Weblate (Hungarian)
Currently translated at 100.0% (399 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/hu/
2021-06-19 12:32:46 +02:00
31db5f2140 Translated using Weblate (Russian)
Currently translated at 100.0% (399 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2021-06-19 12:32:46 +02:00
9ff94f3b24 Translated using Weblate (Finnish)
Currently translated at 98.4% (393 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2021-06-19 12:32:46 +02:00
334e0c3b37 Translated using Weblate (Swedish)
Currently translated at 100.0% (399 of 399 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2021-06-18 07:40:13 +02:00
3244dd675d Fixed QT6 build 2021-06-17 22:40:37 +02:00
6f093b2148 Localization update 2021-06-17 22:15:13 +02:00
319f1180f1 Cosmetics 2021-06-17 22:13:31 +02:00
ec5a1c7851 Added support for world file maps 2021-06-17 21:58:25 +02:00
4ada19b4bf Reverted all the crazy changes done by user "caspertone2003" using weblate 2021-06-07 00:39:34 +02:00
1777e708d3 Translated using Weblate (Spanish)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/es/
2021-06-07 00:31:02 +02:00
fd590c83d1 Merge branch 'origin/master' into Weblate. 2021-06-06 16:56:54 +02:00
811d41c26f Always check whether the file is at the end 2021-06-06 16:56:26 +02:00
8887e5d7a7 Merge branch 'origin/master' into Weblate. 2021-06-06 08:06:32 +02:00
8ac739c50a Translated using Weblate (Spanish)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/es/
2021-06-06 08:06:31 +02:00
d291320832 Allow "quoted" CSV files not ending with CRLF 2021-06-06 08:04:21 +02:00
14c90e3eb0 Merge branch 'origin/master' into Weblate. 2021-06-04 21:08:21 +02:00
7163441cb5 Fixed pixel align issue 2021-06-04 21:04:09 +02:00
1cb478e707 Merge branch 'origin/master' into Weblate. 2021-05-31 22:38:14 +02:00
8589716a59 A little bit more sane bitmask 2021-05-31 22:37:55 +02:00
9973236912 Merge branch 'origin/master' into Weblate. 2021-05-29 23:15:08 +02:00
aff4dc9408 Fixed lat/lon error checks 2021-05-29 23:14:26 +02:00
c173a0372f Merge branch 'origin/master' into Weblate. 2021-05-29 13:10:02 +02:00
c7ef24ff30 Added TomTom OV2 and ITN support info 2021-05-29 13:09:58 +02:00
ee36404613 Merge branch 'origin/master' into Weblate. 2021-05-29 00:27:39 +02:00
c9083c184b Added missing icns resources (ov2 & itn) 2021-05-29 00:26:36 +02:00
918a55732f Use smaller icns files generated by rsvg instead of imagemagick 2021-05-29 00:24:12 +02:00
bfca1a127b Use rsvg instead of imagemagick for SVG->PNG conversion on OS X 2021-05-29 00:22:24 +02:00
89044d215b Merge branch 'origin/master' into Weblate. 2021-05-29 00:19:58 +02:00
86993863c5 Make the fullscreen shortcut more standard
(+ fix Travis CI OS X build)
2021-05-29 00:17:53 +02:00
28333ffc28 Merge branch 'origin/master' into Weblate. 2021-05-28 07:20:28 +02:00
723f2060a3 Brew on Travis CI has QT 6.x which requires XCode 12 2021-05-28 07:20:07 +02:00
190a4a437a Merge branch 'origin/master' into Weblate. 2021-05-27 23:22:46 +02:00
cbe03a7a29 Try some newer Travis CI OS X image, maybe it will work... 2021-05-27 23:22:27 +02:00
11c9fd6d48 Merge branch 'origin/master' into Weblate. 2021-05-27 22:08:59 +02:00
a53f20314f Improved/fixed data dir changes handling 2021-05-27 22:08:40 +02:00
59e680d695 Added missing OS X ov2 and itn integration 2021-05-27 22:07:44 +02:00
d39bd296f6 Properly handle Mapsforge world maps 2021-05-27 22:07:09 +02:00
441ccc59d0 Added support for font-family style parameters 2021-05-27 22:06:14 +02:00
a74495a5e2 Translated using Weblate (Polish)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pl/
2021-05-26 18:34:17 +02:00
0f8478c380 Removed Chiness translation stub
(There is evidently no real interest in translating anything)
2021-05-23 10:30:13 +02:00
d1cd1be878 Translated using Weblate (Polish)
Currently translated at 99.4% (396 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pl/
2021-05-23 10:26:22 +02:00
596e1fd754 Translated using Weblate (Italian)
Currently translated at 98.7% (393 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/it/
2021-05-19 14:36:17 +02:00
bfa7eea6ed Translated using Weblate (French)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2021-05-19 14:36:16 +02:00
7ad051ddd5 Translated using Weblate (German)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2021-05-19 14:36:16 +02:00
52d715e3ce Merge branch 'origin/master' into Weblate. 2021-05-14 22:58:52 +02:00
2748849032 Fixed rendering issues when digital zoom is active 2021-05-14 22:57:35 +02:00
0f48e7c137 Also accept broken ITN files generated by GPSBabel 2021-05-14 22:56:38 +02:00
f3c0ed3f7f Added workaround for broken IGC files created by XCSoar
closes #371
2021-05-14 22:47:09 +02:00
d1faf6c2c5 Translated using Weblate (Esperanto)
Currently translated at 96.4% (384 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/eo/
2021-05-14 20:38:19 +02:00
e0dc4ea352 Translated using Weblate (Hungarian)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/hu/
2021-05-14 20:38:19 +02:00
2235231723 Translated using Weblate (Ukrainian)
Currently translated at 96.4% (384 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/uk/
2021-05-14 20:38:18 +02:00
b8c2f77fee Translated using Weblate (Turkish)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2021-05-14 20:38:18 +02:00
c5516071ab Translated using Weblate (Swedish)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2021-05-14 20:38:18 +02:00
64307c0641 Translated using Weblate (Russian)
Currently translated at 100.0% (398 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2021-05-14 20:38:17 +02:00
7ccb80cb91 Translated using Weblate (Finnish)
Currently translated at 98.9% (394 of 398 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2021-05-14 20:38:17 +02:00
38d6f52965 Merge branch 'origin/master' into Weblate. 2021-05-12 22:17:45 +02:00
854454248e Czech translation 2021-05-12 22:17:28 +02:00
1b66dc4744 Merge branch 'origin/master' into Weblate. 2021-05-12 22:02:42 +02:00
87df10d099 OV2/ITM desktop integration 2021-05-12 22:02:04 +02:00
f310230fd3 Localization update 2021-05-12 22:00:48 +02:00
b9e3e81ac1 Added support for waypoint phone data
+ address waypoint data where missing
2021-05-12 21:58:46 +02:00
c84c3bfd65 Translated using Weblate (Swedish)
Currently translated at 100.0% (397 of 397 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2021-05-12 19:45:04 +02:00
86cb33266d Translated using Weblate (Turkish)
Currently translated at 100.0% (397 of 397 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2021-05-12 19:45:04 +02:00
881f380cf0 Translated using Weblate (Hungarian)
Currently translated at 100.0% (397 of 397 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/hu/
2021-05-12 19:45:04 +02:00
637820930b Merge branch 'origin/master' into Weblate. 2021-05-12 07:48:28 +02:00
4b2bee2368 Localization update 2021-05-12 07:48:13 +02:00
86e8ac71ee Added support for TomTom ITN files 2021-05-12 07:44:25 +02:00
ae270de0c5 Merge branch 'origin/master' into Weblate. 2021-05-12 07:44:24 +02:00
9dccc113f5 Translated using Weblate (Hungarian)
Currently translated at 100.0% (396 of 396 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/hu/
2021-05-11 09:32:00 +02:00
4b4053e85b Translated using Weblate (Turkish)
Currently translated at 100.0% (396 of 396 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2021-05-11 09:32:00 +02:00
72b550f209 Translated using Weblate (Swedish)
Currently translated at 100.0% (396 of 396 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2021-05-11 09:31:59 +02:00
9373c7070b Translated using Weblate (Russian)
Currently translated at 100.0% (396 of 396 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2021-05-11 09:31:59 +02:00
5efd3d1e33 Propper entry text trim 2021-05-10 08:26:19 +02:00
411428718e Localization update 2021-05-09 22:46:00 +02:00
6f0a6511db Version++ 2021-05-09 22:43:54 +02:00
4c65cb186a Merge branch 'origin/master' into Weblate. 2021-05-09 22:40:40 +02:00
14b884f61a Removed obsolete include 2021-05-09 22:40:24 +02:00
6a941566cb Added support for TomTom OV2 files 2021-05-09 22:39:39 +02:00
64aa44d09b Fixed "Show POI laels" setting 2021-05-09 22:36:37 +02:00
cbaecee4a8 Code cleanup 2021-05-09 22:35:05 +02:00
3908c363d9 Translated using Weblate (German)
Currently translated at 100.0% (395 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2021-05-07 00:09:49 +02:00
ff8be4206c Translated using Weblate (Italian)
Currently translated at 93.1% (368 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/it/
2021-05-07 00:09:49 +02:00
fc75bbfbc3 Merge branch 'origin/master' into Weblate. 2021-04-28 00:01:36 +02:00
95c9b42f66 Translated using Weblate (Esperanto)
Currently translated at 96.4% (381 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/eo/
2021-04-28 00:01:36 +02:00
9ed4418e1b Translated using Weblate (Ukrainian)
Currently translated at 96.4% (381 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/uk/
2021-04-28 00:01:35 +02:00
0b634b33ad Translated using Weblate (Finnish)
Currently translated at 98.9% (391 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2021-04-28 00:01:35 +02:00
2e2fee560f Switched to Qt5 signal/slot API 2021-04-28 00:01:07 +02:00
527f9891c8 Translated using Weblate (Esperanto)
Currently translated at 96.2% (380 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/eo/
2021-04-27 21:31:51 +02:00
8c8ad4a4ba Merge branch 'origin/master' into Weblate. 2021-04-25 10:01:29 +02:00
9f3917b0f2 Fixed crash when loading Trekbuddy atlases or Garmin GMAP as map dirs. 2021-04-25 10:00:15 +02:00
7673154795 Merge branch 'origin/master' into Weblate. 2021-04-24 05:18:06 +02:00
e05c47b9ce Translated using Weblate (French)
Currently translated at 100.0% (395 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2021-04-24 05:18:06 +02:00
d33bcd1e55 Also read subsequent spatial indexes on the same level 2021-04-24 05:17:12 +02:00
f248e1a735 Translated using Weblate (Russian)
Currently translated at 100.0% (395 of 395 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2021-04-22 12:03:18 +02:00
167 changed files with 7331 additions and 7543 deletions

View File

@ -1,4 +1,4 @@
version: 9.0.{build}
version: 9.2.{build}
configuration:
- Release

View File

@ -5,6 +5,7 @@ os:
- osx
dist: focal
osx_image: xcode12
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi

View File

@ -2,7 +2,7 @@
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, NMEA, IGC, CUP, SIGMA SLF, Suunto SML, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin GPI&CSV and geotagged JPEG files.
* Opens GPX, TCX, FIT, KML, NMEA, IGC, CUP, SIGMA SLF, Suunto SML, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin GPI&CSV, TomTom OV2&ITN and geotagged JPEG files.
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS, QuadTiles).
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin IMG/GMAP & JNX maps, TwoNav RMaps, GeoTIFF images, BSB charts, KMZ maps, AlpineQuest maps, Locus/OsmAnd/RMaps SQLite maps, Mapsforge vector maps).
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.

View File

@ -3,7 +3,7 @@ unix:!macx {
} else {
TARGET = GPXSee
}
VERSION = 9.0
VERSION = 9.2
QT += core \
gui \
@ -90,7 +90,9 @@ HEADERS += src/common/config.h \
src/GUI/mapview.h \
src/GUI/font.h \
src/GUI/areaitem.h \
src/data/itnparser.h \
src/data/link.h \
src/data/ov2parser.h \
src/map/IMG/bitmapline.h \
src/map/IMG/bitstream.h \
src/map/IMG/deltastream.h \
@ -105,6 +107,7 @@ HEADERS += src/common/config.h \
src/map/IMG/rastertile.h \
src/map/IMG/shield.h \
src/map/mapsforge/style.h \
src/map/prjfile.h \
src/map/textpathitem.h \
src/map/textpointitem.h \
src/map/mapsforge/mapdata.h \
@ -147,6 +150,7 @@ HEADERS += src/common/config.h \
src/map/ct.h \
src/map/mapsource.h \
src/map/tileloader.h \
src/map/wldfile.h \
src/map/wmtsmap.h \
src/map/wmts.h \
src/map/wmsmap.h \
@ -205,7 +209,7 @@ HEADERS += src/common/config.h \
src/map/IMG/subdiv.h \
src/map/IMG/style.h \
src/map/IMG/netfile.h \
src/GUI/limitedcombobox.h \
src/GUI/projectioncombobox.h \
src/GUI/pathtickitem.h \
src/map/textitem.h \
src/map/IMG/label.h \
@ -219,7 +223,8 @@ HEADERS += src/common/config.h \
src/data/geojsonparser.h \
src/GUI/timezoneinfo.h \
src/map/aqmmap.h \
src/map/mapsforgemap.h
src/map/mapsforgemap.h \
src/map/worldfilemap.h
SOURCES += src/main.cpp \
src/GUI/axislabelitem.cpp \
@ -277,6 +282,9 @@ SOURCES += src/main.cpp \
src/GUI/gearratiographitem.cpp \
src/GUI/mapview.cpp \
src/GUI/areaitem.cpp \
src/data/address.cpp \
src/data/itnparser.cpp \
src/data/ov2parser.cpp \
src/data/waypoint.cpp \
src/map/IMG/bitmapline.cpp \
src/map/IMG/bitstream.cpp \
@ -290,6 +298,7 @@ SOURCES += src/main.cpp \
src/map/IMG/mapdata.cpp \
src/map/IMG/rastertile.cpp \
src/map/mapsforge/style.cpp \
src/map/prjfile.cpp \
src/map/textpathitem.cpp \
src/map/textpointitem.cpp \
src/map/mapsforge/mapdata.cpp \
@ -327,6 +336,7 @@ SOURCES += src/main.cpp \
src/map/linearunits.cpp \
src/map/mapsource.cpp \
src/map/tileloader.cpp \
src/map/wldfile.cpp \
src/map/wmtsmap.cpp \
src/map/wmts.cpp \
src/map/wmsmap.cpp \
@ -384,7 +394,9 @@ SOURCES += src/main.cpp \
src/GUI/pngexportdialog.cpp \
src/data/geojsonparser.cpp \
src/map/aqmmap.cpp \
src/map/mapsforgemap.cpp
src/map/mapsforgemap.cpp \
src/map/worldfilemap.cpp \
src/GUI/projectioncombobox.cpp
DEFINES += APP_VERSION=\\\"$$VERSION\\\" \
QT_NO_DEPRECATED_WARNINGS
@ -456,7 +468,10 @@ macx {
icons/formats/rmap.icns \
icons/formats/tba.icns \
icons/formats/aqm.icns \
icons/formats/sqlt.icns
icons/formats/sqlt.icns \
icons/formats/ov2.icns \
icons/formats/itn.icns \
icons/formats/wld.icns
QMAKE_BUNDLE_DATA += locale maps icons csv
}
@ -485,7 +500,10 @@ win32 {
icons/formats/rmap.ico \
icons/formats/tba.ico \
icons/formats/aqm.ico \
icons/formats/sqlt.ico
icons/formats/sqlt.ico \
icons/formats/ov2.ico \
icons/formats/itn.ico \
icons/formats/wld.ico
DEFINES += _USE_MATH_DEFINES \
NOGDI
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
icons/formats/itn.icns Normal file

Binary file not shown.

BIN
icons/formats/itn.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
icons/formats/ov2.icns Normal file

Binary file not shown.

BIN
icons/formats/ov2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -22,3 +22,6 @@ rmap:#145cba
tba:#367050
aqm:#32a89e
sqlt:#303030
ov2:#a8c920
itn:#b8540d
wld:#c74c8f

View File

@ -9,16 +9,16 @@ while read e; do
ICONSET=$1.iconset
mkdir $ICONSET
convert -density 400 -background none -resize '16x16' "$1.svg" "$ICONSET/icon_16x16.png"
convert -density 400 -background none -resize '32x32' "$1.svg" "$ICONSET/icon_16x16@2x.png"
rsvg-convert -w 16 -h 16 -o "$ICONSET/icon_16x16.png" "$1.svg"
rsvg-convert -w 32 -h 32 -o "$ICONSET/icon_16x16@2x.png" "$1.svg"
cp "$ICONSET/icon_16x16@2x.png" "$ICONSET/icon_32x32.png"
convert -density 400 -background none -resize '64x64' "$1.svg" "$ICONSET/icon_32x32@2x.png"
convert -density 400 -background none -resize '128x128' "$1.svg" "$ICONSET/icon_128x128.png"
convert -density 400 -background none -resize '256x256' "$1.svg" "$ICONSET/icon_128x128@2x.png"
rsvg-convert -w 64 -h 64 -o "$ICONSET/icon_32x32@2x.png" "$1.svg"
rsvg-convert -w 128 -h 128 -o "$ICONSET/icon_128x128.png" "$1.svg"
rsvg-convert -w 256 -h 256 -o "$ICONSET/icon_128x128@2x.png" "$1.svg"
cp "$ICONSET/icon_128x128@2x.png" "$ICONSET/icon_256x256.png"
convert -density 400 -background none -resize '512x512' "$1.svg" "$ICONSET/icon_256x256@2x.png"
rsvg-convert -w 512 -h 512 -o "$ICONSET/icon_256x256@2x.png" "$1.svg"
cp "$ICONSET/icon_256x256@2x.png" "$ICONSET/icon_512x512.png"
convert -density 400 -background none -resize '1024x1024' "$1.svg" "$ICONSET/icon_512x512@2x.png"
rsvg-convert -w 1024 -h 1024 -o "$ICONSET/icon_512x512@2x.png" "$1.svg"
iconutil -c icns -o $1.icns "$ICONSET"
rm -R "$ICONSET" $1.svg

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
icons/formats/wld.icns Normal file

Binary file not shown.

BIN
icons/formats/wld.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -494,6 +494,58 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>ov2</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.tomtom.ov2</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/ov2.icns</string>
<key>CFBundleTypeName</key>
<string>TomTom POI File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>itn</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.tomtom.itn</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/itn.icns</string>
<key>CFBundleTypeName</key>
<string>TomTom Route File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>wld</string>
<string>jgw</string>
<string>gfw</string>
<string>pgw</string>
<string>tfw</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.esri.wld</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/wld.icns</string>
<key>CFBundleTypeName</key>
<string>ESRI World File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
@ -1113,6 +1165,73 @@
<string>image/tiff</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tomtom.ov2</string>
<key>UTTypeReferenceURL</key>
<string>https://www.tomtom.com/lib/doc/ttnavsdk3_manual.pdf</string>
<key>UTTypeDescription</key>
<string>TomTom POI File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>ov2</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.tomtom.ov2</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.tomtom.itn</string>
<key>UTTypeReferenceURL</key>
<string>https://www.tomtom.com/lib/doc/ttnavsdk3_manual.pdf</string>
<key>UTTypeDescription</key>
<string>TomTom Route File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>itn</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.tomtom.itn</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.esri.wld</string>
<key>UTTypeReferenceURL</key>
<string>http://webhelp.esri.com/arcims/9.3/General/topics/author_world_files.htm</string>
<key>UTTypeDescription</key>
<string>ESRI World File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>wld</string>
<string>jgw</string>
<string>gfw</string>
<string>pgw</string>
<string>tfw</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.esri.wld</string>
</dict>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>

View File

@ -14,13 +14,14 @@
<ul>
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SIGMA SLF, Suunto SML, LOC,
OziExplorer (PLT, WPT, RTE), GeoJSON, SeeYou CUP,
Garmin GPI &amp; CSV and geotagged JPEG files.</li>
Garmin GPI &amp; CSV, TomTom OV2 &amp; ITN and geotagged JPEG
files.</li>
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
WMS, TMS, QuadTiles).</li>
<li>Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases,
TwoNav RMaps, Garmin IMG &amp; JNX maps, GeoTIFF images,
BSB nautical charts, KMZ maps, AlpineQuest maps,
Mapsforge maps).</li>
Mapsforge maps), ESRI world files.</li>
<li>Elevation, speed, heart rate, cadence, power, temperature and
gear ratio graphs.</li>
<li>Support for multiple tracks in one view.</li>
@ -91,5 +92,8 @@
<mimetype>application/vnd.alpinequest.aqm</mimetype>
<mimetype>application/vnd.rmaps.sqlite</mimetype>
<mimetype>application/vnd.mapsforge.map</mimetype>
<mimetype>application/vnd.tomtom.ov2</mimetype>
<mimetype>application/vnd.tomtom.itn</mimetype>
<mimetype>application/vnd.esri.wld</mimetype>
</mimetypes>
</component>

View File

@ -15,4 +15,4 @@ Icon=gpxsee
Terminal=false
Type=Application
Categories=Graphics;Viewer;Education;Geography;Maps;Sports;Qt
MimeType=application/gpx+xml;application/vnd.garmin.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/vnd.groundspeak.loc+xml;application/vnd.sigma.slf+xml;application/geo+json;application/vnd.naviter.seeyou.cup;application/vnd.garmin.gpi;application/vnd.suunto.sml+xml;image/jpeg;text/csv;application/vnd.garmin.img;application/vnd.garmin.jnx;application/vnd.garmin.gmap+xml;image/vnd.maptech.kap;application/vnd.oziexplorer.map;application/vnd.mapbox.mbtiles;application/vnd.twonav.rmap;application/vnd.trekbuddy.tba;application/vnd.gpxsee.map+xml;application/x-tar;image/tiff;application/vnd.google-earth.kmz;application/vnd.alpinequest.aqm;application/vnd.rmaps.sqlite;application/vnd.mapsforge.map
MimeType=application/gpx+xml;application/vnd.garmin.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/vnd.groundspeak.loc+xml;application/vnd.sigma.slf+xml;application/geo+json;application/vnd.naviter.seeyou.cup;application/vnd.garmin.gpi;application/vnd.suunto.sml+xml;image/jpeg;text/csv;application/vnd.garmin.img;application/vnd.garmin.jnx;application/vnd.garmin.gmap+xml;image/vnd.maptech.kap;application/vnd.oziexplorer.map;application/vnd.mapbox.mbtiles;application/vnd.twonav.rmap;application/vnd.trekbuddy.tba;application/vnd.gpxsee.map+xml;application/x-tar;image/tiff;application/vnd.google-earth.kmz;application/vnd.alpinequest.aqm;application/vnd.rmaps.sqlite;application/vnd.mapsforge.map;application/vnd.tomtom.ov2;application/vnd.tomtom.itn;application/vnd.esri.wld

View File

@ -9,7 +9,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "9.0"
!define VERSION "9.2"
; The file to write
OutFile "GPXSee-${VERSION}.exe"
@ -130,15 +130,22 @@ Section "GPXSee" SEC_APP
!insertmacro FILE_ASSOCIATION_ADD "rmap" "TwoNav Raster Map File" 14
!insertmacro FILE_ASSOCIATION_ADD "tba" "TrekBuddy Atlas" 15
!insertmacro FILE_ASSOCIATION_ADD "aqm" "AlpineQuest Map File" 16
!insertmacro FILE_ASSOCIATION_ADD "sqlitedb" "RMAps SQLite Map File" 17
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 18
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 19
!insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 19
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 20
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 21
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 22
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 23
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 24
!insertmacro FILE_ASSOCIATION_ADD "sqlitedb" "RMaps SQLite Map File" 17
!insertmacro FILE_ASSOCIATION_ADD "ov2" "TomTom POI File" 18
!insertmacro FILE_ASSOCIATION_ADD "itn" "TomTom Route File" 19
!insertmacro FILE_ASSOCIATION_ADD "wld" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "jgw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "gfw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "pgw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "tfw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 21
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 22
!insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 22
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 23
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 24
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 25
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 26
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 27
WriteRegStr HKCR "Applications\GPXSee.exe\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".gpx\OpenWithList" "GPXSee.exe" ""
@ -156,6 +163,8 @@ Section "GPXSee" SEC_APP
WriteRegStr HKCR ".cup\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".gpi\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".sml\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".ov2\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".itn\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".csv\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".json\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".jpg\OpenWithList" "GPXSee.exe" ""
@ -175,7 +184,12 @@ Section "GPXSee" SEC_APP
WriteRegStr HKCR ".kmz\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".aqm\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".sqlitedb\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".wld\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".jgw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".gfw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".pgw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".tfw\OpenWithList" "GPXSee.exe" ""
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@ -292,6 +306,13 @@ Section "Uninstall"
!insertmacro FILE_ASSOCIATION_REMOVE "kmz"
!insertmacro FILE_ASSOCIATION_REMOVE "aqm"
!insertmacro FILE_ASSOCIATION_REMOVE "sqlitedb"
!insertmacro FILE_ASSOCIATION_REMOVE "ov2"
!insertmacro FILE_ASSOCIATION_REMOVE "itn"
!insertmacro FILE_ASSOCIATION_REMOVE "wld"
!insertmacro FILE_ASSOCIATION_REMOVE "jgw"
!insertmacro FILE_ASSOCIATION_REMOVE "gfw"
!insertmacro FILE_ASSOCIATION_REMOVE "pgw"
!insertmacro FILE_ASSOCIATION_REMOVE "tfw"
DeleteRegValue HKCR ".gpx\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".tcx\OpenWithList" "GPXSee.exe"
@ -308,6 +329,8 @@ Section "Uninstall"
DeleteRegValue HKCR ".cup\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".gpi\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".sml\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".ov2\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".itn\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".csv\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".json\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".jpg\OpenWithList" "GPXSee.exe"
@ -327,6 +350,11 @@ Section "Uninstall"
DeleteRegValue HKCR ".kmz\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".aqm\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".sqlitedb\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".wld\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".jgw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".gfw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".pgw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".tfw\OpenWithList" "GPXSee.exe"
DeleteRegKey HKCR "Applications\GPXSee.exe"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
@ -359,4 +387,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

View File

@ -128,6 +128,19 @@
<glob pattern="*.sml"/>
</mime-type>
<mime-type type="application/vnd.tomtom.ov2">
<comment>TomTom POI File</comment>
<sub-class-of type="application/octet-stream"/>
<generic-icon name="application/octet-stream"/>
<glob pattern="*.ov2"/>
</mime-type>
<mime-type type="application/vnd.tomtom.itn">
<comment>TomTom Route File</comment>
<sub-class-of type="text/csv"/>
<generic-icon name="text/csv"/>
<glob pattern="*.itn"/>
</mime-type>
<!-- Maps -->
@ -247,4 +260,15 @@
<glob pattern="*.map"/>
</mime-type>
<mime-type type="application/vnd.esri.wld">
<comment>ESRI World File</comment>
<sub-class-of type="text/plain"/>
<generic-icon name="text/plain"/>
<glob pattern="*.wld"/>
<glob pattern="*.jgw"/>
<glob pattern="*.gfw"/>
<glob pattern="*.pgw"/>
<glob pattern="*.tfw"/>
</mime-type>
</mime-info>

View File

@ -9,7 +9,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "9.0"
!define VERSION "9.2"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
@ -138,14 +138,21 @@ Section "GPXSee" SEC_APP
!insertmacro FILE_ASSOCIATION_ADD "tba" "TrekBuddy Atlas" 15
!insertmacro FILE_ASSOCIATION_ADD "aqm" "AlpineQuest Map File" 16
!insertmacro FILE_ASSOCIATION_ADD "sqlitedb" "RMaps SQLite Map File" 17
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 18
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 19
!insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 19
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 20
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 21
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 22
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 23
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 24
!insertmacro FILE_ASSOCIATION_ADD "ov2" "TomTom POI File" 18
!insertmacro FILE_ASSOCIATION_ADD "itn" "TomTom Route File" 19
!insertmacro FILE_ASSOCIATION_ADD "wld" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "jgw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "gfw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "pgw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "tfw" "ESRI World File" 20
!insertmacro FILE_ASSOCIATION_ADD "tcx" "Training Center XML" 21
!insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 22
!insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 22
!insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 23
!insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 24
!insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 25
!insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 26
!insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 27
WriteRegStr HKCR "Applications\GPXSee.exe\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".gpx\OpenWithList" "GPXSee.exe" ""
@ -163,6 +170,8 @@ Section "GPXSee" SEC_APP
WriteRegStr HKCR ".cup\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".gpi\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".sml\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".ov2\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".itn\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".csv\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".json\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".jpg\OpenWithList" "GPXSee.exe" ""
@ -182,6 +191,11 @@ Section "GPXSee" SEC_APP
WriteRegStr HKCR ".kmz\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".aqm\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".sqlitedb\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".wld\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".jgw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".gfw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".pgw\OpenWithList" "GPXSee.exe" ""
WriteRegStr HKCR ".tfw\OpenWithList" "GPXSee.exe" ""
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
@ -315,6 +329,13 @@ Section "Uninstall"
!insertmacro FILE_ASSOCIATION_REMOVE "kmz"
!insertmacro FILE_ASSOCIATION_REMOVE "aqm"
!insertmacro FILE_ASSOCIATION_REMOVE "sqlitedb"
!insertmacro FILE_ASSOCIATION_REMOVE "ov2"
!insertmacro FILE_ASSOCIATION_REMOVE "itn"
!insertmacro FILE_ASSOCIATION_REMOVE "wld"
!insertmacro FILE_ASSOCIATION_REMOVE "jgw"
!insertmacro FILE_ASSOCIATION_REMOVE "gfw"
!insertmacro FILE_ASSOCIATION_REMOVE "pgw"
!insertmacro FILE_ASSOCIATION_REMOVE "tfw"
DeleteRegValue HKCR ".gpx\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".tcx\OpenWithList" "GPXSee.exe"
@ -331,6 +352,8 @@ Section "Uninstall"
DeleteRegValue HKCR ".cup\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".gpi\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".sml\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".ov2\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".itn\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".csv\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".json\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".jpg\OpenWithList" "GPXSee.exe"
@ -350,6 +373,11 @@ Section "Uninstall"
DeleteRegValue HKCR ".kmz\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".aqm\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".sqlitedb\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".wld\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".jgw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".gfw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".pgw\OpenWithList" "GPXSee.exe"
DeleteRegValue HKCR ".tfw\OpenWithList" "GPXSee.exe"
DeleteRegKey HKCR "Applications\GPXSee.exe"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
@ -382,4 +410,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

View File

@ -7,8 +7,8 @@ FileBrowser::FileBrowser(QObject *parent) : QObject(parent)
{
_watcher = new QFileSystemWatcher(this);
connect(_watcher, SIGNAL(directoryChanged(const QString &)), this,
SLOT(reloadDirectory(const QString &)));
connect(_watcher, &QFileSystemWatcher::directoryChanged, this,
&FileBrowser::reloadDirectory);
_index = -1;
}
@ -83,8 +83,10 @@ QString FileBrowser::first()
void FileBrowser::reloadDirectory(const QString &path)
{
QDir dir(path);
QFileInfo current = _files.at(_index);
QFileInfo current = (_index >= 0) ? _files.at(_index) : QFileInfo();
_files = dir.entryInfoList(_filter, QDir::Files);
_index = _files.empty() ? -1 : _files.indexOf(current);
emit listChanged();
}

View File

@ -25,6 +25,9 @@ public:
bool isLast() const;
bool isFirst() const;
signals:
void listChanged();
private slots:
void reloadDirectory(const QString &path);

View File

@ -21,7 +21,7 @@ FileSelectWidget::FileSelectWidget(QWidget *parent) : QWidget(parent)
_button = new QToolButton();
_button->setText("...");
#endif // Q_OS_WIN32
connect(_button, SIGNAL(clicked()), this, SLOT(browse()));
connect(_button, &QToolButton::clicked, this, &FileSelectWidget::browse);
QHBoxLayout *layout = new QHBoxLayout();
layout->setContentsMargins(QMargins());

View File

@ -56,8 +56,8 @@ GraphView::GraphView(QWidget *parent)
_message->setBrush(QPalette().brush(QPalette::Disabled,
QPalette::WindowText));
connect(_slider, SIGNAL(positionChanged(const QPointF&)), this,
SLOT(emitSliderPositionChanged(const QPointF&)));
connect(_slider, &SliderItem::positionChanged, this,
&GraphView::emitSliderPositionChanged);
_width = 1;

View File

@ -31,6 +31,7 @@
#include "map/maplist.h"
#include "map/emptymap.h"
#include "map/downloader.h"
#include "map/crs.h"
#include "icons.h"
#include "keys.h"
#include "settings.h"
@ -109,20 +110,22 @@ void GUI::createBrowser()
{
_browser = new FileBrowser(this);
_browser->setFilter(Data::filter());
connect(_browser, &FileBrowser::listChanged, this,
&GUI::updateNavigationActions);
}
TreeNode<MapAction*> GUI::createMapActions()
{
_mapsActionGroup = new QActionGroup(this);
_mapsActionGroup->setExclusive(true);
connect(_mapsActionGroup, SIGNAL(triggered(QAction*)), this,
SLOT(mapChanged(QAction*)));
connect(_mapsActionGroup, &QActionGroup::triggered, this, &GUI::mapChanged);
QString mapDir(ProgramPaths::mapDir());
if (mapDir.isNull())
return TreeNode<MapAction*>();
TreeNode<Map*> maps(MapList::loadMaps(mapDir));
TreeNode<Map*> maps(MapList::loadMaps(mapDir,
CRS::projection(_options.inputProjection)));
return createMapActionsNode(maps);
}
@ -137,7 +140,7 @@ TreeNode<MapAction*> GUI::createMapActionsNode(const TreeNode<Map*> &node)
Map *map = node.items().at(i);
if (map->isValid()) {
MapAction *a = new MapAction(map, _mapsActionGroup);
connect(a, SIGNAL(loaded()), this, SLOT(mapInitialized()));
connect(a, &MapAction::loaded, this, &GUI::mapInitialized);
tree.addItem(a);
} else {
qWarning("%s: %s", qPrintable(map->path()),
@ -169,8 +172,8 @@ TreeNode<POIAction *> GUI::createPOIActions()
{
_poisActionGroup = new QActionGroup(this);
_poisActionGroup->setExclusive(false);
connect(_poisActionGroup, SIGNAL(triggered(QAction*)), this,
SLOT(poiFileChecked(QAction*)));
connect(_poisActionGroup, &QActionGroup::triggered, this,
&GUI::poiFileChecked);
TreeNode<QString> poiFiles;
QString poiDir(ProgramPaths::poiDir());
@ -209,64 +212,65 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_exitAction = new QAction(QIcon(QUIT_ICON), tr("Quit"), this);
_exitAction->setShortcut(QUIT_SHORTCUT);
_exitAction->setMenuRole(QAction::QuitRole);
connect(_exitAction, SIGNAL(triggered()), this, SLOT(close()));
connect(_exitAction, &QAction::triggered, this, &GUI::close);
addAction(_exitAction);
// Help & About
_pathsAction = new QAction(tr("Paths"), this);
_pathsAction->setMenuRole(QAction::NoRole);
connect(_pathsAction, SIGNAL(triggered()), this, SLOT(paths()));
connect(_pathsAction, &QAction::triggered, this, &GUI::paths);
_keysAction = new QAction(tr("Keyboard controls"), this);
_keysAction->setMenuRole(QAction::NoRole);
connect(_keysAction, SIGNAL(triggered()), this, SLOT(keys()));
connect(_keysAction, &QAction::triggered, this, &GUI::keys);
_aboutAction = new QAction(QIcon(APP_ICON), tr("About GPXSee"), this);
_aboutAction->setMenuRole(QAction::AboutRole);
connect(_aboutAction, SIGNAL(triggered()), this, SLOT(about()));
connect(_aboutAction, &QAction::triggered, this, &GUI::about);
// File actions
_openFileAction = new QAction(QIcon(OPEN_FILE_ICON), tr("Open..."), this);
_openFileAction->setMenuRole(QAction::NoRole);
_openFileAction->setShortcut(OPEN_SHORTCUT);
connect(_openFileAction, SIGNAL(triggered()), this, SLOT(openFile()));
connect(_openFileAction, &QAction::triggered, this,
QOverload<>::of(&GUI::openFile));
addAction(_openFileAction);
_printFileAction = new QAction(QIcon(PRINT_FILE_ICON), tr("Print..."),
this);
_printFileAction->setMenuRole(QAction::NoRole);
_printFileAction->setActionGroup(_fileActionGroup);
connect(_printFileAction, SIGNAL(triggered()), this, SLOT(printFile()));
connect(_printFileAction, &QAction::triggered, this, &GUI::printFile);
addAction(_printFileAction);
_exportPDFFileAction = new QAction(QIcon(EXPORT_FILE_ICON),
tr("Export to PDF..."), this);
_exportPDFFileAction->setMenuRole(QAction::NoRole);
_exportPDFFileAction->setShortcut(PDF_EXPORT_SHORTCUT);
_exportPDFFileAction->setActionGroup(_fileActionGroup);
connect(_exportPDFFileAction, SIGNAL(triggered()), this, SLOT(exportPDFFile()));
connect(_exportPDFFileAction, &QAction::triggered, this, &GUI::exportPDFFile);
addAction(_exportPDFFileAction);
_exportPNGFileAction = new QAction(QIcon(EXPORT_FILE_ICON),
tr("Export to PNG..."), this);
_exportPNGFileAction->setMenuRole(QAction::NoRole);
_exportPNGFileAction->setShortcut(PNG_EXPORT_SHORTCUT);
_exportPNGFileAction->setActionGroup(_fileActionGroup);
connect(_exportPNGFileAction, SIGNAL(triggered()), this, SLOT(exportPNGFile()));
connect(_exportPNGFileAction, &QAction::triggered, this, &GUI::exportPNGFile);
addAction(_exportPNGFileAction);
_closeFileAction = new QAction(QIcon(CLOSE_FILE_ICON), tr("Close"), this);
_closeFileAction->setMenuRole(QAction::NoRole);
_closeFileAction->setShortcut(CLOSE_SHORTCUT);
_closeFileAction->setActionGroup(_fileActionGroup);
connect(_closeFileAction, SIGNAL(triggered()), this, SLOT(closeAll()));
connect(_closeFileAction, &QAction::triggered, this, &GUI::closeAll);
addAction(_closeFileAction);
_reloadFileAction = new QAction(QIcon(RELOAD_FILE_ICON), tr("Reload"),
this);
_reloadFileAction->setMenuRole(QAction::NoRole);
_reloadFileAction->setShortcut(RELOAD_SHORTCUT);
_reloadFileAction->setActionGroup(_fileActionGroup);
connect(_reloadFileAction, SIGNAL(triggered()), this, SLOT(reloadFiles()));
connect(_reloadFileAction, &QAction::triggered, this, &GUI::reloadFiles);
addAction(_reloadFileAction);
_statisticsAction = new QAction(tr("Statistics..."), this);
_statisticsAction->setMenuRole(QAction::NoRole);
_statisticsAction->setShortcut(STATISTICS_SHORTCUT);
_statisticsAction->setActionGroup(_fileActionGroup);
connect(_statisticsAction, SIGNAL(triggered()), this, SLOT(statistics()));
connect(_statisticsAction, &QAction::triggered, this, &GUI::statistics);
addAction(_statisticsAction);
// POI actions
@ -274,33 +278,33 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_openPOIAction = new QAction(QIcon(OPEN_FILE_ICON), tr("Load POI file..."),
this);
_openPOIAction->setMenuRole(QAction::NoRole);
connect(_openPOIAction, SIGNAL(triggered()), this, SLOT(openPOIFile()));
connect(_openPOIAction, &QAction::triggered, this,
QOverload<>::of(&GUI::openPOIFile));
_selectAllPOIAction = new QAction(tr("Select all files"), this);
_selectAllPOIAction->setMenuRole(QAction::NoRole);
_selectAllPOIAction->setEnabled(!_poisActionGroup->actions().isEmpty());
connect(_selectAllPOIAction, SIGNAL(triggered()), this,
SLOT(selectAllPOIs()));
connect(_selectAllPOIAction, &QAction::triggered, this,
&GUI::selectAllPOIs);
_unselectAllPOIAction = new QAction(tr("Unselect all files"), this);
_unselectAllPOIAction->setMenuRole(QAction::NoRole);
_unselectAllPOIAction->setEnabled(_selectAllPOIAction->isEnabled());
connect(_unselectAllPOIAction, SIGNAL(triggered()), this,
SLOT(unselectAllPOIs()));
connect(_unselectAllPOIAction, &QAction::triggered, this,
&GUI::unselectAllPOIs);
_overlapPOIAction = new QAction(tr("Overlap POIs"), this);
_overlapPOIAction->setMenuRole(QAction::NoRole);
_overlapPOIAction->setCheckable(true);
connect(_overlapPOIAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showOverlappedPOIs(bool)));
connect(_overlapPOIAction, &QAction::triggered, _mapView,
&MapView::showOverlappedPOIs);
_showPOILabelsAction = new QAction(tr("Show POI labels"), this);
_showPOILabelsAction->setMenuRole(QAction::NoRole);
_showPOILabelsAction->setCheckable(true);
connect(_showPOILabelsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showPOILabels(bool)));
connect(_showPOILabelsAction, &QAction::triggered, _mapView,
&MapView::showPOILabels);
_showPOIAction = new QAction(QIcon(SHOW_POI_ICON), tr("Show POIs"), this);
_showPOIAction->setMenuRole(QAction::NoRole);
_showPOIAction->setCheckable(true);
_showPOIAction->setShortcut(SHOW_POI_SHORTCUT);
connect(_showPOIAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showPOI(bool)));
connect(_showPOIAction, &QAction::triggered, _mapView, &MapView::showPOI);
addAction(_showPOIAction);
// Map actions
@ -311,77 +315,76 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_showMapAction->setMenuRole(QAction::NoRole);
_showMapAction->setCheckable(true);
_showMapAction->setShortcut(SHOW_MAP_SHORTCUT);
connect(_showMapAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showMap(bool)));
connect(_showMapAction, &QAction::triggered, _mapView,
&MapView::showMap);
addAction(_showMapAction);
_loadMapAction = new QAction(QIcon(OPEN_FILE_ICON), tr("Load map..."),
this);
_loadMapAction->setMenuRole(QAction::NoRole);
connect(_loadMapAction, SIGNAL(triggered()), this, SLOT(loadMap()));
connect(_loadMapAction, &QAction::triggered, this,
QOverload<>::of(&GUI::loadMap));
_loadMapDirAction = new QAction(QIcon(OPEN_FILE_ICON),
tr("Load map directory..."), this);
_loadMapDirAction->setMenuRole(QAction::NoRole);
connect(_loadMapDirAction, SIGNAL(triggered()), this, SLOT(loadMapDir()));
connect(_loadMapDirAction, &QAction::triggered, this, &GUI::loadMapDir);
_clearMapCacheAction = new QAction(tr("Clear tile cache"), this);
_clearMapCacheAction->setEnabled(false);
_clearMapCacheAction->setMenuRole(QAction::NoRole);
connect(_clearMapCacheAction, SIGNAL(triggered()), this,
SLOT(clearMapCache()));
connect(_clearMapCacheAction, &QAction::triggered, this,
&GUI::clearMapCache);
_nextMapAction = new QAction(tr("Next map"), this);
_nextMapAction->setMenuRole(QAction::NoRole);
_nextMapAction->setShortcut(NEXT_MAP_SHORTCUT);
connect(_nextMapAction, SIGNAL(triggered()), this, SLOT(nextMap()));
connect(_nextMapAction, &QAction::triggered, this, &GUI::nextMap);
addAction(_nextMapAction);
_prevMapAction = new QAction(tr("Next map"), this);
_prevMapAction->setMenuRole(QAction::NoRole);
_prevMapAction->setShortcut(PREV_MAP_SHORTCUT);
connect(_prevMapAction, SIGNAL(triggered()), this, SLOT(prevMap()));
connect(_prevMapAction, &QAction::triggered, this, &GUI::prevMap);
addAction(_prevMapAction);
_showCoordinatesAction = new QAction(tr("Show cursor coordinates"), this);
_showCoordinatesAction->setMenuRole(QAction::NoRole);
_showCoordinatesAction->setCheckable(true);
connect(_showCoordinatesAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showCoordinates(bool)));
connect(_showCoordinatesAction, &QAction::triggered, _mapView,
&MapView::showCoordinates);
// Data actions
_showTracksAction = new QAction(tr("Show tracks"), this);
_showTracksAction->setMenuRole(QAction::NoRole);
_showTracksAction->setCheckable(true);
connect(_showTracksAction, SIGNAL(triggered(bool)), this,
SLOT(showTracks(bool)));
connect(_showTracksAction, &QAction::triggered, this, &GUI::showTracks);
_showRoutesAction = new QAction(tr("Show routes"), this);
_showRoutesAction->setMenuRole(QAction::NoRole);
_showRoutesAction->setCheckable(true);
connect(_showRoutesAction, SIGNAL(triggered(bool)), this,
SLOT(showRoutes(bool)));
connect(_showRoutesAction, &QAction::triggered, this, &GUI::showRoutes);
_showWaypointsAction = new QAction(tr("Show waypoints"), this);
_showWaypointsAction->setMenuRole(QAction::NoRole);
_showWaypointsAction->setCheckable(true);
connect(_showWaypointsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showWaypoints(bool)));
connect(_showWaypointsAction, &QAction::triggered, _mapView,
&MapView::showWaypoints);
_showAreasAction = new QAction(tr("Show areas"), this);
_showAreasAction->setMenuRole(QAction::NoRole);
_showAreasAction->setCheckable(true);
connect(_showAreasAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showAreas(bool)));
connect(_showAreasAction, &QAction::triggered, _mapView,
&MapView::showAreas);
_showWaypointLabelsAction = new QAction(tr("Waypoint labels"), this);
_showWaypointLabelsAction->setMenuRole(QAction::NoRole);
_showWaypointLabelsAction->setCheckable(true);
connect(_showWaypointLabelsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showWaypointLabels(bool)));
connect(_showWaypointLabelsAction, &QAction::triggered, _mapView,
&MapView::showWaypointLabels);
_showRouteWaypointsAction = new QAction(tr("Route waypoints"), this);
_showRouteWaypointsAction->setMenuRole(QAction::NoRole);
_showRouteWaypointsAction->setCheckable(true);
connect(_showRouteWaypointsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showRouteWaypoints(bool)));
connect(_showRouteWaypointsAction, &QAction::triggered, _mapView,
&MapView::showRouteWaypoints);
_showTicksAction = new QAction(tr("km/mi markers"), this);
_showTicksAction->setMenuRole(QAction::NoRole);
_showTicksAction->setCheckable(true);
connect(_showTicksAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showTicks(bool)));
connect(_showTicksAction, &QAction::triggered, _mapView,
&MapView::showTicks);
QActionGroup *markerInfoGroup = new QActionGroup(this);
connect(markerInfoGroup, SIGNAL(triggered(QAction*)), this,
SLOT(showPathMarkerInfo(QAction*)));
connect(markerInfoGroup, &QActionGroup::triggered, this,
&GUI::showPathMarkerInfo);
_hideMarkersAction = new QAction(tr("Do not show"), this);
_hideMarkersAction->setMenuRole(QAction::NoRole);
_hideMarkersAction->setCheckable(true);
@ -405,8 +408,7 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_showGraphsAction->setMenuRole(QAction::NoRole);
_showGraphsAction->setCheckable(true);
_showGraphsAction->setShortcut(SHOW_GRAPHS_SHORTCUT);
connect(_showGraphsAction, SIGNAL(triggered(bool)), this,
SLOT(showGraphs(bool)));
connect(_showGraphsAction, &QAction::triggered, this, &GUI::showGraphs);
addAction(_showGraphsAction);
ag = new QActionGroup(this);
ag->setExclusive(true);
@ -414,117 +416,110 @@ void GUI::createActions(TreeNode<MapAction*> &mapActions,
_distanceGraphAction->setMenuRole(QAction::NoRole);
_distanceGraphAction->setCheckable(true);
_distanceGraphAction->setActionGroup(ag);
connect(_distanceGraphAction, SIGNAL(triggered()), this,
SLOT(setDistanceGraph()));
connect(_distanceGraphAction, &QAction::triggered, this,
&GUI::setDistanceGraph);
addAction(_distanceGraphAction);
_timeGraphAction = new QAction(tr("Time"), this);
_timeGraphAction->setMenuRole(QAction::NoRole);
_timeGraphAction->setCheckable(true);
_timeGraphAction->setActionGroup(ag);
connect(_timeGraphAction, SIGNAL(triggered()), this,
SLOT(setTimeGraph()));
connect(_timeGraphAction, &QAction::triggered, this, &GUI::setTimeGraph);
addAction(_timeGraphAction);
_showGraphGridAction = new QAction(tr("Show grid"), this);
_showGraphGridAction->setMenuRole(QAction::NoRole);
_showGraphGridAction->setCheckable(true);
connect(_showGraphGridAction, SIGNAL(triggered(bool)), this,
SLOT(showGraphGrids(bool)));
connect(_showGraphGridAction, &QAction::triggered, this,
&GUI::showGraphGrids);
_showGraphSliderInfoAction = new QAction(tr("Show slider info"), this);
_showGraphSliderInfoAction->setMenuRole(QAction::NoRole);
_showGraphSliderInfoAction->setCheckable(true);
connect(_showGraphSliderInfoAction, SIGNAL(triggered(bool)), this,
SLOT(showGraphSliderInfo(bool)));
connect(_showGraphSliderInfoAction, &QAction::triggered, this,
&GUI::showGraphSliderInfo);
// Settings actions
_showToolbarsAction = new QAction(tr("Show toolbars"), this);
_showToolbarsAction->setMenuRole(QAction::NoRole);
_showToolbarsAction->setCheckable(true);
connect(_showToolbarsAction, SIGNAL(triggered(bool)), this,
SLOT(showToolbars(bool)));
connect(_showToolbarsAction, &QAction::triggered, this, &GUI::showToolbars);
ag = new QActionGroup(this);
ag->setExclusive(true);
_totalTimeAction = new QAction(tr("Total time"), this);
_totalTimeAction->setMenuRole(QAction::NoRole);
_totalTimeAction->setCheckable(true);
_totalTimeAction->setActionGroup(ag);
connect(_totalTimeAction, SIGNAL(triggered()), this,
SLOT(setTotalTime()));
connect(_totalTimeAction, &QAction::triggered, this, &GUI::setTotalTime);
_movingTimeAction = new QAction(tr("Moving time"), this);
_movingTimeAction->setMenuRole(QAction::NoRole);
_movingTimeAction->setCheckable(true);
_movingTimeAction->setActionGroup(ag);
connect(_movingTimeAction, SIGNAL(triggered()), this,
SLOT(setMovingTime()));
connect(_movingTimeAction, &QAction::triggered, this, &GUI::setMovingTime);
ag = new QActionGroup(this);
ag->setExclusive(true);
_metricUnitsAction = new QAction(tr("Metric"), this);
_metricUnitsAction->setMenuRole(QAction::NoRole);
_metricUnitsAction->setCheckable(true);
_metricUnitsAction->setActionGroup(ag);
connect(_metricUnitsAction, SIGNAL(triggered()), this,
SLOT(setMetricUnits()));
connect(_metricUnitsAction, &QAction::triggered, this, &GUI::setMetricUnits);
_imperialUnitsAction = new QAction(tr("Imperial"), this);
_imperialUnitsAction->setMenuRole(QAction::NoRole);
_imperialUnitsAction->setCheckable(true);
_imperialUnitsAction->setActionGroup(ag);
connect(_imperialUnitsAction, SIGNAL(triggered()), this,
SLOT(setImperialUnits()));
connect(_imperialUnitsAction, &QAction::triggered, this,
&GUI::setImperialUnits);
_nauticalUnitsAction = new QAction(tr("Nautical"), this);
_nauticalUnitsAction->setMenuRole(QAction::NoRole);
_nauticalUnitsAction->setCheckable(true);
_nauticalUnitsAction->setActionGroup(ag);
connect(_nauticalUnitsAction, SIGNAL(triggered()), this,
SLOT(setNauticalUnits()));
connect(_nauticalUnitsAction, &QAction::triggered, this,
&GUI::setNauticalUnits);
ag = new QActionGroup(this);
ag->setExclusive(true);
_decimalDegreesAction = new QAction(tr("Decimal degrees (DD)"), this);
_decimalDegreesAction->setMenuRole(QAction::NoRole);
_decimalDegreesAction->setCheckable(true);
_decimalDegreesAction->setActionGroup(ag);
connect(_decimalDegreesAction, SIGNAL(triggered()), this,
SLOT(setDecimalDegrees()));
connect(_decimalDegreesAction, &QAction::triggered, this,
&GUI::setDecimalDegrees);
_degreesMinutesAction = new QAction(tr("Degrees and decimal minutes (DMM)"),
this);
_degreesMinutesAction->setMenuRole(QAction::NoRole);
_degreesMinutesAction->setCheckable(true);
_degreesMinutesAction->setActionGroup(ag);
connect(_degreesMinutesAction, SIGNAL(triggered()), this,
SLOT(setDegreesMinutes()));
connect(_degreesMinutesAction, &QAction::triggered, this,
&GUI::setDegreesMinutes);
_dmsAction = new QAction(tr("Degrees, minutes, seconds (DMS)"), this);
_dmsAction->setMenuRole(QAction::NoRole);
_dmsAction->setCheckable(true);
_dmsAction->setActionGroup(ag);
connect(_dmsAction, SIGNAL(triggered()), this, SLOT(setDMS()));
connect(_dmsAction, &QAction::triggered, this, &GUI::setDMS);
_fullscreenAction = new QAction(QIcon(FULLSCREEN_ICON),
tr("Fullscreen mode"), this);
_fullscreenAction->setMenuRole(QAction::NoRole);
_fullscreenAction->setCheckable(true);
_fullscreenAction->setShortcut(FULLSCREEN_SHORTCUT);
connect(_fullscreenAction, SIGNAL(triggered(bool)), this,
SLOT(showFullscreen(bool)));
connect(_fullscreenAction, &QAction::triggered, this, &GUI::showFullscreen);
addAction(_fullscreenAction);
_openOptionsAction = new QAction(tr("Options..."), this);
_openOptionsAction->setMenuRole(QAction::PreferencesRole);
connect(_openOptionsAction, SIGNAL(triggered()), this,
SLOT(openOptions()));
connect(_openOptionsAction, &QAction::triggered, this, &GUI::openOptions);
// Navigation actions
_nextAction = new QAction(QIcon(NEXT_FILE_ICON), tr("Next"), this);
_nextAction->setActionGroup(_navigationActionGroup);
_nextAction->setMenuRole(QAction::NoRole);
connect(_nextAction, SIGNAL(triggered()), this, SLOT(next()));
connect(_nextAction, &QAction::triggered, this, &GUI::next);
_prevAction = new QAction(QIcon(PREV_FILE_ICON), tr("Previous"), this);
_prevAction->setMenuRole(QAction::NoRole);
_prevAction->setActionGroup(_navigationActionGroup);
connect(_prevAction, SIGNAL(triggered()), this, SLOT(prev()));
connect(_prevAction, &QAction::triggered, this, &GUI::prev);
_lastAction = new QAction(QIcon(LAST_FILE_ICON), tr("Last"), this);
_lastAction->setMenuRole(QAction::NoRole);
_lastAction->setActionGroup(_navigationActionGroup);
connect(_lastAction, SIGNAL(triggered()), this, SLOT(last()));
connect(_lastAction, &QAction::triggered, this, &GUI::last);
_firstAction = new QAction(QIcon(FIRST_FILE_ICON), tr("First"), this);
_firstAction->setMenuRole(QAction::NoRole);
_firstAction->setActionGroup(_navigationActionGroup);
connect(_firstAction, SIGNAL(triggered()), this, SLOT(first()));
connect(_firstAction, &QAction::triggered, this, &GUI::first);
}
void GUI::createMapNodeMenu(const TreeNode<MapAction*> &node, QMenu *menu)
@ -697,8 +692,8 @@ void GUI::createGraphTabs()
_graphTabWidget->setDocumentMode(true);
#endif // Q_OS_MAC
connect(_graphTabWidget, SIGNAL(currentChanged(int)), this,
SLOT(graphChanged(int)));
connect(_graphTabWidget, &QTabWidget::currentChanged, this,
&GUI::graphChanged);
_tabs.append(new ElevationGraph(_graphTabWidget));
_tabs.append(new SpeedGraph(_graphTabWidget));
@ -709,8 +704,8 @@ void GUI::createGraphTabs()
_tabs.append(new GearRatioGraph(_graphTabWidget));
for (int i = 0; i < _tabs.size(); i++)
connect(_tabs.at(i), SIGNAL(sliderPositionChanged(qreal)), _mapView,
SLOT(setMarkerPosition(qreal)));
connect(_tabs.at(i), &GraphTab::sliderPositionChanged, _mapView,
&MapView::setMarkerPosition);
}
void GUI::createStatusBar()
@ -1013,8 +1008,19 @@ void GUI::openOptions()
SET_VIEW_OPTION(pathAntiAliasing, useAntiAliasing);
SET_VIEW_OPTION(useOpenGL, useOpenGL);
SET_VIEW_OPTION(sliderColor, setMarkerColor);
SET_VIEW_OPTION(outputProjection, setOutputProjection);
SET_VIEW_OPTION(inputProjection, setInputProjection);
if (options.hidpiMap != _options.hidpiMap)
_mapView->setDevicePixelRatio(devicePixelRatioF(),
options.hidpiMap ? devicePixelRatioF() : 1.0);
if (options.outputProjection != _options.outputProjection)
_mapView->setOutputProjection(CRS::projection(options.outputProjection));
if (options.inputProjection != _options.inputProjection)
_mapView->setInputProjection(CRS::projection(options.inputProjection));
if (options.timeZone != _options.timeZone) {
_mapView->setTimeZone(options.timeZone.zone());
_dateRange.first = _dateRange.first.toTimeZone(options.timeZone.zone());
_dateRange.second = _dateRange.second.toTimeZone(options.timeZone.zone());
}
SET_TAB_OPTION(palette, setPalette);
SET_TAB_OPTION(graphWidth, setGraphWidth);
@ -1054,16 +1060,6 @@ void GUI::openOptions()
if (options.enableHTTP2 != _options.enableHTTP2)
Downloader::enableHTTP2(options.enableHTTP2);
if (options.hidpiMap != _options.hidpiMap)
_mapView->setDevicePixelRatio(devicePixelRatioF(),
options.hidpiMap ? devicePixelRatioF() : 1.0);
if (options.timeZone != _options.timeZone) {
_mapView->setTimeZone(options.timeZone.zone());
_dateRange.first = _dateRange.first.toTimeZone(options.timeZone.zone());
_dateRange.second = _dateRange.second.toTimeZone(options.timeZone.zone());
}
if (reload)
reloadFiles();
@ -1553,7 +1549,7 @@ bool GUI::loadMapNode(const TreeNode<Map*> &node, MapAction *&action,
_showMapAction->setEnabled(true);
_clearMapCacheAction->setEnabled(true);
} else
connect(a, SIGNAL(loaded()), this, SLOT(mapLoaded()));
connect(a, &MapAction::loaded, this, &GUI::mapLoaded);
}
} else {
valid = true;
@ -1568,7 +1564,8 @@ bool GUI::loadMapNode(const TreeNode<Map*> &node, MapAction *&action,
bool GUI::loadMap(const QString &fileName, MapAction *&action, bool silent)
{
TreeNode<Map*> maps(MapList::loadMaps(fileName));
TreeNode<Map*> maps(MapList::loadMaps(fileName,
CRS::projection(_options.inputProjection)));
QList<QAction*> existingActions(_mapsActionGroup->actions());
return loadMapNode(maps, action, silent, existingActions);
@ -1637,7 +1634,7 @@ void GUI::loadMapDirNode(const TreeNode<Map *> &node, QList<MapAction*> &actions
_clearMapCacheAction->setEnabled(true);
actions.append(a);
} else
connect(a, SIGNAL(loaded()), this, SLOT(mapLoadedDir()));
connect(a, &MapAction::loaded, this, &GUI::mapLoadedDir);
}
_areaCount++;
@ -1657,7 +1654,8 @@ void GUI::loadMapDir()
return;
QFileInfo fi(dir);
TreeNode<Map*> maps(MapList::loadMaps(dir));
TreeNode<Map*> maps(MapList::loadMaps(dir,
CRS::projection(_options.inputProjection)));
QList<QAction*> existingActions(_mapsActionGroup->actions());
QList<MapAction*> actions;
QMenu *menu = new QMenu(maps.name());
@ -1800,21 +1798,10 @@ void GUI::graphChanged(int index)
void GUI::updateNavigationActions()
{
if (_browser->isLast()) {
_nextAction->setEnabled(false);
_lastAction->setEnabled(false);
} else {
_nextAction->setEnabled(true);
_lastAction->setEnabled(true);
}
if (_browser->isFirst()) {
_prevAction->setEnabled(false);
_firstAction->setEnabled(false);
} else {
_prevAction->setEnabled(true);
_firstAction->setEnabled(true);
}
_lastAction->setEnabled(!_browser->isLast());
_nextAction->setEnabled(!_browser->isLast());
_firstAction->setEnabled(!_browser->isFirst());
_prevAction->setEnabled(!_browser->isFirst());
}
bool GUI::updateGraphTabs()
@ -2081,6 +2068,9 @@ void GUI::writeSettings()
settings.setValue(SHOW_POI_SETTING, _showPOIAction->isChecked());
if (_overlapPOIAction->isChecked() != OVERLAP_POI_DEFAULT)
settings.setValue(OVERLAP_POI_SETTING, _overlapPOIAction->isChecked());
if (_showPOILabelsAction->isChecked() != SHOW_POI_LABELS_DEFAULT)
settings.setValue(SHOW_POI_LABELS_SETTING,
_showPOILabelsAction->isChecked());
int j = 0;
QList<QAction*> poiActions(_poisActionGroup->actions());
@ -2359,7 +2349,8 @@ void GUI::readSettings()
_mapView->showOverlappedPOIs(false);
else
_overlapPOIAction->setChecked(true);
if (!settings.value(LABELS_POI_SETTING, LABELS_POI_DEFAULT).toBool())
if (!settings.value(SHOW_POI_LABELS_SETTING, SHOW_POI_LABELS_DEFAULT)
.toBool())
_mapView->showPOILabels(false);
else
_showPOILabelsAction->setChecked(true);
@ -2595,8 +2586,8 @@ void GUI::readSettings()
_mapView->useOpenGL(true);
_mapView->setDevicePixelRatio(devicePixelRatioF(),
_options.hidpiMap ? devicePixelRatioF() : 1.0);
_mapView->setOutputProjection(_options.outputProjection);
_mapView->setInputProjection(_options.inputProjection);
_mapView->setOutputProjection(CRS::projection(_options.outputProjection));
_mapView->setInputProjection(CRS::projection(_options.inputProjection));
_mapView->setTimeZone(_options.timeZone.zone());
for (int i = 0; i < _tabs.count(); i++) {
@ -2689,10 +2680,9 @@ void GUI::show()
QMainWindow::show();
QWindow *w = windowHandle();
connect(w->screen(), SIGNAL(logicalDotsPerInchChanged(qreal)), this,
SLOT(logicalDotsPerInchChanged(qreal)));
connect(w, SIGNAL(screenChanged(QScreen*)), this,
SLOT(screenChanged(QScreen*)));
connect(w->screen(), &QScreen::logicalDotsPerInchChanged, this,
&GUI::logicalDotsPerInchChanged);
connect(w, &QWindow::screenChanged, this, &GUI::screenChanged);
_mapView->fitContentToSize();
}
@ -2704,8 +2694,8 @@ void GUI::screenChanged(QScreen *screen)
disconnect(SIGNAL(logicalDotsPerInchChanged(qreal)), this,
SLOT(logicalDotsPerInchChanged(qreal)));
connect(screen, SIGNAL(logicalDotsPerInchChanged(qreal)), this,
SLOT(logicalDotsPerInchChanged(qreal)));
connect(screen, &QScreen::logicalDotsPerInchChanged, this,
&GUI::logicalDotsPerInchChanged);
}
void GUI::logicalDotsPerInchChanged(qreal dpi)

View File

@ -82,6 +82,7 @@ private slots:
void prev();
void last();
void first();
void updateNavigationActions();
void setTotalTime() {setTimeType(Total);}
void setMovingTime() {setTimeType(Moving);}
@ -136,7 +137,6 @@ private:
QMenu *menu, const QList<QAction*> &existingActions);
void updateStatusBarInfo();
void updateWindowTitle();
void updateNavigationActions();
bool updateGraphTabs();
TimeType timeType() const;

View File

@ -28,11 +28,8 @@
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
#define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G)
#define STATISTICS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_S)
#ifdef Q_OS_MAC
#define FULLSCREEN_SHORTCUT QKeySequence(Qt::META + Qt::CTRL + Qt::Key_F)
#else // Q_OS_MAC
#define FULLSCREEN_SHORTCUT QKeySequence(Qt::Key_F11)
#endif // Q_OS_MAC
#define FULLSCREEN_SHORTCUT (QKeySequence(QKeySequence::FullScreen).isEmpty() \
? QKeySequence(Qt::Key_F11) \
: QKeySequence(QKeySequence::FullScreen))
#endif // KEYS_H

View File

@ -1,39 +0,0 @@
#ifndef LIMITEDCOMBOBOX_H
#define LIMITEDCOMBOBOX_H
#include <QComboBox>
#include <QEvent>
class LimitedComboBox : public QComboBox
{
public:
LimitedComboBox(int limit, QWidget *parent = 0)
: QComboBox(parent), _limit(limit)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
setStyleSheet("combobox-popup: 0;");
}
QSize sizeHint() const
{
return QSize(qMin(_limit, QComboBox::sizeHint().width()),
QComboBox::sizeHint().height());
}
QSize minimumSizeHint() const
{
return QSize(qMin(_limit, QComboBox::minimumSizeHint().width()),
QComboBox::minimumSizeHint().height());
}
bool event(QEvent *e)
{
if (e->type() == QEvent::Polish)
view()->setMinimumWidth(QComboBox::sizeHint().width());
return QComboBox::event(e);
}
private:
int _limit;
};
#endif // LIMITEDCOMBOBOX_H

View File

@ -18,7 +18,7 @@ public:
setMenuRole(QAction::NoRole);
setCheckable(true);
connect(map, SIGNAL(mapLoaded()), this, SLOT(mapLoaded()));
connect(map, &Map::mapLoaded, this, &MapAction::mapLoaded);
}
signals:

View File

@ -91,7 +91,7 @@ MapItem::MapItem(MapAction *action, Map *map, GraphicsItem *parent)
_fileName = src->path();
_bounds = src->llBounds();
connect(this, SIGNAL(triggered()), action, SLOT(trigger()));
connect(this, &MapItem::triggered, action, &MapAction::trigger);
_map = map;
_digitalZoom = 0;

View File

@ -74,10 +74,10 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
_map->load();
_map->setOutputProjection(_outputProjection);
_map->setInputProjection(_inputProjection);
connect(_map, SIGNAL(tilesLoaded()), this, SLOT(reloadMap()));
connect(_map, &Map::tilesLoaded, this, &MapView::reloadMap);
_poi = poi;
connect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
connect(_poi, &POI::pointsChanged, this, &MapView::updatePOI);
_mapOpacity = 1.0;
_backgroundColor = Qt::white;
@ -371,14 +371,14 @@ void MapView::setMap(Map *map)
RectC cr(_map->xy2ll(vr.topLeft()), _map->xy2ll(vr.bottomRight()));
_map->unload();
disconnect(_map, SIGNAL(tilesLoaded()), this, SLOT(reloadMap()));
disconnect(_map, &Map::tilesLoaded, this, &MapView::reloadMap);
_map = map;
_map->load();
_map->setOutputProjection(_outputProjection);
_map->setInputProjection(_inputProjection);
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
connect(_map, SIGNAL(tilesLoaded()), this, SLOT(reloadMap()));
connect(_map, &Map::tilesLoaded, this, &MapView::reloadMap);
digitalZoom(0);
@ -408,8 +408,8 @@ void MapView::setMap(Map *map)
void MapView::setPOI(POI *poi)
{
disconnect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
connect(poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
disconnect(_poi, &POI::pointsChanged, this, &MapView::updatePOI);
connect(poi, &POI::pointsChanged, this, &MapView::updatePOI);
_poi = poi;
@ -1121,37 +1121,19 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
reloadMap();
}
void MapView::setOutputProjection(int id)
void MapView::setOutputProjection(const Projection &proj)
{
const PCS *pcs;
const GCS *gcs;
_outputProjection = proj;
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
if ((pcs = PCS::pcs(id)))
_outputProjection = Projection(pcs);
else if ((gcs = GCS::gcs(id)))
_outputProjection = Projection(gcs);
else
qWarning("%d: Unknown PCS/GCS id", id);
_map->setOutputProjection(_outputProjection);
rescale();
centerOn(_map->ll2xy(center));
}
void MapView::setInputProjection(int id)
void MapView::setInputProjection(const Projection &proj)
{
const PCS *pcs;
const GCS *gcs;
_inputProjection = proj;
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
if ((pcs = PCS::pcs(id)))
_inputProjection = Projection(pcs);
else if ((gcs = GCS::gcs(id)))
_inputProjection = Projection(gcs);
else
qWarning("%d: Unknown PCS/GCS id", id);
_map->setInputProjection(_inputProjection);
rescale();
centerOn(_map->ll2xy(center));

View File

@ -83,8 +83,8 @@ public:
void setCoordinatesFormat(CoordinatesFormat format);
void setTimeZone(const QTimeZone &zone);
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
void setOutputProjection(int id);
void setInputProjection(int id);
void setOutputProjection(const Projection &proj);
void setInputProjection(const Projection &proj);
void clearMapCache();
void fitContentToSize();

View File

@ -13,13 +13,12 @@
#include <QLabel>
#include <QSysInfo>
#include <QButtonGroup>
#include "map/pcs.h"
#include "icons.h"
#include "colorbox.h"
#include "stylecombobox.h"
#include "oddspinbox.h"
#include "percentslider.h"
#include "limitedcombobox.h"
#include "projectioncombobox.h"
#include "optionsdialog.h"
@ -46,46 +45,18 @@ void OptionsDialog::automaticPauseDetectionSet(bool set)
QWidget *OptionsDialog::createMapPage()
{
int last = -1;
_outputProjection = new LimitedComboBox(200);
QList<KV<int, QString> > projections(GCS::list() + PCS::list());
std::sort(projections.begin(), projections.end());
for (int i = 0; i < projections.size(); i++) {
const KV<int, QString> &proj = projections.at(i);
// There may be same EPSG codes with different names
if (proj.key() == last)
continue;
else
last = proj.key();
QString text = QString::number(proj.key()) + " - " + proj.value();
_outputProjection->addItem(text, QVariant(proj.key()));
}
_outputProjection = new ProjectionComboBox();
_outputProjection->setCurrentIndex(_outputProjection->findData(
_options.outputProjection));
_inputProjection = new LimitedComboBox(200);
last = -1;
for (int i = 0; i < projections.size(); i++) {
const KV<int, QString> &proj = projections.at(i);
// There may be same EPSG codes with different names
if (proj.key() == last)
continue;
else
last = proj.key();
if (proj.key() == 4326 || proj.key() == 3857) {
QString text = QString::number(proj.key()) + " - " + proj.value();
_inputProjection->addItem(text, QVariant(proj.key()));
}
}
_inputProjection = new ProjectionComboBox();
_inputProjection->setCurrentIndex(_inputProjection->findData(
_options.inputProjection));
QLabel *inInfo = new QLabel(tr("Select the proper projection of"
" JNX and KMZ maps. Both EPSG:3857 and EPSG:4326 projected maps"
" exist and there is no projection info in the map file."));
QLabel *outInfo = new QLabel(tr("Select the desired projection of IMG"
" maps. The projection must be valid for the whole map area."));
QLabel *inInfo = new QLabel(tr("Select the proper projection of maps"
" without a projection definition (JNX, KMZ and world file maps)."));
QLabel *outInfo = new QLabel(tr("Select the desired projection of vector"
" maps (IMG and Mapsforge maps). The projection must be valid for"
" the whole map area."));
QFont f = inInfo->font();
f.setPointSize(f.pointSize() - 1);
inInfo->setWordWrap(true);
@ -421,8 +392,8 @@ QWidget *OptionsDialog::createDataPage()
_pauseInterval->setValue(_options.pauseInterval);
_pauseInterval->setEnabled(_manualPause->isChecked());
connect(_automaticPause, SIGNAL(toggled(bool)), this,
SLOT(automaticPauseDetectionSet(bool)));
connect(_automaticPause, &QRadioButton::toggled, this,
&OptionsDialog::automaticPauseDetectionSet);
QHBoxLayout *pauseTypeLayout = new QHBoxLayout();
#ifdef Q_OS_MAC
@ -477,8 +448,8 @@ QWidget *OptionsDialog::createDataPage()
for (int i = 0; i < zones.size(); i++)
_timeZone->addItem(zones.at(i));
_timeZone->setCurrentText(_options.timeZone.customZone().id());
connect(_customZone, SIGNAL(toggled(bool)), _timeZone,
SLOT(setEnabled(bool)));
connect(_customZone, &QRadioButton::toggled, _timeZone,
&QComboBox::setEnabled);
QHBoxLayout *customZoneLayout = new QHBoxLayout();
customZoneLayout->addSpacing(20);
customZoneLayout->addWidget(_timeZone);
@ -750,15 +721,17 @@ OptionsDialog::OptionsDialog(Options &options, Units units, QWidget *parent)
pages->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
pages->setMinimumWidth(2 * menu->size().width());
connect(menu, SIGNAL(currentRowChanged(int)), pages,
SLOT(setCurrentIndex(int)));
connect(menu, &QListWidget::currentRowChanged, pages,
&QStackedWidget::setCurrentIndex);
menu->item(0)->setSelected(true);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
| QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this,
&OptionsDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this,
&OptionsDialog::reject);
QVBoxLayout *layout = new QVBoxLayout;
layout->addLayout(contentLayout);

View File

@ -15,7 +15,7 @@ class QComboBox;
class QCheckBox;
class QRadioButton;
class PercentSlider;
class LimitedComboBox;
class ProjectionComboBox;
struct Options {
@ -121,8 +121,8 @@ private:
ColorBox *_sliderColor;
QCheckBox *_graphAA;
// Map
LimitedComboBox *_outputProjection;
LimitedComboBox *_inputProjection;
ProjectionComboBox *_outputProjection;
ProjectionComboBox *_inputProjection;
QRadioButton *_hidpi;
QRadioButton *_lodpi;
// Data

View File

@ -196,6 +196,8 @@ void PathItem::setDigitalZoom(int zoom)
_digitalZoom = zoom;
_pen.setWidthF(_width * pow(2, -_digitalZoom));
_marker->setScale(pow(2, -_digitalZoom));
for (int i = 0; i < _ticks.size(); i++)
_ticks.at(i)->setDigitalZoom(zoom);
updateShape();
}
@ -409,8 +411,8 @@ void PathItem::addGraph(GraphItem *graph)
_graphs.append(graph);
if (graph) {
connect(this, SIGNAL(selected(bool)), graph, SLOT(hover(bool)));
connect(graph, SIGNAL(selected(bool)), this, SLOT(hover(bool)));
connect(this, &PathItem::selected, graph, &GraphItem::hover);
connect(graph, &GraphItem::selected, this, &PathItem::hover);
}
}

View File

@ -16,6 +16,7 @@ public:
void setPos(const QPointF &pos);
void setColor(const QColor &color) {_brush = QBrush(color);}
void setDigitalZoom(int zoom) {setScale(pow(2, -zoom));}
int type() const {return parentItem()->type();}
QString info() const {return static_cast<GraphicsItem*>(parentItem())->info();}

View File

@ -91,8 +91,10 @@ PDFExportDialog::PDFExportDialog(PDFExport &exp, Units units, QWidget *parent)
QDialogButtonBox *buttonBox = new QDialogButtonBox();
buttonBox->addButton(tr("Export"), QDialogButtonBox::AcceptRole);
buttonBox->addButton(QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this,
&PDFExportDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this,
&PDFExportDialog::reject);
QVBoxLayout *layout = new QVBoxLayout;
#ifdef Q_OS_MAC

View File

@ -24,7 +24,7 @@ PercentSlider::PercentSlider(QWidget *parent) : QWidget(parent)
_label->setAlignment(Qt::AlignRight);
_label->setText(format(_slider->value()));
connect(_slider, SIGNAL(valueChanged(int)), this, SLOT(updateLabel(int)));
connect(_slider, &QSlider::valueChanged, this, &PercentSlider::updateLabel);
QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget(_slider);

View File

@ -67,8 +67,10 @@ PNGExportDialog::PNGExportDialog(PNGExport &exp, QWidget *parent)
QDialogButtonBox *buttonBox = new QDialogButtonBox();
buttonBox->addButton(tr("Export"), QDialogButtonBox::AcceptRole);
buttonBox->addButton(QDialogButtonBox::Cancel);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
connect(buttonBox, &QDialogButtonBox::accepted, this,
&PNGExportDialog::accept);
connect(buttonBox, &QDialogButtonBox::rejected, this,
&PNGExportDialog::reject);
QVBoxLayout *layout = new QVBoxLayout;
#ifdef Q_OS_MAC

View File

@ -0,0 +1,22 @@
#include "map/pcs.h"
#include "projectioncombobox.h"
ProjectionComboBox::ProjectionComboBox(QWidget *parent) : QComboBox(parent)
{
setSizeAdjustPolicy(AdjustToMinimumContentsLengthWithIcon);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
int last = -1;
QList<KV<int, QString> > projections(GCS::list() + PCS::list());
std::sort(projections.begin(), projections.end());
for (int i = 0; i < projections.size(); i++) {
const KV<int, QString> &proj = projections.at(i);
// There may be duplicit EPSG codes with different names
if (proj.key() == last)
continue;
else
last = proj.key();
QString text = QString::number(proj.key()) + " - " + proj.value();
addItem(text, QVariant(proj.key()));
}
}

View File

@ -0,0 +1,12 @@
#ifndef PROJECTIONCOMBOBOX_H
#define PROJECTIONCOMBOBOX_H
#include <QComboBox>
class ProjectionComboBox : public QComboBox
{
public:
ProjectionComboBox(QWidget *parent = 0);
};
#endif // PROJECTIONCOMBOBOX_H

View File

@ -69,3 +69,11 @@ void RouteItem::showWaypointLabels(bool show)
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->showLabel(show);
}
void RouteItem::setDigitalZoom(int zoom)
{
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->setDigitalZoom(zoom);
PathItem::setDigitalZoom(zoom);
}

View File

@ -16,6 +16,7 @@ public:
RouteItem(const Route &route, Map *map, QGraphicsItem *parent = 0);
void setMap(Map *map);
void setDigitalZoom(int zoom);
void showWaypoints(bool show);
void showWaypointLabels(bool show);

View File

@ -40,8 +40,8 @@
#define POI_SETTINGS_GROUP "POI"
#define OVERLAP_POI_SETTING "overlap"
#define OVERLAP_POI_DEFAULT false
#define LABELS_POI_SETTING "labels"
#define LABELS_POI_DEFAULT true
#define SHOW_POI_LABELS_SETTING "labels"
#define SHOW_POI_LABELS_DEFAULT true
#define SHOW_POI_SETTING "show"
#define SHOW_POI_DEFAULT false
#define DISABLED_POI_FILE_SETTINGS_PREFIX "disabled"

View File

@ -45,19 +45,14 @@ QString WaypointItem::info() const
&& _waypoint.comment() != _waypoint.description())
tt.insert(qApp->translate("WaypointItem", "Comment"),
_waypoint.comment());
if (_waypoint.address().isValid()) {
QString addr("<address>");
addr += _waypoint.address().street();
addr += "<br/>" + _waypoint.address().city();
if (!_waypoint.address().postalCode().isEmpty())
addr += "<br/>" + _waypoint.address().postalCode();
if (!_waypoint.address().state().isEmpty())
addr += "<br/>" + _waypoint.address().state();
if (!_waypoint.address().country().isEmpty())
addr += "<br/>" + _waypoint.address().country();
addr += "</address>";
if (!_waypoint.address().isEmpty()) {
QString addr(_waypoint.address());
addr.replace('\n', "<br/>");
addr = "<address>" + addr + "</address>";
tt.insert(qApp->translate("WaypointItem", "Address"), addr);
}
if (!_waypoint.phone().isEmpty())
tt.insert(qApp->translate("WaypointItem", "Phone"), _waypoint.phone());
if (!_waypoint.links().isEmpty()) {
QString links;
for (int i = 0; i < _waypoint.links().size(); i++) {

19
src/data/address.cpp Normal file
View File

@ -0,0 +1,19 @@
#include "address.h"
QString Address::address() const
{
QString addr(_street);
if (addr.isEmpty())
addr = _city;
else
addr += "\n" + _city;
if (!_postalCode.isEmpty())
addr += "\n" + _postalCode;
if (!_state.isEmpty())
addr += "\n" + _state;
if (!_country.isEmpty())
addr += "\n" + _country;
return addr;
}

View File

@ -10,11 +10,7 @@ public:
Address(const QString &street, const QString &city)
: _street(street), _city(city) {}
const QString &street() const {return _street;}
const QString &city() const {return _city;}
const QString &state() const {return _state;}
const QString &country() const {return _country;}
const QString &postalCode() const {return _postalCode;}
QString address() const;
void setStreet(const QString &street) {_street = street;}
void setCity(const QString &city) {_city = city;}
@ -22,7 +18,7 @@ public:
void setCountry(const QString &country) {_country = country;}
void setPostalCode(const QString &postalCode) {_postalCode = postalCode;}
bool isValid() const {return !(_street.isEmpty() || _city.isEmpty());}
bool isValid() const {return !_city.isEmpty();}
private:
QString _street;

View File

@ -63,5 +63,5 @@ bool CSV::readEntry(QStringList &list)
list.append(field);
return (state == 0);
return (_device->atEnd() && (state == 0 || state == 2));
}

View File

@ -17,7 +17,8 @@
#include "cupparser.h"
#include "gpiparser.h"
#include "smlparser.h"
#include "map/map.h"
#include "ov2parser.h"
#include "itnparser.h"
#include "data.h"
@ -38,6 +39,8 @@ static EXIFParser exif;
static CUPParser cup;
static GPIParser gpi;
static SMLParser sml;
static OV2Parser ov2;
static ITNParser itn;
static QMap<QString, Parser*> parsers()
{
@ -62,6 +65,8 @@ static QMap<QString, Parser*> parsers()
map.insert("cup", &cup);
map.insert("gpi", &gpi);
map.insert("sml", &sml);
map.insert("ov2", &ov2);
map.insert("itn", &itn);
return map;
}
@ -134,10 +139,12 @@ QString Data::formats()
+ qApp->translate("Data", "GPI files") + " (*.gpi);;"
+ qApp->translate("Data", "GPX files") + " (*.gpx);;"
+ qApp->translate("Data", "IGC files") + " (*.igc);;"
+ qApp->translate("Data", "ITN files") + " (*.itn);;"
+ qApp->translate("Data", "JPEG images") + " (*.jpg *.jpeg);;"
+ qApp->translate("Data", "KML files") + " (*.kml);;"
+ qApp->translate("Data", "LOC files") + " (*.loc);;"
+ qApp->translate("Data", "NMEA files") + " (*.nmea);;"
+ qApp->translate("Data", "OV2 files") + " (*.ov2);;"
+ qApp->translate("Data", "OziExplorer files") + " (*.plt *.rte *.wpt);;"
+ qApp->translate("Data", "SLF files") + " (*.slf);;"
+ qApp->translate("Data", "SML files") + " (*.sml);;"

View File

@ -10,6 +10,7 @@
#include <QTemporaryDir>
#include "common/garmin.h"
#include "common/textcodec.h"
#include "address.h"
#include "gpiparser.h"
@ -324,15 +325,19 @@ static quint32 readContact(DataStream &stream, Waypoint &waypoint)
rs = stream.readRecordHeader(rh);
stream >> flags;
if (flags & 0x1) // phone
if (flags & 0x1) {
ds += stream.readString(str);
waypoint.setPhone(str);
}
if (flags & 0x2) // phone2
ds += stream.readString(str);
if (flags & 0x4) // fax
ds += stream.readString(str);
if (flags & 0x8) // mail
if (flags & 0x8) {
ds += stream.readString(str);
if (flags & 0x10) { // web
waypoint.addLink(Link("mailto:" + str, str));
}
if (flags & 0x10) {
ds += stream.readString(str);
QUrl url(str);
waypoint.addLink(Link(url.scheme().isEmpty()
@ -387,7 +392,8 @@ static quint32 readAddress(DataStream &stream, Waypoint &waypoint)
if (flags & 0x20) // unknown
ds += stream.readString(str);
waypoint.setAddress(addr);
if (addr.isValid())
waypoint.setAddress(addr.address());
if (ds != rh.size)
stream.setStatus(QDataStream::ReadCorruptData);
@ -622,6 +628,10 @@ static void readPOIDatabase(DataStream &stream, QVector<Waypoint> &waypoints,
if (rh.flags & 0x8) {
while (stream.status() == QDataStream::Ok && ds < rh.size) {
switch(stream.nextHeaderType()) {
case 8:
ds += readSpatialIndex(stream, waypoints, polygons,
fileName, imgId);
break;
case 5: // symbol
case 7: // category
default:

View File

@ -1,3 +1,4 @@
#include "address.h"
#include "gpxparser.h"
@ -103,7 +104,8 @@ void GPXParser::address(Waypoint &waypoint)
_reader.skipCurrentElement();
}
waypoint.setAddress(addr);
if (addr.isValid())
waypoint.setAddress(addr.address());
}
void GPXParser::wpExtension(Waypoint &waypoint)
@ -111,6 +113,8 @@ void GPXParser::wpExtension(Waypoint &waypoint)
while (_reader.readNextStartElement()) {
if (_reader.name() == QLatin1String("Address"))
address(waypoint);
else if (_reader.name() == QLatin1String("PhoneNumber"))
waypoint.setPhone(_reader.readElementText());
else
_reader.skipCurrentElement();
}

View File

@ -240,8 +240,11 @@ bool IGCParser::parse(QFile *file, QList<TrackData> &tracks,
}
} else if (line[0] == 'B') {
if (ctx.date.isNull()) {
_errorString = "Missing date header";
return false;
/* The date H header is mandatory, but XCSOAR generates
files without it, so add a dummy date in such case */
qWarning("%s: Missing date header",
qPrintable(file->fileName()));
ctx.date = QDate(1970, 1, 1);
}
if (!track) {
tracks.append(TrackData());

46
src/data/itnparser.cpp Normal file
View File

@ -0,0 +1,46 @@
#include <QByteArray>
#include "common/textcodec.h"
#include "itnparser.h"
bool ITNParser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Area> &polygons, QVector<Waypoint> &waypoints)
{
Q_UNUSED(tracks);
Q_UNUSED(waypoints);
Q_UNUSED(polygons);
RouteData rd;
QByteArray ba;
TextCodec codec(1252);
int lat, lon;
bool ok1, ok2;
_errorLine = 1;
_errorString.clear();
while (!file->atEnd()) {
ba = file->readLine();
QList<QByteArray> fields(ba.split('|'));
if (fields.size() < 4) {
_errorString = "File format error";
return false;
}
lon = fields.at(0).toInt(&ok1);
lat = fields.at(1).toInt(&ok2);
if (!ok1 || !ok2 || lon < -18000000 || lon > 18000000
|| lat < -9000000 || lat > 9000000) {
_errorString = "Invalid coordinates";
return false;
}
Waypoint wp(Coordinates(lon/1e5, lat/1e5));
wp.setName(codec.toString(fields.at(2)));
rd.append(wp);
_errorLine++;
}
routes.append(rd);
return true;
}

21
src/data/itnparser.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef ITNPARSER_H
#define ITNPARSER_H
#include "parser.h"
class ITNParser : public Parser
{
public:
ITNParser() : _errorLine(0) {}
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Area> &polygons, QVector<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
private:
QString _errorString;
int _errorLine;
};
#endif // ITNPARSER_H

View File

@ -492,7 +492,7 @@ void KMLParser::multiGeometry(QList<TrackData> &tracks, QList<Area> &areas,
void KMLParser::placemark(QList<TrackData> &tracks, QList<Area> &areas,
QVector<Waypoint> &waypoints)
{
QString name, desc;
QString name, desc, phone, address;
QDateTime timestamp;
while (_reader.readNextStartElement()) {
@ -500,6 +500,10 @@ void KMLParser::placemark(QList<TrackData> &tracks, QList<Area> &areas,
name = _reader.readElementText();
else if (_reader.name() == QLatin1String("description"))
desc = _reader.readElementText();
else if (_reader.name() == QLatin1String("phoneNumber"))
phone = _reader.readElementText();
else if (_reader.name() == QLatin1String("address"))
address = _reader.readElementText();
else if (_reader.name() == QLatin1String("TimeStamp"))
timestamp = timeStamp();
else if (_reader.name() == QLatin1String("MultiGeometry"))
@ -510,6 +514,8 @@ void KMLParser::placemark(QList<TrackData> &tracks, QList<Area> &areas,
w.setName(name);
w.setDescription(desc);
w.setTimestamp(timestamp);
w.setAddress(address);
w.setPhone(phone);
point(w);
} else if (_reader.name() == QLatin1String("LineString")
|| _reader.name() == QLatin1String("LinearRing")) {

72
src/data/ov2parser.cpp Normal file
View File

@ -0,0 +1,72 @@
#include <QDataStream>
#include "common/textcodec.h"
#include "ov2parser.h"
bool OV2Parser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Area> &polygons, QVector<Waypoint> &waypoints)
{
Q_UNUSED(tracks);
Q_UNUSED(routes);
Q_UNUSED(polygons);
QDataStream stream(file);
quint8 type;
quint32 len;
qint32 lon, lat;
QByteArray ba;
TextCodec codec(1252);
stream.setByteOrder(QDataStream::LittleEndian);
while (!stream.atEnd()) {
stream >> type;
switch (type) {
case 0:
stream >> len;
if (stream.status() != QDataStream::Ok || len < 5
|| stream.skipRawData(len - 5) < (int)len - 5) {
_errorString = "Corrupted deleted record";
return false;
}
break;
case 1:
if (stream.skipRawData(20) < 20) {
_errorString = "Corrupted skipper record";
return false;
}
break;
case 2:
case 3:
{stream >> len >> lon >> lat;
if (stream.status() != QDataStream::Ok || len < 13) {
_errorString = "Corrupted POI record";
return false;
}
ba.resize(len - 13);
if (stream.readRawData(ba.data(), ba.size()) != ba.size()) {
_errorString = "Corrupted POI record";
return false;
}
if (lon < -18000000 || lon > 18000000
|| lat < -9000000 || lat > 9000000) {
_errorString = "Invalid POI coordinates";
return false;
}
Waypoint wp(Coordinates(lon/1e5, lat/1e5));
QList<QByteArray> parts(ba.split('\0'));
int pp = parts.first().indexOf('>');
if (pp >= 0) {
wp.setName(codec.toString(parts.first().left(pp)));
wp.setPhone(parts.first().mid(pp+1));
} else
wp.setName(codec.toString(parts.first()));
waypoints.append(wp);}
break;
default:
_errorString = QString("%1: invalid/unknown record type")
.arg(type);
return false;
}
}
return true;
}

17
src/data/ov2parser.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef OV2PARSER_H
#define OV2PARSER_H
#include "parser.h"
class OV2Parser : public Parser
{
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Area> &polygons, QVector<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return 0;}
private:
QString _errorString;
};
#endif // OV2PARSER_H

View File

@ -34,7 +34,7 @@ bool PLTParser::parse(QFile *file, QList<TrackData> &tracks,
Q_UNUSED(routes);
Q_UNUSED(polygons);
bool res;
const GCS *gcs = 0;
GCS gcs;
_errorLine = 1;
_errorString.clear();
@ -54,7 +54,8 @@ bool PLTParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
gcs = GCS::gcs(QString(line.trimmed()));
if (gcs.isNull()) {
_errorString = "Invalid/unknown datum";
return false;
}
@ -80,7 +81,7 @@ bool PLTParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
Trackpoint tp(gcs->toWGS84(Coordinates(lon, lat)));
Trackpoint tp(gcs.toWGS84(Coordinates(lon, lat)));
if (list.size() >= 4) {
QByteArray field(list.at(3).trimmed());
@ -125,7 +126,7 @@ bool RTEParser::parse(QFile *file, QList<TrackData> &tracks,
Q_UNUSED(tracks);
Q_UNUSED(polygons);
bool res, record = false;
const GCS *gcs = 0;
GCS gcs;
_errorLine = 1;
_errorString.clear();
@ -141,7 +142,8 @@ bool RTEParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
gcs = GCS::gcs(QString(line.trimmed()));
if (gcs.isNull()) {
_errorString = "Invalid/unknown datum";
return false;
}
@ -181,7 +183,7 @@ bool RTEParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
Waypoint wp(gcs->toWGS84(Coordinates(lon, lat)));
Waypoint wp(gcs.toWGS84(Coordinates(lon, lat)));
QByteArray name(list.at(4).trimmed());
if (!name.isEmpty())
@ -225,7 +227,7 @@ bool WPTParser::parse(QFile *file, QList<TrackData> &tracks,
Q_UNUSED(routes);
Q_UNUSED(polygons);
bool res;
const GCS *gcs = 0;
GCS gcs;
_errorLine = 1;
_errorString.clear();
@ -240,7 +242,8 @@ bool WPTParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
gcs = GCS::gcs(QString(line.trimmed()));
if (gcs.isNull()) {
_errorString = "Invalid/unknown datum";
return false;
}
@ -262,7 +265,7 @@ bool WPTParser::parse(QFile *file, QList<TrackData> &tracks,
return false;
}
Waypoint wp(gcs->toWGS84(Coordinates(lon, lat)));
Waypoint wp(gcs.toWGS84(Coordinates(lon, lat)));
QByteArray name(list.at(1).trimmed());
if (!name.isEmpty())

View File

@ -23,13 +23,13 @@ void SMLParser::sample(SegmentData &segment, QMap<QDateTime, Sensors> &map)
while (_reader.readNextStartElement()) {
if (_reader.name() == QLatin1String("Latitude")) {
lat = _reader.readElementText().toDouble(&ok);
if (!ok || lat < -90 || lon > 90) {
if (!ok || lat < -90 || lat > 90) {
_reader.raiseError("Invalid Latitude");
return;
}
} else if (_reader.name() == QLatin1String("Longitude")) {
lon = _reader.readElementText().toDouble(&ok);
if (!ok || lat < -180 || lon > 180) {
if (!ok || lon < -180 || lon > 180) {
_reader.raiseError("Invalid Longitude");
return;
}

View File

@ -10,7 +10,6 @@
#include "common/coordinates.h"
#include "imageinfo.h"
#include "link.h"
#include "address.h"
class Waypoint
{
@ -24,7 +23,8 @@ public:
const QString &name() const {return _name;}
const QString &description() const {return _description;}
const QString &comment() const {return _comment;}
const Address &address() const {return _address;}
const QString &address() const {return _address;}
const QString &phone() const {return _phone;}
const QVector<ImageInfo> &images() const {return _images;}
const QVector<Link> &links() const {return _links;}
const QDateTime &timestamp() const {return _timestamp;}
@ -38,7 +38,8 @@ public:
void setDescription(const QString &description)
{_description = description;}
void setComment(const QString &comment) {_comment = comment;}
void setAddress(const Address &address) {_address = address;}
void setAddress(const QString &address) {_address = address;}
void setPhone(const QString &phone) {_phone = phone;}
void setTimestamp(const QDateTime &timestamp) {_timestamp = timestamp;}
void setElevation(qreal elevation) {_elevation = elevation;}
void addImage(const ImageInfo &image) {_images.append(image);}
@ -59,7 +60,8 @@ private:
QString _name;
QString _description;
QString _comment;
Address _address;
QString _address;
QString _phone;
QVector<ImageInfo> _images;
QVector<Link> _links;
QDateTime _timestamp;

View File

@ -226,12 +226,12 @@ void RasterTile::drawPolygons(QPainter *painter)
RectC r(poly.raster.rect());
QPointF tl(_map->ll2xy(r.topLeft()));
QPointF br(_map->ll2xy(r.bottomRight()));
QSize size(QRectF(tl, br).toRect().size());
QSizeF size(QRectF(tl, br).size());
SubFile::Handle hdl(poly.raster.lbl());
QPixmap pm(poly.raster.lbl()->image(hdl, poly.raster.id()));
qreal sx = (qreal)size.width() / (qreal)pm.width();
qreal sy = (qreal)size.height() / (qreal)pm.height();
qreal sx = size.width() / (qreal)pm.width();
qreal sy = size.height() / (qreal)pm.height();
painter->save();
painter->scale(sx, sy);

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