1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-01 05:19:15 +02:00

Compare commits

...

135 Commits
7.4 ... 7.8

Author SHA1 Message Date
494a8a6da1 Fixed tick box size computation 2019-05-29 21:24:37 +02:00
47206316b7 Path tick distance now based on map resolution rather then path length. 2019-05-29 18:38:49 +02:00
fe69280cc5 Fixed broken zoom fit on IMG maps 2019-05-29 18:27:11 +02:00
ff3c0aafa1 Fixed memory leak 2019-05-29 18:26:29 +02:00
2fb2beecda Translated using Weblate (Czech)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/cs/
2019-05-28 23:38:33 +02:00
432ca35df9 Merge branch 'origin/master' into Weblate. 2019-05-28 23:26:34 +02:00
301172f5e8 Added support for GPX 1.0 speed data 2019-05-28 23:26:03 +02:00
20956625db Enable hover in styles that use it 2019-05-28 23:22:58 +02:00
273fe51dcd Merge branch 'origin/master' into Weblate. 2019-05-28 07:29:26 +02:00
e4098e6dfb Version++ 2019-05-28 07:29:07 +02:00
747acf1580 Merge branch 'origin/master' into Weblate. 2019-05-28 07:27:55 +02:00
738b49668c Fixed broken WMS scale denominators -> zooms transition 2019-05-28 07:26:13 +02:00
48674bb50b Propper path tick tooltip
+ code cleanup
2019-05-28 07:24:39 +02:00
6d054c76f9 Translated using Weblate (German)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-05-25 12:52:19 +02:00
40578d0dee Merge branch 'origin/master' into Weblate. 2019-05-24 18:38:02 +02:00
a16354a6ba Propper reimplementation of the path ticks 2019-05-24 18:37:15 +02:00
44862cebcc Translated using Weblate (Turkish)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-05-24 18:10:46 +02:00
ef5cfde22b Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.2% (312 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-05-24 10:46:33 +02:00
019bd4de10 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-05-24 10:46:32 +02:00
9c6ffed35e Translated using Weblate (Swedish)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-05-24 10:46:32 +02:00
d7a55b3f9c Translated using Weblate (Finnish)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-05-23 20:40:11 +02:00
a9327d2cca Translated using Weblate (Russian)
Currently translated at 100.0% (342 of 342 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-05-23 20:40:10 +02:00
c059cbb848 Merge branch 'origin/master' into Weblate. 2019-05-23 19:25:57 +02:00
3b3559eacf Localization update 2019-05-23 19:25:44 +02:00
f071e88bd0 Merge branch 'origin/master' into Weblate. 2019-05-23 19:19:32 +02:00
8bec307e03 km/mi markers polishing 2019-05-23 19:19:07 +02:00
3204723614 Merge branch 'origin/master' into Weblate. 2019-05-23 08:46:45 +02:00
c688b5fc09 Added optional km/mi markers
closes #84
2019-05-23 08:44:55 +02:00
94bca87982 Merge branch 'origin/master' into Weblate. 2019-05-21 18:00:03 +02:00
3f97d12a76 Code cleanup 2019-05-21 17:59:46 +02:00
ab7aa63a33 Merge branch 'origin/master' into Weblate. 2019-05-21 17:45:25 +02:00
4de22d6679 Fixed broken IMG maps after print/PDF export 2019-05-21 17:44:47 +02:00
c58a52e362 Merge branch 'origin/master' into Weblate. 2019-05-20 23:24:04 +02:00
5b2af9fc9c Added support for QuadTiles maps 2019-05-20 23:23:24 +02:00
4eb54ed8f2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-05-20 05:48:41 +02:00
681c83d017 Version++ 2019-05-18 20:40:59 +02:00
dbd8750524 Updated appdata.xml info 2019-05-18 20:39:55 +02:00
d9489935df Translated using Weblate (German)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-05-18 15:27:12 +02:00
f5d2ccfdb9 Translated using Weblate (Swedish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-05-18 07:11:35 +02:00
1afd59902b Translated using Weblate (Turkish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-05-17 18:01:40 +02:00
a253147760 Translated using Weblate (Finnish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-05-17 18:01:40 +02:00
667a1c350d Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.5% (312 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-05-17 18:01:39 +02:00
d7a9464e37 Translated using Weblate (Czech)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/cs/
2019-05-17 18:01:38 +02:00
d1be147f64 Translated using Weblate (Russian)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-05-17 18:01:38 +02:00
98708f11ac Localization update 2019-05-16 22:52:39 +02:00
c5605eeab1 Translated using Weblate (Swedish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-05-16 22:02:52 +02:00
f29ac69594 Translated using Weblate (Turkish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-05-16 22:02:52 +02:00
49101cba6c Translated using Weblate (Finnish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-05-16 22:02:52 +02:00
c1f746b32a Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.5% (311 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-05-16 22:02:52 +02:00
704be7baf9 Translated using Weblate (Russian)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-05-16 22:02:52 +02:00
3c6ec704ab Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-05-16 22:02:52 +02:00
bf6b6fb100 Translated using Weblate (Finnish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-05-16 22:02:52 +02:00
56a2618f29 Translated using Weblate (Russian)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-05-16 22:02:52 +02:00
785bf94a01 Added support for user defined TYP files for Garmin IMG maps 2019-05-16 20:23:37 +02:00
3747ae6afc Localization update 2019-05-15 21:36:01 +02:00
1f5a051bee Fixed broken text display in Qt < 5.4
(Qt bug workaround)
2019-05-15 21:29:34 +02:00
268c42ab03 Always limit the number of shown items in the combo box. 2019-05-15 20:33:03 +02:00
8a8595d98e Fixed Qt4 build 2019-05-15 07:47:57 +02:00
37c971a720 Added support for vector maps projection setting
Removed obsolete "Always show the map" setting
2019-05-14 23:01:24 +02:00
f0d71d667b Fixed builds with Qt 5 versions < 5.4 2019-05-12 21:26:45 +02:00
f652457f19 One Garmin is enough 2019-05-12 18:13:30 +02:00
1acf603076 Added Garmin IMG info 2019-05-12 18:04:04 +02:00
86f5da9355 Translated using Weblate (German)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-05-12 16:06:49 +02:00
3587d29cb6 Merge branch 'origin/master' into Weblate. 2019-05-12 15:44:14 +02:00
beb93bcd1f Added missing spot units conversion 2019-05-12 15:43:46 +02:00
dd911a95b0 Merge branch 'origin/master' into Weblate. 2019-05-12 15:31:02 +02:00
1fc644e1d6 Translated using Weblate (Turkish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-05-12 15:31:02 +02:00
dc628c9554 Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.5% (312 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-05-12 15:31:01 +02:00
ec3eccd580 Translated using Weblate (Czech)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/cs/
2019-05-12 15:31:00 +02:00
a3d22dcd2a Fixed contour check 2019-05-12 15:30:29 +02:00
c13d7ae51d Translated using Weblate (Swedish)
Currently translated at 100.0% (341 of 341 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-05-12 05:55:21 +02:00
e4085cc25a Localization sources update 2019-05-12 01:38:02 +02:00
8a13355740 Merge branch 'origin/master' into Weblate. 2019-05-12 01:23:41 +02:00
8f799e1bcf Fixed possible crash when the cache wouldn't accept the new item 2019-05-12 01:23:18 +02:00
5cd0a3a8b0 Properly parse TRE7 section 2019-05-12 00:10:56 +02:00
283197612b Merge branch 'origin/master' into Weblate. 2019-05-12 00:10:41 +02:00
2d0ac129ce Various TYP file parser improvements/fixes 2019-05-11 19:11:00 +02:00
499869119a Merge branch 'origin/master' into Weblate. 2019-05-11 19:10:50 +02:00
fdcc431a4e Merge branch 'origin/master' into Weblate. 2019-05-11 00:24:59 +02:00
38a4a4c32b Do not use pens for possibly large areas 2019-05-11 00:24:31 +02:00
6efd8e7fd1 Version++ 2019-05-10 19:40:11 +02:00
5b3c448582 Merge branch 'origin/master' into Weblate. 2019-05-10 19:39:46 +02:00
054ae32689 Merge branch 'origin/master' into Weblate. 2019-05-10 18:57:35 +02:00
0594774570 Added support for Garmin IMG maps 2019-05-10 18:56:19 +02:00
e11d6d280d Translated using Weblate (Turkish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-04-30 09:23:28 +02:00
897de9920e Translated using Weblate (German)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-04-21 11:15:10 +02:00
82923a4529 Large areas (polygons) require a stencil buffer when drawn using OpenGL 2019-04-15 22:14:59 +02:00
4daa9fd55c Fixed coordinates info not displayed issues 2019-04-03 09:18:33 +02:00
3270625172 Fixed broken speed type switch (typo) 2019-04-02 22:43:29 +02:00
d70c4fefd5 Fixed broken coordinates info display under digital zoom 2019-04-02 22:40:46 +02:00
c364121288 Fixed broken RTree iterator code 2019-04-02 00:40:39 +02:00
62eb5a09ae Use the latest schema version (1.3)
+ schema validity fixes
2019-03-24 22:18:32 +01:00
d0438b3ee8 Use a propper path defined by the prefix for resources in QT4 builds 2019-03-21 23:45:48 +01:00
5b83f1b86b Code cleanup 2019-03-21 23:45:04 +01:00
241ecb36f2 Moved the Oxygen icons license to the correct place 2019-03-20 00:23:12 +01:00
f5b9f6e392 Merge branch 'master' of https://github.com/tumic0/GPXSee 2019-03-20 00:18:46 +01:00
d04775d58e Added Oxygen icons license 2019-03-20 00:17:54 +01:00
68644aa25d Icon files structure cleanup 2019-03-20 00:00:08 +01:00
acbf72a983 Update README.md 2019-03-16 23:53:47 +01:00
010b983667 Fixed EXIF altitude handling 2019-03-16 19:29:30 +01:00
e6cd7f8bfa Merge branch 'master' of https://github.com/tumic0/GPXSee 2019-03-16 16:01:22 +01:00
a9cc586103 Translations update 2019-03-16 16:00:42 +01:00
bbd933295c Update CONTRIBUTING.md 2019-03-16 07:51:33 +01:00
0d77165d3f Back to previous format... 2019-03-15 20:44:21 +01:00
b0636d1cdb Markup format fix 2019-03-15 19:44:22 +01:00
0a24a8e466 Code cleanup 2019-03-15 19:43:17 +01:00
3176a42aa5 Optimized file access 2019-03-15 19:39:52 +01:00
2575ecf1d8 Merge branch 'origin/master' into Weblate. 2019-03-14 18:52:47 +01:00
8a990d1b94 Some more exif parser improvements 2019-03-14 18:52:15 +01:00
9fd4b4d22e Translated using Weblate (Spanish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/es/
2019-03-14 12:33:41 +01:00
03d83716f8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-03-14 12:33:39 +01:00
093df0162f Translated using Weblate (French)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2019-03-14 12:33:38 +01:00
3e4c5bebf9 Merge branch 'origin/master' into Weblate. 2019-03-14 08:27:17 +01:00
7c7ba06bf7 Translated using Weblate (Turkish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-03-14 08:27:17 +01:00
f9a5821374 Translated using Weblate (Swedish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-03-14 08:27:17 +01:00
23614aa157 Translated using Weblate (Russian)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-03-14 08:27:16 +01:00
7ca4426757 Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.5% (311 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-03-14 08:27:16 +01:00
02969c19d9 Translated using Weblate (Finnish)
Currently translated at 100.0% (340 of 340 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-03-14 08:27:15 +01:00
cb9606e057 Code cleanup 2019-03-14 08:27:01 +01:00
1137df94a6 Merge branch 'origin/master' into Weblate. 2019-03-13 22:06:21 +01:00
ef011cad67 Localization update 2019-03-13 22:06:06 +01:00
0dd8b6210b Version++ 2019-03-13 22:05:17 +01:00
87a6b903c6 Merge branch 'origin/master' into Weblate. 2019-03-13 22:02:24 +01:00
51c88e7c7c Do not require GPSAltitudeRef (assume positive if missing) 2019-03-13 22:01:05 +01:00
225c123f08 Merge branch 'origin/master' into Weblate. 2019-03-13 20:49:59 +01:00
541e658741 Added support for thumbnail images in waypoint info
+ fixed and improved exif parser
2019-03-13 20:48:25 +01:00
deb09dfe7c Merge branch 'origin/master' into Weblate. 2019-03-13 08:56:43 +01:00
cdfd968592 Fixed Qt4 build 2019-03-13 08:42:18 +01:00
f443f7b8c4 Merge branch 'origin/master' into Weblate. 2019-03-13 00:26:23 +01:00
bf845a4a65 Added support for Geotagged JPEG files 2019-03-13 00:25:46 +01:00
6be0df331d Translated using Weblate (French)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2019-03-11 19:43:47 +01:00
0adf409624 Translated using Weblate (Russian)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-03-11 08:45:17 +01:00
9bcae2e3bc Translated using Weblate (Finnish)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-03-11 08:45:16 +01:00
78d07cc166 Update README.md 2019-03-10 22:09:38 +01:00
04058e54a7 Update README.md 2019-03-10 21:45:37 +01:00
164 changed files with 8514 additions and 3583 deletions

View File

@ -1,4 +1,4 @@
version: 7.4.{build}
version: 7.8.{build}
configuration: Release
platform: Any CPU
environment:

View File

@ -1,7 +1,6 @@
Only localization contributions are accepted at the moment, code pull requests will be rejected.
The rationale is, that I want leave the possibility to distribute GPXsee builds in the OS X/Windows
stores under a non-GPL licence open. In the future, code pull requests under a QT-like contribution
agreement [1] will be possible.
[1] https://d21tv0wm5mksdn.cloudfront.net/wp-content/uploads/2015/03/Qt-ContributionLicenseAgreement_v1_2_FINAL.pdf
stores under a non-GPL licence open. In the future, code pull requests under a
[QT-like contribution agreement](https://d21tv0wm5mksdn.cloudfront.net/wp-content/uploads/2015/03/Qt-ContributionLicenseAgreement_v1_2_FINAL.pdf)
may become possible.

View File

@ -2,9 +2,9 @@
GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common GPS log file formats.
## Features
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin CSV and geotagged JPEG files.
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin IMG & JNX maps, TwoNav RMaps, GeoTIFF images).
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
* Support for DEM files (SRTM HGT).
* Support for multiple tracks in one view.
@ -19,7 +19,7 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common G
## Build
Build requirements:
* Qt 4.8 or QT 5.x (Qt >= 5.10.1 recommended for all features)
* C++03 compiler (tested: msvc2015, gcc >= 4.8, clang/Apple LLVM version 8.1.0)
* C++03 or newer compiler (tested: msvc2015, gcc >= 4.8, clang/Apple LLVM version 8.1.0)
Build steps:
```shell
@ -36,7 +36,7 @@ make # nmake on windows
[Changelog](https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes)
## Homepage
http://www.gpxsee.org
[https://www.gpxsee.org](https://www.gpxsee.org)
## Maps
[GPXSee maps repository](https://github.com/tumic0/GPXSee-maps)

View File

@ -3,7 +3,7 @@ unix:!macx {
} else {
TARGET = GPXSee
}
VERSION = 7.4
VERSION = 7.8
QT += core \
gui \
@ -29,6 +29,7 @@ HEADERS += src/common/config.h \
src/common/kv.h \
src/common/greatcircle.h \
src/common/programpaths.h \
src/common/tifffile.h \
src/GUI/app.h \
src/GUI/icons.h \
src/GUI/gui.h \
@ -83,6 +84,9 @@ HEADERS += src/common/config.h \
src/GUI/mapview.h \
src/GUI/font.h \
src/GUI/areaitem.h \
src/map/IMG/bitmapline.h \
src/map/IMG/textpathitem.h \
src/map/IMG/textpointitem.h \
src/map/projection.h \
src/map/ellipsoid.h \
src/map/datum.h \
@ -108,7 +112,6 @@ HEADERS += src/common/config.h \
src/map/pcs.h \
src/map/transform.h \
src/map/mapfile.h \
src/map/tifffile.h \
src/map/gcs.h \
src/map/angularunits.h \
src/map/primemeridian.h \
@ -161,7 +164,22 @@ HEADERS += src/common/config.h \
src/GUI/coordinatesitem.h \
src/map/rmap.h \
src/map/calibrationpoint.h \
src/map/color.h
src/map/color.h \
src/data/exifparser.h \
src/data/imageinfo.h \
src/map/imgmap.h \
src/map/IMG/img.h \
src/map/IMG/subfile.h \
src/map/IMG/trefile.h \
src/map/IMG/rgnfile.h \
src/map/IMG/lblfile.h \
src/map/IMG/vectortile.h \
src/map/IMG/subdiv.h \
src/map/IMG/units.h \
src/map/IMG/style.h \
src/map/IMG/netfile.h \
src/GUI/limitedcombobox.h \
src/GUI/pathtickitem.h
SOURCES += src/main.cpp \
src/common/coordinates.cpp \
src/common/rectc.cpp \
@ -169,6 +187,7 @@ SOURCES += src/main.cpp \
src/common/util.cpp \
src/common/greatcircle.cpp \
src/common/programpaths.cpp \
src/common/tifffile.cpp \
src/GUI/app.cpp \
src/GUI/gui.cpp \
src/GUI/axisitem.cpp \
@ -212,6 +231,9 @@ SOURCES += src/main.cpp \
src/GUI/gearratiographitem.cpp \
src/GUI/mapview.cpp \
src/GUI/areaitem.cpp \
src/map/IMG/bitmapline.cpp \
src/map/IMG/textpathitem.cpp \
src/map/IMG/textpointitem.cpp \
src/map/maplist.cpp \
src/map/onlinemap.cpp \
src/map/downloader.cpp \
@ -233,7 +255,6 @@ SOURCES += src/main.cpp \
src/map/pcs.cpp \
src/map/transform.cpp \
src/map/mapfile.cpp \
src/map/tifffile.cpp \
src/map/projection.cpp \
src/map/gcs.cpp \
src/map/angularunits.cpp \
@ -277,7 +298,18 @@ SOURCES += src/main.cpp \
src/data/polygon.cpp \
src/map/obliquestereographic.cpp \
src/GUI/coordinatesitem.cpp \
src/map/rmap.cpp
src/map/rmap.cpp \
src/data/exifparser.cpp \
src/map/imgmap.cpp \
src/map/IMG/img.cpp \
src/map/IMG/subfile.cpp \
src/map/IMG/trefile.cpp \
src/map/IMG/rgnfile.cpp \
src/map/IMG/lblfile.cpp \
src/map/IMG/vectortile.cpp \
src/map/IMG/style.cpp \
src/map/IMG/netfile.cpp \
src/GUI/pathtickitem.cpp
greaterThan(QT_MAJOR_VERSION, 4) {
HEADERS += src/data/geojsonparser.h
@ -359,6 +391,7 @@ win32 {
unix:!macx {
isEmpty(PREFIX):PREFIX = /usr/local
DEFINES += PREFIX=\\\"$$PREFIX\\\"
maps.files = pkg/maps/*
maps.path = $$PREFIX/share/gpxsee/maps

View File

@ -1,46 +1,46 @@
<RCC>
<qresource prefix="/">
<file>icons/dialog-close.png</file>
<file>icons/dialog-close@2x.png</file>
<file>icons/document-open.png</file>
<file>icons/document-open@2x.png</file>
<file>icons/document-print.png</file>
<file>icons/document-print@2x.png</file>
<file>icons/document-export.png</file>
<file>icons/document-export@2x.png</file>
<file>icons/flag.png</file>
<file>icons/flag@2x.png</file>
<file>icons/gpxsee.png</file>
<file>icons/gpxsee@2x.png</file>
<file>icons/application-exit.png</file>
<file>icons/application-exit@2x.png</file>
<file>icons/applications-internet.png</file>
<file>icons/applications-internet@2x.png</file>
<file>icons/view-refresh.png</file>
<file>icons/view-refresh@2x.png</file>
<file>icons/arrow-left.png</file>
<file>icons/arrow-left@2x.png</file>
<file>icons/arrow-right.png</file>
<file>icons/arrow-right@2x.png</file>
<file>icons/arrow-left-double.png</file>
<file>icons/arrow-left-double@2x.png</file>
<file>icons/arrow-right-double.png</file>
<file>icons/arrow-right-double@2x.png</file>
<file>icons/view-fullscreen.png</file>
<file>icons/view-fullscreen@2x.png</file>
<file>icons/office-chart-line.png</file>
<file>icons/office-chart-line@2x.png</file>
<file>icons/format-stroke-color.png</file>
<file>icons/format-stroke-color@2x.png</file>
<file>icons/flag_32.png</file>
<file>icons/flag_32@2x.png</file>
<file>icons/preferences-system.png</file>
<file>icons/preferences-system@2x.png</file>
<file>icons/document-print_32.png</file>
<file>icons/document-print_32@2x.png</file>
<file>icons/view-filter.png</file>
<file>icons/view-filter@2x.png</file>
<file>icons/applications-internet_32.png</file>
<file>icons/applications-internet_32@2x.png</file>
<file alias="gpxsee.png">icons/gpxsee.png</file>
<file alias="gpxsee@2x.png">icons/gpxsee@2x.png</file>
<file alias="dialog-close.png">icons/GUI/dialog-close.png</file>
<file alias="dialog-close@2x.png">icons/GUI/dialog-close@2x.png</file>
<file alias="document-open.png">icons/GUI/document-open.png</file>
<file alias="document-open@2x.png">icons/GUI/document-open@2x.png</file>
<file alias="document-print.png">icons/GUI/document-print.png</file>
<file alias="document-print@2x.png">icons/GUI/document-print@2x.png</file>
<file alias="document-export.png">icons/GUI/document-export.png</file>
<file alias="document-export@2x.png">icons/GUI/document-export@2x.png</file>
<file alias="flag.png">icons/GUI/flag.png</file>
<file alias="flag@2x.png">icons/GUI/flag@2x.png</file>
<file alias="application-exit.png">icons/GUI/application-exit.png</file>
<file alias="application-exit@2x.png">icons/GUI/application-exit@2x.png</file>
<file alias="applications-internet.png">icons/GUI/applications-internet.png</file>
<file alias="applications-internet@2x.png">icons/GUI/applications-internet@2x.png</file>
<file alias="view-refresh.png">icons/GUI/view-refresh.png</file>
<file alias="view-refresh@2x.png">icons/GUI/view-refresh@2x.png</file>
<file alias="arrow-left.png">icons/GUI/arrow-left.png</file>
<file alias="arrow-left@2x.png">icons/GUI/arrow-left@2x.png</file>
<file alias="arrow-right.png">icons/GUI/arrow-right.png</file>
<file alias="arrow-right@2x.png">icons/GUI/arrow-right@2x.png</file>
<file alias="arrow-left-double.png">icons/GUI/arrow-left-double.png</file>
<file alias="arrow-left-double@2x.png">icons/GUI/arrow-left-double@2x.png</file>
<file alias="arrow-right-double.png">icons/GUI/arrow-right-double.png</file>
<file alias="arrow-right-double@2x.png">icons/GUI/arrow-right-double@2x.png</file>
<file alias="view-fullscreen.png">icons/GUI/view-fullscreen.png</file>
<file alias="view-fullscreen@2x.png">icons/GUI/view-fullscreen@2x.png</file>
<file alias="office-chart-line.png">icons/GUI/office-chart-line.png</file>
<file alias="office-chart-line@2x.png">icons/GUI/office-chart-line@2x.png</file>
<file alias="format-stroke-color.png">icons/GUI/format-stroke-color.png</file>
<file alias="format-stroke-color@2x.png">icons/GUI/format-stroke-color@2x.png</file>
<file alias="flag_32.png">icons/GUI/flag_32.png</file>
<file alias="flag_32@2x.png">icons/GUI/flag_32@2x.png</file>
<file alias="preferences-system.png">icons/GUI/preferences-system.png</file>
<file alias="preferences-system@2x.png">icons/GUI/preferences-system@2x.png</file>
<file alias="document-print_32.png">icons/GUI/document-print_32.png</file>
<file alias="document-print_32@2x.png">icons/GUI/document-print_32@2x.png</file>
<file alias="view-filter.png">icons/GUI/view-filter.png</file>
<file alias="view-filter@2x.png">icons/GUI/view-filter@2x.png</file>
<file alias="applications-internet_32.png">icons/GUI/applications-internet_32.png</file>
<file alias="applications-internet_32@2x.png">icons/GUI/applications-internet_32@2x.png</file>
</qresource>
</RCC>

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

Before

Width:  |  Height:  |  Size: 926 B

After

Width:  |  Height:  |  Size: 926 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 707 B

After

Width:  |  Height:  |  Size: 707 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 924 B

After

Width:  |  Height:  |  Size: 924 B

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 682 B

After

Width:  |  Height:  |  Size: 682 B

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 865 B

After

Width:  |  Height:  |  Size: 865 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 880 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

169
icons/GUI/licence.txt Normal file
View File

@ -0,0 +1,169 @@
The GUI icons are Oxygen icons from the KDE project (http://www.kde.org)
licensed under LGPLv3.
-----
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

Before

Width:  |  Height:  |  Size: 728 B

After

Width:  |  Height:  |  Size: 728 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 885 B

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 381 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

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

@ -7,15 +7,17 @@
<name>GPXSee</name>
<summary>GPS log file viewer and analyzer</summary>
<description>
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
KML, FIT, IGC, NMEA, SLF, LOC, GeoJSON and OziExplorer files.</p>
<p>GPXSee is a GPS log file viewer and analyzer that supports all common
GPS log file formats.</p>
<p>Features:</p>
<ul>
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
WPT, RTE), GeoJSON, Garmin CSV and geotagged JPEG files.</li>
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
WMS, TMS).</li>
<li>Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases,
GeoTIFF images).</li>
TwoNav RMaps, Garmin IMG &amp; JNX, GeoTIFF images).</li>
<li>Elevation, speed, heart rate, cadence, power and temperature
graphs.</li>
<li>Support for multiple tracks in one view.</li>
@ -23,8 +25,6 @@
<li>Print/export to PDF.</li>
<li>Full-screen mode.</li>
<li>HiDPI/Retina displays &amp; maps support.</li>
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
WPT, RTE), GeoJSON and Garmin CSV files.</li>
</ul>
</description>

View File

@ -7,7 +7,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "7.4"
!define VERSION "7.8"
; The file to write
OutFile "GPXSee-${VERSION}.exe"

View File

@ -7,7 +7,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "7.4"
!define VERSION "7.8"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0">
<map xmlns="http://www.gpxsee.org/map/1.3">
<name>4UMaps</name>
<url>https://4umaps.com/$z/$x/$y.png</url>
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
<zoom min="2" max="15"/>
<bounds bottom="-65"/>
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
</map>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0" type="WMTS">
<map xmlns="http://www.gpxsee.org/map/1.3" type="WMTS">
<name>Antarctica</name>
<url type="REST">https://gis.ngdc.noaa.gov/arcgis/rest/services/antarctic/antarctic_basemap/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</url>
<copyright>NOAA National Centers for Environmental Information (NCEI); International Bathymetric Chart of the Southern Ocean (IBCSO); General Bathymetric Chart of the Oceans (GEBCO); Natural Earth</copyright>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0">
<map xmlns="http://www.gpxsee.org/map/1.3">
<name>Open Street Map</name>
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © OpenStreetMap (CC-BY-SA)</copyright>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0">
<map xmlns="http://www.gpxsee.org/map/1.3">
<name>Open Topo Map</name>
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
<zoom max="17"/>
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
</map>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0">
<map xmlns="http://www.gpxsee.org/map/1.3">
<name>USGS Imagery</name>
<url>https://basemap.nationalmap.gov/ArcGIS/rest/services/USGSImageryOnly/MapServer/tile/$z/$y/$x</url>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
<zoom min="2" max="15"/>
<bounds bottom="0" top="74"/>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
</map>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.gpxsee.org/map/1.0">
<map xmlns="http://www.gpxsee.org/map/1.3">
<name>USGS Topo</name>
<url>https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/$z/$y/$x</url>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
<zoom min="2" max="15"/>
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
</map>

View File

@ -51,7 +51,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
Downloader::setNetworkManager(new QNetworkAccessManager(this));
DEM::setDir(ProgramPaths::demDir());
OPENGL_SET_SAMPLES(4);
OPENGL_SET_FORMAT(4, 8);
loadDatums();
loadPCSs();

View File

@ -29,8 +29,8 @@ private:
Ticks::Ticks(double minValue, double maxValue, int maxCount)
{
double range = niceNum(maxValue - minValue, 0);
_d = niceNum(range / maxCount, 1);
double range = niceNum(maxValue - minValue, false);
_d = niceNum(range / maxCount, true);
_min = ceil(minValue / _d) * _d;
_max = floor(maxValue / _d) * _d;
}

View File

@ -63,11 +63,11 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
qreal CadenceGraph::avg() const
{
qreal sum = 0, w = 0;
QList<QPointF>::const_iterator it;
for (it = _avg.begin(); it != _avg.end(); it++) {
sum += it->y() * it->x();
w += it->x();
for (int i = 0; i < _avg.size(); i++) {
const QPointF &p = _avg.at(i);
sum += p.y() * p.x();
w += p.x();
}
return (sum / w);

View File

@ -21,7 +21,7 @@ private:
qreal max() const {return bounds().bottom();}
void setInfo();
QList<QPointF> _avg;
QVector<QPointF> _avg;
bool _showTracks;
};

View File

@ -12,6 +12,7 @@ ColorBox::ColorBox(QWidget *parent) : QWidget(parent)
_alpha = true;
setSizePolicy(QSizePolicy::QSizePolicy::Minimum, QSizePolicy::Fixed);
setAttribute(Qt::WA_Hover);
}
QSize ColorBox::sizeHint() const

View File

@ -11,6 +11,10 @@ CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent)
_font.setPixelSize(FONT_SIZE);
_font.setFamily(FONT_FAMILY);
_digitalZoom = 0;
setAcceptHoverEvents(true);
updateBoundingRect();
}
@ -48,6 +52,12 @@ void CoordinatesItem::setFormat(const CoordinatesFormat &format)
updateBoundingRect();
}
void CoordinatesItem::setDigitalZoom(qreal zoom)
{
_digitalZoom = zoom;
setScale(pow(2, -_digitalZoom));
}
void CoordinatesItem::updateBoundingRect()
{
QFontMetrics fm(_font);

View File

@ -17,6 +17,7 @@ public:
void setCoordinates(const Coordinates &c);
void setFormat(const CoordinatesFormat &format);
void setDigitalZoom(qreal zoom);
private:
void updateBoundingRect();
@ -25,6 +26,7 @@ private:
CoordinatesFormat _format;
QRectF _boundingRect;
QFont _font;
qreal _digitalZoom;
};
#endif // COORDINATESITEM_H

View File

@ -103,7 +103,6 @@ GUI::GUI()
readSettings();
updateGraphTabs();
updateMapView();
updateStatusBarInfo();
}
@ -350,6 +349,11 @@ void GUI::createActions()
_showRouteWaypointsAction->setCheckable(true);
connect(_showRouteWaypointsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showRouteWaypoints(bool)));
_showTicksAction = new QAction(tr("km/mi markers"), this);
_showTicksAction->setMenuRole(QAction::NoRole);
_showTicksAction->setCheckable(true);
connect(_showTicksAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showTicks(bool)));
// Graph actions
_showGraphsAction = new QAction(QIcon(SHOW_GRAPHS_ICON), tr("Show graphs"),
@ -537,6 +541,7 @@ void GUI::createMenus()
QMenu *displayMenu = dataMenu->addMenu(tr("Display"));
displayMenu->addAction(_showWaypointLabelsAction);
displayMenu->addAction(_showRouteWaypointsAction);
displayMenu->addAction(_showTicksAction);
dataMenu->addSeparator();
dataMenu->addAction(_showTracksAction);
dataMenu->addAction(_showRoutesAction);
@ -725,6 +730,8 @@ void GUI::paths()
+ QDir::cleanPath(ProgramPaths::csvDir(true)) + "</code></td></tr><tr><td>"
+ tr("DEM directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::demDir(true)) + "</code></td></tr><tr><td>"
+ tr("Styles directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::styleDir(true)) + "</code></td></tr><tr><td>"
+ tr("Tile cache directory:") + "</td><td><code>"
+ QDir::cleanPath(ProgramPaths::tilesDir()) + "</code></td></tr></table>"
);
@ -805,7 +812,7 @@ bool GUI::loadFile(const QString &fileName)
for (int i = 0; i < _tabs.count(); i++)
graphs.append(_tabs.at(i)->loadData(data));
if (updateGraphTabs() | updateMapView())
if (updateGraphTabs())
_splitter->refresh();
paths = _mapView->loadData(data);
@ -828,7 +835,6 @@ bool GUI::loadFile(const QString &fileName)
updateStatusBarInfo();
updateWindowTitle();
updateGraphTabs();
updateMapView();
QString error = tr("Error loading data file:") + "\n\n"
+ fileName + "\n\n" + data.errorString();
@ -930,6 +936,7 @@ void GUI::openOptions()
SET_VIEW_OPTION(pathAntiAliasing, useAntiAliasing);
SET_VIEW_OPTION(useOpenGL, useOpenGL);
SET_VIEW_OPTION(sliderColor, setMarkerColor);
SET_VIEW_OPTION(projection, setProjection);
SET_TAB_OPTION(palette, setPalette);
SET_TAB_OPTION(graphWidth, setGraphWidth);
@ -974,8 +981,6 @@ void GUI::openOptions()
reloadFile();
_options = options;
updateMapView();
}
void GUI::printFile()
@ -1230,7 +1235,6 @@ void GUI::closeAll()
updateStatusBarInfo();
updateWindowTitle();
updateGraphTabs();
updateMapView();
}
void GUI::showGraphs(bool show)
@ -1473,19 +1477,6 @@ bool GUI::updateGraphTabs()
return (hidden != _graphTabWidget->isHidden());
}
bool GUI::updateMapView()
{
bool hidden = _mapView->isHidden();
if (_options.alwaysShowMap)
_mapView->setHidden(false);
else
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount
+ _areaCount));
return (hidden != _mapView->isHidden());
}
void GUI::setTimeType(TimeType type)
{
for (int i = 0; i <_tabs.count(); i++)
@ -1736,6 +1727,9 @@ void GUI::writeSettings()
if (_showRouteWaypointsAction->isChecked() != SHOW_ROUTE_WAYPOINTS_DEFAULT)
settings.setValue(SHOW_ROUTE_WAYPOINTS_SETTING,
_showRouteWaypointsAction->isChecked());
if (_showTicksAction->isChecked() != SHOW_TICKS_DEFAULT)
settings.setValue(SHOW_TICKS_SETTING,
_showTicksAction->isChecked());
settings.endGroup();
settings.beginGroup(EXPORT_SETTINGS_GROUP);
@ -1847,8 +1841,8 @@ void GUI::writeSettings()
_options.separateGraphPage);
if (_options.sliderColor != SLIDER_COLOR_DEFAULT)
settings.setValue(SLIDER_COLOR_SETTING, _options.sliderColor);
if (_options.alwaysShowMap != ALWAYS_SHOW_MAP_DEFAULT)
settings.setValue(ALWAYS_SHOW_MAP_SETTING, _options.alwaysShowMap);
if (_options.projection != PROJECTION_DEFAULT)
settings.setValue(PROJECTION_SETTING, _options.projection);
#ifdef ENABLE_HIDPI
if (_options.hidpiMap != HIDPI_MAP_DEFAULT)
settings.setValue(HIDPI_MAP_SETTING, _options.hidpiMap);
@ -1999,6 +1993,10 @@ void GUI::readSettings()
_mapView->showRouteWaypoints(false);
else
_showRouteWaypointsAction->setChecked(true);
if (settings.value(SHOW_TICKS_SETTING, SHOW_TICKS_DEFAULT).toBool()) {
_mapView->showTicks(true);
_showTicksAction->setChecked(true);
}
settings.endGroup();
settings.beginGroup(EXPORT_SETTINGS_GROUP);
@ -2110,8 +2108,8 @@ void GUI::readSettings()
SEPARATE_GRAPH_PAGE_DEFAULT).toBool();
_options.sliderColor = settings.value(SLIDER_COLOR_SETTING,
SLIDER_COLOR_DEFAULT).value<QColor>();
_options.alwaysShowMap = settings.value(ALWAYS_SHOW_MAP_SETTING,
ALWAYS_SHOW_MAP_DEFAULT).toBool();
_options.projection = settings.value(PROJECTION_SETTING, PROJECTION_DEFAULT)
.toInt();
#ifdef ENABLE_HIDPI
_options.hidpiMap = settings.value(HIDPI_MAP_SETTING, HIDPI_MAP_SETTING)
.toBool();
@ -2139,6 +2137,7 @@ void GUI::readSettings()
_mapView->setDevicePixelRatio(devicePixelRatioF(),
_options.hidpiMap ? devicePixelRatioF() : 1.0);
#endif // ENABLE_HIDPI
_mapView->setProjection(_options.projection);
for (int i = 0; i < _tabs.count(); i++) {
_tabs.at(i)->setPalette(_options.palette);

View File

@ -116,7 +116,6 @@ private:
void updateWindowTitle();
void updateNavigationActions();
bool updateGraphTabs();
bool updateMapView();
TimeType timeType() const;
Units units() const;
@ -193,6 +192,7 @@ private:
QAction *_showAreasAction;
QAction *_showRouteWaypointsAction;
QAction *_showMarkersAction;
QAction *_showTicksAction;
QAction *_showCoordinatesAction;
QAction *_openOptionsAction;
QAction *_mapsEnd;

View File

@ -63,11 +63,11 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
qreal HeartRateGraph::avg() const
{
qreal sum = 0, w = 0;
QList<QPointF>::const_iterator it;
for (it = _avg.begin(); it != _avg.end(); it++) {
sum += it->y() * it->x();
w += it->x();
for (int i = 0; i < _avg.size(); i++) {
const QPointF &p = _avg.at(i);
sum += p.y() * p.x();
w += p.x();
}
return (sum / w);

View File

@ -20,7 +20,7 @@ private:
qreal max() const {return bounds().bottom();}
void setInfo();
QList<QPointF> _avg;
QVector<QPointF> _avg;
bool _showTracks;
};

View File

@ -1,30 +1,30 @@
#ifndef ICONS_H
#define ICONS_H
#define APP_ICON ":/icons/gpxsee.png"
#define APP_ICON ":/gpxsee.png"
// Toolbar/menu icons
#define OPEN_FILE_ICON ":/icons/document-open.png"
#define EXPORT_FILE_ICON ":/icons/document-export.png"
#define PRINT_FILE_ICON ":/icons/document-print.png"
#define CLOSE_FILE_ICON ":/icons/dialog-close.png"
#define SHOW_POI_ICON ":/icons/flag.png"
#define SHOW_MAP_ICON ":/icons/applications-internet.png"
#define SHOW_GRAPHS_ICON ":/icons/office-chart-line.png"
#define QUIT_ICON ":/icons/application-exit.png"
#define RELOAD_FILE_ICON ":/icons/view-refresh.png"
#define NEXT_FILE_ICON ":/icons/arrow-right.png"
#define PREV_FILE_ICON ":/icons/arrow-left.png"
#define LAST_FILE_ICON ":/icons/arrow-right-double.png"
#define FIRST_FILE_ICON ":/icons/arrow-left-double.png"
#define FULLSCREEN_ICON ":/icons/view-fullscreen.png"
#define OPEN_FILE_ICON ":/document-open.png"
#define EXPORT_FILE_ICON ":/document-export.png"
#define PRINT_FILE_ICON ":/document-print.png"
#define CLOSE_FILE_ICON ":/dialog-close.png"
#define SHOW_POI_ICON ":/flag.png"
#define SHOW_MAP_ICON ":/applications-internet.png"
#define SHOW_GRAPHS_ICON ":/office-chart-line.png"
#define QUIT_ICON ":/application-exit.png"
#define RELOAD_FILE_ICON ":/view-refresh.png"
#define NEXT_FILE_ICON ":/arrow-right.png"
#define PREV_FILE_ICON ":/arrow-left.png"
#define LAST_FILE_ICON ":/arrow-right-double.png"
#define FIRST_FILE_ICON ":/arrow-left-double.png"
#define FULLSCREEN_ICON ":/view-fullscreen.png"
// Options dialog icons
#define APPEARANCE_ICON ":/icons/format-stroke-color.png"
#define POI_ICON ":/icons/flag_32.png"
#define SYSTEM_ICON ":/icons/preferences-system.png"
#define PRINT_EXPORT_ICON ":/icons/document-print_32.png"
#define DATA_ICON ":/icons/view-filter.png"
#define MAPS_ICON ":/icons/applications-internet_32.png"
#define APPEARANCE_ICON ":/format-stroke-color.png"
#define POI_ICON ":/flag_32.png"
#define SYSTEM_ICON ":/preferences-system.png"
#define PRINT_EXPORT_ICON ":/document-print_32.png"
#define DATA_ICON ":/view-filter.png"
#define MAPS_ICON ":/applications-internet_32.png"
#endif /* ICONS_H */

39
src/GUI/limitedcombobox.h Normal file
View File

@ -0,0 +1,39 @@
#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

@ -7,6 +7,7 @@
#include "data/poi.h"
#include "data/data.h"
#include "map/map.h"
#include "map/pcs.h"
#include "opengl.h"
#include "trackitem.h"
#include "routeitem.h"
@ -39,7 +40,6 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setRenderHint(QPainter::Antialiasing, true);
setAcceptDrops(false);
setMouseTracking(true);
_mapScale = new ScaleItem();
_mapScale->setZValue(2.0);
@ -49,8 +49,10 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
_coordinates->setVisible(false);
_scene->addItem(_coordinates);
_projection = PCS::pcs(3857);
_map = map;
_map->load();
_map->setProjection(_projection);
connect(_map, SIGNAL(loaded()), this, SLOT(reloadMap()));
_poi = poi;
@ -73,6 +75,7 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
_overlapPOIs = true;
_showRouteWaypoints = true;
_showMarkers = true;
_showPathTicks = false;
_trackWidth = 3;
_routeWidth = 3;
_trackStyle = Qt::SolidLine;
@ -123,6 +126,7 @@ PathItem *MapView::addTrack(const Track &track)
ti->setDigitalZoom(_digitalZoom);
ti->setMarkerColor(_markerColor);
ti->showMarker(_showMarkers);
ti->showTicks(_showPathTicks);
_scene->addItem(ti);
if (_showTracks)
@ -152,6 +156,7 @@ PathItem *MapView::addRoute(const Route &route)
ri->setDigitalZoom(_digitalZoom);
ri->setMarkerColor(_markerColor);
ri->showMarker(_showMarkers);
ri->showTicks(_showPathTicks);
_scene->addItem(ri);
if (_showRoutes)
@ -313,6 +318,7 @@ void MapView::setMap(Map *map)
_map = map;
_map->load();
_map->setProjection(_projection);
#ifdef ENABLE_HIDPI
_map->setDevicePixelRatio(_deviceRatio, _mapRatio);
#endif // ENABLE_HIDPI
@ -476,6 +482,7 @@ void MapView::digitalZoom(int zoom)
it.value()->setDigitalZoom(_digitalZoom);
_mapScale->setDigitalZoom(_digitalZoom);
_coordinates->setDigitalZoom(_digitalZoom);
}
void MapView::zoom(int zoom, const QPoint &pos)
@ -720,6 +727,15 @@ void MapView::showMarkers(bool show)
_routes.at(i)->showMarker(show);
}
void MapView::showTicks(bool show)
{
_showPathTicks = show;
for (int i = 0; i < _tracks.size(); i++)
_tracks.at(i)->showTicks(show);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->showTicks(show);
}
void MapView::showMap(bool show)
{
_showMap = show;
@ -751,6 +767,7 @@ void MapView::showPOILabels(bool show)
void MapView::showCoordinates(bool show)
{
_coordinates->setVisible(show);
setMouseTracking(show);
}
void MapView::setPOIOverlap(bool overlap)
@ -1011,3 +1028,17 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
Q_UNUSED(mapRatio);
#endif // ENABLE_HIDPI
}
void MapView::setProjection(int id)
{
Projection projection(PCS::pcs(id));
if (!projection.isValid())
return;
_projection = projection;
Coordinates center = _map->xy2ll(mapToScene(viewport()->rect().center()));
_map->setProjection(_projection);
rescale();
centerOn(_map->ll2xy(center));
}

View File

@ -8,11 +8,13 @@
#include "common/rectc.h"
#include "common/config.h"
#include "data/waypoint.h"
#include "data/polygon.h"
#include "map/projection.h"
#include "searchpointer.h"
#include "units.h"
#include "format.h"
#include "palette.h"
#include "data/polygon.h"
class Data;
class POI;
@ -77,9 +79,11 @@ public slots:
void showRouteWaypoints(bool show);
void showMarkers(bool show);
void showCoordinates(bool show);
void showTicks(bool show);
void clearMapCache();
void setCoordinatesFormat(CoordinatesFormat format);
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
void setProjection(int id);
private slots:
void updatePOI();
@ -132,10 +136,11 @@ private:
Units _units;
CoordinatesFormat _coordinatesFormat;
qreal _mapOpacity;
Projection _projection;
bool _showMap, _showTracks, _showRoutes, _showAreas, _showWaypoints,
_showWaypointLabels, _showPOI, _showPOILabels, _showRouteWaypoints,
_showMarkers;
_showMarkers, _showPathTicks;
bool _overlapPOIs;
int _trackWidth, _routeWidth, _areaWidth;
Qt::PenStyle _trackStyle, _routeStyle, _areaStyle;

View File

@ -14,13 +14,15 @@
#endif
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
#define OPENGL_SET_SAMPLES(samples) \
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
{QGLFormat fmt; \
fmt.setStencilBufferSize(stencilBuffer); \
fmt.setSamples(samples); \
QGLFormat::setDefaultFormat(fmt);}
#else
#define OPENGL_SET_SAMPLES(samples) \
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
{QSurfaceFormat fmt; \
fmt.setSamples(samples);\
fmt.setStencilBufferSize(stencilBuffer); \
fmt.setSamples(samples); \
QSurfaceFormat::setDefaultFormat(fmt);}
#endif

View File

@ -12,11 +12,14 @@
#include <QRadioButton>
#include <QLabel>
#include <QSysInfo>
#include <QInputDialog>
#include "map/pcs.h"
#include "icons.h"
#include "colorbox.h"
#include "stylecombobox.h"
#include "oddspinbox.h"
#include "percentslider.h"
#include "limitedcombobox.h"
#include "optionsdialog.h"
@ -36,10 +39,15 @@ static QFrame *line()
QWidget *OptionsDialog::createMapPage()
{
_alwaysShowMap = new QCheckBox(tr("Always show the map"));
_alwaysShowMap->setChecked(_options->alwaysShowMap);
_alwaysShowMap->setToolTip("<p>" +
tr("Show the map even when no files are loaded.") + "</p>");
_projection = new LimitedComboBox(200);
QList<PCS::Info> projections(PCS::pcsList());
qSort(projections);
for (int i = 0; i < projections.size(); i++) {
QString text = QString::number(projections.at(i).id()) + " - "
+ projections.at(i).name();
_projection->addItem(text, QVariant(projections.at(i).id()));
}
_projection->setCurrentIndex(_projection->findData(_options->projection));
#ifdef ENABLE_HIDPI
_hidpi = new QRadioButton(tr("High-resolution"));
@ -60,14 +68,14 @@ QWidget *OptionsDialog::createMapPage()
llo->setFont(f);
#endif // ENABLE_HIDPI
QFormLayout *showMapLayout = new QFormLayout();
showMapLayout->addWidget(_alwaysShowMap);
QFormLayout *vectorLayout = new QFormLayout();
vectorLayout->addRow(tr("Projection:"), _projection);
QWidget *mapTab = new QWidget();
QVBoxLayout *mapTabLayout = new QVBoxLayout();
mapTabLayout->addLayout(showMapLayout);
mapTabLayout->addStretch();
mapTab->setLayout(mapTabLayout);
QWidget *vectorMapsTab = new QWidget();
QVBoxLayout *vectorMapsTabLayout = new QVBoxLayout();
vectorMapsTabLayout->addLayout(vectorLayout);
vectorMapsTabLayout->addStretch();
vectorMapsTab->setLayout(vectorMapsTabLayout);
#ifdef ENABLE_HIDPI
QVBoxLayout *hidpiTabLayout = new QVBoxLayout();
@ -83,7 +91,7 @@ QWidget *OptionsDialog::createMapPage()
#endif // ENABLE_HIDPI
QTabWidget *mapPage = new QTabWidget();
mapPage->addTab(mapTab, tr("General"));
mapPage->addTab(vectorMapsTab, tr("Vector maps"));
#ifdef ENABLE_HIDPI
mapPage->addTab(hidpiTab, tr("HiDPI display mode"));
#endif // ENABLE_HIDPI
@ -261,6 +269,7 @@ QWidget *OptionsDialog::createAppearancePage()
_backgroundColor = new ColorBox();
_backgroundColor->setColor(_options->backgroundColor);
_backgroundColor->enableAlphaChannel(false);
QFormLayout *mapLayout = new QFormLayout();
mapLayout->addRow(tr("Background color:"), _backgroundColor);
mapLayout->addRow(tr("Map opacity:"), _mapOpacity);
@ -656,7 +665,8 @@ void OptionsDialog::accept()
_options->sliderColor = _sliderColor->color();
_options->graphAntiAliasing = _graphAA->isChecked();
_options->alwaysShowMap = _alwaysShowMap->isChecked();
_options->projection = _projection->itemData(_projection->currentIndex())
.toInt();
#ifdef ENABLE_HIDPI
_options->hidpiMap = _hidpi->isChecked();
#endif // ENABLE_HIDPI

View File

@ -15,6 +15,7 @@ class QComboBox;
class QCheckBox;
class QRadioButton;
class PercentSlider;
class LimitedComboBox;
struct Options {
// Appearance
@ -37,7 +38,7 @@ struct Options {
int mapOpacity;
QColor backgroundColor;
// Map
bool alwaysShowMap;
int projection;
#ifdef ENABLE_HIDPI
bool hidpiMap;
#endif // ENABLE_HIDPI
@ -79,11 +80,14 @@ class OptionsDialog : public QDialog
{
Q_OBJECT
public slots:
void accept();
public:
OptionsDialog(Options *options, QWidget *parent = 0);
public slots:
void accept();
//private slots:
// void projectionChanged(int index);
private:
QWidget *createMapPage();
@ -116,7 +120,7 @@ private:
ColorBox *_sliderColor;
QCheckBox *_graphAA;
// Map
QCheckBox *_alwaysShowMap;
LimitedComboBox *_projection;
#ifdef ENABLE_HIDPI
QRadioButton *_hidpi;
QRadioButton *_lodpi;

View File

@ -3,6 +3,7 @@
#include <QPainter>
#include "common/greatcircle.h"
#include "map/map.h"
#include "pathtickitem.h"
#include "pathitem.h"
@ -23,14 +24,17 @@ PathItem::PathItem(const Path &path, Map *map, QGraphicsItem *parent)
{
Q_ASSERT(_path.isValid());
_units = Metric;
_digitalZoom = 0;
_width = 3;
QBrush brush(Qt::SolidPattern);
_pen = QPen(brush, _width);
_showMarker = true;
_showTicks = false;
updatePainterPath();
updateShape();
updateTicks();
_markerDistance = _path.first().first().distance();
_marker = new MarkerItem(this);
@ -111,8 +115,7 @@ void PathItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
painter->drawPath(_painterPath);
/*
QPen p = QPen(QBrush(Qt::red), 0);
painter->setPen(p);
painter->setPen(Qt::red);
painter->drawRect(boundingRect());
*/
}
@ -125,6 +128,7 @@ void PathItem::setMap(Map *map)
updatePainterPath();
updateShape();
updateTicks();
QPointF pos = position(_markerDistance);
if (isValid(pos))
@ -284,6 +288,75 @@ void PathItem::showMarker(bool show)
_marker->setVisible(show && isValid(position(_markerDistance)));
}
qreal PathItem::xInM() const
{
return (_units == Nautical) ? NMIINM : (_units == Imperial) ? MIINM : KMINM;
}
unsigned PathItem::tickSize() const
{
qreal res = _map->resolution(sceneBoundingRect());
if (res < 10)
return 1;
else if (res < 25)
return 5;
else if (res < 100)
return 10;
else if (res < 500)
return 50;
else if (res < 2000)
return 100;
else if (res < 10000)
return 500;
else if (res < 20000)
return 1000;
else
return 5000;
}
void PathItem::updateTicks()
{
for (int i = 0; i < _ticks.size(); i++)
delete _ticks[i];
_ticks.clear();
if (!_showTicks)
return;
int ts = tickSize();
int tc = _path.last().last().distance() / (ts * xInM());
QRect tr = PathTickItem::tickRect(ts * tc);
_ticks.resize(tc);
for (int i = 0; i < tc; i++) {
_ticks[i] = new PathTickItem(tr, (i + 1) * ts, this);
_ticks[i]->setPos(position((i + 1) * ts * xInM()));
_ticks[i]->setColor(_pen.color());
_ticks[i]->setToolTip(toolTip());
}
}
void PathItem::showTicks(bool show)
{
if (_showTicks == show)
return;
prepareGeometryChange();
_showTicks = show;
updateTicks();
}
void PathItem::setUnits(Units units)
{
if (_units == units)
return;
prepareGeometryChange();
_units = units;
updateTicks();
}
void PathItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);

View File

@ -5,8 +5,10 @@
#include <QPen>
#include "data/path.h"
#include "markeritem.h"
#include "units.h"
class Map;
class PathTickItem;
class PathItem : public QGraphicsObject
{
@ -24,12 +26,16 @@ public:
void setMap(Map *map);
void setUnits(Units units);
void setColor(const QColor &color);
void setWidth(qreal width);
void setStyle(Qt::PenStyle style);
void setDigitalZoom(int zoom);
void setMarkerColor(const QColor &color);
void showMarker(bool show);
void showTicks(bool show);
Units units() const {return _units;}
public slots:
void moveMarker(qreal distance);
@ -38,10 +44,6 @@ public slots:
signals:
void selected(bool);
protected:
Path _path;
MarkerItem *_marker;
private:
const PathSegment *segment(qreal x) const;
QPointF position(qreal distance) const;
@ -49,19 +51,28 @@ private:
void updateShape();
void addSegment(const Coordinates &c1, const Coordinates &c2);
qreal xInM() const;
unsigned tickSize() const;
void updateTicks();
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
Path _path;
Map *_map;
qreal _markerDistance;
int _digitalZoom;
Units _units;
qreal _width;
QPen _pen;
QPainterPath _shape;
QPainterPath _painterPath;
bool _showMarker;
bool _showTicks;
MarkerItem *_marker;
QVector<PathTickItem*> _ticks;
};
#endif // PATHITEM_H

71
src/GUI/pathtickitem.cpp Normal file
View File

@ -0,0 +1,71 @@
#include <QPainter>
#include <QCursor>
#include "font.h"
#include "pathtickitem.h"
static QFont defaultFont()
{
QFont font;
font.setPixelSize(10);
font.setFamily(FONT_FAMILY);
font.setBold(true);
return font;
}
QFont PathTickItem::_font = defaultFont();
PathTickItem::PathTickItem(const QRectF &tickRect, int value,
QGraphicsItem *parent) : QGraphicsItem(parent), _tickRect(tickRect),
_text(QString::number(value))
{
_tickRect.moveCenter(QPointF(0, -_tickRect.height()/2.0 - 3));
setCursor(Qt::ArrowCursor);
setAcceptHoverEvents(true);
}
QRectF PathTickItem::boundingRect() const
{
return _tickRect.adjusted(0, 0, 0, 3);
}
void PathTickItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
QPointF arrow[3] = {QPointF(0, 0), QPointF(3, -3), QPointF(-3, -3)};
painter->setFont(_font);
painter->setRenderHint(QPainter::Antialiasing, false);
painter->setPen(Qt::white);
painter->setBrush(_brush);
painter->drawPolygon(arrow, 3);
painter->drawRoundedRect(_tickRect, 1.5, 1.5);
painter->drawText(_tickRect, Qt::AlignCenter, _text);
/*
painter->setBrush(Qt::NoBrush);
painter->setPen(Qt::red);
painter->drawRect(boundingRect());
*/
}
void PathTickItem::setPos(const QPointF &pos)
{
/* For propper rounded rect rendering, the item must be positioned in the
middle of a pixel */
QPoint p(pos.toPoint());
QGraphicsItem::setPos(QPointF(p.x() - 0.5, p.y() - 0.5));
}
QRect PathTickItem::tickRect(int value)
{
QFontMetrics fm(_font);
return fm.boundingRect(QRect(), Qt::AlignCenter,
QString::number(qMax(value, 10))).adjusted(-2, 0, 2, 0);
}

29
src/GUI/pathtickitem.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef PATHTICKITEM_H
#define PATHTICKITEM_H
#include <QFont>
#include <QGraphicsItem>
class PathTickItem : public QGraphicsItem
{
public:
PathTickItem(const QRectF &tickRect, int value, QGraphicsItem *parent = 0);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
void setPos(const QPointF &pos);
void setColor(const QColor &color) {_brush = QBrush(color);}
static QRect tickRect(int value);
private:
QRectF _tickRect;
QString _text;
QBrush _brush;
static QFont _font;
};
#endif // PATHTICKITEM_H

View File

@ -63,11 +63,11 @@ QList<GraphItem*> PowerGraph::loadData(const Data &data)
qreal PowerGraph::avg() const
{
qreal sum = 0, w = 0;
QList<QPointF>::const_iterator it;
for (it = _avg.begin(); it != _avg.end(); it++) {
sum += it->y() * it->x();
w += it->x();
for (int i = 0; i < _avg.size(); i++) {
const QPointF &p = _avg.at(i);
sum += p.y() * p.x();
w += p.x();
}
return (sum / w);

View File

@ -20,7 +20,7 @@ private:
qreal max() const {return bounds().bottom();}
void setInfo();
QList<QPointF> _avg;
QVector<QPointF> _avg;
bool _showTracks;
};

View File

@ -15,7 +15,7 @@ QString RouteItem::toolTip(Units units) const
tt.insert(tr("Name"), _name);
if (!_desc.isEmpty())
tt.insert(tr("Description"), _desc);
tt.insert(tr("Distance"), Format::distance(_path.last().last().distance(),
tt.insert(tr("Distance"), Format::distance(path().last().last().distance(),
units));
return tt.toString();
@ -26,12 +26,12 @@ RouteItem::RouteItem(const Route &route, Map *map, QGraphicsItem *parent)
{
const QVector<Waypoint> &waypoints = route.waypoints();
_waypoints.resize(waypoints.size());
for (int i = 0; i < waypoints.size(); i++)
new WaypointItem(waypoints.at(i), map, this);
_waypoints[i] = new WaypointItem(waypoints.at(i), map, this);
_name = route.name();
_desc = route.description();
_units = Metric;
_coordinatesFormat = DecimalDegrees;
setToolTip(toolTip(Metric));
@ -39,33 +39,23 @@ RouteItem::RouteItem(const Route &route, Map *map, QGraphicsItem *parent)
void RouteItem::setMap(Map *map)
{
QList<QGraphicsItem *> childs = childItems();
for (int i = 0; i < childs.count(); i++) {
if (childs.at(i) != _marker) {
WaypointItem *wi = static_cast<WaypointItem*>(childs.at(i));
wi->setMap(map);
}
}
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->setMap(map);
PathItem::setMap(map);
}
void RouteItem::setUnits(Units units)
void RouteItem::setUnits(Units u)
{
if (_units == units)
if (units() == u)
return;
_units = units;
PathItem::setUnits(u);
setToolTip(toolTip(_units));
setToolTip(toolTip(units()));
QList<QGraphicsItem *> childs = childItems();
for (int i = 0; i < childs.count(); i++) {
if (childs.at(i) != _marker) {
WaypointItem *wi = static_cast<WaypointItem*>(childs.at(i));
wi->setToolTipFormat(_units, _coordinatesFormat);
}
}
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->setToolTipFormat(units(), _coordinatesFormat);
}
void RouteItem::setCoordinatesFormat(CoordinatesFormat format)
@ -75,30 +65,18 @@ void RouteItem::setCoordinatesFormat(CoordinatesFormat format)
_coordinatesFormat = format;
QList<QGraphicsItem *> childs = childItems();
for (int i = 0; i < childs.count(); i++) {
if (childs.at(i) != _marker) {
WaypointItem *wi = static_cast<WaypointItem*>(childs.at(i));
wi->setToolTipFormat(_units, _coordinatesFormat);
}
}
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->setToolTipFormat(units(), _coordinatesFormat);
}
void RouteItem::showWaypoints(bool show)
{
QList<QGraphicsItem *> childs = childItems();
for (int i = 0; i < childs.count(); i++)
if (childs.at(i) != _marker)
childs.at(i)->setVisible(show);
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->setVisible(show);
}
void RouteItem::showWaypointLabels(bool show)
{
QList<QGraphicsItem *> childs = childItems();
for (int i = 0; i < childs.count(); i++) {
if (childs.at(i) != _marker) {
WaypointItem *wi = static_cast<WaypointItem*>(childs.at(i));
wi->showLabel(show);
}
}
for (int i = 0; i < _waypoints.count(); i++)
_waypoints[i]->showLabel(show);
}

View File

@ -7,6 +7,7 @@
#include "format.h"
class Map;
class WaypointItem;
class RouteItem : public PathItem
{
@ -17,7 +18,7 @@ public:
void setMap(Map *map);
void setUnits(Units units);
void setUnits(Units u);
void setCoordinatesFormat(CoordinatesFormat format);
void showWaypoints(bool show);
void showWaypointLabels(bool show);
@ -27,8 +28,9 @@ private:
QString _name;
QString _desc;
Units _units;
CoordinatesFormat _coordinatesFormat;
QVector<WaypointItem*> _waypoints;
};
#endif // ROUTEITEM_H

View File

@ -61,9 +61,9 @@ void ScaleItem::computeScale()
qreal res = _res * pow(2, -_digitalZoom);
if (_units == Imperial) {
_length = niceNum((res * M2FT * SCALE_WIDTH) / SEGMENTS, 1);
_length = niceNum((res * M2FT * SCALE_WIDTH) / SEGMENTS, true);
if (_length >= MIINFT) {
_length = niceNum((res * M2MI * SCALE_WIDTH) / SEGMENTS, 1);
_length = niceNum((res * M2MI * SCALE_WIDTH) / SEGMENTS, true);
_width = (_length / (res * M2MI));
_scale = true;
} else {
@ -71,9 +71,9 @@ void ScaleItem::computeScale()
_scale = false;
}
} else if (_units == Nautical) {
_length = niceNum((res * M2FT * SCALE_WIDTH) / SEGMENTS, 1);
_length = niceNum((res * M2FT * SCALE_WIDTH) / SEGMENTS, true);
if (_length >= NMIINFT) {
_length = niceNum((res * M2NMI * SCALE_WIDTH) / SEGMENTS, 1);
_length = niceNum((res * M2NMI * SCALE_WIDTH) / SEGMENTS, true);
_width = (_length / (res * M2NMI));
_scale = true;
} else {
@ -81,7 +81,7 @@ void ScaleItem::computeScale()
_scale = false;
}
} else {
_length = niceNum((res * SCALE_WIDTH) / SEGMENTS, 1);
_length = niceNum((res * SCALE_WIDTH) / SEGMENTS, true);
if (_length >= KMINM) {
_length *= M2KM;
_width = (_length / (res * M2KM));

View File

@ -32,6 +32,8 @@
#define SHOW_GRAPH_SLIDER_INFO_DEFAULT true
#define SHOW_MARKERS_SETTING "pathMarkers"
#define SHOW_MARKERS_DEFAULT true
#define SHOW_TICKS_SETTING "pathTicks"
#define SHOW_TICKS_DEFAULT false
#define MAP_SETTINGS_GROUP "Map"
#define CURRENT_MAP_SETTING "map"
@ -171,8 +173,8 @@
#define SEPARATE_GRAPH_PAGE_DEFAULT false
#define SLIDER_COLOR_SETTING "sliderColor"
#define SLIDER_COLOR_DEFAULT QColor(Qt::red)
#define ALWAYS_SHOW_MAP_SETTING "alwaysShowMap"
#define ALWAYS_SHOW_MAP_DEFAULT true
#define PROJECTION_SETTING "projection"
#define PROJECTION_DEFAULT 3857
#define HIDPI_MAP_SETTING "HiDPIMap"
#define HIDPI_MAP_DEFAULT true

View File

@ -74,12 +74,12 @@ QList<GraphItem*> SpeedGraph::loadData(const Data &data)
qreal SpeedGraph::avg() const
{
qreal sum = 0, w = 0;
QList<QPointF>::const_iterator it;
const QList<QPointF> &list = (_timeType == Moving) ? _mavg : _avg;
const QVector<QPointF> &vector = (_timeType == Moving) ? _mavg : _avg;
for (it = list.begin(); it != list.end(); it++) {
sum += it->y() * it->x();
w += it->x();
for (int i = 0; i < vector.size(); i++) {
const QPointF &p = vector.at(i);
sum += p.y() * p.x();
w += p.x();
}
return (sum / w);

View File

@ -24,8 +24,8 @@ private:
void setYUnits();
void setInfo();
QList<QPointF> _avg;
QList<QPointF> _mavg;
QVector<QPointF> _avg;
QVector<QPointF> _mavg;
Units _units;
TimeType _timeType;

View File

@ -66,11 +66,11 @@ QList<GraphItem*> TemperatureGraph::loadData(const Data &data)
qreal TemperatureGraph::avg() const
{
qreal sum = 0, w = 0;
QList<QPointF>::const_iterator it;
for (it = _avg.begin(); it != _avg.end(); it++) {
sum += it->y() * it->x();
w += it->x();
for (int i = 0; i < _avg.size(); i++) {
const QPointF &p = _avg.at(i);
sum += p.y() * p.x();
w += p.x();
}
return (sum / w);

View File

@ -23,7 +23,7 @@ private:
void setYUnits(Units units);
void setInfo();
QList<QPointF> _avg;
QVector<QPointF> _avg;
bool _showTracks;
};

View File

@ -1,22 +1,43 @@
#include <QImageReader>
#include "tooltip.h"
#define THUMBNAIL_MAX_SIZE 240
void ToolTip::insert(const QString &key, const QString &value)
{
_list.append(KV(key, value));
}
QString ToolTip::toString()
QString ToolTip::toString() const
{
if (_list.isEmpty())
return QString();
QString html;
QString ret = "<table>";
if (_img.isValid()) {
int width, height;
if (_img.size().width() > _img.size().height()) {
width = qMin(_img.size().width(), THUMBNAIL_MAX_SIZE);
qreal ratio = _img.size().width() / (qreal)_img.size().height();
height = (int)(width / ratio);
} else {
height = qMin(_img.size().height(), THUMBNAIL_MAX_SIZE);
qreal ratio = _img.size().height() / (qreal)_img.size().width();
width = (int)(height / ratio);
}
for (int i = 0; i < _list.count(); i++)
ret += "<tr><td align=\"right\"><b>" + _list.at(i).key()
+ ":&nbsp;</b></td><td>" + _list.at(i).value() + "</td></tr>";
html += "<div align=\"center\">";
html += QString("<img src=\"file:%0\" width=\"%1\" height=\"%2\"/>")
.arg(_img.path(), QString::number(width), QString::number(height));
html += "</div>";
}
ret += "</table>";
if (!_list.isEmpty()) {
html += "<table>";
for (int i = 0; i < _list.count(); i++)
html += "<tr><td align=\"right\"><b>" + _list.at(i).key()
+ ":&nbsp;</b></td><td>" + _list.at(i).value() + "</td></tr>";
html += "</table>";
}
return ret;
return html;
}

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