1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-01 13:29:16 +02:00

Compare commits

...

187 Commits
7.2 ... 7.6

Author SHA1 Message Date
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
3220a707d4 Merge branch 'origin/master' into Weblate. 2019-03-10 18:50:18 +01:00
d8ad020678 Added RMap Dutch grid projection support 2019-03-10 18:49:41 +01:00
1f0a4264aa Merge branch 'origin/master' into Weblate. 2019-03-10 18:17:50 +01:00
b13590450d A better date boundary handling fix (#192) 2019-03-10 18:16:43 +01:00
f2695cd5e2 Translated using Weblate (Turkish)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-03-10 18:03:22 +01:00
f57c2d57d3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-03-10 18:03:22 +01:00
c5cdf81f14 Fixed IGC date century issue 2019-03-10 10:35:49 +01:00
c5fef58b2e Fixed IGC date boundary crossing
Fixes #192
2019-03-10 10:23:39 +01:00
e63a2e1fde Silenced MSVC warnings 2019-03-09 14:36:15 +01:00
b58adc5486 Use a less restrictive check
(some rmaps contain tiles with exceeding image data)
2019-03-09 12:09:43 +01:00
46d6fbe5de Translated using Weblate (Swedish)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-03-09 09:33:19 +01:00
ab1eb2f18a Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.4% (310 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-03-09 09:33:19 +01:00
6f70bcae12 Translated using Weblate (Czech)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/cs/
2019-03-09 09:31:38 +01:00
ee81e2f15e Translated using Weblate (German)
Currently translated at 100.0% (339 of 339 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-03-09 09:31:19 +01:00
2fdd340f8a Localization update 2019-03-08 23:16:27 +01:00
bba95b1bf4 Merge branch 'origin/master' into Weblate. 2019-03-08 22:52:38 +01:00
b5578d89b0 Version++ 2019-03-08 22:52:37 +01:00
493d588ca9 Translated using Weblate (French)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2019-03-08 10:03:20 +01:00
172b2b1b14 Improved rmap support 2019-03-07 22:58:43 +01:00
060f940b75 Use a shared CalibrationPoint implementation 2019-03-07 01:08:51 +01:00
e2ad2e9d98 Fixed QT4 build 2019-03-05 23:05:50 +01:00
408ac22994 Fixed missing reference 2019-03-05 22:52:14 +01:00
0e404e993e Fixed some clazy warnings 2019-03-05 22:34:50 +01:00
efca589f01 Made coverity happy 2019-03-05 21:44:36 +01:00
d307ef4b98 Improved error handling 2019-03-05 20:44:10 +01:00
ce57350a55 Silence a clang static analysis warning (should newer happen) 2019-03-05 20:43:05 +01:00
90dcda217e Code cleanup 2019-03-04 22:29:53 +01:00
3c3fb43993 Use the more common map type name (also used by MOBAC) 2019-03-03 21:21:24 +01:00
d2f10aca7c Added missing RMap HiDPI scaling support 2019-03-03 21:17:57 +01:00
78654aa1cf Added missing include 2019-03-03 09:36:57 +01:00
fb34f5c7db Added missing UTM S/N handling 2019-03-02 18:49:01 +01:00
c1a1c3425b Added support for (raster) RMap maps 2019-03-02 16:51:14 +01:00
6b14a7f948 Fixed cut&paste error 2019-02-26 22:16:58 +01:00
a0697a6ce7 Fixed broken equations 2019-02-26 22:16:05 +01:00
3ca5616a3c Translated using Weblate (German)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-02-19 14:40:11 +01:00
0ddcf42da9 Translated using Weblate (Spanish)
Currently translated at 95.0% (321 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/es/
2019-02-19 14:40:11 +01:00
0e5b7299c4 Translated using Weblate (French)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fr/
2019-02-19 14:40:05 +01:00
fc8fda7a82 Merge branch 'origin/master' into Weblate. 2019-02-18 22:53:00 +01:00
18392db8f0 Invalidate the coordinates on map change under cursor 2019-02-18 22:51:38 +01:00
4aa1f7a557 Merge branch 'origin/master' into Weblate. 2019-02-18 22:37:33 +01:00
bb71cfc426 Fixed "display map coordinates" issues 2019-02-18 22:36:45 +01:00
8807c37770 Properly save/restore window layout + fullscreen switch normalization
Fixes #183
2019-02-18 22:33:18 +01:00
e2eec179d5 Translated using Weblate (Turkish)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-02-18 13:31:24 +01:00
1f5922685b Translated using Weblate (Czech)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/cs/
2019-02-17 23:12:45 +01:00
dc70af3f3c Translated using Weblate (German)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/de/
2019-02-17 23:12:45 +01:00
e499574a50 Merge branch 'origin/master' into Weblate. 2019-02-17 22:19:08 +01:00
5840e6832f Translated using Weblate (Swedish)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-02-17 22:19:07 +01:00
463ac2d243 Translated using Weblate (Russian)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-02-17 22:19:07 +01:00
481138ec6e Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-02-17 22:19:07 +01:00
a320231dff Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.4% (309 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-02-17 22:19:06 +01:00
a7ab72c564 Translated using Weblate (Finnish)
Currently translated at 100.0% (338 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-02-17 22:19:06 +01:00
7f7d7a916a Display the coordinates always in black like the scale 2019-02-17 22:18:16 +01:00
a9ddd4d20f Merge branch 'origin/master' into Weblate. 2019-02-17 20:28:20 +01:00
2e036279bb Translations update 2019-02-17 20:28:17 +01:00
dea135d9df Merge branch 'origin/master' into Weblate. 2019-02-17 20:21:07 +01:00
12f3c252bb Added the "show cursor coordinates" option
Closes #167
2019-02-17 20:20:20 +01:00
a1ef211d0f Merge branch 'origin/master' into Weblate. 2019-02-17 15:33:54 +01:00
3d0c36b459 Added missing GPX TrackPointExtension cadence and speed values fetching 2019-02-17 15:32:39 +01:00
eb2af0fb5c Merge branch 'origin/master' into Weblate. 2019-02-17 15:19:34 +01:00
2da8efd497 Translated using Weblate (Russian)
Currently translated at 100.0% (337 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-02-17 15:19:34 +01:00
c0e55ec25c Translated using Weblate (Finnish)
Currently translated at 100.0% (337 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-02-17 15:19:33 +01:00
a2b8cec3be CZ & DE translations update 2019-02-17 15:19:12 +01:00
064928f844 Translated using Weblate (Russian)
Currently translated at 99.7% (336 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-02-17 11:15:51 +01:00
693cce4da3 Translated using Weblate (Russian)
Currently translated at 99.7% (336 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-02-17 09:51:50 +01:00
a7570faed7 Translated using Weblate (Finnish)
Currently translated at 99.7% (336 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-02-17 09:51:48 +01:00
4ccb57ffd7 Translated using Weblate (Russian)
Currently translated at 98.5% (332 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/ru/
2019-02-17 09:06:43 +01:00
cece8002e2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (337 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-02-17 09:06:42 +01:00
451c0c757f Translated using Weblate (Finnish)
Currently translated at 98.5% (332 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-02-17 09:06:42 +01:00
e13bded88f pt_BR translations update 2019-02-16 19:56:04 +01:00
9887151bfd Enabled pt_BR localization 2019-02-16 19:54:50 +01:00
b535ed239b Translated using Weblate (Turkish)
Currently translated at 100.0% (337 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-02-16 19:48:43 +01:00
9f43594abd Translated using Weblate (Swedish)
Currently translated at 100.0% (337 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/sv/
2019-02-16 19:48:43 +01:00
87cbd7bdb1 Translated using Weblate (Spanish)
Currently translated at 74.2% (250 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/es/
2019-02-16 19:48:42 +01:00
d49420e88d Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.4% (334 of 336 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-02-16 19:48:41 +01:00
d9d8588d8d Translated using Weblate (Norwegian Bokmål)
Currently translated at 91.4% (308 of 337 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/nb_NO/
2019-02-16 19:48:31 +01:00
a0eacedf3a Merge branch 'origin/master' into Weblate. 2019-02-16 12:41:10 +01:00
e04179e63e Translated using Weblate (Portuguese (Brazil))
Currently translated at 3.0% (10 of 336 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/pt_BR/
2019-02-16 12:41:09 +01:00
79ecc565eb Translation sources update 2019-02-16 12:41:03 +01:00
aaf8c12084 Added the "Show map markers" setting. 2019-02-16 12:39:23 +01:00
4ab4ff9bf1 Removed obsolete code 2019-02-16 09:58:57 +01:00
d5367ccf34 Enable border-less areas 2019-02-16 09:57:47 +01:00
54d0eea43e Removed obsolete translations 2019-02-16 09:04:44 +01:00
6543de4ca3 Updated German translation 2019-02-16 09:02:17 +01:00
b06ce107af Merge branch 'origin/master' into Weblate. 2019-02-16 08:15:38 +01:00
47c408703f Added pt-BR translation stub 2019-02-16 08:15:16 +01:00
3033ce2d6c Merge branch 'origin/master' into Weblate. 2019-02-15 20:33:16 +01:00
1444a88ad0 Enable empty WMTS styles 2019-02-15 20:32:53 +01:00
ec9d81c65a Added support for oblique stereographic projections 2019-02-15 20:32:13 +01:00
a777008fe4 Translated using Weblate (Turkish)
Currently translated at 97.3% (329 of 338 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/tr/
2019-02-13 18:10:27 +01:00
a73c96996d Merge branch 'origin/master' into Weblate. 2019-02-13 00:59:37 +01:00
d168fd8cd5 Fixed typo 2019-02-13 00:59:26 +01:00
a8df2f68d1 Merge branch 'origin/master' into Weblate. 2019-02-13 00:56:45 +01:00
be07640634 Czech translation update 2019-02-13 00:56:25 +01:00
9924702ba7 Merge branch 'origin/master' into Weblate. 2019-02-13 00:49:11 +01:00
6ee2322033 Translations update 2019-02-13 00:49:00 +01:00
08f2d4e4d2 Merge branch 'origin/master' into Weblate. 2019-02-13 00:47:48 +01:00
69d635be10 Moved the area appearance controls to the paths tab + layout polishing 2019-02-13 00:45:59 +01:00
a6b327f773 Code cleanup 2019-02-13 00:45:34 +01:00
143f53fbd9 Only ignore invalid segments, do not invalidate the whole track 2019-02-13 00:33:00 +01:00
5432a835f9 Merge branch 'origin/master' into Weblate. 2019-02-12 00:20:59 +01:00
cd74b0d43e Fixed broken distance re-computation 2019-02-12 00:20:39 +01:00
94374e748b Merge branch 'origin/master' into Weblate. 2019-02-11 23:55:00 +01:00
a882d1fe68 Fixed exchanged min/max graph info 2019-02-11 23:53:10 +01:00
4a8be940a1 Merge branch 'origin/master' into Weblate. 2019-02-11 23:29:57 +01:00
f379da61e3 Version++ 2019-02-11 23:29:45 +01:00
9f1b697bcf Merge branch 'origin/master' into Weblate. 2019-02-11 23:28:30 +01:00
0308dbbb09 Added support for track segments 2019-02-11 23:28:08 +01:00
516ca53ff0 Translated using Weblate (Finnish)
Currently translated at 100.0% (329 of 329 strings)

Translation: GPXSee/Translations
Translate-URL: https://hosted.weblate.org/projects/gpxsee/translations/fi/
2019-02-05 19:39:55 +01:00
3c112b0b6f Unify OS X platform name 2019-02-04 22:33:34 +01:00
54f24880cf Fixed Windows build 2019-02-03 16:34:33 +01:00
67168b8063 Added support for GPX area extensions 2019-02-01 00:26:27 +01:00
4854bff31b Fixed KML Polygons loading 2019-02-01 00:25:41 +01:00
50306ecb84 Added support for polygon objects 2019-01-31 01:46:53 +01:00
91e633e9fa Added GeoJSON and DEM files info. 2019-01-28 23:02:33 +01:00
221 changed files with 13136 additions and 4384 deletions

View File

@ -1,4 +1,4 @@
version: 7.2.{build}
version: 7.6.{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

@ -1,25 +1,25 @@
# GPXSee
GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.
GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common GPS log file formats.
## Features
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), 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 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.
* Support for POI files.
* Print/export to PDF.
* Full-screen mode.
* HiDPI/Retina displays & maps support.
* Native GUI for Windows, Mac OS X and Linux.
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
![GPXSee - Linux](https://a.fsdn.com/con/app/proj/gpxsee/screenshots/linux2.png)
## 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

@ -1,9 +1,9 @@
unix:!mac {
unix:!macx {
TARGET = gpxsee
} else {
TARGET = GPXSee
}
VERSION = 7.2
VERSION = 7.6
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 \
@ -82,6 +83,10 @@ HEADERS += src/common/config.h \
src/GUI/searchpointer.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 \
@ -107,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 \
@ -131,6 +135,7 @@ HEADERS += src/common/config.h \
src/map/image.h \
src/map/mbtilesmap.h \
src/map/osm.h \
src/map/polarstereographic.h \
src/data/graph.h \
src/data/poi.h \
src/data/waypoint.h \
@ -153,7 +158,26 @@ HEADERS += src/common/config.h \
src/data/locparser.h \
src/data/slfparser.h \
src/data/dem.h \
src/map/polarstereographic.h
src/data/polygon.h \
src/data/area.h \
src/map/obliquestereographic.h \
src/GUI/coordinatesitem.h \
src/map/rmap.h \
src/map/calibrationpoint.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
SOURCES += src/main.cpp \
src/common/coordinates.cpp \
src/common/rectc.cpp \
@ -161,6 +185,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 \
@ -203,6 +228,10 @@ SOURCES += src/main.cpp \
src/GUI/powergraphitem.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 \
@ -224,7 +253,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 \
@ -247,6 +275,8 @@ SOURCES += src/main.cpp \
src/map/image.cpp \
src/map/mbtilesmap.cpp \
src/map/osm.cpp \
src/map/polarstereographic.cpp \
src/map/rectd.cpp \
src/data/data.cpp \
src/data/poi.cpp \
src/data/track.cpp \
@ -263,8 +293,20 @@ SOURCES += src/main.cpp \
src/data/locparser.cpp \
src/data/slfparser.cpp \
src/data/dem.cpp \
src/map/polarstereographic.cpp \
src/map/rectd.cpp
src/data/polygon.cpp \
src/map/obliquestereographic.cpp \
src/GUI/coordinatesitem.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
greaterThan(QT_MAJOR_VERSION, 4) {
HEADERS += src/data/geojsonparser.h
@ -286,7 +328,8 @@ TRANSLATIONS = lang/gpxsee_en.ts \
lang/gpxsee_nb.ts \
lang/gpxsee_da.ts \
lang/gpxsee_tr.ts \
lang/gpxsee_es.ts
lang/gpxsee_es.ts \
lang/gpxsee_pt_BR.ts
macx {
ICON = icons/gpxsee.icns
@ -303,7 +346,8 @@ macx {
lang/gpxsee_nb.qm \
lang/gpxsee_da.qm \
lang/gpxsee_tr.qm \
lang/gpxsee_es.qm
lang/gpxsee_es.qm \
lang/gpxsee_pt_BR.qm
csv.path = Contents/Resources
csv.files = pkg/csv
maps.path = Contents/Resources
@ -338,11 +382,13 @@ win32 {
icons/formats/loc.ico \
icons/formats/slf.ico \
icons/formats/json.ico
DEFINES += _USE_MATH_DEFINES
DEFINES += _USE_MATH_DEFINES \
NOGDI
}
unix:!macx {
isEmpty(PREFIX):PREFIX = /usr/local
lessThan(QT_MAJOR_VERSION, 5) {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

1850
lang/gpxsee_pt_BR.ts Normal file

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

@ -5,6 +5,7 @@ Montserrat 1958 / British West Indies Grid,2004,4604,19942,9001,9807,4400,8801,0
St. Kitts 1955 / British West Indies Grid,2005,4605,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
St. Lucia 1955 / British West Indies Grid,2006,4606,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
St. Vincent 45 / British West Indies Grid,2007,4607,19942,9001,9807,4400,8801,0,9102,8802,-62,9102,8805,0.9995,9201,8806,400000,9001,8807,0,9001,,,,,,
NAD83(CSRS98) / New Brunswick Stereo,2036,4140,19946,9001,9809,4500,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000,9001,8807,7500000,9001,,,,,,
NAD83(CSRS98) / UTM zone 19N,2037,4140,16019,9001,9807,4400,8801,0,9102,8802,-69,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
NAD83(CSRS98) / UTM zone 20N,2038,4140,16020,9001,9807,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
Israel 1993 / Israeli TM Grid,2039,4141,18204,9001,9807,4400,8801,31.4403817,9110,8802,35.1216261,9110,8805,1.0000067,9201,8806,219529.584,9001,8807,626907.39,9001,,,,,,
@ -113,6 +114,10 @@ Pulkovo 1942(83) / Gauss Kruger zone 4,2167,4178,16264,9001,9807,4530,8801,0,910
Pulkovo 1942(83) / Gauss Kruger zone 5,2168,4178,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
Luxembourg 1930 / Gauss,2169,4181,19966,9001,9807,4530,8801,49.5,9110,8802,6.1,9110,8805,1,9201,8806,80000,9001,8807,100000,9001,,,,,,
MGI / Slovenia Grid,2170,4312,19967,9001,9807,4530,8801,0,9110,8802,15,9110,8805,0.9999,9201,8806,500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(58) / Poland zone I,2171,4179,18281,9001,9809,4530,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000,9001,8807,5647000,9001,,,,,,
Pulkovo 1942(58) / Poland zone II,2172,4179,18282,9001,9809,4530,8801,53.0007,9110,8802,21.301,9110,8805,0.9998,9201,8806,4603000,9001,8807,5806000,9001,,,,,,
Pulkovo 1942(58) / Poland zone III,2173,4179,18283,9001,9809,4530,8801,53.35,9110,8802,17.003,9110,8805,0.9998,9201,8806,3501000,9001,8807,5999000,9001,,,,,,
Pulkovo 1942(58) / Poland zone IV,2174,4179,18284,9001,9809,4530,8801,51.4015,9110,8802,16.402,9110,8805,0.9998,9201,8806,3703000,9001,8807,5627000,9001,,,,,,
Pulkovo 1942(58) / Poland zone V,2175,4179,18285,9001,9807,4530,8801,0,9110,8802,18.573,9110,8805,0.999983,9201,8806,237000,9001,8807,-4700000,9001,,,,,,
ETRS89 / Poland CS2000 zone 5,2176,4258,18305,9001,9807,4531,8801,0,9102,8802,15,9102,8805,0.999923,9201,8806,5500000,9001,8807,0,9001,,,,,,
ETRS89 / Poland CS2000 zone 6,2177,4258,18306,9001,9807,4531,8801,0,9102,8802,18,9102,8805,0.999923,9201,8806,6500000,9001,8807,0,9001,,,,,,
@ -215,6 +220,7 @@ NAD83 / Washington South (ftUS),2286,4269,15368,9003,9802,4497,8821,45.2,9110,88
NAD83 / Wisconsin North (ftUS),2287,4269,15369,9003,9802,4497,8821,45.1,9110,8822,-90,9110,8823,46.46,9110,8824,45.34,9110,8826,1968500,9003,8827,0,9003,,,
NAD83 / Wisconsin Central (ftUS),2288,4269,15370,9003,9802,4497,8821,43.5,9110,8822,-90,9110,8823,45.3,9110,8824,44.15,9110,8826,1968500,9003,8827,0,9003,,,
NAD83 / Wisconsin South (ftUS),2289,4269,15371,9003,9802,4497,8821,42,9110,8822,-90,9110,8823,44.04,9110,8824,42.44,9110,8826,1968500,9003,8827,0,9003,,,
NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83),2292,4140,19960,9001,9809,4496,8801,47.15,9110,8802,-63,9110,8805,0.999912,9201,8806,400000,9001,8807,800000,9001,,,,,,
Batavia / TM 109 SE,2308,4211,16709,9001,9807,4400,8801,0,9102,8802,109,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
WGS 84 / TM 116 SE,2309,4326,16716,9001,9807,4400,8801,0,9102,8802,116,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
WGS 84 / TM 132 SE,2310,4326,16732,9001,9807,4400,8801,0,9102,8802,132,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
@ -793,6 +799,8 @@ NAD83(CSRS) / MTM zone 7,2949,4617,17707,9001,9807,4496,8801,0,9110,8802,-70.3,9
NAD83(CSRS) / MTM zone 8,2950,4617,17708,9001,9807,4496,8801,0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
NAD83(CSRS) / MTM zone 9,2951,4617,17709,9001,9807,4496,8801,0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
NAD83(CSRS) / MTM zone 10,2952,4617,17710,9001,9807,4496,8801,0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800,9001,8807,0,9001,,,,,,
NAD83(CSRS) / New Brunswick Stereographic,2953,4617,19946,9001,9809,4500,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000,9001,8807,7500000,9001,,,,,,
NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83),2954,4617,19960,9001,9809,4496,8801,47.15,9110,8802,-63,9110,8805,0.999912,9201,8806,400000,9001,8807,800000,9001,,,,,,
NAD83(CSRS) / UTM zone 11N,2955,4617,16011,9001,9807,4400,8801,0,9102,8802,-117,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
NAD83(CSRS) / UTM zone 12N,2956,4617,16012,9001,9807,4400,8801,0,9102,8802,-111,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
NAD83(CSRS) / UTM zone 13N,2957,4617,16013,9001,9807,4400,8801,0,9102,8802,-105,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
@ -940,6 +948,7 @@ MAGNA-SIRGAS / Colombia Bogota zone,3116,4686,18057,9001,9807,4500,8801,4.354632
MAGNA-SIRGAS / Colombia East Central zone,3117,4686,18058,9001,9807,4500,8801,4.35463215,9110,8802,-71.04390285,9110,8805,1,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
MAGNA-SIRGAS / Colombia East zone,3118,4686,18059,9001,9807,4500,8801,4.35463215,9110,8802,-68.04390285,9110,8805,1,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
Douala 1948 / AEF west,3119,4192,18415,9001,9807,4400,8801,0,9110,8802,10.3,9110,8805,0.999,9201,8806,1000000,9001,8807,1000000,9001,,,,,,
Pulkovo 1942(58) / Poland zone I,3120,4179,18280,9001,9809,4530,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000,9001,8807,5467000,9001,,,,,,
PRS92 / Philippines zone 1,3121,4683,18171,9001,9807,4499,8801,0,9102,8802,117,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
PRS92 / Philippines zone 2,3122,4683,18172,9001,9807,4499,8801,0,9102,8802,119,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
PRS92 / Philippines zone 3,3123,4683,18173,9001,9807,4499,8801,0,9102,8802,121,9102,8805,0.99995,9201,8806,500000,9001,8807,0,9001,,,,,,
@ -1127,6 +1136,7 @@ CSG67 / UTM zone 21N,3312,4623,16021,9001,9807,4400,8801,0,9102,8802,-57,9102,88
RGFG95 / UTM zone 21N,3313,4624,16021,9001,9807,4400,8801,0,9102,8802,-57,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
Katanga 1955 / Katanga Lambert,3314,4695,17401,9001,9802,4400,8821,0,9102,8822,26,9102,8823,-6.5,9102,8824,-11.5,9102,8826,0,9001,8827,0,9001,,,
Katanga 1955 / Katanga TM,3315,4695,17402,9001,9807,4400,8801,-9,9102,8802,26,9102,8805,0.9998,9201,8806,0,9001,8807,0,9001,,,,,,
Pulkovo 1942(58) / GUGiK-80,3328,4179,18286,9001,9809,4530,8801,52.1,9110,8802,19.1,9110,8805,0.999714,9201,8806,500000,9001,8807,500000,9001,,,,,,
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 5,3329,4179,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 6,3330,4179,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 7,3331,4179,16267,9001,9807,4530,8801,0,9102,8802,21,9102,8805,1,9201,8806,7500000,9001,8807,0,9001,,,,,,
@ -1585,6 +1595,7 @@ Pulkovo 1942(58) / 3-degree Gauss-Kruger zone 10,3840,4179,16270,9001,9807,4530,
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 6,3841,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 7,3842,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 8,3843,4178,16266,9001,9807,4530,8801,0,9102,8802,18,9102,8805,1,9201,8806,6500000,9001,8807,0,9001,,,,,,
Pulkovo 1942(58) / Stereo70,3844,4179,19926,9001,9809,4530,8801,46,9102,8802,25,9102,8805,0.99975,9201,8806,500000,9001,8807,500000,9001,,,,,,
SWEREF99 / RT90 7.5 gon V emulation,3845,4619,17339,9001,9807,4530,8801,0,9110,8802,11.18225,9110,8805,1.000006,9201,8806,1500025.141,9001,8807,-667.282,9001,,,,,,
SWEREF99 / RT90 5 gon V emulation,3846,4619,17340,9001,9807,4530,8801,0,9110,8802,13.332256,9110,8805,1.0000058,9201,8806,1500044.695,9001,8807,-667.13,9001,,,,,,
SWEREF99 / RT90 2.5 gon V emulation,3847,4619,17341,9001,9807,4530,8801,0,9110,8802,15.4822624306,9110,8805,1.00000561024,9201,8806,1500064.274,9001,8807,-667.711,9001,,,,,,
@ -2476,6 +2487,7 @@ Corrego Alegre 1970-72 / UTM zone 23S,22523,4225,16123,9001,9807,4400,8801,0,910
Corrego Alegre 1970-72 / UTM zone 24S,22524,4225,16124,9001,9807,4400,8801,0,9102,8802,-39,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
Corrego Alegre 1970-72 / UTM zone 25S,22525,4225,16125,9001,9807,4400,8801,0,9102,8802,-33,9102,8805,0.9996,9201,8806,500000,9001,8807,10000000,9001,,,,,,
Deir ez Zor / Syria Lambert,22770,4227,19948,9001,9801,4499,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000,9001,8807,300000,9001,,,,,,
Deir ez Zor / Levant Stereographic,22780,4227,19949,9001,9809,4499,8801,38,9105,8802,43.5,9105,8805,0.9995341,9201,8806,0,9001,8807,0,9001,,,,,,
Egypt 1907 / Blue Belt,22991,4229,18071,9001,9807,4400,8801,30,9102,8802,35,9102,8805,1,9201,8806,300000,9001,8807,1100000,9001,,,,,,
Egypt 1907 / Red Belt,22992,4229,18072,9001,9807,4400,8801,30,9102,8802,31,9102,8805,1,9201,8806,615000,9001,8807,810000,9001,,,,,,
Egypt 1907 / Purple Belt,22993,4229,18073,9001,9807,4400,8801,30,9102,8802,27,9102,8805,1,9201,8806,700000,9001,8807,200000,9001,,,,,,
@ -3032,6 +3044,8 @@ Pulkovo 1942 / Gauss-Kruger 30N,28490,4284,16330,9001,9807,4530,8801,0,9102,8802
Pulkovo 1942 / Gauss-Kruger 31N,28491,4284,16331,9001,9807,4530,8801,0,9102,8802,-177,9102,8805,1,9201,8806,500000,9001,8807,0,9001,,,,,,
Pulkovo 1942 / Gauss-Kruger 32N,28492,4284,16332,9001,9807,4530,8801,0,9102,8802,-171,9102,8805,1,9201,8806,500000,9001,8807,0,9001,,,,,,
Qatar 1974 / Qatar National Grid,28600,4285,19919,9001,9807,4400,8801,24.27,9110,8802,51.13,9110,8805,0.99999,9201,8806,200000,9001,8807,300000,9001,,,,,,
Amersfoort / RD Old,28991,4289,19913,9001,9809,4499,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,0,9001,8807,0,9001,,,,,,
Amersfoort / RD New,28992,4289,19914,9001,9809,4499,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,155000,9001,8807,463000,9001,,,,,,
SAD69 / UTM zone 18N,29118,4291,16018,9001,9807,4400,8801,0,9102,8802,-75,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
SAD69 / UTM zone 19N,29119,4291,16019,9001,9807,4400,8801,0,9102,8802,-69,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
SAD69 / UTM zone 20N,29120,4291,16020,9001,9807,4400,8801,0,9102,8802,-63,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
@ -3150,6 +3164,8 @@ DHDN / 3-degree Gauss-Kruger zone 4,31468,4314,16264,9001,9807,4530,8801,0,9102,
DHDN / 3-degree Gauss-Kruger zone 5,31469,4314,16265,9001,9807,4530,8801,0,9102,8802,15,9102,8805,1,9201,8806,5500000,9001,8807,0,9001,,,,,,
Conakry 1905 / UTM zone 28N,31528,4315,16028,9001,9807,4400,8801,0,9102,8802,-15,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
Conakry 1905 / UTM zone 29N,31529,4315,16029,9001,9807,4400,8801,0,9102,8802,-9,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
Dealul Piscului 1930 / Stereo 33,31600,4316,19927,9001,9809,4499,8801,45.54,9110,8802,25.23328772,9110,8805,0.9996667,9201,8806,500000,9001,8807,500000,9001,,,,,,
Dealul Piscului 1970/ Stereo 70,31700,4317,19926,9001,9809,4530,8801,46,9102,8802,25,9102,8805,0.99975,9201,8806,500000,9001,8807,500000,9001,,,,,,
NGN / UTM zone 38N,31838,4318,16038,9001,9807,4400,8801,0,9102,8802,45,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
NGN / UTM zone 39N,31839,4318,16039,9001,9807,4400,8801,0,9102,8802,51,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,
KUDAMS / KTM,31900,4319,19928,9001,9807,4400,8801,0,9102,8802,48,9102,8805,0.9996,9201,8806,500000,9001,8807,0,9001,,,,,,

Can't render this file because it is too large.

View File

@ -7,7 +7,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "7.2"
!define VERSION "7.6"
; The file to write
OutFile "GPXSee-${VERSION}.exe"
@ -188,6 +188,7 @@ SectionGroup "Localization" SEC_LOCALIZATION
!insertmacro LOCALIZATION "German" "de"
!insertmacro LOCALIZATION "Norwegian" "nb"
!insertmacro LOCALIZATION "Polish" "pl"
!insertmacro LOCALIZATION "Portuguese (Brazil)" "pt_BR"
!insertmacro LOCALIZATION "Russian" "ru"
!insertmacro LOCALIZATION "Spanish" "es"
!insertmacro LOCALIZATION "Swedish" "sv"

View File

@ -7,7 +7,7 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "7.2"
!define VERSION "7.6"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
@ -190,6 +190,7 @@ SectionGroup "Localization" SEC_LOCALIZATION
!insertmacro LOCALIZATION "German" "de"
!insertmacro LOCALIZATION "Norwegian" "nb"
!insertmacro LOCALIZATION "Polish" "pl"
!insertmacro LOCALIZATION "Portuguese (Brazil)" "pt_BR"
!insertmacro LOCALIZATION "Russian" "ru"
!insertmacro LOCALIZATION "Spanish" "es"
!insertmacro LOCALIZATION "Swedish" "sv"

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();

155
src/GUI/areaitem.cpp Normal file
View File

@ -0,0 +1,155 @@
#include <cmath>
#include <QApplication>
#include <QCursor>
#include <QPainter>
#include "map/map.h"
#include "tooltip.h"
#include "areaitem.h"
QString AreaItem::toolTip() const
{
ToolTip tt;
if (!_area.name().isEmpty())
tt.insert(qApp->translate("PolygonItem", "Name"), _area.name());
if (!_area.description().isEmpty())
tt.insert(qApp->translate("PolygonItem", "Description"),
_area.description());
return tt.toString();
}
AreaItem::AreaItem(const Area &area, Map *map, QGraphicsItem *parent)
: QGraphicsItem(parent), _area(area)
{
_map = map;
_digitalZoom = 0;
_width = 2;
_opacity = 0.5;
QBrush brush(Qt::SolidPattern);
_pen = QPen(brush, _width);
updatePainterPath();
setCursor(Qt::ArrowCursor);
setAcceptHoverEvents(true);
setToolTip(toolTip());
}
QPainterPath AreaItem::painterPath(const Polygon &polygon)
{
QPainterPath path;
const QVector<Coordinates> &lr = polygon.first();
path.moveTo(_map->ll2xy(lr.first()));
for (int i = 1; i < lr.size(); i++)
path.lineTo(_map->ll2xy(lr.at(i)));
path.closeSubpath();
for (int i = 1; i < polygon.size(); i++) {
const QVector<Coordinates> &lr = polygon.at(i);
QPainterPath hole;
hole.moveTo(_map->ll2xy(lr.first()));
for (int j = 1; j < lr.size(); j++)
hole.lineTo(_map->ll2xy(lr.at(j)));
hole.closeSubpath();
path = path.subtracted(hole);
}
return path;
}
void AreaItem::updatePainterPath()
{
_painterPath = QPainterPath();
for (int i = 0; i < _area.size(); i++)
_painterPath.addPath(painterPath(_area.at(i)));
}
void AreaItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
painter->setPen(_width ? _pen : QPen(Qt::NoPen));
painter->drawPath(_painterPath);
painter->fillPath(_painterPath, _brush);
/*
QPen p = QPen(QBrush(Qt::red), 0);
painter->setPen(p);
painter->drawRect(boundingRect());
*/
}
void AreaItem::setMap(Map *map)
{
prepareGeometryChange();
_map = map;
updatePainterPath();
}
void AreaItem::setColor(const QColor &color)
{
if (_pen.color() == color)
return;
QColor bc(color);
bc.setAlphaF(_opacity * color.alphaF());
_pen.setColor(color);
_brush = QBrush(bc);
update();
}
void AreaItem::setOpacity(qreal opacity)
{
if (_opacity == opacity)
return;
_opacity = opacity;
QColor bc(_pen.color());
bc.setAlphaF(_opacity * _pen.color().alphaF());
_brush = QBrush(bc);
update();
}
void AreaItem::setWidth(qreal width)
{
if (_width == width)
return;
prepareGeometryChange();
_width = width;
_pen.setWidthF(_width * pow(2, -_digitalZoom));
}
void AreaItem::setStyle(Qt::PenStyle style)
{
if (_pen.style() == style)
return;
_pen.setStyle(style);
update();
}
void AreaItem::setDigitalZoom(int zoom)
{
if (_digitalZoom == zoom)
return;
prepareGeometryChange();
_digitalZoom = zoom;
_pen.setWidthF(_width * pow(2, -_digitalZoom));
}

46
src/GUI/areaitem.h Normal file
View File

@ -0,0 +1,46 @@
#ifndef AREAITEM_H
#define AREAITEM_H
#include <QGraphicsItem>
#include "data/area.h"
class Map;
class AreaItem : public QGraphicsItem
{
public:
AreaItem(const Area &area, Map *map, QGraphicsItem *parent = 0);
QPainterPath shape() const {return _painterPath;}
QRectF boundingRect() const {return _painterPath.boundingRect();}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
const Area &area() const {return _area;}
void setMap(Map *map);
void setColor(const QColor &color);
void setOpacity(qreal opacity);
void setWidth(qreal width);
void setStyle(Qt::PenStyle style);
void setDigitalZoom(int zoom);
private:
QPainterPath painterPath(const Polygon &polygon);
void updatePainterPath();
QString toolTip() const;
Area _area;
Map *_map;
int _digitalZoom;
qreal _width;
QPen _pen;
QBrush _brush;
qreal _opacity;
QPainterPath _painterPath;
};
#endif // AREAITEM_H

View File

@ -32,15 +32,16 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
QList<GraphItem*> graphs;
for (int i = 0; i < data.tracks().count(); i++) {
const Graph &graph = data.tracks().at(i)->cadence();
const Track &track = data.tracks().at(i);
const Graph &graph = track.cadence();
if (graph.size() < 2) {
if (!graph.isValid()) {
skipColor();
graphs.append(0);
} else {
CadenceGraphItem *gi = new CadenceGraphItem(graph, _graphType);
GraphView::addGraph(gi);
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
_avg.append(QPointF(track.distance(), gi->avg()));
graphs.append(gi);
}
}
@ -50,6 +51,9 @@ QList<GraphItem*> CadenceGraph::loadData(const Data &data)
graphs.append(0);
}
for (int i = 0; i < data.areas().count(); i++)
skipColor();
setInfo();
redraw();
@ -59,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);
@ -73,7 +77,7 @@ void CadenceGraph::clear()
{
_avg.clear();
GraphView::clear();
GraphTab::clear();
}
void CadenceGraph::showTracks(bool show)

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

@ -6,17 +6,6 @@
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent) : GraphItem(graph, type, parent)
{
qreal sum = 0;
_max = graph.first().y();
for (int i = 1; i < graph.size(); i++) {
qreal y = graph.at(i).y();
sum += y * (graph.at(i).s() - graph.at(i-1).s());
if (y > _max)
_max = y;
}
_avg = sum/graph.last().s();
setToolTip(toolTip());
}

View File

@ -11,13 +11,8 @@ public:
CadenceGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent = 0);
qreal max() const {return _max;}
qreal avg() const {return _avg;}
private:
QString toolTip() const;
qreal _avg, _max;
};
#endif // CADENCEGRAPHITEM_H

View File

@ -0,0 +1,67 @@
#include <QFontMetrics>
#include <QPainter>
#include "font.h"
#include "coordinatesitem.h"
CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent)
{
_format = DecimalDegrees;
_font.setPixelSize(FONT_SIZE);
_font.setFamily(FONT_FAMILY);
_digitalZoom = 0;
setAcceptHoverEvents(true);
updateBoundingRect();
}
void CoordinatesItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
if (!_c.isValid())
return;
QFontMetrics fm(_font);
painter->setFont(_font);
painter->setPen(QPen(Qt::black));
painter->drawText(0, -fm.descent(), Format::coordinates(_c, _format));
/*
painter->setPen(Qt::red);
painter->drawRect(boundingRect());
*/
}
void CoordinatesItem::setCoordinates(const Coordinates &c)
{
_c = c;
update();
}
void CoordinatesItem::setFormat(const CoordinatesFormat &format)
{
prepareGeometryChange();
_format = format;
updateBoundingRect();
}
void CoordinatesItem::setDigitalZoom(qreal zoom)
{
_digitalZoom = zoom;
setScale(pow(2, -_digitalZoom));
}
void CoordinatesItem::updateBoundingRect()
{
QFontMetrics fm(_font);
_boundingRect = fm.tightBoundingRect(Format::coordinates(
Coordinates(-180, -90), _format));
_boundingRect.moveBottom(-fm.descent());
}

32
src/GUI/coordinatesitem.h Normal file
View File

@ -0,0 +1,32 @@
#ifndef COORDINATESITEM_H
#define COORDINATESITEM_H
#include <QGraphicsItem>
#include <QFont>
#include "common/coordinates.h"
#include "format.h"
class CoordinatesItem : public QGraphicsItem
{
public:
CoordinatesItem(QGraphicsItem *parent = 0);
QRectF boundingRect() const {return _boundingRect;}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
void setCoordinates(const Coordinates &c);
void setFormat(const CoordinatesFormat &format);
void setDigitalZoom(qreal zoom);
private:
void updateBoundingRect();
Coordinates _c;
CoordinatesFormat _format;
QRectF _boundingRect;
QFont _font;
qreal _digitalZoom;
};
#endif // COORDINATESITEM_H

View File

@ -69,7 +69,7 @@ void ElevationGraph::setInfo()
GraphItem *ElevationGraph::loadGraph(const Graph &graph, Type type)
{
if (graph.size() < 2) {
if (!graph.isValid()) {
skipColor();
return 0;
}
@ -97,9 +97,11 @@ QList<GraphItem*> ElevationGraph::loadData(const Data &data)
QList<GraphItem*> graphs;
for (int i = 0; i < data.tracks().count(); i++)
graphs.append(loadGraph(data.tracks().at(i)->elevation(), Track));
graphs.append(loadGraph(data.tracks().at(i).elevation(), Track));
for (int i = 0; i < data.routes().count(); i++)
graphs.append(loadGraph(data.routes().at(i)->elevation(), Route));
graphs.append(loadGraph(data.routes().at(i).elevation(), Route));
for (int i = 0; i < data.areas().count(); i++)
skipColor();
setInfo();
redraw();
@ -118,7 +120,7 @@ void ElevationGraph::clear()
_routeMin = NAN;
_routeMax = NAN;
GraphView::clear();
GraphTab::clear();
}
void ElevationGraph::setYUnits(Units units)

View File

@ -6,22 +6,22 @@
ElevationGraphItem::ElevationGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent) : GraphItem(graph, type, parent)
{
_min = GraphItem::min();
_max = GraphItem::max();
_ascent = _descent = 0;
_min = _max = graph.first().y();
for (int i = 0; i < graph.size(); i++) {
const GraphSegment &segment = graph.at(i);
for (int j = 1; j < graph.size(); j++) {
qreal cur = graph.at(j).y();
qreal prev = graph.at(j-1).y();
for (int j = 1; j < segment.size(); j++) {
qreal cur = segment.at(j).y();
qreal prev = segment.at(j-1).y();
if (cur > prev)
_ascent += cur - prev;
if (cur < prev)
_descent += prev - cur;
if (cur < _min)
_min = cur;
if (cur > _max)
_max = cur;
if (cur > prev)
_ascent += cur - prev;
if (cur < prev)
_descent += prev - cur;
}
}
setToolTip(toolTip(Metric));

View File

@ -13,8 +13,8 @@ public:
qreal ascent() const {return _ascent;}
qreal descent() const {return _descent;}
qreal min() const {return _min;}
qreal max() const {return _max;}
qreal min() const {return _min;}
void setUnits(Units units);

View File

@ -34,9 +34,9 @@ QList<GraphItem*> GearRatioGraph::loadData(const Data &data)
QList<GraphItem*> graphs;
for (int i = 0; i < data.tracks().count(); i++) {
const Graph &graph = data.tracks().at(i)->ratio();
const Graph &graph = data.tracks().at(i).ratio();
if (graph.size() < 2) {
if (!graph.isValid()) {
skipColor();
graphs.append(0);
} else {
@ -55,6 +55,9 @@ QList<GraphItem*> GearRatioGraph::loadData(const Data &data)
graphs.append(0);
}
for (int i = 0; i < data.areas().count(); i++)
skipColor();
setInfo();
redraw();
@ -83,7 +86,7 @@ void GearRatioGraph::clear()
{
_map.clear();
GraphView::clear();
GraphTab::clear();
}
void GearRatioGraph::showTracks(bool show)

View File

@ -8,19 +8,6 @@ GearRatioGraphItem::GearRatioGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent) : GraphItem(graph, type, parent), _top(NAN)
{
qreal val = NAN;
_min = _max = graph.first().y();
for (int i = 1; i < graph.size(); i++) {
const GraphPoint &p = graph.at(i);
qreal val = _map.value(p.y());
_map.insert(p.y(), val + (p.s() - graph.at(i-1).s()));
if (p.y() < _min)
_min = p.y();
if (p.y() > _max)
_max = p.y();
}
for (QMap<qreal, qreal>::const_iterator it = _map.constBegin();
it != _map.constEnd(); ++it) {

View File

@ -12,8 +12,6 @@ public:
GearRatioGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent = 0);
qreal min() const {return _min;}
qreal max() const {return _max;}
qreal top() const {return _top;}
const QMap<qreal, qreal> &map() const {return _map;}
@ -22,7 +20,7 @@ private:
QString toolTip() const;
QMap<qreal, qreal> _map;
qreal _top, _min, _max;
qreal _top;
};
#endif // GEARRATIOGRAPHITEM_H

View File

@ -3,26 +3,17 @@
GraphItem::GraphItem(const Graph &graph, GraphType type, QGraphicsItem *parent)
: QGraphicsObject(parent)
: QGraphicsObject(parent), _graph(graph), _type(type)
{
Q_ASSERT(_graph.isValid());
_id = 0;
_width = 1;
_pen = QPen(Qt::black, _width);
_type = type;
_graph = graph;
_sx = 1.0; _sy = 1.0;
_time = _graph.hasTime();
_time = true;
for (int i = 0; i < _graph.size(); i++) {
if (std::isnan(_graph.at(i).t())) {
_time = false;
break;
}
}
setZValue(1.0);
setZValue(2.0);
updatePath();
updateShape();
@ -89,18 +80,31 @@ void GraphItem::setWidth(int width)
updateShape();
}
const GraphSegment *GraphItem::segment(qreal x, GraphType type) const
{
for (int i = 0; i < _graph.size(); i++)
if (x <= _graph.at(i).last().x(type))
return &(_graph.at(i));
return 0;
}
qreal GraphItem::yAtX(qreal x)
{
const GraphSegment *seg = segment(x, _type);
if (!seg)
return NAN;
int low = 0;
int high = _graph.count() - 1;
int high = seg->count() - 1;
int mid = 0;
Q_ASSERT(high > low);
Q_ASSERT(x >= _graph.at(low).x(_type) && x <= _graph.at(high).x(_type));
if (!(x >= seg->at(low).x(_type) && x <= seg->at(high).x(_type)))
return NAN;
while (low <= high) {
mid = low + ((high - low) / 2);
const GraphPoint &p = _graph.at(mid);
const GraphPoint &p = seg->at(mid);
if (p.x(_type) > x)
high = mid - 1;
else if (p.x(_type) < x)
@ -110,58 +114,56 @@ qreal GraphItem::yAtX(qreal x)
}
QLineF l;
if (_graph.at(mid).x(_type) < x)
l = QLineF(_graph.at(mid).x(_type), _graph.at(mid).y(),
_graph.at(mid+1).x(_type), _graph.at(mid+1).y());
if (seg->at(mid).x(_type) < x)
l = QLineF(seg->at(mid).x(_type), seg->at(mid).y(),
seg->at(mid+1).x(_type), seg->at(mid+1).y());
else
l = QLineF(_graph.at(mid-1).x(_type), _graph.at(mid-1).y(),
_graph.at(mid).x(_type), _graph.at(mid).y());
l = QLineF(seg->at(mid-1).x(_type), seg->at(mid-1).y(),
seg->at(mid).x(_type), seg->at(mid).y());
return -l.pointAt((x - l.p1().x()) / (l.p2().x() - l.p1().x())).y();
}
qreal GraphItem::distanceAtTime(qreal time)
{
const GraphSegment *seg = segment(time, Time);
if (!seg)
return NAN;
int low = 0;
int high = _graph.count() - 1;
int high = seg->count() - 1;
int mid = 0;
Q_ASSERT(high > low);
Q_ASSERT(time >= _graph.at(low).t() && time <= _graph.at(high).t());
if (!(time >= seg->at(low).t() && time <= seg->at(high).t()))
return NAN;
while (low <= high) {
mid = low + ((high - low) / 2);
const GraphPoint &p = _graph.at(mid);
const GraphPoint &p = seg->at(mid);
if (p.t() > time)
high = mid - 1;
else if (p.t() < time)
low = mid + 1;
else
return _graph.at(mid).s();
return seg->at(mid).s();
}
QLineF l;
if (_graph.at(mid).t() < time)
l = QLineF(_graph.at(mid).t(), _graph.at(mid).s(), _graph.at(mid+1).t(),
_graph.at(mid+1).s());
if (seg->at(mid).t() < time)
l = QLineF(seg->at(mid).t(), seg->at(mid).s(), seg->at(mid+1).t(),
seg->at(mid+1).s());
else
l = QLineF(_graph.at(mid-1).t(), _graph.at(mid-1).s(),
_graph.at(mid).t(), _graph.at(mid).s());
l = QLineF(seg->at(mid-1).t(), seg->at(mid-1).s(),
seg->at(mid).t(), seg->at(mid).s());
return l.pointAt((time - l.p1().x()) / (l.p2().x() - l.p1().x())).y();
}
void GraphItem::emitSliderPositionChanged(qreal pos)
{
if (_type == Time) {
if (_time) {
if (pos >= _graph.first().t() && pos <= _graph.last().t())
emit sliderPositionChanged(distanceAtTime(pos));
else
emit sliderPositionChanged(NAN);
} else
emit sliderPositionChanged(NAN);
} else
if (_type == Time)
emit sliderPositionChanged(_time ? distanceAtTime(pos) : NAN);
else
emit sliderPositionChanged(pos);
}
@ -197,9 +199,13 @@ void GraphItem::updatePath()
if (_type == Time && !_time)
return;
_path.moveTo(_graph.first().x(_type) * _sx, -_graph.first().y() * _sy);
for (int i = 1; i < _graph.size(); i++)
_path.lineTo(_graph.at(i).x(_type) * _sx, -_graph.at(i).y() * _sy);
for (int i = 0; i < _graph.size(); i++) {
const GraphSegment &segment = _graph.at(i);
_path.moveTo(segment.first().x(_type) * _sx, -segment.first().y() * _sy);
for (int i = 1; i < segment.size(); i++)
_path.lineTo(segment.at(i).x(_type) * _sx, -segment.at(i).y() * _sy);
}
}
void GraphItem::updateBounds()
@ -211,18 +217,71 @@ void GraphItem::updateBounds()
qreal bottom, top, left, right;
QPointF p = QPointF(_graph.first().x(_type), -_graph.first().y());
QPointF p = QPointF(_graph.first().first().x(_type),
-_graph.first().first().y());
bottom = p.y(); top = p.y(); left = p.x(); right = p.x();
for (int i = 1; i < _graph.size(); i++) {
p = QPointF(_graph.at(i).x(_type), -_graph.at(i).y());
bottom = qMax(bottom, p.y()); top = qMin(top, p.y());
right = qMax(right, p.x()); left = qMin(left, p.x());
for (int i = 0; i < _graph.size(); i++) {
const GraphSegment &segment = _graph.at(i);
for (int j = 0; j < segment.size(); j++) {
p = QPointF(segment.at(j).x(_type), -segment.at(j).y());
bottom = qMax(bottom, p.y()); top = qMin(top, p.y());
right = qMax(right, p.x()); left = qMin(left, p.x());
}
}
_bounds = QRectF(QPointF(left, top), QPointF(right, bottom));
}
qreal GraphItem::max() const
{
qreal ret = _graph.first().first().y();
for (int i = 0; i < _graph.size(); i++) {
const GraphSegment &segment = _graph.at(i);
for (int j = 0; j < segment.size(); j++) {
qreal y = segment.at(j).y();
if (y > ret)
ret = y;
}
}
return ret;
}
qreal GraphItem::min() const
{
qreal ret = _graph.first().first().y();
for (int i = 0; i < _graph.size(); i++) {
const GraphSegment &segment = _graph.at(i);
for (int j = 0; j < segment.size(); j++) {
qreal y = segment.at(j).y();
if (y < ret)
ret = y;
}
}
return ret;
}
qreal GraphItem::avg() const
{
qreal sum = 0;
for (int i = 0; i < _graph.size(); i++) {
const GraphSegment &segment = _graph.at(i);
for (int j = 1; j < segment.size(); j++)
sum += segment.at(j).y() * (segment.at(j).s() - segment.at(j-1).s());
}
return sum/_graph.last().last().s();
}
void GraphItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);

View File

@ -21,6 +21,10 @@ public:
const QRectF &bounds() const {return _bounds;}
qreal max() const;
qreal min() const;
qreal avg() const;
void setScale(qreal sx, qreal sy);
void setGraphType(GraphType type);
int id() const {return _id;}
@ -46,6 +50,7 @@ private:
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
const GraphSegment *segment(qreal x, GraphType type) const;
void updatePath();
void updateShape();
void updateBounds();

View File

@ -34,9 +34,9 @@ GraphView::GraphView(QWidget *parent)
setBackgroundBrush(QBrush(palette().brush(QPalette::Base)));
_xAxis = new AxisItem(AxisItem::X);
_xAxis->setZValue(2.0);
_xAxis->setZValue(1.0);
_yAxis = new AxisItem(AxisItem::Y);
_yAxis->setZValue(2.0);
_yAxis->setZValue(1.0);
_slider = new SliderItem();
_slider->setZValue(3.0);
_sliderInfo = new SliderInfoItem(_slider);

View File

@ -88,6 +88,7 @@ GUI::GUI()
_trackCount = 0;
_routeCount = 0;
_waypointCount = 0;
_areaCount = 0;
_trackDistance = 0;
_routeDistance = 0;
_time = 0;
@ -312,6 +313,11 @@ void GUI::createActions()
_showMapAction->setEnabled(false);
_clearMapCacheAction->setEnabled(false);
}
_showCoordinatesAction = new QAction(tr("Show cursor coordinates"), this);
_showCoordinatesAction->setMenuRole(QAction::NoRole);
_showCoordinatesAction->setCheckable(true);
connect(_showCoordinatesAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showCoordinates(bool)));
// Data actions
_showTracksAction = new QAction(tr("Show tracks"), this);
@ -329,6 +335,11 @@ void GUI::createActions()
_showWaypointsAction->setCheckable(true);
connect(_showWaypointsAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showWaypoints(bool)));
_showAreasAction = new QAction(tr("Show areas"), this);
_showAreasAction->setMenuRole(QAction::NoRole);
_showAreasAction->setCheckable(true);
connect(_showAreasAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showAreas(bool)));
_showWaypointLabelsAction = new QAction(tr("Waypoint labels"), this);
_showWaypointLabelsAction->setMenuRole(QAction::NoRole);
_showWaypointLabelsAction->setCheckable(true);
@ -375,6 +386,11 @@ void GUI::createActions()
_showGraphSliderInfoAction->setCheckable(true);
connect(_showGraphSliderInfoAction, SIGNAL(triggered(bool)), this,
SLOT(showGraphSliderInfo(bool)));
_showMarkersAction = new QAction(tr("Show path markers"), this);
_showMarkersAction->setMenuRole(QAction::NoRole);
_showMarkersAction->setCheckable(true);
connect(_showMarkersAction, SIGNAL(triggered(bool)), _mapView,
SLOT(showMarkers(bool)));
// Settings actions
_showToolbarsAction = new QAction(tr("Show toolbars"), this);
@ -491,6 +507,8 @@ void GUI::createMenus()
_mapMenu->addAction(_loadMapAction);
_mapMenu->addAction(_clearMapCacheAction);
_mapMenu->addSeparator();
_mapMenu->addAction(_showCoordinatesAction);
_mapMenu->addSeparator();
_mapMenu->addAction(_showMapAction);
QMenu *graphMenu = menuBar()->addMenu(tr("&Graph"));
@ -499,6 +517,7 @@ void GUI::createMenus()
graphMenu->addSeparator();
graphMenu->addAction(_showGraphGridAction);
graphMenu->addAction(_showGraphSliderInfoAction);
graphMenu->addAction(_showMarkersAction);
graphMenu->addSeparator();
graphMenu->addAction(_showGraphsAction);
@ -521,6 +540,7 @@ void GUI::createMenus()
dataMenu->addSeparator();
dataMenu->addAction(_showTracksAction);
dataMenu->addAction(_showRoutesAction);
dataMenu->addAction(_showAreasAction);
dataMenu->addAction(_showWaypointsAction);
QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
@ -558,6 +578,7 @@ void GUI::createToolBars()
#endif // Q_OS_MAC
_fileToolBar = addToolBar(tr("File"));
_fileToolBar->setObjectName("File");
_fileToolBar->setIconSize(iconSize);
_fileToolBar->addAction(_openFileAction);
_fileToolBar->addAction(_reloadFileAction);
@ -565,12 +586,14 @@ void GUI::createToolBars()
_fileToolBar->addAction(_printFileAction);
_showToolBar = addToolBar(tr("Show"));
_showToolBar->setObjectName("Show");
_showToolBar->setIconSize(iconSize);
_showToolBar->addAction(_showPOIAction);
_showToolBar->addAction(_showMapAction);
_showToolBar->addAction(_showGraphsAction);
_navigationToolBar = addToolBar(tr("Navigation"));
_navigationToolBar->setObjectName("Navigation");
_navigationToolBar->setIconSize(iconSize);
_navigationToolBar->addAction(_firstAction);
_navigationToolBar->addAction(_prevAction);
@ -753,10 +776,11 @@ bool GUI::loadFile(const QString &fileName)
if (data.isValid()) {
for (int i = 0; i < data.tracks().count(); i++) {
_trackDistance += data.tracks().at(i)->distance();
_time += data.tracks().at(i)->time();
_movingTime += data.tracks().at(i)->movingTime();
const QDate &date = data.tracks().at(i)->date().date();
const Track &track = data.tracks().at(i);
_trackDistance += track.distance();
_time += track.time();
_movingTime += track.movingTime();
const QDate &date = track.date().date();
if (_dateRange.first.isNull() || _dateRange.first > date)
_dateRange.first = date;
if (_dateRange.second.isNull() || _dateRange.second < date)
@ -765,16 +789,17 @@ bool GUI::loadFile(const QString &fileName)
_trackCount += data.tracks().count();
for (int i = 0; i < data.routes().count(); i++)
_routeDistance += data.routes().at(i)->distance();
_routeDistance += data.routes().at(i).distance();
_routeCount += data.routes().count();
_waypointCount += data.waypoints().count();
_areaCount += data.areas().count();
if (_pathName.isNull()) {
if (data.tracks().count() == 1 && !data.routes().count())
_pathName = data.tracks().first()->name();
_pathName = data.tracks().first().name();
else if (data.routes().count() == 1 && !data.tracks().count())
_pathName = data.routes().first()->name();
_pathName = data.routes().first().name();
} else
_pathName = QString();
@ -893,8 +918,11 @@ void GUI::openOptions()
SET_VIEW_OPTION(backgroundColor, setBackgroundColor);
SET_VIEW_OPTION(trackWidth, setTrackWidth);
SET_VIEW_OPTION(routeWidth, setRouteWidth);
SET_VIEW_OPTION(areaWidth, setAreaWidth);
SET_VIEW_OPTION(trackStyle, setTrackStyle);
SET_VIEW_OPTION(routeStyle, setRouteStyle);
SET_VIEW_OPTION(areaStyle, setAreaStyle);
SET_VIEW_OPTION(areaOpacity, setAreaOpacity);
SET_VIEW_OPTION(waypointSize, setWaypointSize);
SET_VIEW_OPTION(waypointColor, setWaypointColor);
SET_VIEW_OPTION(poiSize, setPOISize);
@ -1000,6 +1028,9 @@ void GUI::statistics()
if (_showWaypointsAction->isChecked() && _waypointCount > 1)
text.append("<tr><td>" + tr("Waypoints") + ":</td><td>"
+ l.toString(_waypointCount) + "</td></tr>");
if (_showAreasAction->isChecked() && _areaCount > 1)
text.append("<tr><td>" + tr("Areas") + ":</td><td>"
+ l.toString(_areaCount) + "</td></tr>");
if (_dateRange.first.isValid()) {
if (_dateRange.first == _dateRange.second) {
@ -1065,6 +1096,8 @@ void GUI::plot(QPrinter *printer)
info.insert(tr("Routes"), l.toString(_routeCount));
if (_showWaypointsAction->isChecked() && _waypointCount > 1)
info.insert(tr("Waypoints"), l.toString(_waypointCount));
if (_showAreasAction->isChecked() && _areaCount > 1)
info.insert(tr("Areas"), l.toString(_areaCount));
}
if (_dateRange.first.isValid() && _options.printDate) {
@ -1138,6 +1171,7 @@ void GUI::reloadFile()
_trackCount = 0;
_routeCount = 0;
_waypointCount = 0;
_areaCount = 0;
_trackDistance = 0;
_routeDistance = 0;
_time = 0;
@ -1171,6 +1205,7 @@ void GUI::closeFiles()
_trackCount = 0;
_routeCount = 0;
_waypointCount = 0;
_areaCount = 0;
_trackDistance = 0;
_routeDistance = 0;
_time = 0;
@ -1206,13 +1241,11 @@ void GUI::showGraphs(bool show)
void GUI::showToolbars(bool show)
{
if (show) {
addToolBar(_fileToolBar);
addToolBar(_showToolBar);
addToolBar(_navigationToolBar);
_fileToolBar->show();
_showToolBar->show();
_navigationToolBar->show();
Q_ASSERT(!_windowStates.isEmpty());
restoreState(_windowStates.last());
_windowStates.pop_back();
} else {
_windowStates.append(saveState());
removeToolBar(_fileToolBar);
removeToolBar(_showToolBar);
removeToolBar(_navigationToolBar);
@ -1223,26 +1256,16 @@ void GUI::showFullscreen(bool show)
{
if (show) {
_frameStyle = _mapView->frameStyle();
_showGraphs = _showGraphsAction->isChecked();
statusBar()->hide();
menuBar()->hide();
showToolbars(false);
showGraphs(false);
_showGraphsAction->setChecked(false);
_mapView->setFrameStyle(QFrame::NoFrame);
showFullScreen();
} else {
statusBar()->show();
menuBar()->show();
if (_showToolbarsAction->isChecked())
showToolbars(true);
_showGraphsAction->setChecked(_showGraphs);
if (_showGraphsAction->isEnabled())
showGraphs(_showGraphs);
showToolbars(true);
_mapView->setFrameStyle(_frameStyle);
showNormal();
}
}
@ -1457,7 +1480,8 @@ bool GUI::updateMapView()
if (_options.alwaysShowMap)
_mapView->setHidden(false);
else
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount));
_mapView->setHidden(!(_trackCount + _routeCount + _waypointCount
+ _areaCount));
return (hidden != _mapView->isHidden());
}
@ -1612,6 +1636,8 @@ void GUI::dropEvent(QDropEvent *event)
QList<QUrl> urls = event->mimeData()->urls();
for (int i = 0; i < urls.size(); i++)
openFile(urls.at(i).toLocalFile());
event->acceptProposedAction();
}
void GUI::writeSettings()
@ -1624,6 +1650,10 @@ void GUI::writeSettings()
settings.setValue(WINDOW_SIZE_SETTING, size());
if (pos() != WINDOW_POS_DEFAULT)
settings.setValue(WINDOW_POS_SETTING, pos());
if (_windowStates.isEmpty())
settings.setValue(WINDOW_STATE_SETTING, saveState());
else
settings.setValue(WINDOW_STATE_SETTING, _windowStates.first());
settings.endGroup();
settings.beginGroup(SETTINGS_SETTINGS_GROUP);
@ -1648,6 +1678,9 @@ void GUI::writeSettings()
settings.setValue(CURRENT_MAP_SETTING, _map->name());
if (_showMapAction->isChecked() != SHOW_MAP_DEFAULT)
settings.setValue(SHOW_MAP_SETTING, _showMapAction->isChecked());
if (_showCoordinatesAction->isChecked() != SHOW_COORDINATES_DEFAULT)
settings.setValue(SHOW_COORDINATES_SETTING,
_showCoordinatesAction->isChecked());
settings.endGroup();
settings.beginGroup(GRAPH_SETTINGS_GROUP);
@ -1663,6 +1696,9 @@ void GUI::writeSettings()
!= SHOW_GRAPH_SLIDER_INFO_DEFAULT)
settings.setValue(SHOW_GRAPH_SLIDER_INFO_SETTING,
_showGraphSliderInfoAction->isChecked());
if (_showMarkersAction->isChecked() != SHOW_MARKERS_DEFAULT)
settings.setValue(SHOW_MARKERS_SETTING,
_showMarkersAction->isChecked());
settings.endGroup();
settings.beginGroup(POI_SETTINGS_GROUP);
@ -1692,6 +1728,8 @@ void GUI::writeSettings()
if (_showWaypointsAction->isChecked() != SHOW_WAYPOINTS_DEFAULT)
settings.setValue(SHOW_WAYPOINTS_SETTING,
_showWaypointsAction->isChecked());
if (_showAreasAction->isChecked() != SHOW_AREAS_DEFAULT)
settings.setValue(SHOW_AREAS_SETTING, _showAreasAction->isChecked());
if (_showWaypointLabelsAction->isChecked() != SHOW_WAYPOINT_LABELS_DEFAULT)
settings.setValue(SHOW_WAYPOINT_LABELS_SETTING,
_showWaypointLabelsAction->isChecked());
@ -1732,10 +1770,16 @@ void GUI::writeSettings()
settings.setValue(TRACK_WIDTH_SETTING, _options.trackWidth);
if (_options.routeWidth != ROUTE_WIDTH_DEFAULT)
settings.setValue(ROUTE_WIDTH_SETTING, _options.routeWidth);
if (_options.areaWidth != AREA_WIDTH_DEFAULT)
settings.setValue(AREA_WIDTH_SETTING, _options.areaWidth);
if (_options.trackStyle != TRACK_STYLE_DEFAULT)
settings.setValue(TRACK_STYLE_SETTING, (int)_options.trackStyle);
if (_options.routeStyle != ROUTE_STYLE_DEFAULT)
settings.setValue(ROUTE_STYLE_SETTING, (int)_options.routeStyle);
if (_options.areaStyle != AREA_STYLE_DEFAULT)
settings.setValue(AREA_STYLE_SETTING, (int)_options.areaStyle);
if (_options.areaOpacity != AREA_OPACITY_DEFAULT)
settings.setValue(AREA_OPACITY_SETTING, (int)_options.areaOpacity);
if (_options.waypointSize != WAYPOINT_SIZE_DEFAULT)
settings.setValue(WAYPOINT_SIZE_SETTING, _options.waypointSize);
if (_options.waypointColor != WAYPOINT_COLOR_DEFAULT)
@ -1820,6 +1864,7 @@ void GUI::readSettings()
settings.beginGroup(WINDOW_SETTINGS_GROUP);
resize(settings.value(WINDOW_SIZE_SETTING, WINDOW_SIZE_DEFAULT).toSize());
move(settings.value(WINDOW_POS_SETTING, WINDOW_POS_DEFAULT).toPoint());
restoreState(settings.value(WINDOW_STATE_SETTING).toByteArray());
settings.endGroup();
settings.beginGroup(SETTINGS_SETTINGS_GROUP);
@ -1860,6 +1905,11 @@ void GUI::readSettings()
int index = mapIndex(settings.value(CURRENT_MAP_SETTING).toString());
_mapActions.at(index)->trigger();
}
if (settings.value(SHOW_COORDINATES_SETTING, SHOW_COORDINATES_DEFAULT)
.toBool()) {
_showCoordinatesAction->setChecked(true);
_mapView->showCoordinates(true);
}
settings.endGroup();
settings.beginGroup(GRAPH_SETTINGS_GROUP);
@ -1883,6 +1933,10 @@ void GUI::readSettings()
showGraphSliderInfo(false);
else
_showGraphSliderInfoAction->setChecked(true);
if (!settings.value(SHOW_MARKERS_SETTING, SHOW_MARKERS_DEFAULT).toBool())
_mapView->showMarkers(false);
else
_showMarkersAction->setChecked(true);
settings.endGroup();
settings.beginGroup(POI_SETTINGS_GROUP);
@ -1931,6 +1985,10 @@ void GUI::readSettings()
_mapView->showWaypoints(false);
else
_showWaypointsAction->setChecked(true);
if (!settings.value(SHOW_AREAS_SETTING, SHOW_AREAS_DEFAULT).toBool())
_mapView->showAreas(false);
else
_showAreasAction->setChecked(true);
if (!settings.value(SHOW_WAYPOINT_LABELS_SETTING,
SHOW_WAYPOINT_LABELS_DEFAULT).toBool())
_mapView->showWaypointLabels(false);
@ -1976,10 +2034,16 @@ void GUI::readSettings()
TRACK_WIDTH_DEFAULT).toInt();
_options.routeWidth = settings.value(ROUTE_WIDTH_SETTING,
ROUTE_WIDTH_DEFAULT).toInt();
_options.areaWidth = settings.value(AREA_WIDTH_SETTING,
AREA_WIDTH_DEFAULT).toInt();
_options.trackStyle = (Qt::PenStyle) settings.value(TRACK_STYLE_SETTING,
(int)TRACK_STYLE_DEFAULT).toInt();
_options.routeStyle = (Qt::PenStyle) settings.value(ROUTE_STYLE_SETTING,
(int)ROUTE_STYLE_DEFAULT).toInt();
_options.areaStyle = (Qt::PenStyle) settings.value(AREA_STYLE_SETTING,
(int)AREA_STYLE_DEFAULT).toInt();
_options.areaOpacity = settings.value(AREA_OPACITY_SETTING,
AREA_OPACITY_DEFAULT).toInt();
_options.pathAntiAliasing = settings.value(PATH_AA_SETTING, PATH_AA_DEFAULT)
.toBool();
_options.waypointSize = settings.value(WAYPOINT_SIZE_SETTING,
@ -2058,8 +2122,11 @@ void GUI::readSettings()
_mapView->setBackgroundColor(_options.backgroundColor);
_mapView->setTrackWidth(_options.trackWidth);
_mapView->setRouteWidth(_options.routeWidth);
_mapView->setAreaWidth(_options.areaWidth);
_mapView->setTrackStyle(_options.trackStyle);
_mapView->setRouteStyle(_options.routeStyle);
_mapView->setAreaStyle(_options.areaStyle);
_mapView->setAreaOpacity(_options.areaOpacity);
_mapView->setWaypointSize(_options.waypointSize);
_mapView->setWaypointColor(_options.waypointColor);
_mapView->setPOISize(_options.poiSize);

View File

@ -190,7 +190,10 @@ private:
QAction *_showRoutesAction;
QAction *_showWaypointsAction;
QAction *_showWaypointLabelsAction;
QAction *_showAreasAction;
QAction *_showRouteWaypointsAction;
QAction *_showMarkersAction;
QAction *_showCoordinatesAction;
QAction *_openOptionsAction;
QAction *_mapsEnd;
QList<QAction*> _mapActions;
@ -215,20 +218,16 @@ private:
FileBrowser *_browser;
QList<QString> _files;
int _trackCount;
int _routeCount;
int _waypointCount;
qreal _trackDistance;
qreal _routeDistance;
qreal _time;
qreal _movingTime;
int _trackCount, _routeCount, _areaCount, _waypointCount;
qreal _trackDistance, _routeDistance;
qreal _time, _movingTime;
DateRange _dateRange;
QString _pathName;
qreal _sliderPos;
QList<QByteArray> _windowStates;
int _frameStyle;
bool _showGraphs;
Export _export;
Options _options;

View File

@ -32,15 +32,16 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
QList<GraphItem*> graphs;
for (int i = 0; i < data.tracks().count(); i++) {
const Graph &graph = data.tracks().at(i)->heartRate();
const Track &track = data.tracks().at(i);
const Graph &graph = track.heartRate();
if (graph.size() < 2) {
if (!graph.isValid()) {
skipColor();
graphs.append(0);
} else {
HeartRateGraphItem *gi = new HeartRateGraphItem(graph, _graphType);
GraphView::addGraph(gi);
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
_avg.append(QPointF(track.distance(), gi->avg()));
graphs.append(gi);
}
}
@ -50,6 +51,9 @@ QList<GraphItem*> HeartRateGraph::loadData(const Data &data)
graphs.append(0);
}
for (int i = 0; i < data.areas().count(); i++)
skipColor();
setInfo();
redraw();
@ -59,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);
@ -73,7 +77,7 @@ void HeartRateGraph::clear()
{
_avg.clear();
GraphView::clear();
GraphTab::clear();
}
void HeartRateGraph::showTracks(bool show)

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

@ -6,17 +6,6 @@
HeartRateGraphItem::HeartRateGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent) : GraphItem(graph, type, parent)
{
qreal sum = 0;
_max = graph.first().y();
for (int i = 1; i < graph.size(); i++) {
qreal y = graph.at(i).y();
sum += y * (graph.at(i).s() - graph.at(i-1).s());
if (y > _max)
_max = y;
}
_avg = sum/graph.last().s();
setToolTip(toolTip());
}

View File

@ -11,13 +11,8 @@ public:
HeartRateGraphItem(const Graph &graph, GraphType type,
QGraphicsItem *parent = 0);
qreal max() const {return _max;}
qreal avg() const {return _avg;}
private:
QString toolTip() const;
qreal _avg, _max;
};
#endif // HEARTRATEGRAPHITEM_H

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 */

View File

@ -11,7 +11,9 @@
#include "trackitem.h"
#include "routeitem.h"
#include "waypointitem.h"
#include "areaitem.h"
#include "scaleitem.h"
#include "coordinatesitem.h"
#include "keys.h"
#include "mapview.h"
@ -20,6 +22,7 @@
#define MIN_DIGITAL_ZOOM -3
#define MARGIN 10
#define SCALE_OFFSET 7
#define COORDINATES_OFFSET SCALE_OFFSET
MapView::MapView(Map *map, POI *poi, QWidget *parent)
@ -40,6 +43,10 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
_mapScale = new ScaleItem();
_mapScale->setZValue(2.0);
_scene->addItem(_mapScale);
_coordinates = new CoordinatesItem();
_coordinates->setZValue(2.0);
_coordinates->setVisible(false);
_scene->addItem(_coordinates);
_map = map;
_map->load();
@ -50,19 +57,21 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
_units = Metric;
_coordinatesFormat = DecimalDegrees;
_opacity = 1.0;
_mapOpacity = 1.0;
_backgroundColor = Qt::white;
_markerColor = Qt::red;
_showMap = true;
_showTracks = true;
_showRoutes = true;
_showAreas = true;
_showWaypoints = true;
_showWaypointLabels = true;
_showPOI = true;
_showPOILabels = true;
_overlapPOIs = true;
_showRouteWaypoints = true;
_showMarkers = true;
_trackWidth = 3;
_routeWidth = 3;
_trackStyle = Qt::SolidLine;
@ -92,12 +101,13 @@ void MapView::centerOn(const QPointF &pos)
QRectF vr(mapToScene(viewport()->rect()).boundingRect());
_res = _map->resolution(vr);
_mapScale->setResolution(_res);
_coordinates->setCoordinates(Coordinates());
}
PathItem *MapView::addTrack(const Track &track)
{
if (track.isNull()) {
_palette.nextColor();
if (!track.isValid()) {
skipColor();
return 0;
}
@ -111,6 +121,7 @@ PathItem *MapView::addTrack(const Track &track)
ti->setVisible(_showTracks);
ti->setDigitalZoom(_digitalZoom);
ti->setMarkerColor(_markerColor);
ti->showMarker(_showMarkers);
_scene->addItem(ti);
if (_showTracks)
@ -121,8 +132,8 @@ PathItem *MapView::addTrack(const Track &track)
PathItem *MapView::addRoute(const Route &route)
{
if (route.isNull()) {
_palette.nextColor();
if (!route.isValid()) {
skipColor();
return 0;
}
@ -139,6 +150,7 @@ PathItem *MapView::addRoute(const Route &route)
ri->showWaypointLabels(_showWaypointLabels);
ri->setDigitalZoom(_digitalZoom);
ri->setMarkerColor(_markerColor);
ri->showMarker(_showMarkers);
_scene->addItem(ri);
if (_showRoutes)
@ -147,6 +159,28 @@ PathItem *MapView::addRoute(const Route &route)
return ri;
}
void MapView::addArea(const Area &area)
{
if (!area.isValid()) {
skipColor();
return;
}
AreaItem *ai = new AreaItem(area, _map);
_areas.append(ai);
_ar |= ai->area().boundingRect();
ai->setColor(_palette.nextColor());
ai->setWidth(_areaWidth);
ai->setStyle(_areaStyle);
ai->setOpacity(_areaOpacity);
ai->setDigitalZoom(_digitalZoom);
ai->setVisible(_showAreas);
_scene->addItem(ai);
if (_showAreas)
addPOI(_poi->points(ai->area()));
}
void MapView::addWaypoints(const QVector<Waypoint> &waypoints)
{
for (int i = 0; i < waypoints.count(); i++) {
@ -175,12 +209,15 @@ QList<PathItem *> MapView::loadData(const Data &data)
int zoom = _map->zoom();
for (int i = 0; i < data.tracks().count(); i++)
paths.append(addTrack(*(data.tracks().at(i))));
paths.append(addTrack(data.tracks().at(i)));
for (int i = 0; i < data.routes().count(); i++)
paths.append(addRoute(*(data.routes().at(i))));
paths.append(addRoute(data.routes().at(i)));
for (int i = 0; i < data.areas().count(); i++)
addArea(data.areas().at(i));
addWaypoints(data.waypoints());
if (_tracks.empty() && _routes.empty() && _waypoints.empty())
if (_tracks.empty() && _routes.empty() && _waypoints.empty()
&& _areas.empty())
return paths;
if (fitMapZoom() != zoom)
@ -195,7 +232,7 @@ QList<PathItem *> MapView::loadData(const Data &data)
int MapView::fitMapZoom() const
{
RectC br = _tr | _rr | _wr;
RectC br = _tr | _rr | _wr | _ar;
return _map->zoomFit(viewport()->size() - QSize(2*MARGIN, 2*MARGIN),
br.isNull() ? RectC(_map->xy2ll(_map->bounds().topLeft()),
@ -204,7 +241,7 @@ int MapView::fitMapZoom() const
QPointF MapView::contentCenter() const
{
RectC br = _tr | _rr | _wr;
RectC br = _tr | _rr | _wr | _ar;
return br.isNull() ? sceneRect().center() : _map->ll2xy(br.center());
}
@ -239,6 +276,8 @@ void MapView::rescale()
_tracks.at(i)->setMap(_map);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->setMap(_map);
for (int i = 0; i < _areas.size(); i++)
_areas.at(i)->setMap(_map);
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setMap(_map);
@ -258,6 +297,8 @@ void MapView::setPalette(const Palette &palette)
_tracks.at(i)->setColor(_palette.nextColor());
for (int i = 0; i < _routes.count(); i++)
_routes.at(i)->setColor(_palette.nextColor());
for (int i = 0; i < _areas.count(); i++)
_areas.at(i)->setColor(_palette.nextColor());
}
void MapView::setMap(Map *map)
@ -285,6 +326,8 @@ void MapView::setMap(Map *map)
_tracks.at(i)->setMap(map);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->setMap(map);
for (int i = 0; i < _areas.size(); i++)
_areas.at(i)->setMap(map);
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setMap(map);
@ -327,6 +370,9 @@ void MapView::updatePOI()
if (_showRoutes)
for (int i = 0; i < _routes.size(); i++)
addPOI(_poi->points(_routes.at(i)->path()));
if (_showAreas)
for (int i = 0; i < _areas.size(); i++)
addPOI(_poi->points(_areas.at(i)->area()));
if (_showWaypoints)
for (int i = 0; i< _waypoints.size(); i++)
addPOI(_poi->points(_waypoints.at(i)->waypoint()));
@ -384,6 +430,8 @@ void MapView::setCoordinatesFormat(CoordinatesFormat format)
_coordinatesFormat = format;
_coordinates->setFormat(_coordinatesFormat);
for (int i = 0; i < _waypoints.count(); i++)
_waypoints.at(i)->setToolTipFormat(_units, _coordinatesFormat);
for (int i = 0; i < _routes.count(); i++)
@ -419,12 +467,15 @@ void MapView::digitalZoom(int zoom)
_tracks.at(i)->setDigitalZoom(_digitalZoom);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->setDigitalZoom(_digitalZoom);
for (int i = 0; i < _areas.size(); i++)
_areas.at(i)->setDigitalZoom(_digitalZoom);
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setDigitalZoom(_digitalZoom);
for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
it.value()->setDigitalZoom(_digitalZoom);
_mapScale->setDigitalZoom(_digitalZoom);
_coordinates->setDigitalZoom(_digitalZoom);
}
void MapView::zoom(int zoom, const QPoint &pos)
@ -536,7 +587,7 @@ void MapView::plot(QPainter *painter, const QRectF &target, qreal scale,
painter->device()->logicalDpiY()
/ (qreal)metric(QPaintDevice::PdmDpiY));
adj = QRect(0, 0, adj.width() * s.x(), adj.height() * s.y());
_map->zoomFit(adj.size(), _tr | _rr | _wr);
_map->zoomFit(adj.size(), _tr | _rr | _wr | _ar);
rescale();
QPointF center = contentCenter();
@ -579,17 +630,21 @@ void MapView::clear()
_pois.clear();
_tracks.clear();
_routes.clear();
_areas.clear();
_waypoints.clear();
_scene->removeItem(_mapScale);
_scene->removeItem(_coordinates);
_scene->clear();
_scene->addItem(_mapScale);
_scene->addItem(_coordinates);
_palette.reset();
_tr = RectC();
_rr = RectC();
_wr = RectC();
_ar = RectC();
digitalZoom(0);
@ -627,13 +682,22 @@ void MapView::showWaypoints(bool show)
updatePOI();
}
void MapView::showAreas(bool show)
{
_showAreas = show;
for (int i = 0; i < _areas.count(); i++)
_areas.at(i)->setVisible(show);
updatePOI();
}
void MapView::showWaypointLabels(bool show)
{
_showWaypointLabels = show;
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->showLabel(show);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->showWaypointLabels(show);
}
@ -646,6 +710,16 @@ void MapView::showRouteWaypoints(bool show)
_routes.at(i)->showWaypoints(show);
}
void MapView::showMarkers(bool show)
{
_showMarkers = show;
for (int i = 0; i < _tracks.size(); i++)
_tracks.at(i)->showMarker(show);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->showMarker(show);
}
void MapView::showMap(bool show)
{
_showMap = show;
@ -674,6 +748,12 @@ void MapView::showPOILabels(bool show)
updatePOIVisibility();
}
void MapView::showCoordinates(bool show)
{
_coordinates->setVisible(show);
setMouseTracking(show);
}
void MapView::setPOIOverlap(bool overlap)
{
_overlapPOIs = overlap;
@ -697,6 +777,14 @@ void MapView::setRouteWidth(int width)
_routes.at(i)->setWidth(width);
}
void MapView::setAreaWidth(int width)
{
_areaWidth = width;
for (int i = 0; i < _areas.count(); i++)
_areas.at(i)->setWidth(width);
}
void MapView::setTrackStyle(Qt::PenStyle style)
{
_trackStyle = style;
@ -713,6 +801,22 @@ void MapView::setRouteStyle(Qt::PenStyle style)
_routes.at(i)->setStyle(style);
}
void MapView::setAreaStyle(Qt::PenStyle style)
{
_areaStyle = style;
for (int i = 0; i < _areas.count(); i++)
_areas.at(i)->setStyle(style);
}
void MapView::setAreaOpacity(int opacity)
{
_areaOpacity = opacity / 100.0;
for (int i = 0; i < _areas.count(); i++)
_areas.at(i)->setOpacity(_areaOpacity);
}
void MapView::setWaypointSize(int size)
{
_waypointSize = size;
@ -751,7 +855,7 @@ void MapView::setPOIColor(const QColor &color)
void MapView::setMapOpacity(int opacity)
{
_opacity = opacity / 100.0;
_mapOpacity = opacity / 100.0;
reloadMap();
}
@ -769,8 +873,8 @@ void MapView::drawBackground(QPainter *painter, const QRectF &rect)
QRectF ir = rect.intersected(_map->bounds());
Map::Flags flags = Map::NoFlags;
if (_opacity < 1.0)
painter->setOpacity(_opacity);
if (_mapOpacity < 1.0)
painter->setOpacity(_mapOpacity);
if (_plot)
flags = Map::Block;
@ -794,11 +898,18 @@ void MapView::resizeEvent(QResizeEvent *event)
void MapView::paintEvent(QPaintEvent *event)
{
QPointF scenePos = mapToScene(rect().bottomRight() + QPoint(
QPointF scaleScenePos = mapToScene(rect().bottomRight() + QPoint(
-(SCALE_OFFSET + _mapScale->boundingRect().width()),
-(SCALE_OFFSET + _mapScale->boundingRect().height())));
if (_mapScale->pos() != scenePos && !_plot)
_mapScale->setPos(scenePos);
if (_mapScale->pos() != scaleScenePos && !_plot)
_mapScale->setPos(scaleScenePos);
if (_coordinates->isVisible()) {
QPointF coordinatesScenePos = mapToScene(rect().bottomLeft()
+ QPoint(COORDINATES_OFFSET, -COORDINATES_OFFSET));
if (_coordinates->pos() != coordinatesScenePos && !_plot)
_coordinates->setPos(coordinatesScenePos);
}
QGraphicsView::paintEvent(event);
}
@ -816,6 +927,20 @@ void MapView::scrollContentsBy(int dx, int dy)
}
}
void MapView::mouseMoveEvent(QMouseEvent *event)
{
if (_coordinates->isVisible())
_coordinates->setCoordinates(_map->xy2ll(mapToScene(event->pos())));
QGraphicsView::mouseMoveEvent(event);
}
void MapView::leaveEvent(QEvent *event)
{
_coordinates->setCoordinates(Coordinates());
QGraphicsView::leaveEvent(event);
}
void MapView::useOpenGL(bool use)
{
_opengl = use;
@ -867,6 +992,8 @@ void MapView::setDevicePixelRatio(qreal deviceRatio, qreal mapRatio)
_tracks.at(i)->setMap(_map);
for (int i = 0; i < _routes.size(); i++)
_routes.at(i)->setMap(_map);
for (int i = 0; i < _areas.size(); i++)
_areas.at(i)->setMap(_map);
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setMap(_map);

View File

@ -12,6 +12,7 @@
#include "units.h"
#include "format.h"
#include "palette.h"
#include "data/polygon.h"
class Data;
class POI;
@ -22,8 +23,11 @@ class TrackItem;
class RouteItem;
class WaypointItem;
class ScaleItem;
class CoordinatesItem;
class PathItem;
class GraphItem;
class AreaItem;
class Area;
class MapView : public QGraphicsView
{
@ -46,8 +50,11 @@ public:
void setMarkerColor(const QColor &color);
void setTrackWidth(int width);
void setRouteWidth(int width);
void setAreaWidth(int width);
void setTrackStyle(Qt::PenStyle style);
void setRouteStyle(Qt::PenStyle style);
void setAreaStyle(Qt::PenStyle style);
void setAreaOpacity(int opacity);
void setWaypointSize(int size);
void setWaypointColor(const QColor &color);
void setPOISize(int size);
@ -65,8 +72,11 @@ public slots:
void showPOILabels(bool show);
void showTracks(bool show);
void showRoutes(bool show);
void showAreas(bool show);
void showWaypoints(bool show);
void showRouteWaypoints(bool show);
void showMarkers(bool show);
void showCoordinates(bool show);
void clearMapCache();
void setCoordinatesFormat(CoordinatesFormat format);
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
@ -78,6 +88,7 @@ private slots:
private:
PathItem *addTrack(const Track &track);
PathItem *addRoute(const Route &route);
void addArea(const Area &area);
void addWaypoints(const QVector<Waypoint> &waypoints);
void addPOI(const QList<Waypoint> &waypoints);
void loadPOI();
@ -90,6 +101,7 @@ private:
void zoom(int zoom, const QPoint &pos);
void digitalZoom(int zoom);
void updatePOIVisibility();
void skipColor() {_palette.nextColor();}
void mouseDoubleClickEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
@ -98,43 +110,38 @@ private:
void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *event);
void scrollContentsBy(int dx, int dy);
void mouseMoveEvent(QMouseEvent *event);
void leaveEvent(QEvent *event);
QGraphicsScene *_scene;
ScaleItem *_mapScale;
CoordinatesItem *_coordinates;
QList<TrackItem*> _tracks;
QList<RouteItem*> _routes;
QList<WaypointItem*> _waypoints;
QList<AreaItem*> _areas;
QHash<SearchPointer<Waypoint>, WaypointItem*> _pois;
RectC _tr, _rr, _wr;
RectC _tr, _rr, _wr, _ar;
qreal _res;
Map *_map;
POI *_poi;
Palette _palette;
Units _units;
CoordinatesFormat _coordinatesFormat;
qreal _mapOpacity;
qreal _opacity;
QColor _backgroundColor;
bool _showMap;
bool _showTracks;
bool _showRoutes;
bool _showWaypoints;
bool _showWaypointLabels;
bool _showPOI;
bool _showPOILabels;
bool _showMap, _showTracks, _showRoutes, _showAreas, _showWaypoints,
_showWaypointLabels, _showPOI, _showPOILabels, _showRouteWaypoints,
_showMarkers;
bool _overlapPOIs;
bool _showRouteWaypoints;
int _trackWidth;
int _routeWidth;
Qt::PenStyle _trackStyle;
Qt::PenStyle _routeStyle;
int _waypointSize;
int _poiSize;
QColor _waypointColor;
QColor _poiColor;
QColor _markerColor;
int _trackWidth, _routeWidth, _areaWidth;
Qt::PenStyle _trackStyle, _routeStyle, _areaStyle;
int _waypointSize, _poiSize;
QColor _backgroundColor, _waypointColor, _poiColor, _markerColor;
qreal _areaOpacity;
int _digitalZoom;
bool _plot;

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

@ -93,22 +93,7 @@ QWidget *OptionsDialog::createMapPage()
QWidget *OptionsDialog::createAppearancePage()
{
// Paths
_baseColor = new ColorBox();
_baseColor->setColor(_options->palette.color());
_colorOffset = new QDoubleSpinBox();
_colorOffset->setMinimum(0);
_colorOffset->setMaximum(1.0);
_colorOffset->setSingleStep(0.01);
_colorOffset->setValue(_options->palette.shift());
QFormLayout *paletteLayout = new QFormLayout();
paletteLayout->addRow(tr("Base color:"), _baseColor);
paletteLayout->addRow(tr("Palette shift:"), _colorOffset);
#ifndef Q_OS_MAC
QGroupBox *colorBox = new QGroupBox(tr("Colors"));
colorBox->setLayout(paletteLayout);
#endif // Q_OS_MAC
// Tracks
_trackWidth = new QSpinBox();
_trackWidth->setValue(_options->trackWidth);
_trackWidth->setMinimum(1);
@ -125,6 +110,7 @@ QWidget *OptionsDialog::createAppearancePage()
trackBox->setLayout(trackLayout);
#endif // Q_OS_MAC
// Routes
_routeWidth = new QSpinBox();
_routeWidth->setValue(_options->routeWidth);
_routeWidth->setMinimum(1);
@ -141,6 +127,38 @@ QWidget *OptionsDialog::createAppearancePage()
routeBox->setLayout(routeLayout);
#endif // Q_OS_MAC
// Areas
_areaWidth = new QSpinBox();
_areaWidth->setValue(_options->areaWidth);
_areaStyle = new StyleComboBox();
_areaStyle->setValue(_options->areaStyle);
_areaOpacity = new PercentSlider();
_areaOpacity->setValue(_options->areaOpacity);
QFormLayout *areaLayout = new QFormLayout();
#ifdef Q_OS_MAC
areaLayout->addRow(tr("Area border width:"), _areaWidth);
areaLayout->addRow(tr("Area border style:"), _areaStyle);
areaLayout->addRow(tr("Area fill opacity:"), _areaOpacity);
#else // Q_OS_MAC
areaLayout->addRow(tr("Width:"), _areaWidth);
areaLayout->addRow(tr("Style:"), _areaStyle);
areaLayout->addRow(tr("Fill opacity:"), _areaOpacity);
QGroupBox *areaBox = new QGroupBox(tr("Areas"));
areaBox->setLayout(areaLayout);
#endif // Q_OS_MAC
// Palette & antialiasing
_baseColor = new ColorBox();
_baseColor->setColor(_options->palette.color());
_colorOffset = new QDoubleSpinBox();
_colorOffset->setMinimum(0);
_colorOffset->setMaximum(1.0);
_colorOffset->setSingleStep(0.01);
_colorOffset->setValue(_options->palette.shift());
QFormLayout *paletteLayout = new QFormLayout();
paletteLayout->addRow(tr("Base color:"), _baseColor);
paletteLayout->addRow(tr("Palette shift:"), _colorOffset);
_pathAA = new QCheckBox(tr("Use anti-aliasing"));
_pathAA->setChecked(_options->pathAntiAliasing);
QFormLayout *pathAALayout = new QFormLayout();
@ -149,17 +167,18 @@ QWidget *OptionsDialog::createAppearancePage()
QWidget *pathTab = new QWidget();
QVBoxLayout *pathTabLayout = new QVBoxLayout();
#ifdef Q_OS_MAC
pathTabLayout->addLayout(paletteLayout);
pathTabLayout->addWidget(line());
pathTabLayout->addLayout(trackLayout);
pathTabLayout->addWidget(line());
pathTabLayout->addLayout(routeLayout);
pathTabLayout->addWidget(line());
pathTabLayout->addLayout(areaLayout);
pathTabLayout->addWidget(line());
#else // Q_OS_MAC
pathTabLayout->addWidget(colorBox);
pathTabLayout->addWidget(trackBox);
pathTabLayout->addWidget(routeBox);
pathTabLayout->addWidget(areaBox);
#endif // Q_OS_MAC
pathTabLayout->addLayout(paletteLayout);
pathTabLayout->addLayout(pathAALayout);
pathTabLayout->addStretch();
pathTab->setLayout(pathTabLayout);
@ -298,10 +317,6 @@ QWidget *OptionsDialog::createDataPage()
QFormLayout *outlierLayout = new QFormLayout();
outlierLayout->addWidget(_outlierEliminate);
#ifndef Q_OS_MAC
QGroupBox *outlierBox = new QGroupBox(tr("Outlier elimination"));
outlierBox->setLayout(outlierLayout);
#endif // Q_OS_MAC
QWidget *filterTab = new QWidget();
QVBoxLayout *filterTabLayout = new QVBoxLayout();
@ -309,11 +324,10 @@ QWidget *OptionsDialog::createDataPage()
filterTabLayout->addWidget(new QLabel(tr("Smoothing:")));
filterTabLayout->addLayout(smoothLayout);
filterTabLayout->addWidget(line());
filterTabLayout->addLayout(outlierLayout);
#else // Q_OS_MAC
filterTabLayout->addWidget(smoothBox);
filterTabLayout->addWidget(outlierBox);
#endif // Q_OS_MAC
filterTabLayout->addLayout(outlierLayout);
filterTabLayout->addStretch();
filterTab->setLayout(filterTabLayout);
@ -630,6 +644,10 @@ void OptionsDialog::accept()
_options->routeStyle = (Qt::PenStyle) _routeStyle->itemData(
_routeStyle->currentIndex()).toInt();
_options->pathAntiAliasing = _pathAA->isChecked();
_options->areaWidth = _areaWidth->value();
_options->areaStyle = (Qt::PenStyle) _areaStyle->itemData(
_areaStyle->currentIndex()).toInt();
_options->areaOpacity = _areaOpacity->value();
_options->waypointSize = _waypointSize->value();
_options->waypointColor = _waypointColor->color();
_options->poiSize = _poiSize->value();

View File

@ -21,8 +21,11 @@ struct Options {
Palette palette;
int trackWidth;
int routeWidth;
int areaWidth;
Qt::PenStyle trackStyle;
Qt::PenStyle routeStyle;
Qt::PenStyle areaStyle;
int areaOpacity;
QColor waypointColor;
QColor poiColor;
int waypointSize;
@ -101,6 +104,9 @@ private:
StyleComboBox *_trackStyle;
QSpinBox *_routeWidth;
StyleComboBox *_routeStyle;
QSpinBox *_areaWidth;
StyleComboBox *_areaStyle;
PercentSlider *_areaOpacity;
QCheckBox *_pathAA;
QSpinBox *_waypointSize;
ColorBox *_waypointColor;

View File

@ -8,30 +8,33 @@
#define GEOGRAPHICAL_MILE 1855.3248
static unsigned segments(qreal distance)
static inline bool isValid(const QPointF &p)
{
return (!std::isnan(p.x()) && !std::isnan(p.y()));
}
static inline unsigned segments(qreal distance)
{
return ceil(distance / GEOGRAPHICAL_MILE);
}
PathItem::PathItem(const Path &path, Map *map, QGraphicsItem *parent)
: QGraphicsObject(parent)
: QGraphicsObject(parent), _path(path), _map(map)
{
Q_ASSERT(path.count() >= 2);
Q_ASSERT(_path.isValid());
_path = path;
_map = map;
_digitalZoom = 0;
_width = 3;
QBrush brush(Qt::SolidPattern);
_pen = QPen(brush, _width);
_showMarker = true;
updatePainterPath();
updateShape();
_markerDistance = _path.first().first().distance();
_marker = new MarkerItem(this);
_marker->setPos(position(_path.at(0).distance()));
_markerDistance = _path.at(0).distance();
_marker->setPos(position(_markerDistance));
setCursor(Qt::ArrowCursor);
setAcceptHoverEvents(true);
@ -74,23 +77,27 @@ void PathItem::updatePainterPath()
{
_painterPath = QPainterPath();
_painterPath.moveTo(_map->ll2xy(_path.first().coordinates()));
for (int i = 1; i < _path.size(); i++) {
const PathPoint &p1 = _path.at(i-1);
const PathPoint &p2 = _path.at(i);
unsigned n = segments(p2.distance() - p1.distance());
for (int i = 0; i < _path.size(); i++) {
const PathSegment &segment = _path.at(i);
_painterPath.moveTo(_map->ll2xy(segment.first().coordinates()));
if (n > 1) {
GreatCircle gc(p1.coordinates(), p2.coordinates());
Coordinates last = p1.coordinates();
for (int j = 1; j < segment.size(); j++) {
const PathPoint &p1 = segment.at(j-1);
const PathPoint &p2 = segment.at(j);
unsigned n = segments(p2.distance() - p1.distance());
for (unsigned j = 1; j <= n; j++) {
Coordinates c(gc.pointAt(j/(double)n));
addSegment(last, c);
last = c;
}
} else
addSegment(p1.coordinates(), p2.coordinates());
if (n > 1) {
GreatCircle gc(p1.coordinates(), p2.coordinates());
Coordinates last = p1.coordinates();
for (unsigned k = 1; k <= n; k++) {
Coordinates c(gc.pointAt(k/(double)n));
addSegment(last, c);
last = c;
}
} else
addSegment(p1.coordinates(), p2.coordinates());
}
}
}
@ -119,7 +126,9 @@ void PathItem::setMap(Map *map)
updatePainterPath();
updateShape();
_marker->setPos(position(_markerDistance));
QPointF pos = position(_markerDistance);
if (isValid(pos))
_marker->setPos(pos);
}
void PathItem::setColor(const QColor &color)
@ -167,35 +176,48 @@ void PathItem::setDigitalZoom(int zoom)
updateShape();
}
const PathSegment *PathItem::segment(qreal x) const
{
for (int i = 0; i < _path.size(); i++)
if (x <= _path.at(i).last().distance())
return &(_path.at(i));
return 0;
}
QPointF PathItem::position(qreal x) const
{
const PathSegment *seg = segment(x);
if (!seg)
return QPointF(NAN, NAN);
int low = 0;
int high = _path.count() - 1;
int high = seg->count() - 1;
int mid = 0;
Q_ASSERT(high > low);
Q_ASSERT(x >= _path.at(low).distance() && x <= _path.at(high).distance());
if (!(x >= seg->first().distance() && x <= seg->last().distance()))
return QPointF(NAN, NAN);
while (low <= high) {
mid = low + ((high - low) / 2);
qreal val = _path.at(mid).distance();
qreal val = seg->at(mid).distance();
if (val > x)
high = mid - 1;
else if (val < x)
low = mid + 1;
else
return _map->ll2xy(_path.at(mid).coordinates());
return _map->ll2xy(seg->at(mid).coordinates());
}
Coordinates c1, c2;
qreal p1, p2;
if (_path.at(mid).distance() < x) {
c1 = _path.at(mid).coordinates(); c2 = _path.at(mid+1).coordinates();
p1 = _path.at(mid).distance(); p2 = _path.at(mid+1).distance();
if (seg->at(mid).distance() < x) {
c1 = seg->at(mid).coordinates(); c2 = seg->at(mid+1).coordinates();
p1 = seg->at(mid).distance(); p2 = seg->at(mid+1).distance();
} else {
c1 = _path.at(mid-1).coordinates(); c2 = _path.at(mid).coordinates();
p1 = _path.at(mid-1).distance(); p2 = _path.at(mid).distance();
c1 = seg->at(mid-1).coordinates(); c2 = seg->at(mid).coordinates();
p1 = seg->at(mid-1).distance(); p2 = seg->at(mid).distance();
}
unsigned n = segments(p2 - p1);
@ -225,11 +247,12 @@ QPointF PathItem::position(qreal x) const
void PathItem::moveMarker(qreal distance)
{
if (distance >= _path.first().distance()
&& distance <= _path.last().distance()) {
_marker->setVisible(true);
_marker->setPos(position(distance));
_markerDistance = distance;
_markerDistance = distance;
QPointF pos(position(distance));
if (isValid(pos)) {
_marker->setVisible(_showMarker);
_marker->setPos(pos);
} else
_marker->setVisible(false);
}
@ -252,6 +275,15 @@ void PathItem::hover(bool hover)
update();
}
void PathItem::showMarker(bool show)
{
if (_showMarker == show)
return;
_showMarker = show;
_marker->setVisible(show && isValid(position(_markerDistance)));
}
void PathItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
Q_UNUSED(event);

View File

@ -29,6 +29,7 @@ public:
void setStyle(Qt::PenStyle style);
void setDigitalZoom(int zoom);
void setMarkerColor(const QColor &color);
void showMarker(bool show);
public slots:
void moveMarker(qreal distance);
@ -42,6 +43,7 @@ protected:
MarkerItem *_marker;
private:
const PathSegment *segment(qreal x) const;
QPointF position(qreal distance) const;
void updatePainterPath();
void updateShape();
@ -59,6 +61,7 @@ private:
QPen _pen;
QPainterPath _shape;
QPainterPath _painterPath;
bool _showMarker;
};
#endif // PATHITEM_H

View File

@ -22,6 +22,7 @@ PercentSlider::PercentSlider(QWidget *parent) : QWidget(parent)
QFontMetrics fm(_label->font());
_label->setFixedWidth(fm.boundingRect(format(_slider->maximum())).width());
_label->setAlignment(Qt::AlignRight);
_label->setText(format(_slider->value()));
connect(_slider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabel(int)));

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