Compare commits
674 Commits
Author | SHA1 | Date | |
---|---|---|---|
089d796194 | |||
2677bb77f8 | |||
13dba26d3e | |||
9675e19b94 | |||
8d3fcc7a17 | |||
8dc5cb7aa8 | |||
af99e4e05a | |||
d18c0d1643 | |||
b9a93d30c0 | |||
2b6d3799ec | |||
152828042f | |||
e1683a7560 | |||
444cf344a9 | |||
7ac0bcf6d2 | |||
a1ac306bfc | |||
db4a436ff5 | |||
84a6f6c875 | |||
06f2c883d4 | |||
fc95ebfe2b | |||
4b64ee467c | |||
331cb48e11 | |||
fce0c49504 | |||
f670fb0859 | |||
1e45713aa4 | |||
7265c85b83 | |||
4d156044d0 | |||
17c9416532 | |||
8e9db2354e | |||
544a838821 | |||
44d84bf19e | |||
4ca9c79dc4 | |||
cb77cc37c4 | |||
98dd8c264c | |||
84d860e2a2 | |||
e10f8e9c1b | |||
f433f855a4 | |||
c90a03e22c | |||
fbc0fd86cf | |||
aa07b20aa4 | |||
8a7edcfd8d | |||
04a145a2e7 | |||
66f0f6a202 | |||
5698b4c9b0 | |||
77c4eda385 | |||
d6de3acbd2 | |||
652ed8e919 | |||
58e1980b0d | |||
fda33cc95b | |||
02e724fefb | |||
da220c4b62 | |||
6ffc71fd36 | |||
635e2f1fe3 | |||
23e4e66c1b | |||
1739625896 | |||
e9ef68a81c | |||
06205470fe | |||
c535632eb6 | |||
9f1f06577c | |||
0e45831111 | |||
0c8e864d32 | |||
c9cac70e1f | |||
045cbe81bf | |||
bffd1d9172 | |||
b8102d6bb7 | |||
fc80bd1b7c | |||
2441c4996d | |||
89878fade1 | |||
83b7741ed9 | |||
f44b14473d | |||
699de8b133 | |||
b7dd11fa1f | |||
0a32a9b865 | |||
02ad65461c | |||
5fa52b0166 | |||
99fa39030f | |||
6ebf749bdc | |||
5e74642dc8 | |||
b1d1cae9dd | |||
84f41b5aa9 | |||
de2278ba04 | |||
e90f152432 | |||
8deab1c9ca | |||
51e0f9a9c6 | |||
e330abe180 | |||
53a4b45b7b | |||
53229681d2 | |||
b2df7d207f | |||
1ff2162811 | |||
0f10c7596b | |||
4cc3bc28e2 | |||
3ce1918645 | |||
d70f0cf9e0 | |||
34c5ba4669 | |||
afbb8c3284 | |||
5bdc263cda | |||
179f2f1451 | |||
92e772a02b | |||
cbdfe4c105 | |||
a20a268975 | |||
48e972f920 | |||
c38f50538e | |||
53147b5e6e | |||
6c6e384862 | |||
90b780a444 | |||
56d1ac7ff2 | |||
00acd48009 | |||
e30078a63e | |||
51c0c31838 | |||
bc218c9f65 | |||
56e4c80999 | |||
443b916301 | |||
8675a0e945 | |||
0894fb0ddf | |||
73e15f8f11 | |||
0fe7843e52 | |||
e76439bb6e | |||
b54aeff369 | |||
72968efeef | |||
ec3f529b0f | |||
57a171ee8c | |||
d3193abd0b | |||
6809853a8a | |||
3155e8436b | |||
69f9d05ccb | |||
e24a3cd99a | |||
a94fa9f0ea | |||
c4f2a44410 | |||
da4a51e7fa | |||
bb47a34823 | |||
11196c0e35 | |||
00ef815738 | |||
64f685cf60 | |||
7ab13ec8e5 | |||
d3fbbecb2d | |||
7bc83603ca | |||
2cd35b139e | |||
a74afa54fd | |||
753c4e8db0 | |||
d0b3f48caf | |||
e47cd1be7e | |||
d1ba35f012 | |||
b9489afbfe | |||
a7506cfd82 | |||
c060abe6a7 | |||
b457fc430c | |||
89947851fd | |||
7d40dfddb2 | |||
151ae03b53 | |||
9fd8b84c3b | |||
47683e5447 | |||
84bcf07bd4 | |||
cc694971be | |||
ba856d7eb6 | |||
b14eeb58ab | |||
8e932b966c | |||
35818ce16e | |||
6ef7537dff | |||
abbb823890 | |||
0a4f8a46d4 | |||
fd2823c703 | |||
d16b61051f | |||
e69f17aad5 | |||
33b1e179d3 | |||
5efb9f8a4e | |||
ebf39f11bd | |||
8b7422b70a | |||
ef3da2e156 | |||
6e13c2b704 | |||
f3e4719439 | |||
7b6789e78d | |||
95442461fc | |||
729cbd641c | |||
2e2dad8d04 | |||
4e3b6c2eb2 | |||
6430933a96 | |||
3e14d4afda | |||
ebb30a3fca | |||
bd20d40ba7 | |||
77823fba14 | |||
dcc5cbe9bc | |||
cd3c99b065 | |||
83189a4e65 | |||
797fd7f02b | |||
a45125be9a | |||
a7154988ab | |||
afe9a14d5b | |||
b3f1596918 | |||
cd90407f56 | |||
73f06e61f0 | |||
c708fa35fd | |||
dcedfe1e9f | |||
daa9d296bd | |||
b8a9a4481c | |||
e792bf3b23 | |||
359a9f0a5a | |||
4b0b6513d1 | |||
c7762e26fb | |||
5b8d41afb7 | |||
81e1664a9b | |||
fad3f116f5 | |||
a6e522d758 | |||
ab65deadb6 | |||
7f80e8f7b7 | |||
9a5c5eaf61 | |||
9bc5016141 | |||
a4a46232e4 | |||
d85fbe5b48 | |||
141e0cb404 | |||
2b7d0cd631 | |||
d106f47771 | |||
e48729fc84 | |||
dca53bc622 | |||
65045dfee4 | |||
002b9c35e1 | |||
945528d6b1 | |||
4697ba4ef0 | |||
9bf1447a7e | |||
1a8114af8e | |||
ad154dfd7d | |||
c2004ded31 | |||
3ced367fab | |||
506d1998f8 | |||
afc5e9ca4b | |||
425d0e3013 | |||
3a8b1107fe | |||
ad7a413d50 | |||
8d5f72de64 | |||
9e798e626c | |||
cb70f0dded | |||
400003f684 | |||
69db510b10 | |||
cd9ea0f8a9 | |||
0f6c8eb896 | |||
6b3c0d05ca | |||
b0cc028c4c | |||
1513130435 | |||
ec798451e8 | |||
ffc61552d2 | |||
aff7b1c13f | |||
d54f22d3f0 | |||
dba6291f3e | |||
e96cee2ea8 | |||
1eaaea98a3 | |||
a90073c422 | |||
223a13583c | |||
4386e1f2e1 | |||
5bfe9c2527 | |||
efa2b1c366 | |||
e0ad64a902 | |||
f0a1acb96a | |||
5f3bdb87f8 | |||
90d062e097 | |||
58b4c87d46 | |||
02654ec862 | |||
ff015c8714 | |||
c339116cd1 | |||
d8d70bfd8b | |||
7d8149ace3 | |||
4460b454c4 | |||
211310f377 | |||
1e4bcd0ac1 | |||
1a66ed0a36 | |||
273a127069 | |||
1c0a0fd0b3 | |||
713e331b2a | |||
96f406aad7 | |||
0aedec66c4 | |||
b500031713 | |||
699e4f32d5 | |||
992c8aaaf9 | |||
68a72c5809 | |||
eace308774 | |||
e4e3f7d143 | |||
acc49d015e | |||
b48652cb78 | |||
0808f6679e | |||
610ac3d73f | |||
1d719fdcc8 | |||
1746e1cf08 | |||
5d5a5365cd | |||
7dfdeac1da | |||
1ff13ee9f8 | |||
34b1fb6b5d | |||
02bf85780a | |||
47199348d8 | |||
3b55bc0efc | |||
4de3ddf71b | |||
e26fa92ce6 | |||
dfb69b2755 | |||
c2a30738cb | |||
fd53e89ea5 | |||
ccf91bb29f | |||
75bd388be0 | |||
aef0357204 | |||
d073d606d0 | |||
8822bf7e5f | |||
051a3ed303 | |||
96437ae6ab | |||
89c25bbc3a | |||
322792ea04 | |||
ce1c76a315 | |||
804e9594ad | |||
651973c524 | |||
533af66080 | |||
bab5750cf7 | |||
0d6f3ea162 | |||
b915302e2f | |||
03ef7a9147 | |||
33cb944e36 | |||
8bc575aef2 | |||
f0b7abdb72 | |||
6ce14734cd | |||
925a0e2951 | |||
e46bba18f2 | |||
a56aa4e706 | |||
c4b3a81b0b | |||
957cc6f4f3 | |||
ebad0832ee | |||
186c135ad5 | |||
72b5b1ea97 | |||
106d4c6e0b | |||
8f815a6af0 | |||
60f107d7cd | |||
e87fff4bf8 | |||
e6547d92f0 | |||
bfcc577f64 | |||
a56ad8a933 | |||
b1748c848b | |||
3763d44662 | |||
b3e8081942 | |||
b3dc886afc | |||
431002fd62 | |||
63c3a50ca6 | |||
7fd30bbda3 | |||
c1844f9557 | |||
0c7601c831 | |||
19eb3fba7f | |||
bde3c8cc3d | |||
b0ce471ea8 | |||
bd23120c2c | |||
ac4ef0631e | |||
60d9a172b6 | |||
b8eede21c0 | |||
70ddbe192f | |||
d8477571cc | |||
92545acba0 | |||
2bf66ea912 | |||
b21c2267cf | |||
278aa904c1 | |||
b369985f0a | |||
6a5781771f | |||
1b616f3c81 | |||
99dfbc1d2f | |||
f83e3376b4 | |||
311aeecb27 | |||
338ace6dff | |||
51e9ef4416 | |||
ebefe54510 | |||
1ec732c78d | |||
ff733b2705 | |||
99e32b1a15 | |||
f4a992a66f | |||
f52fa9a9ef | |||
61f3a1c932 | |||
93313da01d | |||
a253ac1796 | |||
e6a0eeefcc | |||
214d7c40dc | |||
cd89706d74 | |||
961eac9324 | |||
ddacac8d2e | |||
bd9b5dbc6a | |||
8b813b5879 | |||
b79de29464 | |||
ae2765528d | |||
0356917790 | |||
7352b24473 | |||
3a9ec6247c | |||
e74ac78138 | |||
5fa91be4ac | |||
536b4fd121 | |||
0556ae0f58 | |||
e38fdb26d7 | |||
e420602c69 | |||
b2a49eaa23 | |||
211a4e4cef | |||
8ff8d4bf16 | |||
46598a85fc | |||
32cbd33c91 | |||
0e356d0222 | |||
1a29ab6304 | |||
5581cff55b | |||
a458b82e37 | |||
bd946fb477 | |||
7e6ed0933c | |||
1586a5e912 | |||
3e340ab941 | |||
ea178d1acb | |||
f61488fcfa | |||
b68ca92add | |||
0448ae5eea | |||
2bc112c7b4 | |||
ccd92edb8d | |||
0cbf79870b | |||
7e8530555d | |||
2fd16e5e31 | |||
a5033c8b19 | |||
b0c6176ddd | |||
6edd7a8c61 | |||
8a299be65b | |||
cde4c65c53 | |||
b24136a580 | |||
da1b2bb90a | |||
30e198cf46 | |||
0f2deca4fa | |||
1055c4fd98 | |||
18c501b610 | |||
71310116e3 | |||
34e48199b2 | |||
4cf027df58 | |||
a9668ca86e | |||
181f60ed40 | |||
307405d661 | |||
1242423ca8 | |||
2bdab0f449 | |||
4e23df3a66 | |||
23f5a317d0 | |||
80bc9f1f01 | |||
dec3f10df3 | |||
296d4c6c9d | |||
668558cf2e | |||
a6053a4d7b | |||
535361dada | |||
e9e7660beb | |||
eb5692a0ab | |||
367427b26a | |||
371fa13bc6 | |||
5a8250ed63 | |||
c8a39a607b | |||
215cf03b68 | |||
9cadb8d0a5 | |||
20c82deda7 | |||
7c9768e83a | |||
736566b12c | |||
540339bf22 | |||
81a9743064 | |||
818fa11fd3 | |||
dd80d34e58 | |||
17c791d753 | |||
9f06b042ca | |||
d201101587 | |||
da842bd21d | |||
8a90a736d2 | |||
aac9bf024b | |||
585ded6b1c | |||
b9098c0dc5 | |||
584245785e | |||
66ce91c237 | |||
d134938ff8 | |||
9e583a9dab | |||
62ff4bb7c4 | |||
4b66aaa78b | |||
c97aa9c25d | |||
f1c6db0b46 | |||
9bd70ec96e | |||
984d3bb6c5 | |||
87a4398131 | |||
324ac2e0f4 | |||
8591d3f34c | |||
1a53968bd3 | |||
82cf7b49ca | |||
9789982626 | |||
eb03fe6ead | |||
0d1b416c4f | |||
c89f8dbb47 | |||
e4d777bace | |||
640829d89d | |||
78fb5c1547 | |||
6a25ad6379 | |||
5693375a3f | |||
10b903c129 | |||
9a0d304e8d | |||
0e5eb7287d | |||
7827509a4a | |||
974290ce8b | |||
09c097cc68 | |||
7f12c0ca95 | |||
a773921da0 | |||
b67428065f | |||
5bbf117f64 | |||
1744764025 | |||
c425b3868d | |||
84e61c657e | |||
721ee2aaa9 | |||
6cc22afcdc | |||
b99def1b30 | |||
1c5a19a33a | |||
27194d3d36 | |||
375ef20592 | |||
e86c19635e | |||
d7fd40d9d2 | |||
94fc5e17d0 | |||
425c75416a | |||
1160c6d385 | |||
a6b2a477a1 | |||
0ca264b176 | |||
be3c101c07 | |||
cb52ad8bc5 | |||
12d5dcc78c | |||
afd87c6fa2 | |||
c7d68f924f | |||
89304c0d5c | |||
c57a0f4061 | |||
f02ff1fa01 | |||
434df521fb | |||
9d90b97ba3 | |||
09631de5a2 | |||
6b8c0231ea | |||
eae55b14bb | |||
29fe054d57 | |||
b95fb80210 | |||
70f4010f55 | |||
014e260042 | |||
80bf57abfc | |||
473b92e8f7 | |||
1634b0715c | |||
1a07360d91 | |||
7e365cb990 | |||
19c44f56d6 | |||
799079392c | |||
1957a51570 | |||
e9b32fb582 | |||
3e421c6aba | |||
aa461a04b1 | |||
b369ffacef | |||
6034685fa0 | |||
420e96a2f4 | |||
a5f11cb77b | |||
f9fcbf5de4 | |||
058a09a426 | |||
ebf3c3bc14 | |||
eeed5ceba3 | |||
1827787fc2 | |||
3074ba9957 | |||
8624b42e0b | |||
c00ebdeefd | |||
05f1536285 | |||
bf69ef58ba | |||
adcd603eec | |||
0ee0bd882e | |||
d48a2aac93 | |||
7993e4dcb3 | |||
d20d94ef05 | |||
9f0582cbea | |||
1e6925da75 | |||
7cfc05c101 | |||
392b829733 | |||
36083d2fa1 | |||
63fd7f239c | |||
20b107581e | |||
aacc04520f | |||
dad85e46a7 | |||
5912506292 | |||
e3c23d0ffc | |||
efdb31ddc5 | |||
ee2f471ca0 | |||
dafadbab60 | |||
7de08d116a | |||
dac06b9537 | |||
33b6e8954c | |||
2695745d82 | |||
fc67f6f19a | |||
07cd536867 | |||
c3d6294b7a | |||
68671ed994 | |||
46989bd7a0 | |||
0ce2f02178 | |||
1289762365 | |||
f0c3f9b8c8 | |||
31f6eeac26 | |||
40803d68c1 | |||
35dea229b4 | |||
330b6547c4 | |||
498d33b77d | |||
3592d9e68f | |||
7d38b55f60 | |||
82df1bec0e | |||
82cbbbb52a | |||
b8e404b789 | |||
2ad94947d7 | |||
b713da0012 | |||
daf4ef894c | |||
eae8e23c6c | |||
b9f7af33d7 | |||
f334901db3 | |||
ffcba53b91 | |||
f326c7e002 | |||
15d4bd05f9 | |||
43bc7dd682 | |||
a8cc02c1f9 | |||
511deada2e | |||
36937d8f2d | |||
969d87ec51 | |||
07255aa8ae | |||
e73f9448e9 | |||
ee9a8df51f | |||
dcdd250858 | |||
6f73740da6 | |||
6518fe3278 | |||
97e2215f0b | |||
21e7c00f66 | |||
5daacc0a22 | |||
1323f6ead8 | |||
798f63aaff | |||
b0abc976a5 | |||
4c61e208ed | |||
c997694e10 | |||
a8d671556e | |||
2e4aeb57a8 | |||
e186a33340 | |||
1b5bdc0f07 | |||
5feec6ac0c | |||
5997ba21f2 | |||
37d9bf1b9b | |||
2bf93f891a | |||
11a9d75d8f | |||
23576cd52c | |||
47bcd0cfaf | |||
043d1f49a6 | |||
339144f7f8 | |||
27ff3a9ba8 | |||
8f4d31ac24 | |||
34fcbfb60f | |||
803c4aecce | |||
f247c2fa22 | |||
9fa031ca4d | |||
d3908f1561 | |||
f41b13a5a2 | |||
284f7d0a36 | |||
f469b4f600 | |||
eec797125b | |||
9dce08bce4 | |||
06248457a0 | |||
c9b5e0f2cb | |||
b7f3a64577 | |||
e05069d653 | |||
1928b579ab | |||
501431207f | |||
0d41341086 | |||
13f383ab7a | |||
5253698602 | |||
6bcb6ceb8d | |||
9da82a978c | |||
64a343dd2e | |||
ac93ccba29 | |||
7cd005873d | |||
9c16c3498c | |||
a2eaacc017 | |||
58bed99d14 | |||
de71aa0d0c | |||
14290bf1f0 | |||
e0fd77bbfd | |||
b1b8d68610 | |||
a0b64b4227 | |||
93670d3026 | |||
b212ccf594 | |||
a80de92691 | |||
17ab241a6d | |||
816e1d1768 | |||
50c768e12d | |||
72dda5fdd6 | |||
ee3a6adf2b | |||
56f15da550 | |||
61c82a0836 |
52
.appveyor.yml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
version: 5.0.{build}
|
||||||
|
configuration: Release
|
||||||
|
platform: Any CPU
|
||||||
|
environment:
|
||||||
|
NSISDIR: C:\Program Files (x86)\NSIS
|
||||||
|
matrix:
|
||||||
|
- QTDIR: C:\Qt\5.9\msvc2015
|
||||||
|
PLATFORM: x86
|
||||||
|
NSI: gpxsee.nsi
|
||||||
|
OPENSSLDIR: C:\OpenSSL-Win32\bin
|
||||||
|
- QTDIR: C:\Qt\5.9\msvc2015_64
|
||||||
|
PLATFORM: x86_amd64
|
||||||
|
NSI: gpxsee64.nsi
|
||||||
|
OPENSSLDIR: C:\OpenSSL-Win64\bin
|
||||||
|
install:
|
||||||
|
- cmd: >-
|
||||||
|
set PATH=%QTDIR%\bin;%NSISDIR%;%PATH%
|
||||||
|
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
|
||||||
|
build_script:
|
||||||
|
- cmd: >-
|
||||||
|
lrelease gpxsee.pro
|
||||||
|
|
||||||
|
qmake gpxsee.pro
|
||||||
|
|
||||||
|
nmake release
|
||||||
|
|
||||||
|
|
||||||
|
md installer
|
||||||
|
|
||||||
|
copy release\GPXSee.exe installer
|
||||||
|
|
||||||
|
windeployqt --no-svg --release installer\GPXSee.exe
|
||||||
|
|
||||||
|
copy pkg\%NSI% installer
|
||||||
|
|
||||||
|
xcopy pkg\csv installer\csv /i
|
||||||
|
|
||||||
|
xcopy pkg\maps installer\maps /i
|
||||||
|
|
||||||
|
xcopy lang\*.qm installer\translations\ /sy
|
||||||
|
|
||||||
|
copy licence.txt installer
|
||||||
|
|
||||||
|
copy %OPENSSLDIR%\libeay32.dll installer
|
||||||
|
|
||||||
|
copy %OPENSSLDIR%\ssleay32.dll installer
|
||||||
|
|
||||||
|
|
||||||
|
makensis.exe installer\%NSI%
|
||||||
|
artifacts:
|
||||||
|
- path: installer\GPXSee-*.exe
|
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# C++ objects and libs
|
||||||
|
*.o
|
||||||
|
|
||||||
|
# Qt-es
|
||||||
|
/.qmake.stash
|
||||||
|
moc_*.cpp
|
||||||
|
moc_*.h
|
||||||
|
qrc_*.cpp
|
||||||
|
Makefile*
|
||||||
|
*.qm
|
||||||
|
|
||||||
|
# Binary
|
||||||
|
GPXSee
|
18
.travis.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
language: c++
|
||||||
|
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
|
||||||
|
|
||||||
|
install:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt; fi
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libqt4-dev; fi
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PATH=/usr/local/opt/qt/bin/:${PATH}; fi
|
||||||
|
- lrelease gpxsee.pro
|
||||||
|
- qmake gpxsee.pro
|
||||||
|
- make
|
7
CONTRIBUTING.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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
|
33
README.md
@ -1,30 +1,33 @@
|
|||||||
# GPXSee
|
# GPXSee
|
||||||
GPX viewer and analyzer.
|
GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
|
||||||
|
KML, FIT, IGC and NMEA files.
|
||||||
|
|
||||||
* User-definable map sources.
|
## Features
|
||||||
* Track and elevation/speed graphs.
|
* User-definable online maps.
|
||||||
|
* Offline maps (OziExplorer maps and TrekBuddy maps/atlases).
|
||||||
|
* Elevation, speed, heart rate, cadence, power and temperature graphs.
|
||||||
* Support for multiple tracks in one view.
|
* Support for multiple tracks in one view.
|
||||||
* Support for POI files.
|
* Support for POI files.
|
||||||
* Export to PDF.
|
* Print/export to PDF.
|
||||||
|
* Full-screen mode.
|
||||||
* Native GUI for Windows, Mac OS X and Linux.
|
* Native GUI for Windows, Mac OS X and Linux.
|
||||||
|
* Opens GPX, TCX, FIT, KML, IGC, NMEA and Garmin CSV files.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
### Linux/OS X
|
|
||||||
```shell
|
```shell
|
||||||
lrelease gpxsee.pro
|
lrelease gpxsee.pro
|
||||||
qmake gpxsee.pro
|
qmake gpxsee.pro
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
### Windows
|
|
||||||
```shell
|
|
||||||
lrelease gpxsee.pro
|
|
||||||
qmake gpxsee.pro
|
|
||||||
nmake release
|
|
||||||
```
|
|
||||||
|
|
||||||
## Binaries
|
## Download
|
||||||
* Windows & OS X builds: http://sourceforge.net/projects/gpxsee
|
* [Windows & OS X builds](http://sourceforge.net/projects/gpxsee)
|
||||||
* Linux packages: https://build.opensuse.org/project/repositories/home:tumic:GPXSee
|
* [Linux packages](http://software.opensuse.org/download.html?project=home%3Atumic%3AGPXSee&package=gpxsee)
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
[Changelog](https://build.opensuse.org/package/view_file/home:tumic:GPXSee/gpxsee/gpxsee.changes)
|
||||||
|
|
||||||
## Homepage
|
## Homepage
|
||||||
GPXSee homepage: http://tumic.wz.cz/gpxsee
|
http://www.gpxsee.org
|
||||||
|
BIN
cert/mac/gpxsee.cer
Normal file
BIN
cert/win/gpxsee.cer
Normal file
155
gpxsee.nsi
@ -1,155 +0,0 @@
|
|||||||
!include "MUI2.nsh"
|
|
||||||
!include "x64.nsh"
|
|
||||||
|
|
||||||
; The name of the installer
|
|
||||||
Name "GPXSee"
|
|
||||||
|
|
||||||
; The file to write
|
|
||||||
OutFile "install.exe"
|
|
||||||
|
|
||||||
; Required execution level
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
; The default installation directory
|
|
||||||
InstallDir "$PROGRAMFILES\GPXSee"
|
|
||||||
|
|
||||||
; Registry key to check for directory (so if you install again, it will
|
|
||||||
; overwrite the old one automatically)
|
|
||||||
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
|
||||||
|
|
||||||
; Registry key for uninstaller
|
|
||||||
!define REGENTRY "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPXSee"
|
|
||||||
|
|
||||||
; Start menu page configuration
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
|
||||||
|
|
||||||
Var StartMenuFolder
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
; Pages
|
|
||||||
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
|
||||||
!insertmacro MUI_PAGE_LICENSE "licence.txt"
|
|
||||||
!insertmacro MUI_PAGE_COMPONENTS
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
; Languages
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
|
|
||||||
; The stuff to install
|
|
||||||
Section "GPXSee (required)" SEC_APP
|
|
||||||
|
|
||||||
SectionIn RO
|
|
||||||
|
|
||||||
; Set output path to the installation directory.
|
|
||||||
SetOutPath $INSTDIR
|
|
||||||
|
|
||||||
; Put file there
|
|
||||||
File "gpxsee.exe"
|
|
||||||
|
|
||||||
; Write the installation path into the registry
|
|
||||||
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
|
|
||||||
|
|
||||||
; Write the uninstall keys for Windows
|
|
||||||
WriteRegStr HKLM "${REGENTRY}" "DisplayName" "GPXSee"
|
|
||||||
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tuma"
|
|
||||||
WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "2.8"
|
|
||||||
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
||||||
WriteRegDWORD HKLM "${REGENTRY}" "NoModify" 1
|
|
||||||
WriteRegDWORD HKLM "${REGENTRY}" "NoRepair" 1
|
|
||||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
|
||||||
|
|
||||||
; Create start menu entry and add links
|
|
||||||
SetShellVarContext all
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "QT libs" SEC_QT
|
|
||||||
|
|
||||||
File "Qt5Core.dll"
|
|
||||||
File "Qt5Gui.dll"
|
|
||||||
File "Qt5Widgets.dll"
|
|
||||||
File "Qt5PrintSupport.dll"
|
|
||||||
File "Qt5Network.dll"
|
|
||||||
File "libGLESv2.dll"
|
|
||||||
File /r "platforms"
|
|
||||||
File /r "imageformats"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
Section "MSVC runtime" SEC_MSVC
|
|
||||||
|
|
||||||
DetailPrint "Checking whether Visual C++ 2015 Redistributable is already installed..."
|
|
||||||
${If} ${RunningX64}
|
|
||||||
ReadRegDword $R0 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" "Installed"
|
|
||||||
${Else}
|
|
||||||
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" "Installed"
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
StrCmp $R0 "1" 0 +3
|
|
||||||
DetailPrint "Visual C++ 2015 Redistributable is already installed, skipping install."
|
|
||||||
Goto done
|
|
||||||
|
|
||||||
DetailPrint "Installing Visual C++ 2015 Redistributable..."
|
|
||||||
SetOutPath $TEMP
|
|
||||||
File "VC_redist.x86.exe"
|
|
||||||
ExecWait '"$TEMP/VC_redist.x86.exe" /install /quiet /norestart'
|
|
||||||
|
|
||||||
done:
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;--------------------------------
|
|
||||||
|
|
||||||
; Uninstaller
|
|
||||||
|
|
||||||
Section "Uninstall"
|
|
||||||
|
|
||||||
; Remove registry keys
|
|
||||||
DeleteRegKey HKLM "${REGENTRY}"
|
|
||||||
DeleteRegKey HKLM SOFTWARE\GPXSee
|
|
||||||
|
|
||||||
; Remove directories used
|
|
||||||
RMDir /r "$INSTDIR"
|
|
||||||
|
|
||||||
; Remove Start menu entries
|
|
||||||
SetShellVarContext all
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
|
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
;-------------------------------
|
|
||||||
|
|
||||||
;Descriptions
|
|
||||||
|
|
||||||
;Language strings
|
|
||||||
LangString DESC_QT ${LANG_ENGLISH} \
|
|
||||||
"QT Library. Unselct only if you have QT already installed!"
|
|
||||||
LangString DESC_MSVC ${LANG_ENGLISH} \
|
|
||||||
"Visual C++ 2015 runtime components. Unselct only if you have the runtime already installed!"
|
|
||||||
LangString DESC_APP ${LANG_ENGLISH} \
|
|
||||||
"GPXSee application"
|
|
||||||
|
|
||||||
;Assign language strings to sections
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QT} $(DESC_QT)
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
290
gpxsee.pro
@ -1,64 +1,244 @@
|
|||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
|
VERSION = 5.0
|
||||||
QT += core \
|
QT += core \
|
||||||
gui \
|
gui \
|
||||||
network
|
network
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
|
||||||
|
lessThan(QT_VERSION, 5.4): QT += opengl
|
||||||
|
macx: QT += opengl
|
||||||
|
INCLUDEPATH += ./src
|
||||||
HEADERS += src/config.h \
|
HEADERS += src/config.h \
|
||||||
src/icons.h \
|
src/common/staticassert.h \
|
||||||
src/gui.h \
|
src/common/coordinates.h \
|
||||||
src/gpx.h \
|
src/common/range.h \
|
||||||
src/parser.h \
|
src/common/rectc.h \
|
||||||
src/poi.h \
|
src/common/wgs84.h \
|
||||||
src/rtree.h \
|
src/common/str2int.h \
|
||||||
src/ll.h \
|
src/GUI/app.h \
|
||||||
src/axisitem.h \
|
src/GUI/icons.h \
|
||||||
src/keys.h \
|
src/GUI/gui.h \
|
||||||
src/slideritem.h \
|
src/GUI/axisitem.h \
|
||||||
src/markeritem.h \
|
src/GUI/keys.h \
|
||||||
src/infoitem.h \
|
src/GUI/slideritem.h \
|
||||||
src/elevationgraph.h \
|
src/GUI/markeritem.h \
|
||||||
src/speedgraph.h \
|
src/GUI/infoitem.h \
|
||||||
src/sliderinfoitem.h \
|
src/GUI/elevationgraph.h \
|
||||||
src/filebrowser.h \
|
src/GUI/speedgraph.h \
|
||||||
src/map.h \
|
src/GUI/sliderinfoitem.h \
|
||||||
src/maplist.h \
|
src/GUI/filebrowser.h \
|
||||||
src/downloader.h \
|
src/GUI/units.h \
|
||||||
src/units.h \
|
src/GUI/scaleitem.h \
|
||||||
src/scaleitem.h \
|
src/GUI/graphview.h \
|
||||||
src/nicenum.h \
|
src/GUI/waypointitem.h \
|
||||||
src/waypoint.h \
|
src/GUI/palette.h \
|
||||||
src/trackview.h \
|
src/GUI/heartrategraph.h \
|
||||||
src/track.h \
|
src/GUI/trackinfo.h \
|
||||||
src/graphview.h \
|
src/GUI/exportdialog.h \
|
||||||
src/trackpoint.h \
|
src/GUI/fileselectwidget.h \
|
||||||
src/waypointitem.h \
|
src/GUI/margins.h \
|
||||||
src/palette.h
|
src/GUI/temperaturegraph.h \
|
||||||
|
src/GUI/graphtab.h \
|
||||||
|
src/GUI/trackitem.h \
|
||||||
|
src/GUI/tooltip.h \
|
||||||
|
src/GUI/routeitem.h \
|
||||||
|
src/GUI/graphitem.h \
|
||||||
|
src/GUI/pathitem.h \
|
||||||
|
src/GUI/griditem.h \
|
||||||
|
src/GUI/format.h \
|
||||||
|
src/GUI/cadencegraph.h \
|
||||||
|
src/GUI/powergraph.h \
|
||||||
|
src/GUI/optionsdialog.h \
|
||||||
|
src/GUI/colorbox.h \
|
||||||
|
src/GUI/stylecombobox.h \
|
||||||
|
src/GUI/opengl.h \
|
||||||
|
src/GUI/timetype.h \
|
||||||
|
src/GUI/percentslider.h \
|
||||||
|
src/GUI/elevationgraphitem.h \
|
||||||
|
src/GUI/speedgraphitem.h \
|
||||||
|
src/GUI/heartrategraphitem.h \
|
||||||
|
src/GUI/temperaturegraphitem.h \
|
||||||
|
src/GUI/cadencegraphitem.h \
|
||||||
|
src/GUI/powergraphitem.h \
|
||||||
|
src/GUI/oddspinbox.h \
|
||||||
|
src/GUI/settings.h \
|
||||||
|
src/GUI/nicenum.h \
|
||||||
|
src/GUI/cpuarch.h \
|
||||||
|
src/GUI/searchpointer.h \
|
||||||
|
src/GUI/mapview.h \
|
||||||
|
src/map/projection.h \
|
||||||
|
src/map/ellipsoid.h \
|
||||||
|
src/map/datum.h \
|
||||||
|
src/map/mercator.h \
|
||||||
|
src/map/transversemercator.h \
|
||||||
|
src/map/latlon.h \
|
||||||
|
src/map/utm.h \
|
||||||
|
src/map/lambertconic.h \
|
||||||
|
src/map/lambertazimuthal.h \
|
||||||
|
src/map/albersequal.h \
|
||||||
|
src/map/map.h \
|
||||||
|
src/map/maplist.h \
|
||||||
|
src/map/onlinemap.h \
|
||||||
|
src/map/downloader.h \
|
||||||
|
src/map/tile.h \
|
||||||
|
src/map/emptymap.h \
|
||||||
|
src/map/offlinemap.h \
|
||||||
|
src/map/tar.h \
|
||||||
|
src/map/ozf.h \
|
||||||
|
src/map/atlas.h \
|
||||||
|
src/map/matrix.h \
|
||||||
|
src/map/geotiff.h \
|
||||||
|
src/map/pcs.h \
|
||||||
|
src/map/transform.h \
|
||||||
|
src/map/mapfile.h \
|
||||||
|
src/map/tifffile.h \
|
||||||
|
src/data/graph.h \
|
||||||
|
src/data/poi.h \
|
||||||
|
src/data/waypoint.h \
|
||||||
|
src/data/track.h \
|
||||||
|
src/data/route.h \
|
||||||
|
src/data/trackpoint.h \
|
||||||
|
src/data/data.h \
|
||||||
|
src/data/parser.h \
|
||||||
|
src/data/trackdata.h \
|
||||||
|
src/data/routedata.h \
|
||||||
|
src/data/path.h \
|
||||||
|
src/data/rtree.h \
|
||||||
|
src/data/gpxparser.h \
|
||||||
|
src/data/tcxparser.h \
|
||||||
|
src/data/csvparser.h \
|
||||||
|
src/data/kmlparser.h \
|
||||||
|
src/data/fitparser.h \
|
||||||
|
src/data/igcparser.h \
|
||||||
|
src/data/nmeaparser.h \
|
||||||
|
src/map/gcs.h \
|
||||||
|
src/map/angularunits.h \
|
||||||
|
src/map/primemeridian.h \
|
||||||
|
src/map/linearunits.h \
|
||||||
|
src/map/ct.h \
|
||||||
|
src/map/mapsource.h
|
||||||
SOURCES += src/main.cpp \
|
SOURCES += src/main.cpp \
|
||||||
src/gui.cpp \
|
src/common/coordinates.cpp \
|
||||||
src/gpx.cpp \
|
src/common/rectc.cpp \
|
||||||
src/parser.cpp \
|
src/common/range.cpp \
|
||||||
src/poi.cpp \
|
src/common/str2int.cpp \
|
||||||
src/ll.cpp \
|
src/GUI/app.cpp \
|
||||||
src/axisitem.cpp \
|
src/GUI/gui.cpp \
|
||||||
src/slideritem.cpp \
|
src/GUI/axisitem.cpp \
|
||||||
src/markeritem.cpp \
|
src/GUI/slideritem.cpp \
|
||||||
src/infoitem.cpp \
|
src/GUI/markeritem.cpp \
|
||||||
src/elevationgraph.cpp \
|
src/GUI/infoitem.cpp \
|
||||||
src/speedgraph.cpp \
|
src/GUI/elevationgraph.cpp \
|
||||||
src/sliderinfoitem.cpp \
|
src/GUI/speedgraph.cpp \
|
||||||
src/filebrowser.cpp \
|
src/GUI/sliderinfoitem.cpp \
|
||||||
src/map.cpp \
|
src/GUI/filebrowser.cpp \
|
||||||
src/maplist.cpp \
|
src/GUI/scaleitem.cpp \
|
||||||
src/downloader.cpp \
|
src/GUI/graphview.cpp \
|
||||||
src/scaleitem.cpp \
|
src/GUI/waypointitem.cpp \
|
||||||
src/nicenum.cpp \
|
src/GUI/palette.cpp \
|
||||||
src/trackview.cpp \
|
src/GUI/heartrategraph.cpp \
|
||||||
src/track.cpp \
|
src/GUI/trackinfo.cpp \
|
||||||
src/graphview.cpp \
|
src/GUI/exportdialog.cpp \
|
||||||
src/waypointitem.cpp \
|
src/GUI/fileselectwidget.cpp \
|
||||||
src/palette.cpp
|
src/GUI/temperaturegraph.cpp \
|
||||||
|
src/GUI/trackitem.cpp \
|
||||||
|
src/GUI/tooltip.cpp \
|
||||||
|
src/GUI/routeitem.cpp \
|
||||||
|
src/GUI/graphitem.cpp \
|
||||||
|
src/GUI/pathitem.cpp \
|
||||||
|
src/GUI/griditem.cpp \
|
||||||
|
src/GUI/format.cpp \
|
||||||
|
src/GUI/cadencegraph.cpp \
|
||||||
|
src/GUI/powergraph.cpp \
|
||||||
|
src/GUI/optionsdialog.cpp \
|
||||||
|
src/GUI/colorbox.cpp \
|
||||||
|
src/GUI/stylecombobox.cpp \
|
||||||
|
src/GUI/oddspinbox.cpp \
|
||||||
|
src/GUI/percentslider.cpp \
|
||||||
|
src/GUI/elevationgraphitem.cpp \
|
||||||
|
src/GUI/speedgraphitem.cpp \
|
||||||
|
src/GUI/heartrategraphitem.cpp \
|
||||||
|
src/GUI/temperaturegraphitem.cpp \
|
||||||
|
src/GUI/cadencegraphitem.cpp \
|
||||||
|
src/GUI/powergraphitem.cpp \
|
||||||
|
src/GUI/nicenum.cpp \
|
||||||
|
src/GUI/mapview.cpp \
|
||||||
|
src/map/maplist.cpp \
|
||||||
|
src/map/onlinemap.cpp \
|
||||||
|
src/map/downloader.cpp \
|
||||||
|
src/map/emptymap.cpp \
|
||||||
|
src/map/offlinemap.cpp \
|
||||||
|
src/map/tar.cpp \
|
||||||
|
src/map/atlas.cpp \
|
||||||
|
src/map/ozf.cpp \
|
||||||
|
src/map/matrix.cpp \
|
||||||
|
src/map/ellipsoid.cpp \
|
||||||
|
src/map/datum.cpp \
|
||||||
|
src/map/mercator.cpp \
|
||||||
|
src/map/transversemercator.cpp \
|
||||||
|
src/map/utm.cpp \
|
||||||
|
src/map/lambertconic.cpp \
|
||||||
|
src/map/albersequal.cpp \
|
||||||
|
src/map/lambertazimuthal.cpp \
|
||||||
|
src/map/geotiff.cpp \
|
||||||
|
src/map/pcs.cpp \
|
||||||
|
src/map/transform.cpp \
|
||||||
|
src/map/mapfile.cpp \
|
||||||
|
src/map/tifffile.cpp \
|
||||||
|
src/data/data.cpp \
|
||||||
|
src/data/poi.cpp \
|
||||||
|
src/data/track.cpp \
|
||||||
|
src/data/route.cpp \
|
||||||
|
src/data/path.cpp \
|
||||||
|
src/data/gpxparser.cpp \
|
||||||
|
src/data/tcxparser.cpp \
|
||||||
|
src/data/csvparser.cpp \
|
||||||
|
src/data/kmlparser.cpp \
|
||||||
|
src/data/fitparser.cpp \
|
||||||
|
src/data/igcparser.cpp \
|
||||||
|
src/data/nmeaparser.cpp \
|
||||||
|
src/map/projection.cpp \
|
||||||
|
src/map/gcs.cpp \
|
||||||
|
src/map/angularunits.cpp \
|
||||||
|
src/map/primemeridian.cpp \
|
||||||
|
src/map/linearunits.cpp \
|
||||||
|
src/map/mapsource.cpp
|
||||||
RESOURCES += gpxsee.qrc
|
RESOURCES += gpxsee.qrc
|
||||||
TRANSLATIONS = lang/gpxsee_cs.ts
|
TRANSLATIONS = lang/gpxsee_cs.ts \
|
||||||
macx:ICON = icons/gpxsee.icns
|
lang/gpxsee_sv.ts \
|
||||||
win32:RC_FILE = gpxsee.rc
|
lang/gpxsee_de.ts \
|
||||||
|
lang/gpxsee_ru.ts \
|
||||||
|
lang/gpxsee_fi.ts \
|
||||||
|
lang/gpxsee_fr.ts
|
||||||
|
macx {
|
||||||
|
ICON = icons/gpxsee.icns
|
||||||
|
QMAKE_INFO_PLIST = pkg/Info.plist
|
||||||
|
LOCALE.path = Contents/Resources/translations
|
||||||
|
LOCALE.files = lang/gpxsee_cs.qm \
|
||||||
|
lang/gpxsee_de.qm \
|
||||||
|
lang/gpxsee_fi.qm \
|
||||||
|
lang/gpxsee_fr.qm \
|
||||||
|
lang/gpxsee_ru.qm \
|
||||||
|
lang/gpxsee_sv.qm
|
||||||
|
CSV.path = Contents/Resources
|
||||||
|
CSV.files = pkg/csv
|
||||||
|
MAPS.path = Contents/Resources
|
||||||
|
MAPS.files = pkg/maps
|
||||||
|
ICONS.path = Contents/Resources/icons
|
||||||
|
ICONS.files = icons/tcx.icns \
|
||||||
|
icons/kml.icns \
|
||||||
|
icons/fit.icns \
|
||||||
|
icons/igc.icns \
|
||||||
|
icons/nmea.icns
|
||||||
|
QMAKE_BUNDLE_DATA += LOCALE MAPS ICONS CSV
|
||||||
|
}
|
||||||
|
win32 {
|
||||||
|
RC_ICONS = icons/gpxsee.ico \
|
||||||
|
icons/gpx.ico \
|
||||||
|
icons/tcx.ico \
|
||||||
|
icons/kml.ico \
|
||||||
|
icons/fit.ico \
|
||||||
|
icons/igc.ico \
|
||||||
|
icons/nmea.ico
|
||||||
|
}
|
||||||
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||||
|
13
gpxsee.qrc
@ -2,8 +2,8 @@
|
|||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>icons/dialog-close.png</file>
|
<file>icons/dialog-close.png</file>
|
||||||
<file>icons/document-open.png</file>
|
<file>icons/document-open.png</file>
|
||||||
<file>icons/document-save-as.png</file>
|
<file>icons/document-print.png</file>
|
||||||
<file>icons/document-save.png</file>
|
<file>icons/document-export.png</file>
|
||||||
<file>icons/flag.png</file>
|
<file>icons/flag.png</file>
|
||||||
<file>icons/gpxsee.png</file>
|
<file>icons/gpxsee.png</file>
|
||||||
<file>icons/application-exit.png</file>
|
<file>icons/application-exit.png</file>
|
||||||
@ -13,7 +13,12 @@
|
|||||||
<file>icons/arrow-right.png</file>
|
<file>icons/arrow-right.png</file>
|
||||||
<file>icons/arrow-left-double.png</file>
|
<file>icons/arrow-left-double.png</file>
|
||||||
<file>icons/arrow-right-double.png</file>
|
<file>icons/arrow-right-double.png</file>
|
||||||
<file>lang/gpxsee_cs.qm</file>
|
<file>icons/view-fullscreen.png</file>
|
||||||
<file>maps.txt</file>
|
<file>icons/office-chart-line.png</file>
|
||||||
|
<file>icons/preferences-desktop-display.png</file>
|
||||||
|
<file>icons/flag_48.png</file>
|
||||||
|
<file>icons/system-run.png</file>
|
||||||
|
<file>icons/document-print-preview.png</file>
|
||||||
|
<file>icons/view-filter.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
icons/document-export.png
Normal file
After Width: | Height: | Size: 865 B |
BIN
icons/document-print-preview.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
icons/document-print.png
Normal file
After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 798 B |
BIN
icons/fit.icns
Normal file
BIN
icons/fit.ico
Normal file
After Width: | Height: | Size: 361 KiB |
171
icons/fit.svg
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
id="svg3390"
|
||||||
|
height="185"
|
||||||
|
width="185"
|
||||||
|
inkscape:version="0.91 r13725"
|
||||||
|
sodipodi:docname="fit.svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1440"
|
||||||
|
inkscape:window-height="815"
|
||||||
|
id="namedview3427"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="3.1351351"
|
||||||
|
inkscape:cx="92.5"
|
||||||
|
inkscape:cy="92.5"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg3390" />
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
|
||||||
|
id="path3392"
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
|
||||||
|
<rect
|
||||||
|
y="124.9782"
|
||||||
|
x="16.573463"
|
||||||
|
height="49.84631"
|
||||||
|
width="120.3215"
|
||||||
|
id="rect3426"
|
||||||
|
style="fill:#006600;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<g
|
||||||
|
id="g3828"
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3717"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3719"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
id="polyline3721" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3725"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3727"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3731"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3733"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3737"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3739"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3743"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3745"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3749"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3751"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
transform="scale(0.9437456,1.0596076)"
|
||||||
|
id="text3921"
|
||||||
|
y="155.86783"
|
||||||
|
x="44.388157"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:linespacing="100%"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan3429"
|
||||||
|
x="44.388157"
|
||||||
|
y="155.86783">FIT</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
BIN
icons/flag_48.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
icons/gpx.icns
Normal file
BIN
icons/gpx.ico
Normal file
After Width: | Height: | Size: 361 KiB |
146
icons/gpx.svg
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
version="1.1"
|
||||||
|
id="svg3390"
|
||||||
|
height="185"
|
||||||
|
width="185">
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
|
||||||
|
id="path3392"
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
|
||||||
|
<rect
|
||||||
|
y="124.9782"
|
||||||
|
x="16.573463"
|
||||||
|
height="49.84631"
|
||||||
|
width="120.3215"
|
||||||
|
id="rect3426"
|
||||||
|
style="fill:#003399;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<g
|
||||||
|
id="g3828"
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3717"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3719"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
id="polyline3721" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3725"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3727"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3731"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3733"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3737"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3739"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3743"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3745"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3749"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3751"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
transform="scale(0.9437456,1.0596076)"
|
||||||
|
id="text3921"
|
||||||
|
y="155.86783"
|
||||||
|
x="31.672857"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
y="155.86783"
|
||||||
|
x="31.672857"
|
||||||
|
id="tspan3923"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start">GPX</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
BIN
icons/igc.icns
Normal file
BIN
icons/igc.ico
Normal file
After Width: | Height: | Size: 361 KiB |
145
icons/igc.svg
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="185"
|
||||||
|
height="185"
|
||||||
|
id="svg3390"
|
||||||
|
version="1.1">
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
|
||||||
|
id="path3392"
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ff3300;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect3426"
|
||||||
|
width="120.3215"
|
||||||
|
height="49.84631"
|
||||||
|
x="16.573463"
|
||||||
|
y="124.9782" />
|
||||||
|
<g
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
|
||||||
|
id="g3828">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3717"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3719"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
id="polyline3721"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3725"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3727"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3731"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3733"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3737"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3739"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3743"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3745"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3749"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3751"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="40.149723"
|
||||||
|
y="155.86783"
|
||||||
|
id="text3921"
|
||||||
|
transform="scale(0.9437456,1.0596076)"><tspan
|
||||||
|
y="155.86783"
|
||||||
|
x="40.149723"
|
||||||
|
id="tspan3448">IGC</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/kml.icns
Normal file
BIN
icons/kml.ico
Normal file
After Width: | Height: | Size: 361 KiB |
143
icons/kml.svg
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="185"
|
||||||
|
height="185"
|
||||||
|
id="svg3390"
|
||||||
|
version="1.1">
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
|
||||||
|
id="path3392"
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
|
||||||
|
<rect
|
||||||
|
style="fill:#990000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect3426"
|
||||||
|
width="120.3215"
|
||||||
|
height="49.84631"
|
||||||
|
x="16.573463"
|
||||||
|
y="124.9782" />
|
||||||
|
<g
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
|
||||||
|
id="g3828">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3717"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3719"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
id="polyline3721"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3725"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3727"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3731"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3733"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3737"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3739"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3743"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3745"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3749"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3751"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||||
|
x="31.672857"
|
||||||
|
y="155.86783"
|
||||||
|
id="text3921"
|
||||||
|
transform="scale(0.9437456,1.0596076)"><tspan
|
||||||
|
id="tspan3429">KML</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/nmea.icns
Normal file
BIN
icons/nmea.ico
Normal file
After Width: | Height: | Size: 361 KiB |
145
icons/nmea.svg
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
version="1.1"
|
||||||
|
id="svg3390"
|
||||||
|
height="185"
|
||||||
|
width="185">
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
|
||||||
|
id="path3392"
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
|
||||||
|
<rect
|
||||||
|
y="124.9782"
|
||||||
|
x="16.573463"
|
||||||
|
height="49.84631"
|
||||||
|
width="131.6837"
|
||||||
|
id="rect3426"
|
||||||
|
style="fill:#0083d7;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
<g
|
||||||
|
id="g3828"
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3717"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
|
||||||
|
cx="113"
|
||||||
|
cy="90.875"
|
||||||
|
id="ellipse3719"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
id="polyline3721" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3725"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="73.5"
|
||||||
|
cy="125.854"
|
||||||
|
id="ellipse3727"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3731"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="136.5"
|
||||||
|
cy="172.375"
|
||||||
|
id="ellipse3733"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3737"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="60.700001"
|
||||||
|
cy="186.39999"
|
||||||
|
id="ellipse3739"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3743"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="154.5"
|
||||||
|
cy="154.354"
|
||||||
|
id="ellipse3745"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
style="fill:#000000"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3749"
|
||||||
|
r="7.0209999" />
|
||||||
|
<circle
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
|
||||||
|
cx="96"
|
||||||
|
cy="151.875"
|
||||||
|
id="ellipse3751"
|
||||||
|
r="7.0209999" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
transform="scale(0.9437456,1.0596076)"
|
||||||
|
id="text3921"
|
||||||
|
y="155.86783"
|
||||||
|
x="21.076782"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
y="155.86783"
|
||||||
|
x="21.076782"
|
||||||
|
id="tspan3429">NMEA</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/office-chart-line.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
icons/preferences-desktop-display.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
icons/system-run.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
icons/tcx.icns
Normal file
BIN
icons/tcx.ico
Normal file
After Width: | Height: | Size: 361 KiB |
145
icons/tcx.svg
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="185"
|
||||||
|
height="185"
|
||||||
|
id="svg3390"
|
||||||
|
version="1.1">
|
||||||
|
<metadata
|
||||||
|
id="metadata3404">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs3402" />
|
||||||
|
<path
|
||||||
|
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
|
||||||
|
id="path3392"
|
||||||
|
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
|
||||||
|
<rect
|
||||||
|
style="fill:#ffcc00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="rect3426"
|
||||||
|
width="120.3215"
|
||||||
|
height="49.84631"
|
||||||
|
x="16.573463"
|
||||||
|
y="124.9782" />
|
||||||
|
<g
|
||||||
|
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
|
||||||
|
id="g3828">
|
||||||
|
<g
|
||||||
|
id="g3715">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3717"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3719"
|
||||||
|
cy="90.875"
|
||||||
|
cx="113"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
|
||||||
|
</g>
|
||||||
|
<polyline
|
||||||
|
id="polyline3721"
|
||||||
|
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
|
||||||
|
<g
|
||||||
|
id="g3723">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3725"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3727"
|
||||||
|
cy="125.854"
|
||||||
|
cx="73.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3729">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3731"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3733"
|
||||||
|
cy="172.375"
|
||||||
|
cx="136.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3735">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3737"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3739"
|
||||||
|
cy="186.39999"
|
||||||
|
cx="60.700001"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3741">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3743"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3745"
|
||||||
|
cy="154.354"
|
||||||
|
cx="154.5"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g3747">
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3749"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:#000000" />
|
||||||
|
<circle
|
||||||
|
r="7.0209999"
|
||||||
|
id="ellipse3751"
|
||||||
|
cy="151.875"
|
||||||
|
cx="96"
|
||||||
|
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
x="35.911289"
|
||||||
|
y="155.86783"
|
||||||
|
id="text3921"
|
||||||
|
transform="scale(0.9437456,1.0596076)"><tspan
|
||||||
|
y="155.86783"
|
||||||
|
x="35.911289"
|
||||||
|
id="tspan3429">TCX</tspan></text>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/view-filter.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
icons/view-fullscreen.png
Normal file
After Width: | Height: | Size: 381 B |
1516
lang/gpxsee_cs.ts
1501
lang/gpxsee_de.ts
Normal file
1501
lang/gpxsee_fi.ts
Normal file
1501
lang/gpxsee_fr.ts
Normal file
1502
lang/gpxsee_ru.ts
Normal file
1501
lang/gpxsee_sv.ts
Normal file
2
maps.txt
@ -1,2 +0,0 @@
|
|||||||
Thunderforest http://tile.thunderforest.com/outdoors/$z/$x/$y.png
|
|
||||||
Open Street Map http://tile.openstreetmap.org/$z/$x/$y.png
|
|
251
pkg/Info.plist
Normal file
@ -0,0 +1,251 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>@ICON@</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>@SHORT_VERSION@</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>@EXECUTABLE@</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.gpxsee.GPXSee</string>
|
||||||
|
|
||||||
|
<key>CFBundleDocumentTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>gpx</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/gpx+xml</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/gpx.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>GPS Exchange Format</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>tcx</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/tcx+xml</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/tcx.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>Training Center XML</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>kml</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/vnd.google-earth.kml+xml</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/kml.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>Keyhole Markup Language</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>fit</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/vnd.ant.fit</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/fit.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>Flexible and Interoperable Data Transfer</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>igc</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/vnd.fai.igc</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/igc.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>Flight Recorder Data Format</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>nmea</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeMIMETypes</key>
|
||||||
|
<array>
|
||||||
|
<string>application/vnd.nmea.nmea</string>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleTypeIconFile</key>
|
||||||
|
<string>icons/nmea.icns</string>
|
||||||
|
<key>CFBundleTypeName</key>
|
||||||
|
<string>NMEA 0183 data</string>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Viewer</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
<key>UTImportedTypeDeclarations</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>com.topografix.gpx</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www.topografix.com/GPX/1/1</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>GPS Exchange Format</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.xml</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>gpx</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/gpx+xml</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>com.garmin.tcx</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>Training Center XML</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.xml</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>tcx</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/tcx+xml</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>com.google.kml</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>https://developers.google.com/kml/documentation/kmlreference</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>Keyhole Markup Language</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.xml</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>kml</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/vnd.google-earth.kml+xml</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>com.thisisant.fit</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>https://www.thisisant.com/resources/fit</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>Flexible and Interoperable Data Transfer</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.data</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>fit</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/vnd.ant.fit</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>org.fai.igc</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www.fai.org/gnss-recording-devices/igc-approved-flight-recorders</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>Flight Recorder Data Format</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.data</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>igc</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/vnd.fai.igc</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>UTTypeIdentifier</key>
|
||||||
|
<string>org.nmea.nmea</string>
|
||||||
|
<key>UTTypeReferenceURL</key>
|
||||||
|
<string>http://www.nmea.org/content/nmea_standards/nmea_0183_v_410.asp</string>
|
||||||
|
<key>UTTypeDescription</key>
|
||||||
|
<string>NMEA 0183 data</string>
|
||||||
|
<key>UTTypeConformsTo</key>
|
||||||
|
<array>
|
||||||
|
<string>public.data</string>
|
||||||
|
</array>
|
||||||
|
<key>UTTypeTagSpecification</key>
|
||||||
|
<dict>
|
||||||
|
<key>public.filename-extension</key>
|
||||||
|
<array>
|
||||||
|
<string>nmea</string>
|
||||||
|
</array>
|
||||||
|
<key>public.mime-type</key>
|
||||||
|
<string>application/vnd.nmea.nmea</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
|
||||||
|
</dict>
|
||||||
|
</plist>
|
19
pkg/csv/ellipsoids.csv
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Airy 1830,7001,6377563.396,299.3249646
|
||||||
|
Modified Airy,7002,6377340.189,299.3249646
|
||||||
|
Australian National,7003,6378160.0,298.25
|
||||||
|
Bessel 1841,7004,6377397.155,299.1528128
|
||||||
|
Bessel 1841 (Norway),7005,6377492.0176,299.1528
|
||||||
|
Clarke 1866,7008,6378206.4,294.9786982
|
||||||
|
Clarke 1880 (Palestine),7010,6378300.789,293.466
|
||||||
|
Clarke 1880 (IGN),7011,6378249.2,293.466021
|
||||||
|
Clarke 1880,7012,6378249.145,293.465
|
||||||
|
Everest 1830 (1937 Adjustment),7015,6377276.345,300.8017
|
||||||
|
Everest 1830 Modified,7018,6377304.063,300.8017
|
||||||
|
GRS 80,7019,6378137.0,298.257222101
|
||||||
|
Helmert 1906,7020,6378200.0,298.3
|
||||||
|
International 1924,7022,6378388.0,297.0
|
||||||
|
Krassovsky 1940,7024,6378245.0,298.3
|
||||||
|
South American 1969,7036,6378160.0,298.25
|
||||||
|
WGS 72,7043,6378135.0,298.26
|
||||||
|
Bessel 1841 (Namibia),7046,6377483.865,299.1528128
|
||||||
|
Hough 1960,7053,6378270.0,297.0
|
|
121
pkg/csv/gcs.csv
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
Adindan,4201,6201,9122,7012,8901,9603,-162,-12,206
|
||||||
|
Afgooye,4205,6205,9122,7024,8901,9603,-43,-163,45
|
||||||
|
Ain el Abd 1970,4204,6204,9122,7022,8901,9603,-150,-251,-2
|
||||||
|
Anna 1 Astro 1965,4708,6708,9122,7003,8901,9603,-491,-22,435
|
||||||
|
Arc 1950,4209,6209,9122,7012,8901,9603,-143,-90,-294
|
||||||
|
Arc 1960,4210,6210,9122,7012,8901,9603,-160,-8,-300
|
||||||
|
Ascension Island 1958,4712,6712,9122,7022,8901,9603,-207,107,52
|
||||||
|
Astro B4 Sorol Atoll,4707,6707,9122,7022,8901,9603,114,-116,-333
|
||||||
|
Astro Beacon 1945,4709,6709,9122,7022,8901,9603,145,75,-272
|
||||||
|
Astro DOS 71/4,4710,6710,9122,7022,8901,9603,-320,550,-494
|
||||||
|
Astronomic Stn 1952,4711,6711,9122,7022,8901,9603,124,-234,-25
|
||||||
|
Australian Geodetic 1966,4202,6202,9122,7003,8901,9603,-133,-48,148
|
||||||
|
Australian Geodetic 1984,4203,6203,9122,7003,8901,9603,-134,-48,149
|
||||||
|
Australian Geocentric 1994 (GDA94),4283,6283,9122,7019,8901,9603,0,0,0
|
||||||
|
Austrian,4312,6312,9122,7004,8901,9603,594,84,471
|
||||||
|
Bellevue (IGN),4714,6714,9122,7022,8901,9603,-127,-769,472
|
||||||
|
Bermuda 1957,4216,6216,9122,7008,8901,9603,-73,213,296
|
||||||
|
Bogota Observatory,4218,6218,9122,7022,8901,9603,307,304,-318
|
||||||
|
Campo Inchauspe,4221,6221,9122,7022,8901,9603,-148,136,90
|
||||||
|
Canton Astro 1966,4716,6716,9122,7022,8901,9603,298,-304,-375
|
||||||
|
Cape,4222,6222,9122,7012,8901,9603,-136,-108,-292
|
||||||
|
Cape Canaveral,4717,6717,9122,7008,8901,9603,-2,150,181
|
||||||
|
Carthage,4223,6223,9122,7012,8901,9603,-263,6,431
|
||||||
|
CH-1903,4149,6149,9122,7004,8901,9603,674,15,405
|
||||||
|
Chatham 1971,4672,6672,9122,7022,8901,9603,175,-38,113
|
||||||
|
Chua Astro,4224,6224,9122,7022,8901,9603,-134,229,-29
|
||||||
|
Corrego Alegre,4225,6225,9122,7022,8901,9603,-206,172,-6
|
||||||
|
Djakarta (Batavia),4211,6211,9122,7004,8901,9603,-377,681,-50
|
||||||
|
DOS 1968,,,9122,7022,8901,9603,230,-199,-752
|
||||||
|
Easter Island 1967,4719,6719,9122,7022,8901,9603,211,147,111
|
||||||
|
Egypt,4199,6199,9122,7022,8901,9603,-130,-117,-151
|
||||||
|
European 1950,4230,6230,9122,7022,8901,9603,-87,-98,-121
|
||||||
|
European 1950 (Mean France),,,9122,7022,8901,9603,-87,-96,-120
|
||||||
|
European 1950 (Spain and Portugal),,,9122,7022,8901,9603,-84,-107,-120
|
||||||
|
European 1979,4668,6668,9122,7022,8901,9603,-86,-98,-119
|
||||||
|
Finland Hayford,4123,6123,9122,7022,8901,9603,-78,-231,-97
|
||||||
|
Gandajika Base,4233,6233,9122,7022,8901,9603,-133,-321,50
|
||||||
|
Geodetic Datum 1949,4272,6272,9122,7022,8901,9603,84,-22,209
|
||||||
|
GGRS 87,4121,6121,9122,7019,8901,9603,-199.87,74.79,246.62
|
||||||
|
Guam 1963,4675,6675,9122,7008,8901,9603,-100,-248,259
|
||||||
|
GUX 1 Astro,4718,6718,9122,7022,8901,9603,252,-209,-751
|
||||||
|
Hartebeeshoek94,4148,6148,9122,7030,8901,9603,0,0,0
|
||||||
|
Hermannskogel,3906,1031,9122,7004,8901,9603,653,-212,449
|
||||||
|
Hjorsey 1955,4658,6658,9122,7022,8901,9603,-73,46,-86
|
||||||
|
Hong Kong 1963,4739,6739,9122,7022,8901,9603,-156,-271,-189
|
||||||
|
Hu-Tzu-Shan,4236,6236,9122,7022,8901,9603,-634,-549,-201
|
||||||
|
Indian Bangladesh,4682,6682,9122,7015,8901,9603,289,734,257
|
||||||
|
Indian Thailand,4240,6240,9122,7015,8901,9603,214,836,303
|
||||||
|
Israeli,4281,6281,9122,7010,8901,9603,-235,-85,264
|
||||||
|
Ireland 1965,4299,6299,9122,7002,8901,9603,506,-122,611
|
||||||
|
ISTS 073 Astro 1969,4724,6724,9122,7022,8901,9603,208,-435,-229
|
||||||
|
Johnston Island,4725,6725,9122,7022,8901,9603,191,-77,-204
|
||||||
|
Kandawala,4244,6244,9122,7015,8901,9603,-97,787,86
|
||||||
|
Kerguelen Island,4698,6698,9122,7022,8901,9603,145,-187,103
|
||||||
|
Kertau 1948,4245,6245,9122,7018,8901,9603,-11,851,5
|
||||||
|
L.C. 5 Astro,4726,6726,9122,7008,8901,9603,42,124,147
|
||||||
|
Liberia 1964,4251,6251,9122,7012,8901,9603,-90,40,88
|
||||||
|
Luzon Mindanao,,,9122,7008,8901,9603,-133,-79,-72
|
||||||
|
Luzon Philippines,4253,6253,9122,7008,8901,9603,-133,-77,-51
|
||||||
|
Mahe 1971,4256,6256,9122,7012,8901,9603,41,-220,-134
|
||||||
|
Marco Astro,4616,6616,9122,7022,8901,9603,-289,-124,60
|
||||||
|
Massawa,4262,6262,9122,7004,8901,9603,639,405,60
|
||||||
|
Merchich,4261,6261,9122,7012,8901,9603,31,146,47
|
||||||
|
Midway Astro 1961,4727,6727,9122,7022,8901,9603,912,-58,1227
|
||||||
|
Minna,4263,6263,9122,7012,8901,9603,-92,-93,122
|
||||||
|
NAD27 Alaska,,,9122,7008,8901,9603,-5,135,172
|
||||||
|
NAD27 Bahamas,,,9122,7008,8901,9603,-4,154,178
|
||||||
|
NAD27 Canada,,,9122,7008,8901,9603,-10,158,187
|
||||||
|
NAD27 Canal Zone,,,9122,7008,8901,9603,0,125,201
|
||||||
|
NAD27 Caribbean,,,9122,7008,8901,9603,-3,142,183
|
||||||
|
NAD27 Central,,,9122,7008,8901,9603,0,125,194
|
||||||
|
NAD27 CONUS,4267,6267,9122,7008,8901,9603,-8,160,176
|
||||||
|
NAD27 Cuba,,,9122,7008,8901,9603,-9,152,178
|
||||||
|
NAD27 Greenland,,,9122,7008,8901,9603,11,114,195
|
||||||
|
NAD27 Mexico,,,9122,7008,8901,9603,-12,130,190
|
||||||
|
NAD27 San Salvador,,,9122,7008,8901,9603,1,140,165
|
||||||
|
NAD83,4269,6269,9122,7019,8901,9603,0,0,0
|
||||||
|
Nahrwn Masirah Ilnd,,,9122,7012,8901,9603,-247,-148,369
|
||||||
|
Nahrwn Saudi Arbia,,,9122,7012,8901,9603,-231,-196,482
|
||||||
|
Nahrwn United Arab,4270,6270,9122,7012,8901,9603,-249,-156,381
|
||||||
|
Naparima BWI,4271,6271,9122,7022,8901,9603,-2,374,172
|
||||||
|
NGO1948,4273,6273,9122,7005,8901,9603,315,-217,528
|
||||||
|
NTF France,4275,6275,9122,7011,8901,9603,-168,-60,320
|
||||||
|
Norsk,4817,6817,9122,7005,8913,9603,278,93,474
|
||||||
|
NZGD1949,4272,6272,9122,7022,8901,9603,84,-22,209
|
||||||
|
NZGD2000,4167,6167,9122,7030,8901,9603,0,0,0
|
||||||
|
Observatorio 1966,4182,6182,9122,7022,8901,9603,-425,-169,81
|
||||||
|
Old Egyptian,4229,6229,9122,7020,8901,9603,-130,110,-13
|
||||||
|
Old Hawaiian,4135,6135,9122,7008,8901,9603,61,-285,-181
|
||||||
|
Oman,4232,6232,9122,7012,8901,9603,-346,-1,224
|
||||||
|
Ord Srvy Grt Britn,4277,6277,9122,7001,8901,9603,375,-111,431
|
||||||
|
Pico De Las Nieves,4728,6728,9122,7022,8901,9603,-307,-92,127
|
||||||
|
Pitcairn Astro 1967,4729,6729,9122,7022,8901,9603,185,165,42
|
||||||
|
Potsdam Rauenberg DHDN,4314,6314,9122,7004,8901,9603,606,23,413
|
||||||
|
Prov So Amrican 1956,4248,6248,9122,7022,8901,9603,-288,175,-376
|
||||||
|
Prov So Chilean 1963,4254,6254,9122,7022,8901,9603,16,196,93
|
||||||
|
Puerto Rico,4139,6139,9122,7008,8901,9603,11,72,-101
|
||||||
|
Pulkovo 1942 (1),4284,6284,9122,7024,8901,9603,28,-130,-95
|
||||||
|
Pulkovo 1942 (2),,,9122,7024,8901,9603,28,-130,-95
|
||||||
|
Qatar National,4285,6285,9122,7022,8901,9603,-128,-283,22
|
||||||
|
Qornoq,4287,6287,9108,7022,8901,9603,164,138,-189
|
||||||
|
Reunion,4626,6626,9122,7022,8901,9603,94,-948,-1262
|
||||||
|
Rijksdriehoeksmeting,4289,6289,9122,7004,8901,9603,593,26,478
|
||||||
|
Rome 1940,4806,6806,9122,7022,8906,9603,-225,-65,9
|
||||||
|
RT 90,4124,6124,9122,7004,8901,9603,498,-36,568
|
||||||
|
S42,4179,6179,9122,7024,8901,9603,28,-121,-77
|
||||||
|
Santo (DOS),4730,6730,9122,7022,8901,9603,170,42,84
|
||||||
|
Sao Braz,4184,6184,9122,7022,8901,9603,-203,141,53
|
||||||
|
Sapper Hill 1943,4292,6292,9122,7022,8901,9603,-355,16,74
|
||||||
|
Schwarzeck,4293,6293,9122,7046,8901,9603,616,97,-251
|
||||||
|
South American 1969,4291,6291,9108,7036,8901,9603,-57,1,-41
|
||||||
|
Southeast Base,4615,6615,9122,7022,8901,9603,-499,-249,314
|
||||||
|
Southwest Base,4183,6183,9122,7022,8901,9603,-104,167,-38
|
||||||
|
Timbalai 1948,4298,6298,9122,7015,8901,9603,-689,691,-46
|
||||||
|
Tokyo,4301,6301,9122,7004,8901,9603,-128,481,664
|
||||||
|
Tristan Astro 1968,4734,6734,9122,7022,8901,9603,-632,438,-609
|
||||||
|
Viti Levu 1916,4731,6731,9122,7012,8901,9603,51,391,-36
|
||||||
|
Wake-Eniwetok 1960,4732,6732,9122,7053,8901,9603,101,52,-39
|
||||||
|
WGS 72,4322,6322,9122,7043,8901,9603,0,0,5
|
||||||
|
Yacare,4309,6309,9122,7022,8901,9603,-155,171,37
|
||||||
|
Zanderij,4311,6311,9122,7022,8901,9603,-265,120,-358
|
|
1626
pkg/csv/pcs.csv
Normal file
12
pkg/gpxsee.desktop
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=GPXSee
|
||||||
|
Comment=GPS log file viewer and analyzer
|
||||||
|
Comment[cz]=Prohlížeč a analyzátor GPS logů
|
||||||
|
Comment[fi]=Ohjelma GPS-lokien katseluun ja analysointiin
|
||||||
|
Comment[ru]=Программа для просмотра и анализа GPS логов
|
||||||
|
Exec=gpxsee %F
|
||||||
|
Icon=gpxsee
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Graphics;Viewer;Maps;Qt;
|
||||||
|
MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;
|
291
pkg/gpxsee.nsi
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
!include "MUI2.nsh"
|
||||||
|
!include "x64.nsh"
|
||||||
|
!include "WinVer.nsh"
|
||||||
|
|
||||||
|
; The name of the installer
|
||||||
|
Name "GPXSee"
|
||||||
|
; Program version
|
||||||
|
!define VERSION "5.0"
|
||||||
|
|
||||||
|
; The file to write
|
||||||
|
OutFile "GPXSee-${VERSION}.exe"
|
||||||
|
; Compression method
|
||||||
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
|
; Required execution level
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
|
; The default installation directory
|
||||||
|
InstallDir "$PROGRAMFILES\GPXSee"
|
||||||
|
|
||||||
|
; Installer executable info
|
||||||
|
VIProductVersion "${VERSION}.0.0"
|
||||||
|
VIAddVersionKey "ProductVersion" ${VERSION}
|
||||||
|
VIAddVersionKey "FileVersion" "${VERSION}.0.0"
|
||||||
|
VIAddVersionKey "ProductName" "GPXSee"
|
||||||
|
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
||||||
|
VIAddVersionKey "FileDescription" "GPXSee installer"
|
||||||
|
|
||||||
|
; Registry key to check for directory (so if you install again, it will
|
||||||
|
; overwrite the old one automatically)
|
||||||
|
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
||||||
|
|
||||||
|
; Registry key for uninstaller
|
||||||
|
!define REGENTRY "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPXSee"
|
||||||
|
; File types registry entries
|
||||||
|
!define REGGPX "GPXSee.gpx"
|
||||||
|
!define REGTCX "GPXSee.tcx"
|
||||||
|
!define REGKML "GPXSee.kml"
|
||||||
|
!define REGFIT "GPXSee.fit"
|
||||||
|
!define REGIGC "GPXSee.igc"
|
||||||
|
!define REGNMEA "GPXSee.nmea"
|
||||||
|
|
||||||
|
; Start menu page configuration
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
||||||
|
|
||||||
|
Var StartMenuFolder
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Pages
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "licence.txt"
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Languages
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
${IfNot} ${AtLeastWin7}
|
||||||
|
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
; The stuff to install
|
||||||
|
Section "GPXSee" SEC_APP
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
; Set output path to the installation directory.
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
|
; Put the files there
|
||||||
|
File "gpxsee.exe"
|
||||||
|
File /r "maps"
|
||||||
|
File /r "csv"
|
||||||
|
|
||||||
|
; Create start menu entry and add links
|
||||||
|
SetShellVarContext all
|
||||||
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
||||||
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
|
|
||||||
|
; Create the uninstaller
|
||||||
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
|
; Write the installation path into the registry
|
||||||
|
DetailPrint "Registering application..."
|
||||||
|
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
|
||||||
|
|
||||||
|
; Write the uninstall keys for Windows
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "DisplayName" "GPXSee"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tuma"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "${VERSION}"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegDWORD HKLM "${REGENTRY}" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "${REGENTRY}" "NoRepair" 1
|
||||||
|
|
||||||
|
; Associate file formats
|
||||||
|
DetailPrint "Associating file types..."
|
||||||
|
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
||||||
|
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
|
||||||
|
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
|
||||||
|
WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
||||||
|
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
|
||||||
|
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
|
||||||
|
WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
||||||
|
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
|
||||||
|
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
|
||||||
|
WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
||||||
|
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
|
||||||
|
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
|
||||||
|
WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
||||||
|
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
|
||||||
|
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
|
||||||
|
WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "QT framework" SEC_QT
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
File "Qt5Core.dll"
|
||||||
|
File "Qt5Gui.dll"
|
||||||
|
File "Qt5Widgets.dll"
|
||||||
|
File "Qt5PrintSupport.dll"
|
||||||
|
File "Qt5Network.dll"
|
||||||
|
File /r "platforms"
|
||||||
|
File /r "imageformats"
|
||||||
|
File /r "printsupport"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "MSVC runtime" SEC_MSVC
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
DetailPrint "Checking whether Visual C++ 2015 Redistributable is already installed..."
|
||||||
|
${If} ${RunningX64}
|
||||||
|
ReadRegDword $R0 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" "Installed"
|
||||||
|
${Else}
|
||||||
|
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86" "Installed"
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
StrCmp $R0 "1" 0 +3
|
||||||
|
DetailPrint "Visual C++ 2015 Redistributable is already installed, skipping install."
|
||||||
|
Goto done
|
||||||
|
|
||||||
|
DetailPrint "Installing Visual C++ 2015 Redistributable..."
|
||||||
|
SetOutPath $TEMP
|
||||||
|
File "vcredist_x86.exe"
|
||||||
|
ExecWait '"$TEMP\vcredist_x86.exe" /install /quiet /norestart'
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
|
done:
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "OpenSSL" SEC_OPENSSL
|
||||||
|
|
||||||
|
File "libeay32.dll"
|
||||||
|
File "ssleay32.dll"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "ANGLE" SEC_ANGLE
|
||||||
|
|
||||||
|
File "libGLESv2.dll"
|
||||||
|
File "libEGL.dll"
|
||||||
|
File "D3DCompiler_47.dll"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
|
Section "Czech"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
||||||
|
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Finnish"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
||||||
|
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "French"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
||||||
|
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "German"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
||||||
|
File /oname=translations\qt_de.qm translations\qt_de.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Russian"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
||||||
|
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Swedish"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
||||||
|
SectionEnd
|
||||||
|
SectionGroupEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Uninstaller
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
|
||||||
|
; Remove registry keys
|
||||||
|
DeleteRegKey HKLM "${REGENTRY}"
|
||||||
|
DeleteRegKey HKLM SOFTWARE\GPXSee
|
||||||
|
|
||||||
|
; Remove directories used
|
||||||
|
RMDir /r "$INSTDIR"
|
||||||
|
|
||||||
|
; Remove Start menu entries
|
||||||
|
SetShellVarContext all
|
||||||
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||||
|
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
|
||||||
|
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
|
||||||
|
; Remove GPX file association
|
||||||
|
DeleteRegKey HKCR "${REGGPX}"
|
||||||
|
DeleteRegKey HKCR ".gpx"
|
||||||
|
DeleteRegKey HKCR "${REGTCX}"
|
||||||
|
DeleteRegKey HKCR ".tcx"
|
||||||
|
DeleteRegKey HKCR "${REGKML}"
|
||||||
|
DeleteRegKey HKCR ".kml"
|
||||||
|
DeleteRegKey HKCR "${REGFIT}"
|
||||||
|
DeleteRegKey HKCR ".fit"
|
||||||
|
DeleteRegKey HKCR "${REGIGC}"
|
||||||
|
DeleteRegKey HKCR ".igc"
|
||||||
|
DeleteRegKey HKCR "${REGNMEA}"
|
||||||
|
DeleteRegKey HKCR ".nmea"
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;-------------------------------
|
||||||
|
|
||||||
|
;Descriptions
|
||||||
|
|
||||||
|
;Language strings
|
||||||
|
LangString DESC_QT ${LANG_ENGLISH} \
|
||||||
|
"QT cross-platform application framework."
|
||||||
|
LangString DESC_MSVC ${LANG_ENGLISH} \
|
||||||
|
"Visual C++ 2015 runtime components. If already installed, will be skipped."
|
||||||
|
LangString DESC_OPENSSL ${LANG_ENGLISH} \
|
||||||
|
"OpenSSL library. Required for HTTPS to work."
|
||||||
|
LangString DESC_ANGLE ${LANG_ENGLISH} \
|
||||||
|
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
||||||
|
LangString DESC_APP ${LANG_ENGLISH} \
|
||||||
|
"GPXSee application"
|
||||||
|
LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||||
|
"Localization"
|
||||||
|
|
||||||
|
;Assign language strings to sections
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QT} $(DESC_QT)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_OPENSSL} $(DESC_OPENSSL)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
46
pkg/gpxsee.xml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||||
|
|
||||||
|
<mime-type type="application/gpx+xml">
|
||||||
|
<comment>GPS Exchange Format</comment>
|
||||||
|
<sub-class-of type="application/xml"/>
|
||||||
|
<generic-icon name="application-xml"/>
|
||||||
|
<glob pattern="*.gpx"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
<mime-type type="application/tcx+xml">
|
||||||
|
<comment>Training Center XML</comment>
|
||||||
|
<sub-class-of type="application/xml"/>
|
||||||
|
<generic-icon name="application-xml"/>
|
||||||
|
<glob pattern="*.tcx"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
<mime-type type="application/kml+xml">
|
||||||
|
<comment>Keyhole Markup Language</comment>
|
||||||
|
<sub-class-of type="application/xml"/>
|
||||||
|
<generic-icon name="application-xml"/>
|
||||||
|
<glob pattern="*.kml"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
<mime-type type="application/vnd.ant.fit">
|
||||||
|
<comment>Flexible and Interoperable Data Transfer</comment>
|
||||||
|
<sub-class-of type="application/octet-stream"/>
|
||||||
|
<generic-icon name="application-octet-stream"/>
|
||||||
|
<glob pattern="*.fit"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
<mime-type type="application/vnd.fai.igc">
|
||||||
|
<comment>Flight Recorder Data Format</comment>
|
||||||
|
<sub-class-of type="text/plain"/>
|
||||||
|
<generic-icon name="text-plain"/>
|
||||||
|
<glob pattern="*.igc"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
<mime-type type="application/vnd.nmea.nmea">
|
||||||
|
<comment>NMEA 0183 data</comment>
|
||||||
|
<sub-class-of type="text/plain"/>
|
||||||
|
<generic-icon name="text-plain"/>
|
||||||
|
<glob pattern="*.nmea"/>
|
||||||
|
</mime-type>
|
||||||
|
|
||||||
|
</mime-info>
|
294
pkg/gpxsee64.nsi
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
!include "MUI2.nsh"
|
||||||
|
!include "x64.nsh"
|
||||||
|
!include "WinVer.nsh"
|
||||||
|
|
||||||
|
; The name of the installer
|
||||||
|
Name "GPXSee"
|
||||||
|
; Program version
|
||||||
|
!define VERSION "5.0"
|
||||||
|
|
||||||
|
; The file to write
|
||||||
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
|
; Compression method
|
||||||
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
|
; Required execution level
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
|
; The default installation directory
|
||||||
|
InstallDir "$PROGRAMFILES64\GPXSee"
|
||||||
|
|
||||||
|
; Installer executable info
|
||||||
|
VIProductVersion "${VERSION}.0.0"
|
||||||
|
VIAddVersionKey "ProductVersion" ${VERSION}
|
||||||
|
VIAddVersionKey "FileVersion" "${VERSION}.0.0"
|
||||||
|
VIAddVersionKey "ProductName" "GPXSee"
|
||||||
|
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
||||||
|
VIAddVersionKey "FileDescription" "GPXSee installer (x64)"
|
||||||
|
|
||||||
|
; Registry key to check for directory (so if you install again, it will
|
||||||
|
; overwrite the old one automatically)
|
||||||
|
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
||||||
|
|
||||||
|
; Registry key for uninstaller
|
||||||
|
!define REGENTRY "Software\Microsoft\Windows\CurrentVersion\Uninstall\GPXSee"
|
||||||
|
; File types registry entries
|
||||||
|
!define REGGPX "GPXSee.gpx"
|
||||||
|
!define REGTCX "GPXSee.tcx"
|
||||||
|
!define REGKML "GPXSee.kml"
|
||||||
|
!define REGFIT "GPXSee.fit"
|
||||||
|
!define REGIGC "GPXSee.igc"
|
||||||
|
!define REGNMEA "GPXSee.nmea"
|
||||||
|
|
||||||
|
; Start menu page configuration
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
||||||
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
||||||
|
|
||||||
|
Var StartMenuFolder
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Pages
|
||||||
|
|
||||||
|
!insertmacro MUI_PAGE_WELCOME
|
||||||
|
!insertmacro MUI_PAGE_LICENSE "licence.txt"
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Languages
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
${IfNot} ${AtLeastWin7}
|
||||||
|
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
${If} ${RunningX64}
|
||||||
|
SetRegView 64
|
||||||
|
${Else}
|
||||||
|
MessageBox MB_OK "The 64b version of GPXSee can not be run on 32b systems."
|
||||||
|
Abort
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
; The stuff to install
|
||||||
|
Section "GPXSee" SEC_APP
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
; Set output path to the installation directory.
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
|
; Put the files there
|
||||||
|
File "gpxsee.exe"
|
||||||
|
File /r "maps"
|
||||||
|
File /r "csv"
|
||||||
|
|
||||||
|
; Create start menu entry and add links
|
||||||
|
SetShellVarContext all
|
||||||
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
||||||
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
|
|
||||||
|
; Create the uninstaller
|
||||||
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
|
; Write the installation path into the registry
|
||||||
|
DetailPrint "Registering application..."
|
||||||
|
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
|
||||||
|
|
||||||
|
; Write the uninstall keys for Windows
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "DisplayName" "GPXSee (x64)"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "Publisher" "Martin Tuma"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "DisplayVersion" "${VERSION}"
|
||||||
|
WriteRegStr HKLM "${REGENTRY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegDWORD HKLM "${REGENTRY}" "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM "${REGENTRY}" "NoRepair" 1
|
||||||
|
|
||||||
|
; Associate file formats
|
||||||
|
DetailPrint "Associating file types..."
|
||||||
|
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
||||||
|
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
|
||||||
|
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
|
||||||
|
WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
||||||
|
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
|
||||||
|
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
|
||||||
|
WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
||||||
|
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
|
||||||
|
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
|
||||||
|
WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
||||||
|
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
|
||||||
|
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
|
||||||
|
WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
||||||
|
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
|
||||||
|
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
|
||||||
|
WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
|
||||||
|
WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
|
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "QT framework" SEC_QT
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
File "Qt5Core.dll"
|
||||||
|
File "Qt5Gui.dll"
|
||||||
|
File "Qt5Widgets.dll"
|
||||||
|
File "Qt5PrintSupport.dll"
|
||||||
|
File "Qt5Network.dll"
|
||||||
|
File /r "platforms"
|
||||||
|
File /r "imageformats"
|
||||||
|
File /r "printsupport"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "MSVC runtime" SEC_MSVC
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
DetailPrint "Checking whether Visual C++ 2015 Redistributable is already installed..."
|
||||||
|
ReadRegDword $R0 HKLM "SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" "Installed"
|
||||||
|
StrCmp $R0 "1" 0 +3
|
||||||
|
DetailPrint "Visual C++ 2015 Redistributable is already installed, skipping install."
|
||||||
|
Goto done
|
||||||
|
|
||||||
|
DetailPrint "Installing Visual C++ 2015 Redistributable..."
|
||||||
|
SetOutPath $TEMP
|
||||||
|
File "vcredist_x64.exe"
|
||||||
|
ExecWait '"$TEMP\vcredist_x64.exe" /install /quiet /norestart'
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
|
done:
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "OpenSSL" SEC_OPENSSL
|
||||||
|
|
||||||
|
File "libeay32.dll"
|
||||||
|
File "ssleay32.dll"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "ANGLE" SEC_ANGLE
|
||||||
|
|
||||||
|
File "libGLESv2.dll"
|
||||||
|
File "libEGL.dll"
|
||||||
|
File "D3DCompiler_47.dll"
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
|
Section "Czech"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
||||||
|
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Finnish"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
||||||
|
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "French"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
||||||
|
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "German"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
||||||
|
File /oname=translations\qt_de.qm translations\qt_de.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Russian"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
||||||
|
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
||||||
|
SectionEnd
|
||||||
|
Section "Swedish"
|
||||||
|
CreateDirectory "$INSTDIR\translations"
|
||||||
|
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
||||||
|
SectionEnd
|
||||||
|
SectionGroupEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Uninstaller
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
|
||||||
|
; Remove registry keys
|
||||||
|
SetRegView 64
|
||||||
|
DeleteRegKey HKLM "${REGENTRY}"
|
||||||
|
DeleteRegKey HKLM SOFTWARE\GPXSee
|
||||||
|
|
||||||
|
; Remove directories used
|
||||||
|
RMDir /r "$INSTDIR"
|
||||||
|
|
||||||
|
; Remove Start menu entries
|
||||||
|
SetShellVarContext all
|
||||||
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||||
|
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
|
||||||
|
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
|
||||||
|
; Remove File associations
|
||||||
|
DeleteRegKey HKCR "${REGGPX}"
|
||||||
|
DeleteRegKey HKCR ".gpx"
|
||||||
|
DeleteRegKey HKCR "${REGTCX}"
|
||||||
|
DeleteRegKey HKCR ".tcx"
|
||||||
|
DeleteRegKey HKCR "${REGKML}"
|
||||||
|
DeleteRegKey HKCR ".kml"
|
||||||
|
DeleteRegKey HKCR "${REGFIT}"
|
||||||
|
DeleteRegKey HKCR ".fit"
|
||||||
|
DeleteRegKey HKCR "${REGIGC}"
|
||||||
|
DeleteRegKey HKCR ".igc"
|
||||||
|
DeleteRegKey HKCR "${REGNMEA}"
|
||||||
|
DeleteRegKey HKCR ".nmea"
|
||||||
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;-------------------------------
|
||||||
|
|
||||||
|
;Descriptions
|
||||||
|
|
||||||
|
;Language strings
|
||||||
|
LangString DESC_QT ${LANG_ENGLISH} \
|
||||||
|
"QT cross-platform application framework."
|
||||||
|
LangString DESC_MSVC ${LANG_ENGLISH} \
|
||||||
|
"Visual C++ 2015 runtime components. If already installed, will be skipped."
|
||||||
|
LangString DESC_OPENSSL ${LANG_ENGLISH} \
|
||||||
|
"OpenSSL library. Required for HTTPS to work."
|
||||||
|
LangString DESC_ANGLE ${LANG_ENGLISH} \
|
||||||
|
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
||||||
|
LangString DESC_APP ${LANG_ENGLISH} \
|
||||||
|
"GPXSee application"
|
||||||
|
LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||||
|
"Localization"
|
||||||
|
|
||||||
|
;Assign language strings to sections
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QT} $(DESC_QT)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_OPENSSL} $(DESC_OPENSSL)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
7
pkg/maps/4UMaps.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map>
|
||||||
|
<name>4UMaps</name>
|
||||||
|
<url>http://4umaps.eu/$z/$x/$y.png</url>
|
||||||
|
<zoom min="2" max="15"/>
|
||||||
|
<bounds bottom="-65"/>
|
||||||
|
</map>
|
5
pkg/maps/OpenStreetMap.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map>
|
||||||
|
<name>Open Street Map</name>
|
||||||
|
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
|
||||||
|
</map>
|
6
pkg/maps/OpenTopoMap.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map>
|
||||||
|
<name>Open Topo Map</name>
|
||||||
|
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
|
||||||
|
<zoom max="17"/>
|
||||||
|
</map>
|
7
pkg/maps/USGS-imagery.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map>
|
||||||
|
<name>USGS Imagery</name>
|
||||||
|
<url>https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y</url>
|
||||||
|
<zoom min="2" max="15"/>
|
||||||
|
<bounds bottom="0" top="74"/>
|
||||||
|
</map>
|
6
pkg/maps/USGS-topo.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<map>
|
||||||
|
<name>USGS Topo</name>
|
||||||
|
<url>https://navigator.er.usgs.gov/tiles/tcr.cgi/$z/$x/$y.png</url>
|
||||||
|
<zoom min="2" max="15"/>
|
||||||
|
</map>
|
111
src/GUI/app.cpp
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
#include <QtGlobal>
|
||||||
|
#include <QTranslator>
|
||||||
|
#include <QLocale>
|
||||||
|
#include <QFileOpenEvent>
|
||||||
|
#include <QNetworkProxyFactory>
|
||||||
|
#include <QLibraryInfo>
|
||||||
|
#include "map/onlinemap.h"
|
||||||
|
#include "map/downloader.h"
|
||||||
|
#include "map/ellipsoid.h"
|
||||||
|
#include "map/gcs.h"
|
||||||
|
#include "map/pcs.h"
|
||||||
|
#include "opengl.h"
|
||||||
|
#include "gui.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
|
|
||||||
|
App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||||
|
_argc(argc), _argv(argv)
|
||||||
|
{
|
||||||
|
QTranslator *gpxsee = new QTranslator(this);
|
||||||
|
gpxsee->load(QLocale::system(), "gpxsee", "_", TRANSLATIONS_DIR);
|
||||||
|
installTranslator(gpxsee);
|
||||||
|
|
||||||
|
QTranslator *qt = new QTranslator(this);
|
||||||
|
#if defined(Q_OS_WINDOWS) || defined(Q_OS_MAC)
|
||||||
|
qt->load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
|
||||||
|
#else // Q_OS_WINDOWS || Q_OS_MAC
|
||||||
|
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||||
|
QLibraryInfo::TranslationsPath));
|
||||||
|
#endif // Q_OS_WINDOWS || Q_OS_MAC
|
||||||
|
installTranslator(qt);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
setAttribute(Qt::AA_DontShowIconsInMenus);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
|
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||||
|
OnlineMap::setDownloader(new Downloader(this));
|
||||||
|
OPENGL_SET_SAMPLES(4);
|
||||||
|
loadDatums();
|
||||||
|
loadPCSs();
|
||||||
|
|
||||||
|
_gui = new GUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
App::~App()
|
||||||
|
{
|
||||||
|
delete _gui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void App::run()
|
||||||
|
{
|
||||||
|
_gui->show();
|
||||||
|
|
||||||
|
for (int i = 1; i < _argc; i++)
|
||||||
|
_gui->openFile(QString::fromLocal8Bit(_argv[i]));
|
||||||
|
|
||||||
|
exec();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool App::event(QEvent *event)
|
||||||
|
{
|
||||||
|
if (event->type() == QEvent::FileOpen) {
|
||||||
|
QFileOpenEvent *e = static_cast<QFileOpenEvent *>(event);
|
||||||
|
return _gui->openFile(e->file());
|
||||||
|
}
|
||||||
|
|
||||||
|
return QApplication::event(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void App::loadDatums()
|
||||||
|
{
|
||||||
|
QString ef, df;
|
||||||
|
|
||||||
|
if (QFile::exists(USER_ELLIPSOID_FILE))
|
||||||
|
ef = USER_ELLIPSOID_FILE;
|
||||||
|
else if (QFile::exists(GLOBAL_ELLIPSOID_FILE))
|
||||||
|
ef = GLOBAL_ELLIPSOID_FILE;
|
||||||
|
else
|
||||||
|
qWarning("No ellipsoids file found.");
|
||||||
|
|
||||||
|
if (QFile::exists(USER_GCS_FILE))
|
||||||
|
df = USER_GCS_FILE;
|
||||||
|
else if (QFile::exists(GLOBAL_GCS_FILE))
|
||||||
|
df = GLOBAL_GCS_FILE;
|
||||||
|
else
|
||||||
|
qWarning("No datums file found.");
|
||||||
|
|
||||||
|
if (!ef.isNull() && !df.isNull()) {
|
||||||
|
Ellipsoid::loadList(ef);
|
||||||
|
GCS::loadList(df);
|
||||||
|
} else
|
||||||
|
qWarning("Maps based on a datum different from WGS84 won't work.");
|
||||||
|
}
|
||||||
|
|
||||||
|
void App::loadPCSs()
|
||||||
|
{
|
||||||
|
QString file;
|
||||||
|
|
||||||
|
if (QFile::exists(USER_PCS_FILE))
|
||||||
|
file = USER_PCS_FILE;
|
||||||
|
else if (QFile::exists(GLOBAL_PCS_FILE))
|
||||||
|
file = GLOBAL_PCS_FILE;
|
||||||
|
else {
|
||||||
|
qWarning("No PCS file found.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PCS::loadList(file);
|
||||||
|
}
|
29
src/GUI/app.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef APP_H
|
||||||
|
#define APP_H
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
class GUI;
|
||||||
|
|
||||||
|
class App : QApplication
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
App(int &argc, char **argv);
|
||||||
|
~App();
|
||||||
|
void run();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool event(QEvent *event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void loadDatums();
|
||||||
|
void loadPCSs();
|
||||||
|
|
||||||
|
int &_argc;
|
||||||
|
char **_argv;
|
||||||
|
GUI *_gui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // APP_H
|
@ -5,6 +5,7 @@
|
|||||||
#include "axisitem.h"
|
#include "axisitem.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define AXIS_WIDTH 1
|
||||||
#define TICK 6
|
#define TICK 6
|
||||||
#define PADDING 6
|
#define PADDING 6
|
||||||
#define XTICKS 15
|
#define XTICKS 15
|
||||||
@ -34,27 +35,34 @@ AxisItem::AxisItem(Type type, QGraphicsItem *parent) : QGraphicsItem(parent)
|
|||||||
{
|
{
|
||||||
_type = type;
|
_type = type;
|
||||||
_size = 0;
|
_size = 0;
|
||||||
|
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxisItem::setRange(const QPointF &range)
|
void AxisItem::setRange(const RangeF &range)
|
||||||
{
|
{
|
||||||
|
prepareGeometryChange();
|
||||||
_range = range;
|
_range = range;
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
prepareGeometryChange();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxisItem::setSize(qreal size)
|
void AxisItem::setSize(qreal size)
|
||||||
{
|
{
|
||||||
|
prepareGeometryChange();
|
||||||
_size = size;
|
_size = size;
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
prepareGeometryChange();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxisItem::setLabel(const QString& label)
|
void AxisItem::setLabel(const QString& label)
|
||||||
{
|
{
|
||||||
|
prepareGeometryChange();
|
||||||
_label = label;
|
_label = label;
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
prepareGeometryChange();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxisItem::updateBoundingRect()
|
void AxisItem::updateBoundingRect()
|
||||||
@ -67,7 +75,7 @@ void AxisItem::updateBoundingRect()
|
|||||||
struct Label l;
|
struct Label l;
|
||||||
|
|
||||||
|
|
||||||
l = label(_range.x(), _range.y(), (_type == X) ? XTICKS : YTICKS);
|
l = label(_range.min(), _range.max(), (_type == X) ? XTICKS : YTICKS);
|
||||||
es = fm.tightBoundingRect(QString::number(l.max));
|
es = fm.tightBoundingRect(QString::number(l.max));
|
||||||
ss = fm.tightBoundingRect(QString::number(l.min));
|
ss = fm.tightBoundingRect(QString::number(l.min));
|
||||||
ls = fm.tightBoundingRect(_label);
|
ls = fm.tightBoundingRect(_label);
|
||||||
@ -75,11 +83,21 @@ void AxisItem::updateBoundingRect()
|
|||||||
if (_type == X) {
|
if (_type == X) {
|
||||||
_boundingRect = QRectF(-ss.width()/2, -TICK/2,
|
_boundingRect = QRectF(-ss.width()/2, -TICK/2,
|
||||||
_size + es.width()/2 + ss.width()/2,
|
_size + es.width()/2 + ss.width()/2,
|
||||||
ls.height() + es.height() - fm.descent() + TICK + 2*PADDING);
|
ls.height() + es.height() - fm.descent() + TICK + 2*PADDING + 1);
|
||||||
} else {
|
} else {
|
||||||
_boundingRect = QRectF(-(ls.height() + es.width() + 2*PADDING
|
int mtw = 0;
|
||||||
- fm.descent() + TICK/2), -(_size + es.height()/2
|
QRect ts;
|
||||||
+ fm.descent()), ls.height() -fm.descent() + es.width() + 2*PADDING
|
qreal val;
|
||||||
|
|
||||||
|
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
||||||
|
val = l.min + i * l.d;
|
||||||
|
QString str = QString::number(val);
|
||||||
|
ts = fm.tightBoundingRect(str);
|
||||||
|
mtw = qMax(ts.width(), mtw);
|
||||||
|
}
|
||||||
|
|
||||||
|
_boundingRect = QRectF(-(ls.height() + mtw + 2*PADDING + TICK/2),
|
||||||
|
-(_size + es.height()/2 + fm.descent()), ls.height() + mtw + 2*PADDING
|
||||||
+ TICK, _size + es.height()/2 + fm.descent() + ss.height()/2);
|
+ TICK, _size + es.height()/2 + fm.descent() + ss.height()/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,26 +113,29 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||||||
QFontMetrics fm(font);
|
QFontMetrics fm(font);
|
||||||
QRect ts, ls;
|
QRect ts, ls;
|
||||||
struct Label l;
|
struct Label l;
|
||||||
qreal range = _range.y() - _range.x();
|
qreal range = _range.size();
|
||||||
qreal val;
|
qreal val;
|
||||||
|
QPen pen = QPen(Qt::black, AXIS_WIDTH);
|
||||||
|
|
||||||
|
|
||||||
|
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||||
painter->setFont(font);
|
painter->setFont(font);
|
||||||
|
painter->setPen(pen);
|
||||||
|
|
||||||
ls = fm.tightBoundingRect(_label);
|
ls = fm.tightBoundingRect(_label);
|
||||||
|
|
||||||
if (_type == X) {
|
if (_type == X) {
|
||||||
painter->drawLine(0, 0, _size, 0);
|
painter->drawLine(0, 0, _size, 0);
|
||||||
|
|
||||||
l = label(_range.x(), _range.y(), XTICKS);
|
l = label(_range.min(), _range.max(), XTICKS);
|
||||||
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
||||||
val = l.min + i * l.d;
|
val = l.min + i * l.d;
|
||||||
QString str = QString::number(val);
|
QString str = QString::number(val);
|
||||||
|
|
||||||
painter->drawLine((_size/range) * (val - _range.x()), TICK/2,
|
painter->drawLine((_size/range) * (val - _range.min()), TICK/2,
|
||||||
(_size/range) * (val - _range.x()), -TICK/2);
|
(_size/range) * (val - _range.min()), -TICK/2);
|
||||||
ts = fm.tightBoundingRect(str);
|
ts = fm.tightBoundingRect(str);
|
||||||
painter->drawText(((_size/range) * (val - _range.x()))
|
painter->drawText(((_size/range) * (val - _range.min()))
|
||||||
- (ts.width()/2), ts.height() + TICK/2 + PADDING, str);
|
- (ts.width()/2), ts.height() + TICK/2 + PADDING, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,21 +144,23 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||||||
} else {
|
} else {
|
||||||
painter->drawLine(0, 0, 0, -_size);
|
painter->drawLine(0, 0, 0, -_size);
|
||||||
|
|
||||||
l = label(_range.x(), _range.y(), YTICKS);
|
l = label(_range.min(), _range.max(), YTICKS);
|
||||||
|
int mtw = 0;
|
||||||
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
||||||
val = l.min + i * l.d;
|
val = l.min + i * l.d;
|
||||||
QString str = QString::number(val);
|
QString str = QString::number(val);
|
||||||
|
|
||||||
painter->drawLine(TICK/2, -((_size/range) * (val - _range.x())),
|
painter->drawLine(TICK/2, -((_size/range) * (val - _range.min())),
|
||||||
-TICK/2, -((_size/range) * (val - _range.x())));
|
-TICK/2, -((_size/range) * (val - _range.min())));
|
||||||
ts = fm.tightBoundingRect(str);
|
ts = fm.tightBoundingRect(str);
|
||||||
|
mtw = qMax(ts.width(), mtw);
|
||||||
painter->drawText(-(ts.width() + PADDING + TICK/2), -((_size/range)
|
painter->drawText(-(ts.width() + PADDING + TICK/2), -((_size/range)
|
||||||
* (val - _range.x())) + (ts.height()/2), str);
|
* (val - _range.min())) + (ts.height()/2), str);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter->rotate(-90);
|
painter->rotate(-90);
|
||||||
painter->drawText(_size/2 - ls.width()/2, -(ts.width()
|
painter->drawText(_size/2 - ls.width()/2, -(mtw + 2*PADDING + TICK/2),
|
||||||
+ 2*PADDING + TICK/2), _label);
|
_label);
|
||||||
painter->rotate(90);
|
painter->rotate(90);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +170,7 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF AxisItem::margin()
|
QSizeF AxisItem::margin() const
|
||||||
{
|
{
|
||||||
QFont font;
|
QFont font;
|
||||||
font.setPixelSize(FONT_SIZE);
|
font.setPixelSize(FONT_SIZE);
|
||||||
@ -156,7 +179,7 @@ QSizeF AxisItem::margin()
|
|||||||
struct Label l;
|
struct Label l;
|
||||||
|
|
||||||
|
|
||||||
l = label(_range.x(), _range.y(), (_type == X) ? XTICKS : YTICKS);
|
l = label(_range.min(), _range.max(), (_type == X) ? XTICKS : YTICKS);
|
||||||
es = fm.tightBoundingRect(QString::number(l.max));
|
es = fm.tightBoundingRect(QString::number(l.max));
|
||||||
ss = fm.tightBoundingRect(QString::number(l.min));
|
ss = fm.tightBoundingRect(QString::number(l.min));
|
||||||
ls = fm.tightBoundingRect(_label);
|
ls = fm.tightBoundingRect(_label);
|
||||||
@ -165,7 +188,31 @@ QSizeF AxisItem::margin()
|
|||||||
return QSizeF(es.width()/2,
|
return QSizeF(es.width()/2,
|
||||||
ls.height() + es.height() - fm.descent() + TICK/2 + 2*PADDING);
|
ls.height() + es.height() - fm.descent() + TICK/2 + 2*PADDING);
|
||||||
} else {
|
} else {
|
||||||
return QSizeF(ls.height() -fm.descent() + es.width() + 2*PADDING
|
int mtw = 0;
|
||||||
|
QRect ts;
|
||||||
|
qreal val;
|
||||||
|
|
||||||
|
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++) {
|
||||||
|
val = l.min + i * l.d;
|
||||||
|
QString str = QString::number(val);
|
||||||
|
ts = fm.tightBoundingRect(str);
|
||||||
|
mtw = qMax(ts.width(), mtw);
|
||||||
|
}
|
||||||
|
|
||||||
|
return QSizeF(ls.height() -fm.descent() + mtw + 2*PADDING
|
||||||
+ TICK/2, es.height()/2 + fm.descent());
|
+ TICK/2, es.height()/2 + fm.descent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<qreal> AxisItem::ticks() const
|
||||||
|
{
|
||||||
|
struct Label l;
|
||||||
|
QList<qreal> list;
|
||||||
|
|
||||||
|
l = label(_range.min(), _range.max(), (_type == X) ? XTICKS : YTICKS);
|
||||||
|
for (int i = 0; i < ((l.max - l.min) / l.d) + 1; i++)
|
||||||
|
list.append(((_size/_range.size()) * ((l.min + i * l.d)
|
||||||
|
- _range.min())));
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
#define AXISITEM_H
|
#define AXISITEM_H
|
||||||
|
|
||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
|
#include "common/range.h"
|
||||||
|
|
||||||
class AxisItem : public QGraphicsItem
|
class AxisItem : public QGraphicsItem
|
||||||
{
|
{
|
||||||
@ -14,17 +15,18 @@ public:
|
|||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget);
|
QWidget *widget);
|
||||||
|
|
||||||
void setRange(const QPointF &range);
|
void setRange(const RangeF &range);
|
||||||
void setSize(qreal size);
|
void setSize(qreal size);
|
||||||
void setLabel(const QString& label);
|
void setLabel(const QString& label);
|
||||||
|
|
||||||
QSizeF margin();
|
QSizeF margin() const;
|
||||||
|
QList<qreal> ticks() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateBoundingRect();
|
void updateBoundingRect();
|
||||||
|
|
||||||
Type _type;
|
Type _type;
|
||||||
QPointF _range;
|
RangeF _range;
|
||||||
qreal _size;
|
qreal _size;
|
||||||
QString _label;
|
QString _label;
|
||||||
QRectF _boundingRect;
|
QRectF _boundingRect;
|
79
src/GUI/cadencegraph.cpp
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include "data/data.h"
|
||||||
|
#include "cadencegraphitem.h"
|
||||||
|
#include "cadencegraph.h"
|
||||||
|
|
||||||
|
|
||||||
|
CadenceGraph::CadenceGraph(QWidget *parent) : GraphTab(parent)
|
||||||
|
{
|
||||||
|
_showTracks = true;
|
||||||
|
|
||||||
|
GraphView::setYUnits(tr("1/min"));
|
||||||
|
setYLabel(tr("Cadence"));
|
||||||
|
|
||||||
|
setSliderPrecision(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CadenceGraph::setInfo()
|
||||||
|
{
|
||||||
|
if (_showTracks) {
|
||||||
|
GraphView::addInfo(tr("Average"), QString::number(avg() * yScale()
|
||||||
|
+ yOffset(), 'f', 1) + UNIT_SPACE + yUnits());
|
||||||
|
GraphView::addInfo(tr("Maximum"), QString::number(max() * yScale()
|
||||||
|
+ yOffset(), 'f', 1) + UNIT_SPACE + yUnits());
|
||||||
|
} else
|
||||||
|
clearInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CadenceGraph::loadData(const Data &data, const QList<PathItem *> &paths)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < data.tracks().count(); i++) {
|
||||||
|
const Graph &graph = data.tracks().at(i)->cadence();
|
||||||
|
|
||||||
|
if (graph.size() < 2) {
|
||||||
|
skipColor();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
CadenceGraphItem *gi = new CadenceGraphItem(graph, _graphType);
|
||||||
|
GraphView::addGraph(gi, paths.at(i));
|
||||||
|
|
||||||
|
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < data.routes().count(); i++)
|
||||||
|
skipColor();
|
||||||
|
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (sum / w);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CadenceGraph::clear()
|
||||||
|
{
|
||||||
|
_avg.clear();
|
||||||
|
|
||||||
|
GraphView::clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CadenceGraph::showTracks(bool show)
|
||||||
|
{
|
||||||
|
_showTracks = show;
|
||||||
|
|
||||||
|
showGraph(show);
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
29
src/GUI/cadencegraph.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef CADENCEGRAPH_H
|
||||||
|
#define CADENCEGRAPH_H
|
||||||
|
|
||||||
|
#include "graphtab.h"
|
||||||
|
|
||||||
|
class CadenceGraph : public GraphTab
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CadenceGraph(QWidget *parent = 0);
|
||||||
|
|
||||||
|
QString label() const {return tr("Cadence");}
|
||||||
|
void loadData(const Data &data, const QList<PathItem *> &paths);
|
||||||
|
void clear();
|
||||||
|
void showTracks(bool show);
|
||||||
|
void showRoutes(bool show) {Q_UNUSED(show);}
|
||||||
|
|
||||||
|
private:
|
||||||
|
qreal avg() const;
|
||||||
|
qreal max() const {return bounds().bottom();}
|
||||||
|
void setInfo();
|
||||||
|
|
||||||
|
QList<QPointF> _avg;
|
||||||
|
|
||||||
|
bool _showTracks;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CADENCEGRAPH_H
|
26
src/GUI/cadencegraphitem.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "tooltip.h"
|
||||||
|
#include "cadencegraphitem.h"
|
||||||
|
|
||||||
|
CadenceGraphItem::CadenceGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||||
|
{
|
||||||
|
qreal sum = 0;
|
||||||
|
|
||||||
|
for (int j = 1; j < graph.size(); j++)
|
||||||
|
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||||
|
_avg = sum/graph.last().s();
|
||||||
|
|
||||||
|
setToolTip(toolTip());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CadenceGraphItem::toolTip() const
|
||||||
|
{
|
||||||
|
ToolTip tt;
|
||||||
|
|
||||||
|
tt.insert(tr("Maximum"), QString::number(max(), 'f', 1)
|
||||||
|
+ UNIT_SPACE + tr("1/min"));
|
||||||
|
tt.insert(tr("Average"), QString::number(avg(), 'f', 1)
|
||||||
|
+ UNIT_SPACE + tr("1/min"));
|
||||||
|
|
||||||
|
return tt.toString();
|
||||||
|
}
|
23
src/GUI/cadencegraphitem.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef CADENCEGRAPHITEM_H
|
||||||
|
#define CADENCEGRAPHITEM_H
|
||||||
|
|
||||||
|
#include "graphitem.h"
|
||||||
|
|
||||||
|
class CadenceGraphItem : public GraphItem
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
CadenceGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
qreal max() const {return -bounds().top();}
|
||||||
|
qreal avg() const {return _avg;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString toolTip() const;
|
||||||
|
|
||||||
|
qreal _avg;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CADENCEGRAPHITEM_H
|
70
src/GUI/colorbox.cpp
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#include <QStylePainter>
|
||||||
|
#include <QStyleOptionComboBox>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QColorDialog>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include "colorbox.h"
|
||||||
|
|
||||||
|
|
||||||
|
ColorBox::ColorBox(QWidget *parent) : QWidget(parent)
|
||||||
|
{
|
||||||
|
_color = Qt::red;
|
||||||
|
_alpha = true;
|
||||||
|
|
||||||
|
setSizePolicy(QSizePolicy::QSizePolicy::Minimum, QSizePolicy::Fixed);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize ColorBox::sizeHint() const
|
||||||
|
{
|
||||||
|
static QSize size;
|
||||||
|
if (size.isValid())
|
||||||
|
return size;
|
||||||
|
|
||||||
|
QComboBox cb;
|
||||||
|
size = cb.sizeHint();
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ColorBox::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event);
|
||||||
|
|
||||||
|
QStylePainter painter(this);
|
||||||
|
|
||||||
|
QStyleOptionComboBox option;
|
||||||
|
option.initFrom(this);
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN32)
|
||||||
|
painter.setBrush(_color);
|
||||||
|
painter.drawPrimitive(QStyle::PE_Frame, option);
|
||||||
|
#else // Q_OS_MAC || Q_OS_WIN32
|
||||||
|
// Fallback for some broken QT4 styles that do not draw the background
|
||||||
|
painter.setBrush(_color);
|
||||||
|
painter.setPen(Qt::NoPen);
|
||||||
|
painter.drawRect(event->rect().adjusted(2, 2, -2, -2));
|
||||||
|
// If works (QT5 and most QT4 styles) overpaints the previous rectangle
|
||||||
|
option.palette.setBrush(QPalette::Base, _color);
|
||||||
|
painter.drawPrimitive(QStyle::PE_PanelLineEdit, option);
|
||||||
|
painter.drawPrimitive(QStyle::PE_FrameLineEdit, option);
|
||||||
|
#endif // Q_OS_MAC || Q_OS_WIN32
|
||||||
|
}
|
||||||
|
|
||||||
|
void ColorBox::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
if (event->button() != Qt::LeftButton)
|
||||||
|
return;
|
||||||
|
QColorDialog::ColorDialogOptions options = _alpha
|
||||||
|
? QColorDialog::ShowAlphaChannel : (QColorDialog::ColorDialogOptions)0;
|
||||||
|
QColor color = QColorDialog::getColor(_color, this, QString(), options);
|
||||||
|
if (color.isValid()) {
|
||||||
|
_color = color;
|
||||||
|
update();
|
||||||
|
emit colorChanged(_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ColorBox::setColor(const QColor &color)
|
||||||
|
{
|
||||||
|
_color = color;
|
||||||
|
update();
|
||||||
|
}
|
31
src/GUI/colorbox.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef COLORBOX_H
|
||||||
|
#define COLORBOX_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class ColorBox : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ColorBox(QWidget *parent = 0);
|
||||||
|
|
||||||
|
const QColor &color() const {return _color;}
|
||||||
|
void setColor(const QColor &color);
|
||||||
|
void enableAlphaChannel(bool enable) {_alpha = enable;}
|
||||||
|
|
||||||
|
QSize sizeHint() const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void colorChanged(const QColor &color);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QColor _color;
|
||||||
|
bool _alpha;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // COLORBOX_H
|
42
src/GUI/cpuarch.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#ifndef CPUARCH_H
|
||||||
|
#define CPUARCH_H
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||||
|
|
||||||
|
#if defined(__arm64__)
|
||||||
|
#define CPU_ARCH_STR "arm64"
|
||||||
|
#elif defined(__arm__) || defined(__TARGET_ARCH_ARM) || defined(_M_ARM)
|
||||||
|
#define CPU_ARCH_STR "arm"
|
||||||
|
#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) \
|
||||||
|
|| defined(_M_X64)
|
||||||
|
#define CPU_ARCH_STR "x86_64"
|
||||||
|
#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
|
||||||
|
#define CPU_ARCH_STR "i386"
|
||||||
|
#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||||
|
#define CPU_ARCH_STR "ia64"
|
||||||
|
#elif defined(_MIPS_ARCH_MIPS64) || defined(__mips64)
|
||||||
|
#define CPU_ARCH_STR "mips64"
|
||||||
|
#elif defined(__mips) || defined(__mips__) || defined(_M_MRX000)
|
||||||
|
#define CPU_ARCH_STR "mips"
|
||||||
|
#elif defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
|
||||||
|
#define CPU_ARCH_STR "power64"
|
||||||
|
#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \
|
||||||
|
|| defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) \
|
||||||
|
|| defined(_M_MPPC) || defined(_M_PPC)
|
||||||
|
#define CPU_ARCH_STR "power"
|
||||||
|
#else
|
||||||
|
#define CPU_ARCH_STR "unknown"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CPU_ARCH QString(CPU_ARCH_STR)
|
||||||
|
|
||||||
|
#else // QT_VERSION < 5.4
|
||||||
|
|
||||||
|
#include <QSysInfo>
|
||||||
|
#define CPU_ARCH QSysInfo::buildCpuArchitecture()
|
||||||
|
|
||||||
|
#endif // QT_VERSION < 5.4
|
||||||
|
|
||||||
|
#endif // CPUARCH_H
|
212
src/GUI/elevationgraph.cpp
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
#include <cmath>
|
||||||
|
#include "data/data.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "tooltip.h"
|
||||||
|
#include "elevationgraphitem.h"
|
||||||
|
#include "elevationgraph.h"
|
||||||
|
|
||||||
|
|
||||||
|
static qreal nMin(qreal a, qreal b)
|
||||||
|
{
|
||||||
|
if (!std::isnan(a) && !std::isnan(b))
|
||||||
|
return qMin(a, b);
|
||||||
|
else if (!std::isnan(a))
|
||||||
|
return a;
|
||||||
|
else if (!std::isnan(b))
|
||||||
|
return b;
|
||||||
|
else
|
||||||
|
return NAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
static qreal nMax(qreal a, qreal b)
|
||||||
|
{
|
||||||
|
if (!std::isnan(a) && !std::isnan(b))
|
||||||
|
return qMax(a, b);
|
||||||
|
else if (!std::isnan(a))
|
||||||
|
return a;
|
||||||
|
else if (!std::isnan(b))
|
||||||
|
return b;
|
||||||
|
else
|
||||||
|
return NAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
ElevationGraph::ElevationGraph(QWidget *parent) : GraphTab(parent)
|
||||||
|
{
|
||||||
|
_trackAscent = 0;
|
||||||
|
_routeAscent = 0;
|
||||||
|
_trackDescent = 0;
|
||||||
|
_routeDescent = 0;
|
||||||
|
_trackMin = NAN;
|
||||||
|
_trackMax = NAN;
|
||||||
|
_routeMin = NAN;
|
||||||
|
_routeMax = NAN;
|
||||||
|
|
||||||
|
_showRoutes = true;
|
||||||
|
_showTracks = true;
|
||||||
|
|
||||||
|
setYUnits(Metric);
|
||||||
|
setYLabel(tr("Elevation"));
|
||||||
|
setMinYRange(50.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::setInfo()
|
||||||
|
{
|
||||||
|
if (std::isnan(max()) || std::isnan(min()))
|
||||||
|
clearInfo();
|
||||||
|
else {
|
||||||
|
GraphView::addInfo(tr("Ascent"), QString::number(ascent() * yScale(),
|
||||||
|
'f', 0) + UNIT_SPACE + yUnits());
|
||||||
|
GraphView::addInfo(tr("Descent"), QString::number(descent() * yScale(),
|
||||||
|
'f', 0) + UNIT_SPACE + yUnits());
|
||||||
|
GraphView::addInfo(tr("Maximum"), QString::number(max() * yScale(), 'f',
|
||||||
|
0) + UNIT_SPACE + yUnits());
|
||||||
|
GraphView::addInfo(tr("Minimum"), QString::number(min() * yScale(), 'f',
|
||||||
|
0) + UNIT_SPACE + yUnits());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::loadGraph(const Graph &graph, Type type, PathItem *path)
|
||||||
|
{
|
||||||
|
if (graph.size() < 2) {
|
||||||
|
skipColor();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ElevationGraphItem *gi = new ElevationGraphItem(graph, _graphType);
|
||||||
|
GraphView::addGraph(gi, path, type);
|
||||||
|
|
||||||
|
if (type == Track) {
|
||||||
|
_trackAscent += gi->ascent();
|
||||||
|
_trackDescent += gi->descent();
|
||||||
|
_trackMax = nMax(_trackMax, gi->max());
|
||||||
|
_trackMin = nMin(_trackMin, gi->min());
|
||||||
|
} else {
|
||||||
|
_routeAscent += gi->ascent();
|
||||||
|
_routeDescent += gi->descent();
|
||||||
|
_routeMax = nMax(_routeMax, gi->max());
|
||||||
|
_routeMin = nMin(_routeMin, gi->min());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::loadData(const Data &data, const QList<PathItem *> &paths)
|
||||||
|
{
|
||||||
|
int p = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < data.tracks().count(); i++)
|
||||||
|
loadGraph(data.tracks().at(i)->elevation(), Track, paths.at(p++));
|
||||||
|
for (int i = 0; i < data.routes().count(); i++)
|
||||||
|
loadGraph(data.routes().at(i)->elevation(), Route, paths.at(p++));
|
||||||
|
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::clear()
|
||||||
|
{
|
||||||
|
_trackAscent = 0;
|
||||||
|
_routeAscent = 0;
|
||||||
|
_trackDescent = 0;
|
||||||
|
_routeDescent = 0;
|
||||||
|
_trackMin = NAN;
|
||||||
|
_trackMax = NAN;
|
||||||
|
_routeMin = NAN;
|
||||||
|
_routeMax = NAN;
|
||||||
|
|
||||||
|
GraphView::clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::setYUnits(Units units)
|
||||||
|
{
|
||||||
|
if (units == Metric) {
|
||||||
|
GraphView::setYUnits(tr("m"));
|
||||||
|
setYScale(1);
|
||||||
|
} else {
|
||||||
|
GraphView::setYUnits(tr("ft"));
|
||||||
|
setYScale(M2FT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::setUnits(Units units)
|
||||||
|
{
|
||||||
|
setYUnits(units);
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
GraphView::setUnits(units);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::showTracks(bool show)
|
||||||
|
{
|
||||||
|
_showTracks = show;
|
||||||
|
|
||||||
|
setInfo();
|
||||||
|
showGraph(show, Track);
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraph::showRoutes(bool show)
|
||||||
|
{
|
||||||
|
_showRoutes = show;
|
||||||
|
|
||||||
|
showGraph(show, Route);
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal ElevationGraph::ascent() const
|
||||||
|
{
|
||||||
|
qreal val = 0;
|
||||||
|
|
||||||
|
if (_showRoutes)
|
||||||
|
val += _routeAscent;
|
||||||
|
if (_showTracks)
|
||||||
|
val += _trackAscent;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal ElevationGraph::descent() const
|
||||||
|
{
|
||||||
|
qreal val = 0;
|
||||||
|
|
||||||
|
if (_showRoutes)
|
||||||
|
val += _routeDescent;
|
||||||
|
if (_showTracks)
|
||||||
|
val += _trackDescent;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal ElevationGraph::max() const
|
||||||
|
{
|
||||||
|
qreal val;
|
||||||
|
|
||||||
|
if (_showRoutes && _showTracks)
|
||||||
|
val = nMax(_routeMax, _trackMax);
|
||||||
|
else if (_showTracks)
|
||||||
|
val = _trackMax;
|
||||||
|
else if (_showRoutes)
|
||||||
|
val = _routeMax;
|
||||||
|
else
|
||||||
|
val = NAN;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal ElevationGraph::min() const
|
||||||
|
{
|
||||||
|
qreal val;
|
||||||
|
|
||||||
|
if (_showRoutes && _showTracks)
|
||||||
|
val = nMin(_routeMin, _trackMin);
|
||||||
|
else if (_showTracks)
|
||||||
|
val = _trackMin;
|
||||||
|
else if (_showRoutes)
|
||||||
|
val = _routeMin;
|
||||||
|
else
|
||||||
|
val = NAN;
|
||||||
|
|
||||||
|
return val;
|
||||||
|
}
|
41
src/GUI/elevationgraph.h
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ifndef ELEVATIONGRAPH_H
|
||||||
|
#define ELEVATIONGRAPH_H
|
||||||
|
|
||||||
|
#include "graphtab.h"
|
||||||
|
|
||||||
|
class ElevationGraph : public GraphTab
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ElevationGraph(QWidget *parent = 0);
|
||||||
|
|
||||||
|
QString label() const {return tr("Elevation");}
|
||||||
|
void loadData(const Data &data, const QList<PathItem *> &paths);
|
||||||
|
void clear();
|
||||||
|
void setUnits(enum Units units);
|
||||||
|
void showTracks(bool show);
|
||||||
|
void showRoutes(bool show);
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum Type {Track, Route};
|
||||||
|
|
||||||
|
qreal max() const;
|
||||||
|
qreal min() const;
|
||||||
|
qreal ascent() const;
|
||||||
|
qreal descent() const;
|
||||||
|
|
||||||
|
void setYUnits(Units units);
|
||||||
|
void setInfo();
|
||||||
|
|
||||||
|
void loadGraph(const Graph &graph, Type type, PathItem *path);
|
||||||
|
|
||||||
|
qreal _trackAscent, _trackDescent;
|
||||||
|
qreal _routeAscent, _routeDescent;
|
||||||
|
qreal _trackMax, _routeMax;
|
||||||
|
qreal _trackMin, _routeMin;
|
||||||
|
|
||||||
|
bool _showTracks, _showRoutes;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ELEVATIONGRAPH_H
|
43
src/GUI/elevationgraphitem.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include "tooltip.h"
|
||||||
|
#include "elevationgraphitem.h"
|
||||||
|
|
||||||
|
ElevationGraphItem::ElevationGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||||
|
{
|
||||||
|
_ascent = _descent = 0;
|
||||||
|
|
||||||
|
for (int j = 1; j < graph.size(); j++) {
|
||||||
|
qreal cur = graph.at(j).y();
|
||||||
|
qreal prev = graph.at(j-1).y();
|
||||||
|
|
||||||
|
if (cur > prev)
|
||||||
|
_ascent += cur - prev;
|
||||||
|
if (cur < prev)
|
||||||
|
_descent += prev - cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
setToolTip(toolTip(Metric));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ElevationGraphItem::toolTip(Units units) const
|
||||||
|
{
|
||||||
|
ToolTip tt;
|
||||||
|
qreal scale = (units == Metric) ? 1.0 : M2FT;
|
||||||
|
QString su = (units == Metric) ? tr("m") : tr("ft");
|
||||||
|
|
||||||
|
tt.insert(tr("Ascent"), QString::number(ascent() * scale, 'f', 0)
|
||||||
|
+ UNIT_SPACE + su);
|
||||||
|
tt.insert(tr("Descent"), QString::number(descent() * scale, 'f', 0)
|
||||||
|
+ UNIT_SPACE + su);
|
||||||
|
tt.insert(tr("Maximum"), QString::number(max() * scale, 'f', 0)
|
||||||
|
+ UNIT_SPACE + su);
|
||||||
|
tt.insert(tr("Minimum"), QString::number(min() * scale, 'f', 0)
|
||||||
|
+ UNIT_SPACE + su);
|
||||||
|
|
||||||
|
return tt.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ElevationGraphItem::setUnits(Units units)
|
||||||
|
{
|
||||||
|
setToolTip(toolTip(units));
|
||||||
|
}
|
27
src/GUI/elevationgraphitem.h
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef ELEVATIONGRAPHITEM_H
|
||||||
|
#define ELEVATIONGRAPHITEM_H
|
||||||
|
|
||||||
|
#include "graphitem.h"
|
||||||
|
|
||||||
|
class ElevationGraphItem : public GraphItem
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ElevationGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
qreal ascent() const {return _ascent;}
|
||||||
|
qreal descent() const {return _descent;}
|
||||||
|
qreal min() const {return -bounds().bottom();}
|
||||||
|
qreal max() const {return -bounds().top();}
|
||||||
|
|
||||||
|
void setUnits(Units units);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString toolTip(Units units) const;
|
||||||
|
|
||||||
|
qreal _ascent, _descent;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ELEVATIONGRAPHITEM_H
|
193
src/GUI/exportdialog.cpp
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QRadioButton>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QFileInfo>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QTabWidget>
|
||||||
|
#include <QDoubleSpinBox>
|
||||||
|
#include "fileselectwidget.h"
|
||||||
|
#include "units.h"
|
||||||
|
#include "exportdialog.h"
|
||||||
|
|
||||||
|
|
||||||
|
ExportDialog::ExportDialog(Export *exp, QWidget *parent)
|
||||||
|
: QDialog(parent), _export(exp)
|
||||||
|
{
|
||||||
|
int index;
|
||||||
|
|
||||||
|
_fileSelect = new FileSelectWidget();
|
||||||
|
_fileSelect->setFilter(tr("PDF files (*.pdf);;All files (*)"));
|
||||||
|
_fileSelect->setFile(_export->fileName);
|
||||||
|
|
||||||
|
_paperSize = new QComboBox();
|
||||||
|
_paperSize->addItem("A2", QPrinter::A2);
|
||||||
|
_paperSize->addItem("A3", QPrinter::A3);
|
||||||
|
_paperSize->addItem("A4", QPrinter::A4);
|
||||||
|
_paperSize->addItem("A5", QPrinter::A5);
|
||||||
|
_paperSize->addItem("A6", QPrinter::A6);
|
||||||
|
_paperSize->addItem("B3", QPrinter::B3);
|
||||||
|
_paperSize->addItem("B4", QPrinter::B4);
|
||||||
|
_paperSize->addItem("B5", QPrinter::B5);
|
||||||
|
_paperSize->addItem("B6", QPrinter::B6);
|
||||||
|
_paperSize->addItem("Tabloid", QPrinter::Tabloid);
|
||||||
|
_paperSize->addItem("Legal", QPrinter::Legal);
|
||||||
|
_paperSize->addItem("Letter", QPrinter::Letter);
|
||||||
|
if ((index = _paperSize->findData(_export->paperSize)) >= 0)
|
||||||
|
_paperSize->setCurrentIndex(index);
|
||||||
|
|
||||||
|
_resolution = new QComboBox();
|
||||||
|
_resolution->addItem("300 DPI", 300);
|
||||||
|
_resolution->addItem("600 DPI", 600);
|
||||||
|
_resolution->addItem("1200 DPI", 1200);
|
||||||
|
if ((index = _resolution->findData(_export->resolution)) >= 0)
|
||||||
|
_resolution->setCurrentIndex(index);
|
||||||
|
|
||||||
|
_portrait = new QRadioButton(tr("Portrait"));
|
||||||
|
_landscape = new QRadioButton(tr("Landscape"));
|
||||||
|
QHBoxLayout *orientationLayout = new QHBoxLayout();
|
||||||
|
orientationLayout->addWidget(_portrait);
|
||||||
|
orientationLayout->addWidget(_landscape);
|
||||||
|
if (_export->orientation == QPrinter::Portrait)
|
||||||
|
_portrait->setChecked(true);
|
||||||
|
else
|
||||||
|
_landscape->setChecked(true);
|
||||||
|
|
||||||
|
_topMargin = new QDoubleSpinBox();
|
||||||
|
_bottomMargin = new QDoubleSpinBox();
|
||||||
|
_leftMargin = new QDoubleSpinBox();
|
||||||
|
_rightMargin = new QDoubleSpinBox();
|
||||||
|
QString us = (_export->units == Imperial) ? tr("in") : tr("mm");
|
||||||
|
_topMargin->setSuffix(UNIT_SPACE + us);
|
||||||
|
_bottomMargin->setSuffix(UNIT_SPACE + us);
|
||||||
|
_leftMargin->setSuffix(UNIT_SPACE + us);
|
||||||
|
_rightMargin->setSuffix(UNIT_SPACE + us);
|
||||||
|
if (_export->units == Imperial) {
|
||||||
|
_topMargin->setValue(_export->margins.top() * MM2IN);
|
||||||
|
_bottomMargin->setValue(_export->margins.bottom() * MM2IN);
|
||||||
|
_leftMargin->setValue(_export->margins.left() * MM2IN);
|
||||||
|
_rightMargin->setValue(_export->margins.right() * MM2IN);
|
||||||
|
_topMargin->setSingleStep(0.1);
|
||||||
|
_bottomMargin->setSingleStep(0.1);
|
||||||
|
_leftMargin->setSingleStep(0.1);
|
||||||
|
_rightMargin->setSingleStep(0.1);
|
||||||
|
} else {
|
||||||
|
_topMargin->setValue(_export->margins.top());
|
||||||
|
_bottomMargin->setValue(_export->margins.bottom());
|
||||||
|
_leftMargin->setValue(_export->margins.left());
|
||||||
|
_rightMargin->setValue(_export->margins.right());
|
||||||
|
}
|
||||||
|
|
||||||
|
QGridLayout *marginsLayout = new QGridLayout();
|
||||||
|
marginsLayout->addWidget(_topMargin, 0, 0, 1, 2, Qt::AlignCenter);
|
||||||
|
marginsLayout->addWidget(_leftMargin, 1, 0, 1, 1, Qt::AlignRight);
|
||||||
|
marginsLayout->addWidget(_rightMargin, 1, 1, 1, 1, Qt::AlignLeft);
|
||||||
|
marginsLayout->addWidget(_bottomMargin, 2, 0, 1, 2, Qt::AlignCenter);
|
||||||
|
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
QGroupBox *pageSetupBox = new QGroupBox(tr("Page Setup"));
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
QFormLayout *pageSetupLayout = new QFormLayout;
|
||||||
|
pageSetupLayout->addRow(tr("Page size:"), _paperSize);
|
||||||
|
pageSetupLayout->addRow(tr("Resolution:"), _resolution);
|
||||||
|
pageSetupLayout->addRow(tr("Orientation:"), orientationLayout);
|
||||||
|
pageSetupLayout->addRow(tr("Margins:"), marginsLayout);
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QFrame *line = new QFrame();
|
||||||
|
line->setFrameShape(QFrame::HLine);
|
||||||
|
line->setFrameShadow(QFrame::Sunken);
|
||||||
|
pageSetupLayout->addRow(line);
|
||||||
|
pageSetupLayout->addRow(tr("File:"), _fileSelect);
|
||||||
|
pageSetupLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||||
|
#else // Q_OS_MAC
|
||||||
|
pageSetupBox->setLayout(pageSetupLayout);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
QGroupBox *outputFileBox = new QGroupBox(tr("Output file"));
|
||||||
|
QHBoxLayout *outputFileLayout = new QHBoxLayout();
|
||||||
|
outputFileLayout->addWidget(_fileSelect);
|
||||||
|
outputFileBox->setLayout(outputFileLayout);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
|
QDialogButtonBox *buttonBox = new QDialogButtonBox();
|
||||||
|
buttonBox->addButton(tr("Export"), QDialogButtonBox::AcceptRole);
|
||||||
|
buttonBox->addButton(QDialogButtonBox::Cancel);
|
||||||
|
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||||
|
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
layout->addLayout(pageSetupLayout);
|
||||||
|
#else // Q_OS_MAC
|
||||||
|
layout->addWidget(pageSetupBox);
|
||||||
|
layout->addWidget(outputFileBox);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
layout->addWidget(buttonBox);
|
||||||
|
setLayout(layout);
|
||||||
|
|
||||||
|
setWindowTitle(tr("Export to PDF"));
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ExportDialog::checkFile()
|
||||||
|
{
|
||||||
|
if (_fileSelect->file().isEmpty()) {
|
||||||
|
QMessageBox::warning(this, tr("Error"), tr("No output file selected."));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile file(_fileSelect->file());
|
||||||
|
QFileInfo fi(file);
|
||||||
|
bool exists = fi.exists();
|
||||||
|
bool opened = false;
|
||||||
|
|
||||||
|
if (exists && fi.isDir()) {
|
||||||
|
QMessageBox::warning(this, tr("Error"), tr("%1 is a directory.")
|
||||||
|
.arg(file.fileName()));
|
||||||
|
return false;
|
||||||
|
} else if ((exists && !fi.isWritable())
|
||||||
|
|| !(opened = file.open(QFile::Append))) {
|
||||||
|
QMessageBox::warning(this, tr("Error"), tr("%1 is not writable.")
|
||||||
|
.arg(file.fileName()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (opened) {
|
||||||
|
file.close();
|
||||||
|
if (!exists)
|
||||||
|
file.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExportDialog::accept()
|
||||||
|
{
|
||||||
|
if (!checkFile())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QPrinter::Orientation orientation = _portrait->isChecked()
|
||||||
|
? QPrinter::Portrait : QPrinter::Landscape;
|
||||||
|
QPrinter::PaperSize paperSize = static_cast<QPrinter::PaperSize>
|
||||||
|
(_paperSize->itemData(_paperSize->currentIndex()).toInt());
|
||||||
|
int resolution = _resolution->itemData(_resolution->currentIndex()).toInt();
|
||||||
|
|
||||||
|
_export->fileName = _fileSelect->file();
|
||||||
|
_export->paperSize = paperSize;
|
||||||
|
_export->resolution = resolution;
|
||||||
|
_export->orientation = orientation;
|
||||||
|
if (_export->units == Imperial)
|
||||||
|
_export->margins = MarginsF(_leftMargin->value() / MM2IN,
|
||||||
|
_topMargin->value() / MM2IN, _rightMargin->value() / MM2IN,
|
||||||
|
_bottomMargin->value() / MM2IN);
|
||||||
|
else
|
||||||
|
_export->margins = MarginsF(_leftMargin->value(), _topMargin->value(),
|
||||||
|
_rightMargin->value(), _bottomMargin->value());
|
||||||
|
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
50
src/GUI/exportdialog.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#ifndef EXPORTDIALOG_H
|
||||||
|
#define EXPORTDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QPrinter>
|
||||||
|
#include "margins.h"
|
||||||
|
#include "units.h"
|
||||||
|
|
||||||
|
class QComboBox;
|
||||||
|
class QRadioButton;
|
||||||
|
class FileSelectWidget;
|
||||||
|
class QDoubleSpinBox;
|
||||||
|
|
||||||
|
struct Export {
|
||||||
|
QString fileName;
|
||||||
|
QPrinter::PaperSize paperSize;
|
||||||
|
QPrinter::Orientation orientation;
|
||||||
|
MarginsF margins;
|
||||||
|
int resolution;
|
||||||
|
|
||||||
|
Units units;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ExportDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
ExportDialog(Export *exp, QWidget *parent = 0);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void accept();
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool checkFile();
|
||||||
|
|
||||||
|
Export *_export;
|
||||||
|
|
||||||
|
FileSelectWidget *_fileSelect;
|
||||||
|
QComboBox *_paperSize;
|
||||||
|
QComboBox *_resolution;
|
||||||
|
QRadioButton *_portrait;
|
||||||
|
QRadioButton *_landscape;
|
||||||
|
QDoubleSpinBox *_topMargin;
|
||||||
|
QDoubleSpinBox *_bottomMargin;
|
||||||
|
QDoubleSpinBox *_leftMargin;
|
||||||
|
QDoubleSpinBox *_rightMargin;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // EXPORTDIALOG_H
|
@ -41,12 +41,12 @@ void FileBrowser::setFilter(const QStringList &filter)
|
|||||||
reloadDirectory(_files.last().canonicalPath());
|
reloadDirectory(_files.last().canonicalPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileBrowser::isLast()
|
bool FileBrowser::isLast() const
|
||||||
{
|
{
|
||||||
return (_files.size() > 0 && _index == _files.size() - 1);
|
return (_files.size() > 0 && _index == _files.size() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FileBrowser::isFirst()
|
bool FileBrowser::isFirst() const
|
||||||
{
|
{
|
||||||
return (_files.size() > 0 && _index == 0);
|
return (_files.size() > 0 && _index == 0);
|
||||||
}
|
}
|
@ -23,8 +23,8 @@ public:
|
|||||||
QString last();
|
QString last();
|
||||||
QString first();
|
QString first();
|
||||||
|
|
||||||
bool isLast();
|
bool isLast() const;
|
||||||
bool isFirst();
|
bool isFirst() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void reloadDirectory(const QString &path);
|
void reloadDirectory(const QString &path);
|
43
src/GUI/fileselectwidget.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include <QPushButton>
|
||||||
|
#include <QToolButton>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QFileInfo>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QFontMetrics>
|
||||||
|
#include "fileselectwidget.h"
|
||||||
|
|
||||||
|
|
||||||
|
FileSelectWidget::FileSelectWidget(QWidget *parent) : QWidget(parent)
|
||||||
|
{
|
||||||
|
QFontMetrics fm(QApplication::font());
|
||||||
|
_edit = new QLineEdit();
|
||||||
|
_edit->setMinimumWidth(fm.boundingRect(QDir::homePath()).width());
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
_button = new QPushButton("...");
|
||||||
|
_button->setMaximumWidth(_button->sizeHint().width() / 2);
|
||||||
|
#else // Q_OS_WIN32
|
||||||
|
_button = new QToolButton();
|
||||||
|
_button->setText("...");
|
||||||
|
#endif // Q_OS_WIN32
|
||||||
|
connect(_button, SIGNAL(clicked()), this, SLOT(browse()));
|
||||||
|
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout();
|
||||||
|
layout->setMargin(0);
|
||||||
|
layout->addWidget(_edit);
|
||||||
|
layout->addWidget(_button);
|
||||||
|
setLayout(layout);
|
||||||
|
|
||||||
|
QSizePolicy p(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||||
|
setSizePolicy(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileSelectWidget::browse()
|
||||||
|
{
|
||||||
|
QFileInfo fi(_edit->text());
|
||||||
|
QString fileName = QFileDialog::getSaveFileName(this, tr("Select file"),
|
||||||
|
fi.dir().absolutePath(), _filter);
|
||||||
|
|
||||||
|
if (!fileName.isEmpty())
|
||||||
|
_edit->setText(fileName);
|
||||||
|
}
|
35
src/GUI/fileselectwidget.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#ifndef FILESELECTWIDGET_H
|
||||||
|
#define FILESELECTWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
class QPushButton;
|
||||||
|
class QToolButton;
|
||||||
|
|
||||||
|
class FileSelectWidget : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
FileSelectWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
|
QString file() {return _edit->text();}
|
||||||
|
void setFile(const QString &file) {_edit->setText(file);}
|
||||||
|
void setFilter(const QString &filter) {_filter = filter;}
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void browse();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLineEdit *_edit;
|
||||||
|
#ifdef Q_OS_WIN32
|
||||||
|
QPushButton *_button;
|
||||||
|
#else // Q_OS_WIN32
|
||||||
|
QToolButton *_button;
|
||||||
|
#endif // Q_OS_WIN32
|
||||||
|
|
||||||
|
QString _filter;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // FILESELECTWIDGET_H
|
57
src/GUI/format.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include <QApplication>
|
||||||
|
#include "common/coordinates.h"
|
||||||
|
#include "format.h"
|
||||||
|
|
||||||
|
QString Format::timeSpan(qreal time, bool full)
|
||||||
|
{
|
||||||
|
unsigned h, m, s;
|
||||||
|
|
||||||
|
h = time / 3600;
|
||||||
|
m = (time - (h * 3600)) / 60;
|
||||||
|
s = time - (h * 3600) - (m * 60);
|
||||||
|
|
||||||
|
if (full || h)
|
||||||
|
return QString("%1:%2:%3").arg(h, 2, 10, QChar('0'))
|
||||||
|
.arg(m, 2, 10, QChar('0')).arg(s, 2, 10, QChar('0'));
|
||||||
|
else
|
||||||
|
return QString("%1:%2").arg(m, 2, 10, QChar('0'))
|
||||||
|
.arg(s, 2, 10, QChar('0'));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Format::distance(qreal value, Units units)
|
||||||
|
{
|
||||||
|
if (units == Imperial) {
|
||||||
|
if (value < MIINM)
|
||||||
|
return QString::number(value * M2FT, 'f', 0) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "ft");
|
||||||
|
else
|
||||||
|
return QString::number(value * M2MI, 'f', 1) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "mi");
|
||||||
|
} else {
|
||||||
|
if (value < KMINM)
|
||||||
|
return QString::number(value, 'f', 0) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "m");
|
||||||
|
else
|
||||||
|
return QString::number(value * M2KM, 'f', 1) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "km");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Format::elevation(qreal value, Units units)
|
||||||
|
{
|
||||||
|
if (units == Metric)
|
||||||
|
return QString::number(value, 'f', 0) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "m");
|
||||||
|
else
|
||||||
|
return QString::number(value * M2FT, 'f', 0) + UNIT_SPACE
|
||||||
|
+ qApp->translate("Format", "ft");
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Format::coordinates(const Coordinates &value)
|
||||||
|
{
|
||||||
|
QChar yH = (value.lat() < 0) ? 'S' : 'N';
|
||||||
|
QChar xH = (value.lon() < 0) ? 'W' : 'E';
|
||||||
|
|
||||||
|
return QString::number(qAbs(value.lat()), 'f', 5) + yH + "," + QChar(0x00A0)
|
||||||
|
+ QString::number(qAbs(value.lon()), 'f', 5) + xH;
|
||||||
|
}
|
17
src/GUI/format.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef FORMAT_H
|
||||||
|
#define FORMAT_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include "units.h"
|
||||||
|
|
||||||
|
class Coordinates;
|
||||||
|
|
||||||
|
namespace Format
|
||||||
|
{
|
||||||
|
QString timeSpan(qreal time, bool full = true);
|
||||||
|
QString distance(qreal value, Units units);
|
||||||
|
QString elevation(qreal value, Units units);
|
||||||
|
QString coordinates(const Coordinates &value);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // FORMAT_H
|
246
src/GUI/graphitem.cpp
Normal file
@ -0,0 +1,246 @@
|
|||||||
|
#include <QPainter>
|
||||||
|
#include "graphitem.h"
|
||||||
|
|
||||||
|
|
||||||
|
GraphItem::GraphItem(const Graph &graph, GraphType type, QGraphicsItem *parent)
|
||||||
|
: QGraphicsObject(parent)
|
||||||
|
{
|
||||||
|
_id = 0;
|
||||||
|
_width = 1;
|
||||||
|
|
||||||
|
_pen = QPen(Qt::black, _width);
|
||||||
|
|
||||||
|
_type = type;
|
||||||
|
_graph = graph;
|
||||||
|
_sx = 1.0; _sy = 1.0;
|
||||||
|
|
||||||
|
_time = true;
|
||||||
|
for (int i = 0; i < _graph.size(); i++) {
|
||||||
|
if (std::isnan(_graph.at(i).t())) {
|
||||||
|
_time = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setZValue(1.0);
|
||||||
|
|
||||||
|
updatePath();
|
||||||
|
updateShape();
|
||||||
|
updateBounds();
|
||||||
|
|
||||||
|
setAcceptHoverEvents(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::updateShape()
|
||||||
|
{
|
||||||
|
QPainterPathStroker s;
|
||||||
|
s.setWidth(_width + 1);
|
||||||
|
_shape = s.createStroke(_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget)
|
||||||
|
{
|
||||||
|
Q_UNUSED(option);
|
||||||
|
Q_UNUSED(widget);
|
||||||
|
|
||||||
|
painter->setPen(_pen);
|
||||||
|
painter->drawPath(_path);
|
||||||
|
|
||||||
|
/*
|
||||||
|
QPen p = QPen(QBrush(Qt::red), 0);
|
||||||
|
painter->setPen(p);
|
||||||
|
painter->drawRect(boundingRect());
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::setGraphType(GraphType type)
|
||||||
|
{
|
||||||
|
if (type == _type)
|
||||||
|
return;
|
||||||
|
|
||||||
|
prepareGeometryChange();
|
||||||
|
|
||||||
|
_type = type;
|
||||||
|
updatePath();
|
||||||
|
updateShape();
|
||||||
|
updateBounds();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::setColor(const QColor &color)
|
||||||
|
{
|
||||||
|
if (_pen.color() == color)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_pen.setColor(color);
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::setWidth(int width)
|
||||||
|
{
|
||||||
|
if (width == _width)
|
||||||
|
return;
|
||||||
|
|
||||||
|
prepareGeometryChange();
|
||||||
|
|
||||||
|
_width = width;
|
||||||
|
_pen.setWidth(width);
|
||||||
|
|
||||||
|
updateShape();
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal GraphItem::yAtX(qreal x)
|
||||||
|
{
|
||||||
|
int low = 0;
|
||||||
|
int high = _graph.count() - 1;
|
||||||
|
int mid = 0;
|
||||||
|
|
||||||
|
Q_ASSERT(high > low);
|
||||||
|
Q_ASSERT(x >= _graph.at(low).x(_type) && x <= _graph.at(high).x(_type));
|
||||||
|
|
||||||
|
while (low <= high) {
|
||||||
|
mid = low + ((high - low) / 2);
|
||||||
|
const GraphPoint &p = _graph.at(mid);
|
||||||
|
if (p.x(_type) > x)
|
||||||
|
high = mid - 1;
|
||||||
|
else if (p.x(_type) < x)
|
||||||
|
low = mid + 1;
|
||||||
|
else
|
||||||
|
return -p.y();
|
||||||
|
}
|
||||||
|
|
||||||
|
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());
|
||||||
|
else
|
||||||
|
l = QLineF(_graph.at(mid-1).x(_type), _graph.at(mid-1).y(),
|
||||||
|
_graph.at(mid).x(_type), _graph.at(mid).y());
|
||||||
|
|
||||||
|
return -l.pointAt((x - l.p1().x()) / (l.p2().x() - l.p1().x())).y();
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal GraphItem::distanceAtTime(qreal time)
|
||||||
|
{
|
||||||
|
int low = 0;
|
||||||
|
int high = _graph.count() - 1;
|
||||||
|
int mid = 0;
|
||||||
|
|
||||||
|
Q_ASSERT(high > low);
|
||||||
|
Q_ASSERT(time >= _graph.at(low).t() && time <= _graph.at(high).t());
|
||||||
|
|
||||||
|
while (low <= high) {
|
||||||
|
mid = low + ((high - low) / 2);
|
||||||
|
const GraphPoint &p = _graph.at(mid);
|
||||||
|
if (p.t() > time)
|
||||||
|
high = mid - 1;
|
||||||
|
else if (p.t() < time)
|
||||||
|
low = mid + 1;
|
||||||
|
else
|
||||||
|
return _graph.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());
|
||||||
|
else
|
||||||
|
l = QLineF(_graph.at(mid-1).t(), _graph.at(mid-1).s(),
|
||||||
|
_graph.at(mid).t(), _graph.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
|
||||||
|
emit sliderPositionChanged(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::hover(bool hover)
|
||||||
|
{
|
||||||
|
if (hover) {
|
||||||
|
_pen.setWidth(_width + 1);
|
||||||
|
setZValue(zValue() + 1.0);
|
||||||
|
} else {
|
||||||
|
_pen.setWidth(_width);
|
||||||
|
setZValue(zValue() - 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::setScale(qreal sx, qreal sy)
|
||||||
|
{
|
||||||
|
if (_sx == sx && _sy == sy)
|
||||||
|
return;
|
||||||
|
|
||||||
|
prepareGeometryChange();
|
||||||
|
|
||||||
|
_sx = sx; _sy = sy;
|
||||||
|
updatePath();
|
||||||
|
updateShape();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::updatePath()
|
||||||
|
{
|
||||||
|
_path = QPainterPath();
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::updateBounds()
|
||||||
|
{
|
||||||
|
if (_type == Time && !_time) {
|
||||||
|
_bounds = QRectF();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal bottom, top, left, right;
|
||||||
|
|
||||||
|
QPointF p = QPointF(_graph.first().x(_type), -_graph.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());
|
||||||
|
}
|
||||||
|
|
||||||
|
_bounds = QRectF(QPointF(left, top), QPointF(right, bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event);
|
||||||
|
|
||||||
|
_pen.setWidthF(_width + 1);
|
||||||
|
setZValue(zValue() + 1.0);
|
||||||
|
update();
|
||||||
|
|
||||||
|
emit selected(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event);
|
||||||
|
|
||||||
|
_pen.setWidthF(_width);
|
||||||
|
setZValue(zValue() - 1.0);
|
||||||
|
update();
|
||||||
|
|
||||||
|
emit selected(false);
|
||||||
|
}
|
67
src/GUI/graphitem.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#ifndef GRAPHITEM_H
|
||||||
|
#define GRAPHITEM_H
|
||||||
|
|
||||||
|
#include <QGraphicsObject>
|
||||||
|
#include <QPen>
|
||||||
|
#include "data/graph.h"
|
||||||
|
#include "units.h"
|
||||||
|
|
||||||
|
class GraphItem : public QGraphicsObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
GraphItem(const Graph &graph, GraphType type, QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
QPainterPath shape() const {return _shape;}
|
||||||
|
QRectF boundingRect() const {return _shape.boundingRect();}
|
||||||
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget);
|
||||||
|
|
||||||
|
const QRectF &bounds() const {return _bounds;}
|
||||||
|
|
||||||
|
void setScale(qreal sx, qreal sy);
|
||||||
|
void setGraphType(GraphType type);
|
||||||
|
int id() const {return _id;}
|
||||||
|
void setId(int id) {_id = id;}
|
||||||
|
void setColor(const QColor &color);
|
||||||
|
void setWidth(int width);
|
||||||
|
virtual void setUnits(Units units) {Q_UNUSED(units);}
|
||||||
|
|
||||||
|
qreal yAtX(qreal x);
|
||||||
|
qreal distanceAtTime(qreal time);
|
||||||
|
|
||||||
|
void redraw();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sliderPositionChanged(qreal);
|
||||||
|
void selected(bool);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void emitSliderPositionChanged(qreal);
|
||||||
|
void hover(bool hover);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||||
|
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||||
|
|
||||||
|
void updatePath();
|
||||||
|
void updateShape();
|
||||||
|
void updateBounds();
|
||||||
|
|
||||||
|
int _id;
|
||||||
|
QPen _pen;
|
||||||
|
int _width;
|
||||||
|
|
||||||
|
Graph _graph;
|
||||||
|
GraphType _type;
|
||||||
|
|
||||||
|
QPainterPath _path;
|
||||||
|
QPainterPath _shape;
|
||||||
|
QRectF _bounds;
|
||||||
|
qreal _sx, _sy;
|
||||||
|
|
||||||
|
bool _time;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GRAPHITEM_H
|
30
src/GUI/graphtab.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#ifndef GRAPHTAB_H
|
||||||
|
#define GRAPHTAB_H
|
||||||
|
|
||||||
|
#include <QList>
|
||||||
|
#include "graphview.h"
|
||||||
|
#include "units.h"
|
||||||
|
#include "timetype.h"
|
||||||
|
|
||||||
|
class Data;
|
||||||
|
class PathItem;
|
||||||
|
|
||||||
|
class GraphTab : public GraphView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
GraphTab(QWidget *parent = 0) : GraphView(parent)
|
||||||
|
{setFrameShape(QFrame::NoFrame);}
|
||||||
|
|
||||||
|
virtual QString label() const = 0;
|
||||||
|
virtual void loadData(const Data &data, const QList<PathItem *> &paths) = 0;
|
||||||
|
virtual void clear() {GraphView::clear();}
|
||||||
|
virtual void setUnits(enum Units units) {GraphView::setUnits(units);}
|
||||||
|
virtual void setGraphType(GraphType type) {GraphView::setGraphType(type);}
|
||||||
|
virtual void setTimeType(enum TimeType type) {Q_UNUSED(type)}
|
||||||
|
virtual void showTracks(bool show) {Q_UNUSED(show)}
|
||||||
|
virtual void showRoutes(bool show) {Q_UNUSED(show)}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GRAPHTAB_H
|
498
src/GUI/graphview.cpp
Normal file
@ -0,0 +1,498 @@
|
|||||||
|
#include <QGraphicsScene>
|
||||||
|
#include <QEvent>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QPaintEngine>
|
||||||
|
#include <QPaintDevice>
|
||||||
|
#include "data/graph.h"
|
||||||
|
#include "opengl.h"
|
||||||
|
#include "config.h"
|
||||||
|
#include "axisitem.h"
|
||||||
|
#include "slideritem.h"
|
||||||
|
#include "sliderinfoitem.h"
|
||||||
|
#include "infoitem.h"
|
||||||
|
#include "griditem.h"
|
||||||
|
#include "graphitem.h"
|
||||||
|
#include "pathitem.h"
|
||||||
|
#include "format.h"
|
||||||
|
#include "graphview.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define MARGIN 10.0
|
||||||
|
|
||||||
|
GraphView::GraphView(QWidget *parent)
|
||||||
|
: QGraphicsView(parent)
|
||||||
|
{
|
||||||
|
_scene = new QGraphicsScene(this);
|
||||||
|
setScene(_scene);
|
||||||
|
|
||||||
|
setBackgroundBrush(QBrush(Qt::white));
|
||||||
|
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||||
|
setRenderHint(QPainter::Antialiasing, true);
|
||||||
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
|
_xAxis = new AxisItem(AxisItem::X);
|
||||||
|
_xAxis->setZValue(2.0);
|
||||||
|
_yAxis = new AxisItem(AxisItem::Y);
|
||||||
|
_yAxis->setZValue(2.0);
|
||||||
|
_slider = new SliderItem();
|
||||||
|
_slider->setZValue(3.0);
|
||||||
|
_sliderInfo = new SliderInfoItem(_slider);
|
||||||
|
_sliderInfo->setZValue(3.0);
|
||||||
|
_info = new InfoItem();
|
||||||
|
_grid = new GridItem();
|
||||||
|
|
||||||
|
connect(_slider, SIGNAL(positionChanged(const QPointF&)), this,
|
||||||
|
SLOT(emitSliderPositionChanged(const QPointF&)));
|
||||||
|
|
||||||
|
_width = 1;
|
||||||
|
|
||||||
|
_xScale = 1;
|
||||||
|
_yScale = 1;
|
||||||
|
_yOffset = 0;
|
||||||
|
|
||||||
|
_precision = 0;
|
||||||
|
_minYRange = 0.01;
|
||||||
|
|
||||||
|
_sliderPos = 0;
|
||||||
|
|
||||||
|
_units = Metric;
|
||||||
|
_graphType = Distance;
|
||||||
|
_xLabel = tr("Distance");
|
||||||
|
}
|
||||||
|
|
||||||
|
GraphView::~GraphView()
|
||||||
|
{
|
||||||
|
if (_xAxis->scene() != _scene)
|
||||||
|
delete _xAxis;
|
||||||
|
if (_yAxis->scene() != _scene)
|
||||||
|
delete _yAxis;
|
||||||
|
if (_slider->scene() != _scene)
|
||||||
|
delete _slider;
|
||||||
|
if (_info->scene() != _scene)
|
||||||
|
delete _info;
|
||||||
|
if (_grid->scene() != _scene)
|
||||||
|
delete _grid;
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++)
|
||||||
|
if (_graphs.at(i)->scene() != _scene)
|
||||||
|
delete _graphs[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::createXLabel()
|
||||||
|
{
|
||||||
|
_xAxis->setLabel(QString("%1 [%2]").arg(_xLabel).arg(_xUnits));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::createYLabel()
|
||||||
|
{
|
||||||
|
_yAxis->setLabel(QString("%1 [%2]").arg(_yLabel).arg(_yUnits));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setYLabel(const QString &label)
|
||||||
|
{
|
||||||
|
_yLabel = label;
|
||||||
|
createYLabel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setYUnits(const QString &units)
|
||||||
|
{
|
||||||
|
_yUnits = units;
|
||||||
|
createYLabel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setXUnits()
|
||||||
|
{
|
||||||
|
if (_graphType == Distance) {
|
||||||
|
if (_units == Metric) {
|
||||||
|
if (bounds().width() < KMINM) {
|
||||||
|
_xUnits = tr("m");
|
||||||
|
_xScale = 1;
|
||||||
|
} else {
|
||||||
|
_xUnits = tr("km");
|
||||||
|
_xScale = M2KM;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (bounds().width() < MIINM) {
|
||||||
|
_xUnits = tr("ft");
|
||||||
|
_xScale = M2FT;
|
||||||
|
} else {
|
||||||
|
_xUnits = tr("mi");
|
||||||
|
_xScale = M2MI;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (bounds().width() < MININS) {
|
||||||
|
_xUnits = tr("s");
|
||||||
|
_xScale = 1;
|
||||||
|
} else if (bounds().width() < HINS) {
|
||||||
|
_xUnits = tr("min");
|
||||||
|
_xScale = MIN2S;
|
||||||
|
} else {
|
||||||
|
_xUnits = tr("h");
|
||||||
|
_xScale = H2S;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
createXLabel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setUnits(Units units)
|
||||||
|
{
|
||||||
|
_units = units;
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++)
|
||||||
|
_graphs.at(i)->setUnits(units);
|
||||||
|
|
||||||
|
setXUnits();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setGraphType(GraphType type)
|
||||||
|
{
|
||||||
|
_graphType = type;
|
||||||
|
_bounds = QRectF();
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++) {
|
||||||
|
_graphs.at(i)->setGraphType(type);
|
||||||
|
if (_graphs.at(i)->scene() == _scene)
|
||||||
|
_bounds |= _graphs.at(i)->bounds();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == Distance)
|
||||||
|
_xLabel = tr("Distance");
|
||||||
|
else
|
||||||
|
_xLabel = tr("Time");
|
||||||
|
setXUnits();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::showGrid(bool show)
|
||||||
|
{
|
||||||
|
_grid->setVisible(show);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::showSliderInfo(bool show)
|
||||||
|
{
|
||||||
|
_sliderInfo->setVisible(show);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::addGraph(GraphItem *graph, PathItem *path, int id)
|
||||||
|
{
|
||||||
|
QColor color(_palette.nextColor());
|
||||||
|
color.setAlpha(255);
|
||||||
|
|
||||||
|
graph->setUnits(_units);
|
||||||
|
graph->setId(id);
|
||||||
|
graph->setColor(color);
|
||||||
|
graph->setWidth(_width);
|
||||||
|
|
||||||
|
connect(this, SIGNAL(sliderPositionChanged(qreal)), graph,
|
||||||
|
SLOT(emitSliderPositionChanged(qreal)));
|
||||||
|
connect(graph, SIGNAL(sliderPositionChanged(qreal)), path,
|
||||||
|
SLOT(moveMarker(qreal)));
|
||||||
|
connect(path, SIGNAL(selected(bool)), graph, SLOT(hover(bool)));
|
||||||
|
connect(graph, SIGNAL(selected(bool)), path, SLOT(hover(bool)));
|
||||||
|
|
||||||
|
_graphs.append(graph);
|
||||||
|
|
||||||
|
if (!_hide.contains(id)) {
|
||||||
|
_visible.append(graph);
|
||||||
|
_scene->addItem(graph);
|
||||||
|
_bounds |= graph->bounds();
|
||||||
|
setXUnits();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::removeItem(QGraphicsItem *item)
|
||||||
|
{
|
||||||
|
if (item->scene() == _scene)
|
||||||
|
_scene->removeItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::addItem(QGraphicsItem *item)
|
||||||
|
{
|
||||||
|
if (item->scene() != _scene)
|
||||||
|
_scene->addItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::showGraph(bool show, int id)
|
||||||
|
{
|
||||||
|
if (show)
|
||||||
|
_hide.remove(id);
|
||||||
|
else
|
||||||
|
_hide.insert(id);
|
||||||
|
|
||||||
|
_visible.clear();
|
||||||
|
_bounds = QRectF();
|
||||||
|
for (int i = 0; i < _graphs.count(); i++) {
|
||||||
|
GraphItem* gi = _graphs.at(i);
|
||||||
|
if (_hide.contains(gi->id()))
|
||||||
|
removeItem(gi);
|
||||||
|
else {
|
||||||
|
addItem(gi);
|
||||||
|
_visible.append(gi);
|
||||||
|
_bounds |= gi->bounds();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QRectF GraphView::bounds() const
|
||||||
|
{
|
||||||
|
QRectF br(_bounds);
|
||||||
|
br.moveTopLeft(QPointF(br.left(), -br.top() - br.height()));
|
||||||
|
return br;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::redraw()
|
||||||
|
{
|
||||||
|
redraw(viewport()->size() - QSizeF(MARGIN, MARGIN));
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::redraw(const QSizeF &size)
|
||||||
|
{
|
||||||
|
QRectF r;
|
||||||
|
QSizeF mx, my;
|
||||||
|
RangeF rx, ry;
|
||||||
|
qreal sx, sy;
|
||||||
|
|
||||||
|
|
||||||
|
if (_visible.isEmpty() || _bounds.isNull()) {
|
||||||
|
removeItem(_xAxis);
|
||||||
|
removeItem(_yAxis);
|
||||||
|
removeItem(_slider);
|
||||||
|
removeItem(_info);
|
||||||
|
removeItem(_grid);
|
||||||
|
_scene->setSceneRect(QRectF());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
addItem(_xAxis);
|
||||||
|
addItem(_yAxis);
|
||||||
|
addItem(_slider);
|
||||||
|
addItem(_info);
|
||||||
|
addItem(_grid);
|
||||||
|
|
||||||
|
rx = RangeF(bounds().left() * _xScale, bounds().right() * _xScale);
|
||||||
|
ry = RangeF(bounds().top() * _yScale + _yOffset, bounds().bottom() * _yScale
|
||||||
|
+ _yOffset);
|
||||||
|
if (ry.size() < _minYRange)
|
||||||
|
ry.resize(_minYRange);
|
||||||
|
|
||||||
|
_xAxis->setRange(rx);
|
||||||
|
_yAxis->setRange(ry);
|
||||||
|
mx = _xAxis->margin();
|
||||||
|
my = _yAxis->margin();
|
||||||
|
|
||||||
|
r = _bounds;
|
||||||
|
if (r.height() < _minYRange)
|
||||||
|
r.adjust(0, -(_minYRange/2 - r.height()/2), 0,
|
||||||
|
_minYRange/2 - r.height()/2);
|
||||||
|
|
||||||
|
sx = (size.width() - (my.width() + mx.width())) / r.width();
|
||||||
|
sy = (size.height() - (mx.height() + my.height())
|
||||||
|
- _info->boundingRect().height()) / r.height();
|
||||||
|
|
||||||
|
for (int i = 0; i < _visible.size(); i++)
|
||||||
|
_visible.at(i)->setScale(sx, sy);
|
||||||
|
|
||||||
|
QPointF p(r.left() * sx, r.top() * sy);
|
||||||
|
QSizeF s(r.width() * sx, r.height() * sy);
|
||||||
|
r = QRectF(p, s);
|
||||||
|
if (r.height() < _minYRange * sy)
|
||||||
|
r.adjust(0, -(_minYRange/2 * sy - r.height()/2), 0,
|
||||||
|
(_minYRange/2) * sy - r.height()/2);
|
||||||
|
|
||||||
|
_xAxis->setSize(r.width());
|
||||||
|
_yAxis->setSize(r.height());
|
||||||
|
_xAxis->setPos(r.bottomLeft());
|
||||||
|
_yAxis->setPos(r.bottomLeft());
|
||||||
|
|
||||||
|
_grid->setSize(r.size());
|
||||||
|
_grid->setTicks(_xAxis->ticks(), _yAxis->ticks());
|
||||||
|
_grid->setPos(r.bottomLeft());
|
||||||
|
|
||||||
|
_slider->setArea(r);
|
||||||
|
updateSliderPosition();
|
||||||
|
|
||||||
|
r |= _xAxis->sceneBoundingRect();
|
||||||
|
r |= _yAxis->sceneBoundingRect();
|
||||||
|
_info->setPos(r.topLeft() + QPointF(r.width()/2
|
||||||
|
- _info->boundingRect().width()/2, -_info->boundingRect().height()));
|
||||||
|
|
||||||
|
_scene->setSceneRect(_scene->itemsBoundingRect());
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::resizeEvent(QResizeEvent *)
|
||||||
|
{
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::mousePressEvent(QMouseEvent *e)
|
||||||
|
{
|
||||||
|
if (e->button() == Qt::LeftButton)
|
||||||
|
newSliderPosition(mapToScene(e->pos()));
|
||||||
|
|
||||||
|
QGraphicsView::mousePressEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::plot(QPainter *painter, const QRectF &target, qreal scale)
|
||||||
|
{
|
||||||
|
QSizeF canvas = QSizeF(target.width() / scale, target.height() / scale);
|
||||||
|
|
||||||
|
setUpdatesEnabled(false);
|
||||||
|
redraw(canvas);
|
||||||
|
if (_slider->pos().x() == _slider->area().left())
|
||||||
|
_slider->hide();
|
||||||
|
_scene->render(painter, target);
|
||||||
|
_slider->show();
|
||||||
|
redraw();
|
||||||
|
setUpdatesEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::clear()
|
||||||
|
{
|
||||||
|
_slider->clear();
|
||||||
|
_info->clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++)
|
||||||
|
delete _graphs[i];
|
||||||
|
|
||||||
|
_graphs.clear();
|
||||||
|
_visible.clear();
|
||||||
|
_palette.reset();
|
||||||
|
|
||||||
|
_bounds = QRectF();
|
||||||
|
_sliderPos = 0;
|
||||||
|
|
||||||
|
_scene->setSceneRect(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::updateSliderPosition()
|
||||||
|
{
|
||||||
|
if (bounds().width() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_sliderPos <= bounds().right() && _sliderPos >= bounds().left()) {
|
||||||
|
_slider->setPos((_sliderPos / bounds().width())
|
||||||
|
* _slider->area().width(), _slider->area().bottom());
|
||||||
|
_slider->setVisible(!_visible.isEmpty());
|
||||||
|
} else {
|
||||||
|
_slider->setPos(_slider->area().left(), _slider->area().bottom());
|
||||||
|
_slider->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_slider->isVisible())
|
||||||
|
updateSliderInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::updateSliderInfo()
|
||||||
|
{
|
||||||
|
qreal r, y;
|
||||||
|
|
||||||
|
if (_visible.count() > 1) {
|
||||||
|
r = 0;
|
||||||
|
y = 0;
|
||||||
|
} else {
|
||||||
|
QRectF br(_visible.first()->bounds());
|
||||||
|
if (br.height() < _minYRange)
|
||||||
|
br.adjust(0, -(_minYRange/2 - br.height()/2), 0,
|
||||||
|
_minYRange/2 - br.height()/2);
|
||||||
|
|
||||||
|
y = _visible.first()->yAtX(_sliderPos);
|
||||||
|
r = (y - br.bottom()) / br.height();
|
||||||
|
}
|
||||||
|
|
||||||
|
qreal pos = (_sliderPos / bounds().width()) * _slider->area().width();
|
||||||
|
SliderInfoItem::Side s = (pos + _sliderInfo->boundingRect().width()
|
||||||
|
> _slider->area().right()) ? SliderInfoItem::Left : SliderInfoItem::Right;
|
||||||
|
|
||||||
|
_sliderInfo->setSide(s);
|
||||||
|
_sliderInfo->setPos(QPointF(0, _slider->boundingRect().height() * r));
|
||||||
|
_sliderInfo->setText(_graphType == Time ? Format::timeSpan(_sliderPos,
|
||||||
|
bounds().width() > 3600) : QString::number(_sliderPos * _xScale, 'f', 1)
|
||||||
|
+ UNIT_SPACE + _xUnits, (_visible.count() > 1) ? QString()
|
||||||
|
: QString::number(-y * _yScale + _yOffset, 'f', _precision) + UNIT_SPACE
|
||||||
|
+ _yUnits);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::emitSliderPositionChanged(const QPointF &pos)
|
||||||
|
{
|
||||||
|
if (_slider->area().width() <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_sliderPos = (pos.x() / _slider->area().width()) * bounds().width();
|
||||||
|
_sliderPos = qMax(_sliderPos, bounds().left());
|
||||||
|
_sliderPos = qMin(_sliderPos, bounds().right());
|
||||||
|
updateSliderPosition();
|
||||||
|
|
||||||
|
emit sliderPositionChanged(_sliderPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setSliderPosition(qreal pos)
|
||||||
|
{
|
||||||
|
if (_visible.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_sliderPos = pos;
|
||||||
|
updateSliderPosition();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::newSliderPosition(const QPointF &pos)
|
||||||
|
{
|
||||||
|
if (_slider->area().contains(pos))
|
||||||
|
_slider->setPos(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::addInfo(const QString &key, const QString &value)
|
||||||
|
{
|
||||||
|
_info->insert(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::clearInfo()
|
||||||
|
{
|
||||||
|
_info->clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setPalette(const Palette &palette)
|
||||||
|
{
|
||||||
|
_palette = palette;
|
||||||
|
_palette.reset();
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++) {
|
||||||
|
QColor color(_palette.nextColor());
|
||||||
|
color.setAlpha(255);
|
||||||
|
_graphs.at(i)->setColor(color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setGraphWidth(int width)
|
||||||
|
{
|
||||||
|
_width = width;
|
||||||
|
|
||||||
|
for (int i = 0; i < _graphs.count(); i++)
|
||||||
|
_graphs.at(i)->setWidth(width);
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::useOpenGL(bool use)
|
||||||
|
{
|
||||||
|
if (use)
|
||||||
|
setViewport(new OPENGL_WIDGET);
|
||||||
|
else
|
||||||
|
setViewport(new QWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::useAntiAliasing(bool use)
|
||||||
|
{
|
||||||
|
setRenderHint(QPainter::Antialiasing, use);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GraphView::setSliderColor(const QColor &color)
|
||||||
|
{
|
||||||
|
_slider->setColor(color);
|
||||||
|
_sliderInfo->setColor(color);
|
||||||
|
}
|
115
src/GUI/graphview.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
#ifndef GRAPHVIEW_H
|
||||||
|
#define GRAPHVIEW_H
|
||||||
|
|
||||||
|
#include <QGraphicsView>
|
||||||
|
#include <QList>
|
||||||
|
#include <QSet>
|
||||||
|
#include "data/graph.h"
|
||||||
|
#include "palette.h"
|
||||||
|
#include "units.h"
|
||||||
|
|
||||||
|
|
||||||
|
class AxisItem;
|
||||||
|
class SliderItem;
|
||||||
|
class SliderInfoItem;
|
||||||
|
class InfoItem;
|
||||||
|
class GraphItem;
|
||||||
|
class PathItem;
|
||||||
|
class GridItem;
|
||||||
|
|
||||||
|
class GraphView : public QGraphicsView
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
GraphView(QWidget *parent = 0);
|
||||||
|
~GraphView();
|
||||||
|
|
||||||
|
bool isEmpty() const {return _graphs.isEmpty();}
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
void plot(QPainter *painter, const QRectF &target, qreal scale);
|
||||||
|
|
||||||
|
void setPalette(const Palette &palette);
|
||||||
|
void setGraphWidth(int width);
|
||||||
|
void showGrid(bool show);
|
||||||
|
void showSliderInfo(bool show);
|
||||||
|
void useOpenGL(bool use);
|
||||||
|
void useAntiAliasing(bool use);
|
||||||
|
|
||||||
|
void setSliderPosition(qreal pos);
|
||||||
|
void setSliderColor(const QColor &color);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sliderPositionChanged(qreal);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void addGraph(GraphItem *graph, PathItem *path, int id = 0);
|
||||||
|
|
||||||
|
void showGraph(bool show, int id = 0);
|
||||||
|
void setGraphType(GraphType type);
|
||||||
|
void setUnits(Units units);
|
||||||
|
|
||||||
|
const QString &yLabel() const {return _yLabel;}
|
||||||
|
const QString &yUnits() const {return _yUnits;}
|
||||||
|
qreal yScale() const {return _yScale;}
|
||||||
|
qreal yOffset() const {return _yOffset;}
|
||||||
|
void setYLabel(const QString &label);
|
||||||
|
void setYUnits(const QString &units);
|
||||||
|
void setYScale(qreal scale) {_yScale = scale;}
|
||||||
|
void setYOffset(qreal offset) {_yOffset = offset;}
|
||||||
|
|
||||||
|
void setSliderPrecision(int precision) {_precision = precision;}
|
||||||
|
void setMinYRange(qreal range) {_minYRange = range;}
|
||||||
|
|
||||||
|
QRectF bounds() const;
|
||||||
|
void redraw();
|
||||||
|
void redraw(const QSizeF &size);
|
||||||
|
void addInfo(const QString &key, const QString &value);
|
||||||
|
void clearInfo();
|
||||||
|
void skipColor() {_palette.nextColor();}
|
||||||
|
|
||||||
|
QList<GraphItem*> _graphs;
|
||||||
|
GraphType _graphType;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void emitSliderPositionChanged(const QPointF &pos);
|
||||||
|
void newSliderPosition(const QPointF &pos);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void setXUnits();
|
||||||
|
void createXLabel();
|
||||||
|
void createYLabel();
|
||||||
|
void updateSliderPosition();
|
||||||
|
void updateSliderInfo();
|
||||||
|
void removeItem(QGraphicsItem *item);
|
||||||
|
void addItem(QGraphicsItem *item);
|
||||||
|
|
||||||
|
void resizeEvent(QResizeEvent *);
|
||||||
|
void mousePressEvent(QMouseEvent *);
|
||||||
|
|
||||||
|
Units _units;
|
||||||
|
qreal _xScale, _yScale;
|
||||||
|
qreal _yOffset;
|
||||||
|
QString _xUnits, _yUnits;
|
||||||
|
QString _xLabel, _yLabel;
|
||||||
|
int _precision;
|
||||||
|
qreal _minYRange;
|
||||||
|
qreal _sliderPos;
|
||||||
|
|
||||||
|
QGraphicsScene *_scene;
|
||||||
|
|
||||||
|
AxisItem *_xAxis, *_yAxis;
|
||||||
|
SliderItem *_slider;
|
||||||
|
SliderInfoItem *_sliderInfo;
|
||||||
|
InfoItem *_info;
|
||||||
|
GridItem *_grid;
|
||||||
|
|
||||||
|
QList<GraphItem*> _visible;
|
||||||
|
QSet<int> _hide;
|
||||||
|
QRectF _bounds;
|
||||||
|
Palette _palette;
|
||||||
|
int _width;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GRAPHVIEW_H
|
50
src/GUI/griditem.cpp
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#include <QPainter>
|
||||||
|
#include "griditem.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define GRID_WIDTH 0
|
||||||
|
|
||||||
|
GridItem::GridItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||||
|
{
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
}
|
||||||
|
|
||||||
|
void GridItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget)
|
||||||
|
{
|
||||||
|
Q_UNUSED(option);
|
||||||
|
Q_UNUSED(widget);
|
||||||
|
QBrush brush(Qt::gray);
|
||||||
|
QPen pen = QPen(brush, GRID_WIDTH, Qt::DotLine);
|
||||||
|
|
||||||
|
|
||||||
|
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||||
|
painter->setPen(pen);
|
||||||
|
|
||||||
|
for (int i = 0; i < _xTicks.size(); i++)
|
||||||
|
painter->drawLine(_xTicks.at(i), 0, _xTicks.at(i),
|
||||||
|
-_boundingRect.height());
|
||||||
|
for (int i = 0; i < _yTicks.size(); i++)
|
||||||
|
painter->drawLine(0, -_yTicks.at(i), boundingRect().width(),
|
||||||
|
-_yTicks.at(i));
|
||||||
|
|
||||||
|
/*
|
||||||
|
painter->setPen(Qt::red);
|
||||||
|
painter->drawRect(boundingRect());
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void GridItem::setTicks(const QList<qreal> &x, const QList<qreal> &y)
|
||||||
|
{
|
||||||
|
_xTicks = x; _yTicks = y;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GridItem::setSize(const QSizeF &size)
|
||||||
|
{
|
||||||
|
prepareGeometryChange();
|
||||||
|
|
||||||
|
_boundingRect = QRectF(QPointF(0, -size.height()), size);
|
||||||
|
}
|
23
src/GUI/griditem.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef GRIDITEM_H
|
||||||
|
#define GRIDITEM_H
|
||||||
|
|
||||||
|
#include <QGraphicsItem>
|
||||||
|
|
||||||
|
class GridItem : public QGraphicsItem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GridItem(QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
QRectF boundingRect() const {return _boundingRect;}
|
||||||
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||||
|
QWidget *widget);
|
||||||
|
|
||||||
|
void setTicks(const QList<qreal> &x, const QList<qreal> &y);
|
||||||
|
void setSize(const QSizeF &size);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QRectF _boundingRect;
|
||||||
|
QList<qreal> _xTicks, _yTicks;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GRIDITEM_H
|
1893
src/GUI/gui.cpp
Normal file
219
src/GUI/gui.h
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
#ifndef GUI_H
|
||||||
|
#define GUI_H
|
||||||
|
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QString>
|
||||||
|
#include <QList>
|
||||||
|
#include <QDate>
|
||||||
|
#include <QPrinter>
|
||||||
|
#include "data/graph.h"
|
||||||
|
#include "data/poi.h"
|
||||||
|
#include "units.h"
|
||||||
|
#include "timetype.h"
|
||||||
|
#include "exportdialog.h"
|
||||||
|
#include "optionsdialog.h"
|
||||||
|
|
||||||
|
class QMenu;
|
||||||
|
class QToolBar;
|
||||||
|
class QTabWidget;
|
||||||
|
class QActionGroup;
|
||||||
|
class QAction;
|
||||||
|
class QLabel;
|
||||||
|
class QSignalMapper;
|
||||||
|
class QPrinter;
|
||||||
|
class FileBrowser;
|
||||||
|
class GraphTab;
|
||||||
|
class MapView;
|
||||||
|
class Map;
|
||||||
|
class MapList;
|
||||||
|
|
||||||
|
class GUI : public QMainWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
GUI();
|
||||||
|
~GUI();
|
||||||
|
|
||||||
|
bool openFile(const QString &fileName);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void about();
|
||||||
|
void keys();
|
||||||
|
void paths();
|
||||||
|
void printFile();
|
||||||
|
void exportFile();
|
||||||
|
void openFile();
|
||||||
|
void closeAll();
|
||||||
|
void reloadFile();
|
||||||
|
void openPOIFile();
|
||||||
|
void closePOIFiles();
|
||||||
|
void showGraphs(bool show);
|
||||||
|
void showGraphGrids(bool show);
|
||||||
|
void showGraphSliderInfo(bool show);
|
||||||
|
void showToolbars(bool show);
|
||||||
|
void showFullscreen(bool show);
|
||||||
|
void showTracks(bool show);
|
||||||
|
void showRoutes(bool show);
|
||||||
|
void loadMap();
|
||||||
|
void nextMap();
|
||||||
|
void prevMap();
|
||||||
|
void openOptions();
|
||||||
|
|
||||||
|
void mapChanged(int);
|
||||||
|
void graphChanged(int);
|
||||||
|
void poiFileChecked(int);
|
||||||
|
|
||||||
|
void next();
|
||||||
|
void prev();
|
||||||
|
void last();
|
||||||
|
void first();
|
||||||
|
|
||||||
|
void setTotalTime() {setTimeType(Total);}
|
||||||
|
void setMovingTime() {setTimeType(Moving);}
|
||||||
|
void setMetricUnits() {setUnits(Metric);}
|
||||||
|
void setImperialUnits() {setUnits(Imperial);}
|
||||||
|
void setDistanceGraph() {setGraphType(Distance);}
|
||||||
|
void setTimeGraph() {setGraphType(Time);}
|
||||||
|
|
||||||
|
void sliderPositionChanged(qreal pos);
|
||||||
|
|
||||||
|
private:
|
||||||
|
typedef QPair<QDate, QDate> DateRange;
|
||||||
|
|
||||||
|
void loadMaps();
|
||||||
|
void loadPOIs();
|
||||||
|
void closeFiles();
|
||||||
|
void plot(QPrinter *printer);
|
||||||
|
|
||||||
|
QAction *createPOIFileAction(int index);
|
||||||
|
void createPOIFilesActions();
|
||||||
|
void createMapActions();
|
||||||
|
void createActions();
|
||||||
|
void createMenus();
|
||||||
|
void createToolBars();
|
||||||
|
void createStatusBar();
|
||||||
|
void createMapView();
|
||||||
|
void createGraphTabs();
|
||||||
|
void createBrowser();
|
||||||
|
|
||||||
|
bool openPOIFile(const QString &fileName);
|
||||||
|
bool loadFile(const QString &fileName);
|
||||||
|
bool loadMap(const QString &fileName);
|
||||||
|
void exportFile(const QString &fileName);
|
||||||
|
void updateStatusBarInfo();
|
||||||
|
void updateWindowTitle();
|
||||||
|
void updateNavigationActions();
|
||||||
|
void updateGraphTabs();
|
||||||
|
void updateMapView();
|
||||||
|
|
||||||
|
TimeType timeType() const;
|
||||||
|
Units units() const;
|
||||||
|
void setTimeType(TimeType type);
|
||||||
|
void setUnits(Units units);
|
||||||
|
void setGraphType(GraphType type);
|
||||||
|
|
||||||
|
qreal distance() const;
|
||||||
|
qreal time() const;
|
||||||
|
qreal movingTime() const;
|
||||||
|
int mapIndex(const QString &name);
|
||||||
|
void readSettings();
|
||||||
|
void writeSettings();
|
||||||
|
|
||||||
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
void closeEvent(QCloseEvent *event);
|
||||||
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
|
void dropEvent(QDropEvent *event);
|
||||||
|
|
||||||
|
QToolBar *_fileToolBar;
|
||||||
|
QToolBar *_showToolBar;
|
||||||
|
QToolBar *_navigationToolBar;
|
||||||
|
QMenu *_poiFilesMenu;
|
||||||
|
QMenu *_mapMenu;
|
||||||
|
|
||||||
|
QActionGroup *_fileActionGroup;
|
||||||
|
QActionGroup *_navigationActionGroup;
|
||||||
|
QActionGroup *_mapsActionGroup;
|
||||||
|
QAction *_exitAction;
|
||||||
|
QAction *_keysAction;
|
||||||
|
QAction *_pathsAction;
|
||||||
|
QAction *_aboutAction;
|
||||||
|
QAction *_aboutQtAction;
|
||||||
|
QAction *_printFileAction;
|
||||||
|
QAction *_exportFileAction;
|
||||||
|
QAction *_openFileAction;
|
||||||
|
QAction *_closeFileAction;
|
||||||
|
QAction *_reloadFileAction;
|
||||||
|
QAction *_openPOIAction;
|
||||||
|
QAction *_closePOIAction;
|
||||||
|
QAction *_showPOIAction;
|
||||||
|
QAction *_overlapPOIAction;
|
||||||
|
QAction *_showPOILabelsAction;
|
||||||
|
QAction *_showMapAction;
|
||||||
|
QAction *_fullscreenAction;
|
||||||
|
QAction *_loadMapAction;
|
||||||
|
QAction *_clearMapCacheAction;
|
||||||
|
QAction *_showGraphsAction;
|
||||||
|
QAction *_showGraphGridAction;
|
||||||
|
QAction *_showGraphSliderInfoAction;
|
||||||
|
QAction *_distanceGraphAction;
|
||||||
|
QAction *_timeGraphAction;
|
||||||
|
QAction *_showToolbarsAction;
|
||||||
|
QAction *_nextAction;
|
||||||
|
QAction *_prevAction;
|
||||||
|
QAction *_lastAction;
|
||||||
|
QAction *_firstAction;
|
||||||
|
QAction *_metricUnitsAction;
|
||||||
|
QAction *_imperialUnitsAction;
|
||||||
|
QAction *_totalTimeAction;
|
||||||
|
QAction *_movingTimeAction;
|
||||||
|
QAction *_nextMapAction;
|
||||||
|
QAction *_prevMapAction;
|
||||||
|
QAction *_showTracksAction;
|
||||||
|
QAction *_showRoutesAction;
|
||||||
|
QAction *_showWaypointsAction;
|
||||||
|
QAction *_showWaypointLabelsAction;
|
||||||
|
QAction *_showRouteWaypointsAction;
|
||||||
|
QAction *_openOptionsAction;
|
||||||
|
QAction *_mapsEnd;
|
||||||
|
QList<QAction*> _mapActions;
|
||||||
|
QList<QAction*> _poiFilesActions;
|
||||||
|
|
||||||
|
QSignalMapper *_poiFilesSignalMapper;
|
||||||
|
QSignalMapper *_mapsSignalMapper;
|
||||||
|
|
||||||
|
QLabel *_fileNameLabel;
|
||||||
|
QLabel *_distanceLabel;
|
||||||
|
QLabel *_timeLabel;
|
||||||
|
|
||||||
|
MapView *_mapView;
|
||||||
|
QTabWidget *_graphTabWidget;
|
||||||
|
QList<GraphTab*> _tabs;
|
||||||
|
|
||||||
|
POI *_poi;
|
||||||
|
MapList *_ml;
|
||||||
|
Map *_map;
|
||||||
|
|
||||||
|
FileBrowser *_browser;
|
||||||
|
QList<QString> _files;
|
||||||
|
|
||||||
|
int _trackCount;
|
||||||
|
int _routeCount;
|
||||||
|
int _waypointCount;
|
||||||
|
qreal _trackDistance;
|
||||||
|
qreal _routeDistance;
|
||||||
|
qreal _time;
|
||||||
|
qreal _movingTime;
|
||||||
|
DateRange _dateRange;
|
||||||
|
QString _pathName;
|
||||||
|
|
||||||
|
qreal _sliderPos;
|
||||||
|
|
||||||
|
int _frameStyle;
|
||||||
|
bool _showGraphs;
|
||||||
|
|
||||||
|
Export _export;
|
||||||
|
Options _options;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // GUI_H
|
79
src/GUI/heartrategraph.cpp
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#include "data/data.h"
|
||||||
|
#include "heartrategraphitem.h"
|
||||||
|
#include "heartrategraph.h"
|
||||||
|
|
||||||
|
|
||||||
|
HeartRateGraph::HeartRateGraph(QWidget *parent) : GraphTab(parent)
|
||||||
|
{
|
||||||
|
_showTracks = true;
|
||||||
|
|
||||||
|
GraphView::setYUnits(tr("1/min"));
|
||||||
|
setYLabel(tr("Heart rate"));
|
||||||
|
|
||||||
|
setSliderPrecision(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HeartRateGraph::setInfo()
|
||||||
|
{
|
||||||
|
if (_showTracks) {
|
||||||
|
GraphView::addInfo(tr("Average"), QString::number(avg() * yScale(), 'f',
|
||||||
|
0) + UNIT_SPACE + yUnits());
|
||||||
|
GraphView::addInfo(tr("Maximum"), QString::number(max() * yScale(), 'f',
|
||||||
|
0) + UNIT_SPACE + yUnits());
|
||||||
|
} else
|
||||||
|
clearInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HeartRateGraph::loadData(const Data &data, const QList<PathItem *> &paths)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < data.tracks().count(); i++) {
|
||||||
|
const Graph &graph = data.tracks().at(i)->heartRate();
|
||||||
|
|
||||||
|
if (graph.size() < 2) {
|
||||||
|
skipColor();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
HeartRateGraphItem *gi = new HeartRateGraphItem(graph, _graphType);
|
||||||
|
GraphView::addGraph(gi, paths.at(i));
|
||||||
|
|
||||||
|
_avg.append(QPointF(data.tracks().at(i)->distance(), gi->avg()));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < data.routes().count(); i++)
|
||||||
|
skipColor();
|
||||||
|
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
return (sum / w);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HeartRateGraph::clear()
|
||||||
|
{
|
||||||
|
_avg.clear();
|
||||||
|
|
||||||
|
GraphView::clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void HeartRateGraph::showTracks(bool show)
|
||||||
|
{
|
||||||
|
_showTracks = show;
|
||||||
|
|
||||||
|
showGraph(show);
|
||||||
|
setInfo();
|
||||||
|
|
||||||
|
redraw();
|
||||||
|
}
|
28
src/GUI/heartrategraph.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#ifndef HEARTRATEGRAPH_H
|
||||||
|
#define HEARTRATEGRAPH_H
|
||||||
|
|
||||||
|
#include "graphtab.h"
|
||||||
|
|
||||||
|
class HeartRateGraph : public GraphTab
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
HeartRateGraph(QWidget *parent = 0);
|
||||||
|
|
||||||
|
QString label() const {return tr("Heart rate");}
|
||||||
|
void loadData(const Data &data, const QList<PathItem *> &paths);
|
||||||
|
void clear();
|
||||||
|
void showTracks(bool show);
|
||||||
|
|
||||||
|
private:
|
||||||
|
qreal avg() const;
|
||||||
|
qreal max() const {return bounds().bottom();}
|
||||||
|
void setInfo();
|
||||||
|
|
||||||
|
QList<QPointF> _avg;
|
||||||
|
|
||||||
|
bool _showTracks;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // HEARTRATEGRAPH_H
|
26
src/GUI/heartrategraphitem.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "tooltip.h"
|
||||||
|
#include "heartrategraphitem.h"
|
||||||
|
|
||||||
|
HeartRateGraphItem::HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent) : GraphItem(graph, type, parent)
|
||||||
|
{
|
||||||
|
qreal sum = 0;
|
||||||
|
|
||||||
|
for (int j = 1; j < graph.size(); j++)
|
||||||
|
sum += graph.at(j).y() * (graph.at(j).s() - graph.at(j-1).s());
|
||||||
|
_avg = sum/graph.last().s();
|
||||||
|
|
||||||
|
setToolTip(toolTip());
|
||||||
|
}
|
||||||
|
|
||||||
|
QString HeartRateGraphItem::toolTip() const
|
||||||
|
{
|
||||||
|
ToolTip tt;
|
||||||
|
|
||||||
|
tt.insert(tr("Maximum"), QString::number(max(), 'f', 0)
|
||||||
|
+ UNIT_SPACE + tr("1/min"));
|
||||||
|
tt.insert(tr("Average"), QString::number(avg(), 'f', 0)
|
||||||
|
+ UNIT_SPACE + tr("1/min"));
|
||||||
|
|
||||||
|
return tt.toString();
|
||||||
|
}
|
23
src/GUI/heartrategraphitem.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef HEARTRATEGRAPHITEM_H
|
||||||
|
#define HEARTRATEGRAPHITEM_H
|
||||||
|
|
||||||
|
#include "graphitem.h"
|
||||||
|
|
||||||
|
class HeartRateGraphItem : public GraphItem
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
HeartRateGraphItem(const Graph &graph, GraphType type,
|
||||||
|
QGraphicsItem *parent = 0);
|
||||||
|
|
||||||
|
qreal max() const {return -bounds().top();}
|
||||||
|
qreal avg() const {return _avg;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString toolTip() const;
|
||||||
|
|
||||||
|
qreal _avg;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // HEARTRATEGRAPHITEM_H
|
29
src/GUI/icons.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#ifndef ICONS_H
|
||||||
|
#define ICONS_H
|
||||||
|
|
||||||
|
#define APP_ICON ":/icons/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"
|
||||||
|
|
||||||
|
// Options dialog icons
|
||||||
|
#define APPEARANCE_ICON ":/icons/preferences-desktop-display.png"
|
||||||
|
#define POI_ICON ":/icons/flag_48.png"
|
||||||
|
#define SYSTEM_ICON ":/icons/system-run.png"
|
||||||
|
#define PRINT_EXPORT_ICON ":/icons/document-print-preview.png"
|
||||||
|
#define DATA_ICON ":/icons/view-filter.png"
|
||||||
|
|
||||||
|
#endif /* ICONS_H */
|
@ -7,7 +7,9 @@
|
|||||||
|
|
||||||
InfoItem::InfoItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
InfoItem::InfoItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||||
{
|
{
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
|
setCacheMode(QGraphicsItem::DeviceCoordinateCache);
|
||||||
|
#endif // Q_OS_MAC
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoItem::updateBoundingRect()
|
void InfoItem::updateBoundingRect()
|
||||||
@ -40,6 +42,9 @@ void InfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|||||||
QList<KV>::const_iterator i;
|
QList<KV>::const_iterator i;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
|
||||||
|
|
||||||
|
painter->setRenderHint(QPainter::Antialiasing, false);
|
||||||
|
|
||||||
for (i = _list.constBegin(); i != _list.constEnd(); i++) {
|
for (i = _list.constBegin(); i != _list.constEnd(); i++) {
|
||||||
painter->drawText(width, fm.height() - fm.descent(), i->key + ": ");
|
painter->drawText(width, fm.height() - fm.descent(), i->key + ": ");
|
||||||
width += fm.width(i->key + ": ");
|
width += fm.width(i->key + ": ");
|
||||||
@ -65,18 +70,20 @@ void InfoItem::insert(const QString &key, const QString &value)
|
|||||||
KV kv(key, value);
|
KV kv(key, value);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
prepareGeometryChange();
|
||||||
|
|
||||||
if ((i = _list.indexOf(kv)) < 0)
|
if ((i = _list.indexOf(kv)) < 0)
|
||||||
_list.append(kv);
|
_list.append(kv);
|
||||||
else
|
else
|
||||||
_list[i] = kv;
|
_list[i] = kv;
|
||||||
|
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
prepareGeometryChange();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InfoItem::clear()
|
void InfoItem::clear()
|
||||||
{
|
{
|
||||||
|
prepareGeometryChange();
|
||||||
_list.clear();
|
_list.clear();
|
||||||
updateBoundingRect();
|
updateBoundingRect();
|
||||||
prepareGeometryChange();
|
|
||||||
}
|
}
|
@ -15,6 +15,7 @@ public:
|
|||||||
|
|
||||||
void insert(const QString &key, const QString &value);
|
void insert(const QString &key, const QString &value);
|
||||||
void clear();
|
void clear();
|
||||||
|
bool isEmpty() {return _list.isEmpty();}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateBoundingRect();
|
void updateBoundingRect();
|
36
src/GUI/keys.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef KEYS_H
|
||||||
|
#define KEYS_H
|
||||||
|
|
||||||
|
#include <Qt>
|
||||||
|
#include <QKeySequence>
|
||||||
|
|
||||||
|
#define NEXT_KEY Qt::Key_Space
|
||||||
|
#define PREV_KEY Qt::Key_Backspace
|
||||||
|
#define FIRST_KEY Qt::Key_Home
|
||||||
|
#define LAST_KEY Qt::Key_End
|
||||||
|
#define MODIFIER Qt::ShiftModifier
|
||||||
|
|
||||||
|
#define ZOOM_IN QKeySequence::ZoomIn
|
||||||
|
#define ZOOM_OUT QKeySequence::ZoomOut
|
||||||
|
|
||||||
|
#define TOGGLE_GRAPH_TYPE_KEY Qt::Key_X
|
||||||
|
#define TOGGLE_TIME_TYPE_KEY Qt::Key_T
|
||||||
|
|
||||||
|
#define QUIT_SHORTCUT QKeySequence(QKeySequence::Quit)
|
||||||
|
#define OPEN_SHORTCUT QKeySequence(QKeySequence::Open)
|
||||||
|
#define CLOSE_SHORTCUT QKeySequence(QKeySequence::Close)
|
||||||
|
#define RELOAD_SHORTCUT QKeySequence(QKeySequence::Refresh)
|
||||||
|
#define EXPORT_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_E)
|
||||||
|
#define SHOW_POI_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_P)
|
||||||
|
#define SHOW_MAP_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_M)
|
||||||
|
#define NEXT_MAP_SHORTCUT QKeySequence(QKeySequence::Forward)
|
||||||
|
#define PREV_MAP_SHORTCUT QKeySequence(QKeySequence::Back)
|
||||||
|
#define SHOW_GRAPHS_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_G)
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#define FULLSCREEN_SHORTCUT QKeySequence(Qt::META + Qt::CTRL + Qt::Key_F)
|
||||||
|
#else // Q_OS_MAC
|
||||||
|
#define FULLSCREEN_SHORTCUT QKeySequence(Qt::Key_F11)
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
|
#endif // KEYS_H
|