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

Compare commits

..

48 Commits
4.10 ... 4.14

Author SHA1 Message Date
2cd35b139e Removed obsolete strings, added missing punctuation 2017-09-15 18:59:22 +02:00
a74afa54fd Update gpxsee_sv.ts (#32) 2017-09-15 18:55:49 +02:00
753c4e8db0 Do not enable alpha channel for background colors 2017-09-15 08:30:00 +02:00
d0b3f48caf Version++ 2017-09-15 00:41:48 +02:00
e47cd1be7e Translations update 2017-09-15 00:39:59 +02:00
d1ba35f012 Updated maximal zoom for OpenTopo map 2017-09-15 00:35:11 +02:00
b9489afbfe Settings improvements and code cleanup 2017-09-15 00:07:09 +02:00
a7506cfd82 Merge branch 'master' of https://github.com/tumic0/GPXSee 2017-09-14 20:22:11 +02:00
c060abe6a7 Silenced valgrind warnings 2017-09-14 20:19:19 +02:00
b457fc430c Fixed broken parsing of TCX files with heart rate data 2017-09-14 20:18:34 +02:00
89947851fd Fixed invalid memory access 2017-09-14 20:18:02 +02:00
7d40dfddb2 Fixed broken units setting for cadence, heart rate and power graphs 2017-09-14 20:16:42 +02:00
151ae03b53 Fixed broken options layout on OS X 2017-09-10 12:53:51 +02:00
9fd8b84c3b Added waypoints/POI size/color settings 2017-09-10 12:42:49 +02:00
47683e5447 Added map background color setting.
Redesigned appearance settings tab.
2017-09-10 00:09:39 +02:00
84bcf07bd4 Translations update 2017-09-09 22:04:47 +02:00
cc694971be Added support for limiting the maximal zoom level of online map sources 2017-09-09 12:33:43 +02:00
ba856d7eb6 Adjusted the scale bar (text) size to the remaining content in plot mode 2017-09-09 10:51:19 +02:00
b14eeb58ab Fixed scale size in hi-res prints 2017-08-31 16:28:37 +02:00
8e932b966c Fixed msvc warning 2017-08-31 15:32:44 +02:00
35818ce16e Removed obsolete size guard 2017-08-31 08:10:09 +02:00
6ef7537dff Added some more paper sizes 2017-08-31 07:57:46 +02:00
abbb823890 Removed DPI dependency in print font size computation 2017-08-31 00:07:29 +02:00
0a4f8a46d4 Update gpxsee_sv.ts (#31)
* Update gpxsee_sv.ts

* Update gpxsee_sv.ts

Sorry, missed 2 strings.
2017-08-30 21:59:14 +02:00
fd2823c703 Version++ 2017-08-30 13:59:22 +02:00
d16b61051f Localization update 2017-08-30 13:56:23 +02:00
e69f17aad5 Print font size id now appropriate to the page size 2017-08-30 13:09:54 +02:00
33b1e179d3 Use the correct DPI value for zooming 2017-08-29 15:31:12 +02:00
5efb9f8a4e Added resolution setting to export dialogue. 2017-08-28 17:48:46 +02:00
ebf39f11bd Added support for hi-resolution printing 2017-08-28 15:25:45 +02:00
8b7422b70a Code cleanup 2017-08-27 12:19:33 +02:00
ef3da2e156 Removed obsolete Windows XP bug workaround 2017-08-24 21:04:01 +02:00
6e13c2b704 Translations update 2017-08-24 19:40:52 +02:00
f3e4719439 Added map opacity (brightness) settings 2017-08-24 17:29:59 +02:00
7b6789e78d Version++ 2017-08-23 15:42:00 +02:00
95442461fc Added 4UMaps to map sources 2017-08-23 15:41:23 +02:00
729cbd641c Added support for the VICGRID and VICGRID94 projections 2017-08-23 10:46:28 +02:00
2e2dad8d04 Fixed broken xy2ll computation on southern hemispheres 2017-08-23 10:45:23 +02:00
4e3b6c2eb2 Added missing error check 2017-08-22 23:14:32 +02:00
6430933a96 Use the (incorrect) scale factor of 1 in France zone projections like OziExplorer does 2017-08-22 22:59:59 +02:00
3e14d4afda Added France Zone I-IV projections support 2017-08-22 19:03:35 +02:00
ebb30a3fca Made OZF3 files parsing more robust. 2017-08-22 15:57:37 +02:00
bd20d40ba7 Fixed content margin computation.
Code cleanup.
2017-08-20 10:49:58 +02:00
77823fba14 Added missing newlines 2017-08-15 15:58:23 +02:00
dcc5cbe9bc Added appveyor build config 2017-08-15 15:49:28 +02:00
cd3c99b065 Added QT4 Travis CI build config 2017-08-15 15:42:47 +02:00
83189a4e65 Version++ 2017-08-15 15:14:44 +02:00
797fd7f02b Fixed QT4 build 2017-08-15 15:13:34 +02:00
56 changed files with 1499 additions and 667 deletions

52
.appveyor.yml Normal file
View File

@ -0,0 +1,52 @@
version: 4.14.{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
copy pkg\datums.csv installer
copy pkg\ellipsoids.csv installer
copy pkg\maps.txt installer
copy licence.txt installer
copy %OPENSSLDIR%\libeay32.dll installer
copy %OPENSSLDIR%\ssleay32.dll installer
makensis.exe installer\%NSI%
artifacts:
- path: installer\GPXSee-*.exe

9
.travis.yml Normal file
View File

@ -0,0 +1,9 @@
language: c++
install:
- sudo apt-get install libqt4-dev
script:
- lrelease gpxsee.pro
- qmake gpxsee.pro
- make

View File

@ -1,5 +1,5 @@
TARGET = GPXSee
VERSION = 4.10
VERSION = 4.14
QT += core \
gui \
network
@ -96,7 +96,8 @@ HEADERS += src/config.h \
src/albersequal.h \
src/oddspinbox.h \
src/rectc.h \
src/searchpointer.h
src/searchpointer.h \
src/percentslider.h
SOURCES += src/main.cpp \
src/gui.cpp \
src/poi.cpp \
@ -165,7 +166,8 @@ SOURCES += src/main.cpp \
src/maplist.cpp \
src/albersequal.cpp \
src/oddspinbox.cpp \
src/rectc.cpp
src/rectc.cpp \
src/percentslider.cpp
RESOURCES += gpxsee.qrc
TRANSLATIONS = lang/gpxsee_cs.ts \
lang/gpxsee_sv.ts \

View File

@ -28,47 +28,47 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data.cpp" line="93"/>
<location filename="../src/data.cpp" line="102"/>
<source>Supported files (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</source>
<translation>Podporované soubory (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>CSV files (*.csv)</source>
<translation>Soubory CSV (*.csv)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>FIT files (*.fit)</source>
<translation>Soubory FIT (*.fit)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>GPX files (*.gpx)</source>
<translation>Soubory GPX (*.gpx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>IGC files (*.igc)</source>
<translation>Soubory IGC (*.igc)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>KML files (*.kml)</source>
<translation>Soubory KML (*.kml)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>NMEA files (*.nmea)</source>
<translation>Soubory NMEA (*.nmea)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>TCX files (*.tcx)</source>
<translation>Soubory TCX (*.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>All files (*)</source>
<translation>Všechny soubory (*)</translation>
</message>
@ -115,7 +115,7 @@
<context>
<name>ExportDialog</name>
<message>
<location filename="../src/exportdialog.cpp" line="120"/>
<location filename="../src/exportdialog.cpp" line="134"/>
<source>Export to PDF</source>
<translation>Exportovat do PDF</translation>
</message>
@ -125,79 +125,84 @@
<translation>Soubory PDF (*.pdf);;Všechny soubory (*)</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="38"/>
<location filename="../src/exportdialog.cpp" line="51"/>
<source>Portrait</source>
<translation>Na výšku</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="39"/>
<location filename="../src/exportdialog.cpp" line="52"/>
<source>Landscape</source>
<translation>Na šířku</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="83"/>
<location filename="../src/exportdialog.cpp" line="96"/>
<source>Page size:</source>
<translation>Velikost stránky:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="84"/>
<location filename="../src/exportdialog.cpp" line="98"/>
<source>Orientation:</source>
<translation>Orientace:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="80"/>
<location filename="../src/exportdialog.cpp" line="93"/>
<source>Page Setup</source>
<translation>Nastavení stránky</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>in</source>
<translation>in</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>mm</source>
<translation>mm</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="85"/>
<location filename="../src/exportdialog.cpp" line="97"/>
<source>Resolution:</source>
<translation>Rozlišení:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="99"/>
<source>Margins:</source>
<translation>Okraje:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="91"/>
<location filename="../src/exportdialog.cpp" line="105"/>
<source>File:</source>
<translation>Soubor:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="98"/>
<location filename="../src/exportdialog.cpp" line="112"/>
<source>Output file</source>
<translation>Výstupní soubor</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="105"/>
<location filename="../src/exportdialog.cpp" line="119"/>
<source>Export</source>
<translation>Exportovat</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>Error</source>
<translation>Chyba</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<source>No output file selected.</source>
<translation>Nebyl zvolen žádný výstupní soubor.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<source>%1 is a directory.</source>
<translation>%1 je adresář.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>%1 is not writable.</source>
<translation>%1 nelze zapsat.</translation>
</message>
@ -243,12 +248,12 @@
<translation>Program GPXSee je distribuován pod podmínkami licence GNU General Public License verze 3. Pro více informací navštivte stránky programu na adrese </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="724"/>
<location filename="../src/gui.cpp" line="725"/>
<source>Open file</source>
<translation>Otevřít soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="814"/>
<location filename="../src/gui.cpp" line="815"/>
<source>Open POI file</source>
<translation>Otevřít POI soubor</translation>
</message>
@ -386,7 +391,7 @@
</message>
<message>
<location filename="../src/gui.cpp" line="443"/>
<location filename="../src/gui.cpp" line="1006"/>
<location filename="../src/gui.cpp" line="986"/>
<source>Moving time</source>
<translation>Čistý čas</translation>
</message>
@ -521,38 +526,43 @@
<translation>URL online map jsou načteny při startu programu z následujícího souboru:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="706"/>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name, tiles URL and an optional maximal zoom level delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Formát souboru je jeden mapový záznam na řádku, kde mapový záznam sestává ze jména mapy, URL dlaždic a volitelně maximálního zoomu navzájem oddělených tabulátorem. Souřadnice dlaždice jsou v URL nahrazeny řetězci $x a $y, zoom pak řetězcem $z. Příklad:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="707"/>
<source>Offline maps are loaded on program startup from the following directory:</source>
<translation>Offline mapy jsou načítány při startu aplikace z následujícího adresáře:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1197"/>
<location filename="../src/gui.cpp" line="1179"/>
<source>Open map file</source>
<translation>Otevřít mapový soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1233"/>
<location filename="../src/gui.cpp" line="1215"/>
<source>No files loaded</source>
<translation>Nejsou načteny žádné soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="992"/>
<location filename="../src/gui.cpp" line="995"/>
<location filename="../src/gui.cpp" line="972"/>
<location filename="../src/gui.cpp" line="975"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="984"/>
<location filename="../src/gui.cpp" line="964"/>
<source>Routes</source>
<translation>Trasy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1218"/>
<location filename="../src/gui.cpp" line="1200"/>
<source>Error loading map:</source>
<translation>Mapu nelze načíst:</translation>
</message>
<message numerus="yes">
<location filename="../src/gui.cpp" line="1237"/>
<location filename="../src/gui.cpp" line="1219"/>
<source>%n files</source>
<translation>
<numerusform>%n soubor</numerusform>
@ -581,7 +591,7 @@
<translation>Exportovat do PDF...</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="986"/>
<location filename="../src/gui.cpp" line="966"/>
<source>Waypoints</source>
<translation>Navigační body</translation>
</message>
@ -606,48 +616,43 @@
<translation>Poslední soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Formát souboru je jeden mapový záznam na řádku, kde mapový záznam sestává ze jména mapy a URL dlaždic navzájem oddělených tabulátorem. Souřadnice dlaždice jsou v URL nahrazeny řetězci $x a $y, úroven přiblížení (zoom) pak řetězcem $z. Příklad:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="705"/>
<location filename="../src/gui.cpp" line="706"/>
<source>Offline maps</source>
<translation>Offline mapy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="709"/>
<location filename="../src/gui.cpp" line="710"/>
<source>The expected structure is one map/atlas in a separate subdirectory. Supported map formats are OziExplorer maps and TrekBuddy maps/atlases (tared and non-tared).</source>
<translation>Očekávaná struktura je jedna mapa/atlas v samostatném podadresáři. Podporované mapové formáty jsou OziExplorer mapy a TrekBuddy mapy/atlasy (včetně tar varianty).</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="714"/>
<location filename="../src/gui.cpp" line="715"/>
<source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source>
<translation>POI soubory, které se mají automaticky nahrát při startu programu jsou načítány z následujícího adresáře:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="803"/>
<location filename="../src/gui.cpp" line="804"/>
<source>Error loading data file:</source>
<translation>Datový soubor nelze načíst:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="806"/>
<location filename="../src/gui.cpp" line="831"/>
<location filename="../src/gui.cpp" line="807"/>
<location filename="../src/gui.cpp" line="832"/>
<source>Line: %1</source>
<translation>Řádka: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="828"/>
<location filename="../src/gui.cpp" line="829"/>
<source>Error loading POI file:</source>
<translation>Soubor POI nelze načíst:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="978"/>
<location filename="../src/gui.cpp" line="958"/>
<source>Name</source>
<translation>Název</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="982"/>
<location filename="../src/gui.cpp" line="962"/>
<source>Tracks</source>
<translation>Cesty</translation>
</message>
@ -663,20 +668,20 @@
<translation>Navigace</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="713"/>
<location filename="../src/gui.cpp" line="714"/>
<source>POIs</source>
<translation>POI body</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="412"/>
<location filename="../src/gui.cpp" line="1002"/>
<location filename="../src/gui.cpp" line="982"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="419"/>
<location filename="../src/gui.cpp" line="543"/>
<location filename="../src/gui.cpp" line="1004"/>
<location filename="../src/gui.cpp" line="984"/>
<source>Time</source>
<translation>Čas</translation>
</message>
@ -757,12 +762,12 @@
<context>
<name>MapList</name>
<message>
<location filename="../src/maplist.cpp" line="127"/>
<location filename="../src/maplist.cpp" line="141"/>
<source>Map files (*.map *.tba *.tar)</source>
<translation>Mapové soubory (*.map *.tba *.tar)</translation>
</message>
<message>
<location filename="../src/maplist.cpp" line="128"/>
<location filename="../src/maplist.cpp" line="142"/>
<source>URL list files (*.txt)</source>
<translation>Seznamy URL (*.txt)</translation>
</message>
@ -770,256 +775,355 @@
<context>
<name>OptionsDialog</name>
<message>
<location filename="../src/optionsdialog.cpp" line="36"/>
<location filename="../src/optionsdialog.cpp" line="49"/>
<source>Base color:</source>
<translation>Základní barva:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="37"/>
<location filename="../src/optionsdialog.cpp" line="50"/>
<source>Palette shift:</source>
<translation>Posun palety:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="49"/>
<location filename="../src/optionsdialog.cpp" line="63"/>
<source>Track width:</source>
<translation>Šířka cest:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="50"/>
<location filename="../src/optionsdialog.cpp" line="64"/>
<source>Track style:</source>
<translation>Styl cest:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="52"/>
<location filename="../src/optionsdialog.cpp" line="68"/>
<source>Tracks</source>
<translation>Cesty</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="62"/>
<location filename="../src/optionsdialog.cpp" line="79"/>
<source>Route width:</source>
<translation>Šířka tras:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="63"/>
<location filename="../src/optionsdialog.cpp" line="80"/>
<source>Route style:</source>
<translation>Styl tras:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="65"/>
<location filename="../src/optionsdialog.cpp" line="84"/>
<source>Routes</source>
<translation>Trasy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="69"/>
<location filename="../src/optionsdialog.cpp" line="102"/>
<location filename="../src/optionsdialog.cpp" line="88"/>
<location filename="../src/optionsdialog.cpp" line="166"/>
<source>Use anti-aliasing</source>
<translation>Vyhlazovat hrany</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="100"/>
<location filename="../src/optionsdialog.cpp" line="164"/>
<source>Line width:</source>
<translation>Šířka čar:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="116"/>
<location filename="../src/optionsdialog.cpp" line="52"/>
<source>Colors</source>
<translation>Barvy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="117"/>
<location filename="../src/optionsdialog.cpp" line="186"/>
<source>Background color:</source>
<translation>Barva pozadí:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<source>Paths</source>
<translation>Trasy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="118"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<location filename="../src/optionsdialog.cpp" line="187"/>
<source>Map opacity:</source>
<translation>Neprůhlednost mapy:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="200"/>
<source>Map</source>
<translation>Mapa</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="199"/>
<location filename="../src/optionsdialog.cpp" line="386"/>
<source>Graphs</source>
<translation>Grafy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="66"/>
<location filename="../src/optionsdialog.cpp" line="82"/>
<source>Width:</source>
<translation>Šířka:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="67"/>
<location filename="../src/optionsdialog.cpp" line="83"/>
<source>Style:</source>
<translation>Styl:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="120"/>
<source>Waypoint color:</source>
<translation>Barva navigačních bodů:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="121"/>
<source>Waypoint size:</source>
<translation>Velikost navigačních bodů:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="123"/>
<location filename="../src/optionsdialog.cpp" line="139"/>
<source>Color:</source>
<translation>Barva:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="124"/>
<location filename="../src/optionsdialog.cpp" line="140"/>
<source>Size:</source>
<translation>Velikost:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="125"/>
<source>Waypoints</source>
<translation>Navigační body</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="136"/>
<source>POI color:</source>
<translation>Barva POI:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="137"/>
<source>POI size:</source>
<translation>Velikost POI:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="141"/>
<source>POIs</source>
<translation>POI body</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="198"/>
<source>Points</source>
<translation>Body</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="207"/>
<source>Moving average window size</source>
<translation>Velikost okna klouzavého průměru</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="144"/>
<location filename="../src/optionsdialog.cpp" line="226"/>
<source>Elevation:</source>
<translation>Výška:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="145"/>
<location filename="../src/optionsdialog.cpp" line="227"/>
<source>Speed:</source>
<translation>Rychlost:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="146"/>
<location filename="../src/optionsdialog.cpp" line="228"/>
<source>Heart rate:</source>
<translation>Tep:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="147"/>
<location filename="../src/optionsdialog.cpp" line="229"/>
<source>Cadence:</source>
<translation>Kadence:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="148"/>
<location filename="../src/optionsdialog.cpp" line="230"/>
<source>Power:</source>
<translation>Výkon:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="150"/>
<location filename="../src/optionsdialog.cpp" line="232"/>
<source>Smoothing</source>
<translation>Vyhlazování</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="154"/>
<location filename="../src/optionsdialog.cpp" line="236"/>
<source>Eliminate GPS outliers</source>
<translation>Odstarnit odlehlé GPS záznamy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="160"/>
<location filename="../src/optionsdialog.cpp" line="242"/>
<source>Outlier elimination</source>
<translation>Odstranění odlehlých hodnot</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="167"/>
<location filename="../src/optionsdialog.cpp" line="249"/>
<source>Smoothing:</source>
<translation>Vyhlazování:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="190"/>
<location filename="../src/optionsdialog.cpp" line="267"/>
<source>mi/h</source>
<translation>mi/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="193"/>
<location filename="../src/optionsdialog.cpp" line="270"/>
<source>km/h</source>
<translation>km/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<location filename="../src/optionsdialog.cpp" line="274"/>
<source>s</source>
<translation>s</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="201"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<source>Minimal speed:</source>
<translation>Minimální rychlost:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="202"/>
<location filename="../src/optionsdialog.cpp" line="279"/>
<source>Minimal duration:</source>
<translation>Minimální doba trvání:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="209"/>
<location filename="../src/optionsdialog.cpp" line="286"/>
<source>Filtering</source>
<translation>Filtrování</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="210"/>
<location filename="../src/optionsdialog.cpp" line="287"/>
<source>Pause detection</source>
<translation>Detekce přestávek</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="222"/>
<location filename="../src/optionsdialog.cpp" line="299"/>
<source>mi</source>
<translation>mi</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="225"/>
<location filename="../src/optionsdialog.cpp" line="302"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="229"/>
<location filename="../src/optionsdialog.cpp" line="306"/>
<source>POI radius:</source>
<translation>POI radius:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="235"/>
<location filename="../src/optionsdialog.cpp" line="334"/>
<location filename="../src/optionsdialog.cpp" line="312"/>
<location filename="../src/optionsdialog.cpp" line="436"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="242"/>
<location filename="../src/optionsdialog.cpp" line="319"/>
<source>WYSIWYG</source>
<translation>WYSIWYG</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="320"/>
<source>High-Resolution</source>
<translation>Vysoké rozlišení</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="325"/>
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
<translation>Oblast tisku přibližně odpovídá zobrazované oblasti. Přiblížení mapy se nemění.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="327"/>
<source>The zoom level will be changed so that the whole content (tracks/waypoints) fits to the printed area and the map resolution is as close as possible to the print resolution.</source>
<translation>Přiblížení mapy bude upraveno tak, aby se celý obsah (trasy/body) vešel do oblasti tisku a rozlišení mapy bylo co nejblíže rozlišení tisku.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="349"/>
<source>Name</source>
<translation>Název</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="244"/>
<location filename="../src/optionsdialog.cpp" line="351"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="246"/>
<location filename="../src/optionsdialog.cpp" line="353"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="248"/>
<location filename="../src/optionsdialog.cpp" line="355"/>
<source>Time</source>
<translation>Čas</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="250"/>
<location filename="../src/optionsdialog.cpp" line="357"/>
<source>Moving time</source>
<translation>Čistý čas</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="252"/>
<location filename="../src/optionsdialog.cpp" line="359"/>
<source>Item count (&gt;1)</source>
<translation>Počet objektů (&gt;1)</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="267"/>
<location filename="../src/optionsdialog.cpp" line="374"/>
<source>Separate graph page</source>
<translation>Samostatná stránka s grafy</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="277"/>
<location filename="../src/optionsdialog.cpp" line="384"/>
<source>Print mode</source>
<translation>Režim tisku</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="385"/>
<source>Header</source>
<translation>Záhlaví</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="285"/>
<location filename="../src/optionsdialog.cpp" line="393"/>
<source>Use OpenGL</source>
<translation>Používat OpenGL</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="297"/>
<location filename="../src/optionsdialog.cpp" line="399"/>
<source>MB</source>
<translation>MB</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="301"/>
<location filename="../src/optionsdialog.cpp" line="403"/>
<source>Image cache size:</source>
<translation>Mezipaměť obrázků:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="314"/>
<location filename="../src/optionsdialog.cpp" line="337"/>
<location filename="../src/optionsdialog.cpp" line="416"/>
<location filename="../src/optionsdialog.cpp" line="439"/>
<source>System</source>
<translation>Systém</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="331"/>
<location filename="../src/optionsdialog.cpp" line="433"/>
<source>Appearance</source>
<translation>Vzhled</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="333"/>
<location filename="../src/optionsdialog.cpp" line="435"/>
<source>Data</source>
<translation>Data</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="335"/>
<location filename="../src/optionsdialog.cpp" line="437"/>
<source>Print &amp; Export</source>
<translation>Tisk a export</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="364"/>
<location filename="../src/optionsdialog.cpp" line="466"/>
<source>Options</source>
<translation>Nastavení</translation>
</message>
@ -1188,27 +1292,27 @@
<context>
<name>WaypointItem</name>
<message>
<location filename="../src/waypointitem.cpp" line="17"/>
<location filename="../src/waypointitem.cpp" line="19"/>
<source>Name</source>
<translation>Název</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="18"/>
<location filename="../src/waypointitem.cpp" line="20"/>
<source>Coordinates</source>
<translation>Souřadnice</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="21"/>
<location filename="../src/waypointitem.cpp" line="23"/>
<source>Elevation</source>
<translation>Výška</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="24"/>
<location filename="../src/waypointitem.cpp" line="26"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="27"/>
<location filename="../src/waypointitem.cpp" line="29"/>
<source>Description</source>
<translation>Popis</translation>
</message>

View File

@ -28,47 +28,47 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data.cpp" line="93"/>
<location filename="../src/data.cpp" line="102"/>
<source>Supported files (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</source>
<translation>Unterstütze Dateien (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>CSV files (*.csv)</source>
<translation>CSV-Dateien (*.csv)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>FIT files (*.fit)</source>
<translation>FIT-Dateien (*.fit)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>GPX files (*.gpx)</source>
<translation>GPX-Dateien (*.gpx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>IGC files (*.igc)</source>
<translation>IGC-Dateien (*.igc)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>KML files (*.kml)</source>
<translation>KML-Dateien (*.kml)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>NMEA files (*.nmea)</source>
<translation>NMEA-Dateien (*.nmea)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>TCX files (*.tcx)</source>
<translation>TCX-Dateien (*.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>All files (*)</source>
<translation>Alle Dateien (*)</translation>
</message>
@ -115,7 +115,7 @@
<context>
<name>ExportDialog</name>
<message>
<location filename="../src/exportdialog.cpp" line="120"/>
<location filename="../src/exportdialog.cpp" line="134"/>
<source>Export to PDF</source>
<translation>PDF Export</translation>
</message>
@ -125,79 +125,84 @@
<translation>PDF-Dateien (*.pdf);;Alle Dateien (*)</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="38"/>
<location filename="../src/exportdialog.cpp" line="51"/>
<source>Portrait</source>
<translation>Hochformat</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="39"/>
<location filename="../src/exportdialog.cpp" line="52"/>
<source>Landscape</source>
<translation>Querformat</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="83"/>
<location filename="../src/exportdialog.cpp" line="96"/>
<source>Page size:</source>
<translation>Seitengröße:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="84"/>
<location filename="../src/exportdialog.cpp" line="98"/>
<source>Orientation:</source>
<translation>Orientierung:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="80"/>
<location filename="../src/exportdialog.cpp" line="93"/>
<source>Page Setup</source>
<translation>Seiten Setup</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>in</source>
<translation>in</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>mm</source>
<translation>mm</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="85"/>
<location filename="../src/exportdialog.cpp" line="97"/>
<source>Resolution:</source>
<translation>Druckauflösung:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="99"/>
<source>Margins:</source>
<translation>Ränder:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="91"/>
<location filename="../src/exportdialog.cpp" line="105"/>
<source>File:</source>
<translation>Ausgabedatei:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="98"/>
<location filename="../src/exportdialog.cpp" line="112"/>
<source>Output file</source>
<translation>Ausgabedatei</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="105"/>
<location filename="../src/exportdialog.cpp" line="119"/>
<source>Export</source>
<translation>Export</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<source>No output file selected.</source>
<translation>Keine Ausgabedatei ausgewählt.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<source>%1 is a directory.</source>
<translation>%1 ist ein Verzeichniss.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>%1 is not writable.</source>
<translation>%1 ist nich schreibbar.</translation>
</message>
@ -243,12 +248,12 @@
<translation>GPXSee wird unter der GNU General Public License version 3 vertrieben. Mehr Informationen zu GPXSee auf der Homepage </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="724"/>
<location filename="../src/gui.cpp" line="725"/>
<source>Open file</source>
<translation>Datei öffnen</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="814"/>
<location filename="../src/gui.cpp" line="815"/>
<source>Open POI file</source>
<translation>POI Datei öffnen</translation>
</message>
@ -386,7 +391,7 @@
</message>
<message>
<location filename="../src/gui.cpp" line="443"/>
<location filename="../src/gui.cpp" line="1006"/>
<location filename="../src/gui.cpp" line="986"/>
<source>Moving time</source>
<translation>Bewegungszeit</translation>
</message>
@ -521,32 +526,37 @@
<translation>Onlinekarten URLs werden zu Programmstart aus der folgenden Datei gelesen:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="705"/>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name, tiles URL and an optional maximal zoom level delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Das Dateiformat ist eine Karte pro Linie. Jede Linie besteht aus dem Kartenname, der Tiles URL und wahlweise dem maximalen Zoomlevel getrennt durch ein TAB Zeichen. X und Y Koordinate einer Tile werden in der URL durch $x und $y ersetzt und das Zoomlevel durch $z. Ein Beispiel einer Kartendatei könnte so aussehen:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="706"/>
<source>Offline maps</source>
<translation>Offlinekarten</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="706"/>
<location filename="../src/gui.cpp" line="707"/>
<source>Offline maps are loaded on program startup from the following directory:</source>
<translation>Offlinekarten werden zu Programmstart aus dem folgenden Verzeichnis geladen:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1197"/>
<location filename="../src/gui.cpp" line="1179"/>
<source>Open map file</source>
<translation>Karte Datei öffnen</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1218"/>
<location filename="../src/gui.cpp" line="1200"/>
<source>Error loading map:</source>
<translation>Fehler beim Laden der Karte-Datei:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1233"/>
<location filename="../src/gui.cpp" line="1215"/>
<source>No files loaded</source>
<translation>Keine Dateien geladen</translation>
</message>
<message numerus="yes">
<location filename="../src/gui.cpp" line="1237"/>
<location filename="../src/gui.cpp" line="1219"/>
<source>%n files</source>
<translation>
<numerusform>%n Datei</numerusform>
@ -554,13 +564,13 @@
</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="992"/>
<location filename="../src/gui.cpp" line="995"/>
<location filename="../src/gui.cpp" line="972"/>
<location filename="../src/gui.cpp" line="975"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="984"/>
<location filename="../src/gui.cpp" line="964"/>
<source>Routes</source>
<translation>Routen</translation>
</message>
@ -585,7 +595,7 @@
<translation>Als PDF exportieren...</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="986"/>
<location filename="../src/gui.cpp" line="966"/>
<source>Waypoints</source>
<translation>Wegpunkte</translation>
</message>
@ -610,43 +620,38 @@
<translation>Letzte Datei</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Das Dateiformat ist eine Karte pro Linie. Jede Linie besteht aus dem Kartenname und die durch ein TAB Zeichen getrennte Tiles URL. X und Y Koordinate einer Tile werden in der URL durch $x und $y ersetzt und das Zoomlevel durch $z. Ein Beispiel einer Kartendatei könnte so aussehen:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="709"/>
<location filename="../src/gui.cpp" line="710"/>
<source>The expected structure is one map/atlas in a separate subdirectory. Supported map formats are OziExplorer maps and TrekBuddy maps/atlases (tared and non-tared).</source>
<translation>Die erwartete Struktur ist eine Karte/ein Atlas pro Unterverzeichnis. Unterstützte Kartenformate sind OziExplorer Karten und TrekBuddy Karten/Atlanten (mit oder ohne tar Kompression).</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="714"/>
<location filename="../src/gui.cpp" line="715"/>
<source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source>
<translation>Damit GPXSee zu Programmstart automatisch eine POI-Datei lädt, fügen Sie diese zu folgendem Verzeichnis hinzu:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="803"/>
<location filename="../src/gui.cpp" line="804"/>
<source>Error loading data file:</source>
<translation>Fehler beim Laden der Datei:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="806"/>
<location filename="../src/gui.cpp" line="831"/>
<location filename="../src/gui.cpp" line="807"/>
<location filename="../src/gui.cpp" line="832"/>
<source>Line: %1</source>
<translation>Linie: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="828"/>
<location filename="../src/gui.cpp" line="829"/>
<source>Error loading POI file:</source>
<translation>Fehler beim Laden der POI-Datei:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="978"/>
<location filename="../src/gui.cpp" line="958"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="982"/>
<location filename="../src/gui.cpp" line="962"/>
<source>Tracks</source>
<translation>Strecken</translation>
</message>
@ -662,20 +667,20 @@
<translation>Navigation</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="713"/>
<location filename="../src/gui.cpp" line="714"/>
<source>POIs</source>
<translation>POIs</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="412"/>
<location filename="../src/gui.cpp" line="1002"/>
<location filename="../src/gui.cpp" line="982"/>
<source>Distance</source>
<translation>Distanz</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="419"/>
<location filename="../src/gui.cpp" line="543"/>
<location filename="../src/gui.cpp" line="1004"/>
<location filename="../src/gui.cpp" line="984"/>
<source>Time</source>
<translation>Zeit</translation>
</message>
@ -756,269 +761,368 @@
<context>
<name>MapList</name>
<message>
<location filename="../src/maplist.cpp" line="127"/>
<location filename="../src/maplist.cpp" line="141"/>
<source>Map files (*.map *.tba *.tar)</source>
<translation>Karten-Dateien (*.map *.tba *.tar)</translation>
</message>
<message>
<location filename="../src/maplist.cpp" line="128"/>
<location filename="../src/maplist.cpp" line="142"/>
<source>URL list files (*.txt)</source>
<translation type="unfinished"></translation>
<translation>URL-Liste Dateien (*.txt)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../src/optionsdialog.cpp" line="36"/>
<location filename="../src/optionsdialog.cpp" line="49"/>
<source>Base color:</source>
<translation>Grundfarbe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="37"/>
<location filename="../src/optionsdialog.cpp" line="50"/>
<source>Palette shift:</source>
<translation>Palettenverschiebung:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="49"/>
<location filename="../src/optionsdialog.cpp" line="63"/>
<source>Track width:</source>
<translation>Streckenbreite:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="50"/>
<location filename="../src/optionsdialog.cpp" line="64"/>
<source>Track style:</source>
<translation>Streckenstil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="52"/>
<location filename="../src/optionsdialog.cpp" line="68"/>
<source>Tracks</source>
<translation>Strecken</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="62"/>
<location filename="../src/optionsdialog.cpp" line="79"/>
<source>Route width:</source>
<translation>Routenbreite:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="63"/>
<location filename="../src/optionsdialog.cpp" line="80"/>
<source>Route style:</source>
<translation>Routenstil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="65"/>
<location filename="../src/optionsdialog.cpp" line="84"/>
<source>Routes</source>
<translation>Routen</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="69"/>
<location filename="../src/optionsdialog.cpp" line="102"/>
<location filename="../src/optionsdialog.cpp" line="88"/>
<location filename="../src/optionsdialog.cpp" line="166"/>
<source>Use anti-aliasing</source>
<translation>Anti-Aliasing verwenden</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="100"/>
<location filename="../src/optionsdialog.cpp" line="164"/>
<source>Line width:</source>
<translation>Linienbreite:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="116"/>
<location filename="../src/optionsdialog.cpp" line="52"/>
<source>Colors</source>
<translation>Farben</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="117"/>
<location filename="../src/optionsdialog.cpp" line="186"/>
<source>Background color:</source>
<translation>Hintergrundfarbe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<source>Paths</source>
<translation>Pfade</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="118"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<location filename="../src/optionsdialog.cpp" line="187"/>
<source>Map opacity:</source>
<translation>Karte Deckkraft:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="200"/>
<source>Map</source>
<translation>Karte</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="199"/>
<location filename="../src/optionsdialog.cpp" line="386"/>
<source>Graphs</source>
<translation>Graphen</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="66"/>
<location filename="../src/optionsdialog.cpp" line="82"/>
<source>Width:</source>
<translation>Breite:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="67"/>
<location filename="../src/optionsdialog.cpp" line="83"/>
<source>Style:</source>
<translation>Stil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="120"/>
<source>Waypoint color:</source>
<translation>Wegpunkt-Farbe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="121"/>
<source>Waypoint size:</source>
<translation>Wegpunkt-Größe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="123"/>
<location filename="../src/optionsdialog.cpp" line="139"/>
<source>Color:</source>
<translation>Farbe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="124"/>
<location filename="../src/optionsdialog.cpp" line="140"/>
<source>Size:</source>
<translation>Größe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="125"/>
<source>Waypoints</source>
<translation>Wegpunkte</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="136"/>
<source>POI color:</source>
<translation>POI-Farbe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="137"/>
<source>POI size:</source>
<translation>POI-Größe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="141"/>
<source>POIs</source>
<translation>POIs</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="198"/>
<source>Points</source>
<translation>Punkte</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="207"/>
<source>Moving average window size</source>
<translation>Fensterbreite des gleitenden Mittelwerts</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="144"/>
<location filename="../src/optionsdialog.cpp" line="226"/>
<source>Elevation:</source>
<translation>Höhe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="145"/>
<location filename="../src/optionsdialog.cpp" line="227"/>
<source>Speed:</source>
<translation>Geschwindigkeit:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="146"/>
<location filename="../src/optionsdialog.cpp" line="228"/>
<source>Heart rate:</source>
<translation>Herzfrequenz:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="147"/>
<location filename="../src/optionsdialog.cpp" line="229"/>
<source>Cadence:</source>
<translation>Frequenz:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="148"/>
<location filename="../src/optionsdialog.cpp" line="230"/>
<source>Power:</source>
<translation>Leistung:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="150"/>
<location filename="../src/optionsdialog.cpp" line="232"/>
<source>Smoothing</source>
<translation>Glätten</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="154"/>
<location filename="../src/optionsdialog.cpp" line="236"/>
<source>Eliminate GPS outliers</source>
<translation>GPS Ausreißer entfernen</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="160"/>
<location filename="../src/optionsdialog.cpp" line="242"/>
<source>Outlier elimination</source>
<translation>Ausreißer Entfernung</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="167"/>
<location filename="../src/optionsdialog.cpp" line="249"/>
<source>Smoothing:</source>
<translation>Glätten:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="190"/>
<location filename="../src/optionsdialog.cpp" line="267"/>
<source>mi/h</source>
<translation>mi/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="193"/>
<location filename="../src/optionsdialog.cpp" line="270"/>
<source>km/h</source>
<translation>km/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<location filename="../src/optionsdialog.cpp" line="274"/>
<source>s</source>
<translation>sek</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="201"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<source>Minimal speed:</source>
<translation>Minimale Geschwindigkeit:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="202"/>
<location filename="../src/optionsdialog.cpp" line="279"/>
<source>Minimal duration:</source>
<translation>Minimale Dauer:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="209"/>
<location filename="../src/optionsdialog.cpp" line="286"/>
<source>Filtering</source>
<translation>Datenfilterung</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="210"/>
<location filename="../src/optionsdialog.cpp" line="287"/>
<source>Pause detection</source>
<translation>Pausenerkennung</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="222"/>
<location filename="../src/optionsdialog.cpp" line="299"/>
<source>mi</source>
<translation>mi</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="225"/>
<location filename="../src/optionsdialog.cpp" line="302"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="229"/>
<location filename="../src/optionsdialog.cpp" line="306"/>
<source>POI radius:</source>
<translation>POI-Radius:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="235"/>
<location filename="../src/optionsdialog.cpp" line="334"/>
<location filename="../src/optionsdialog.cpp" line="312"/>
<location filename="../src/optionsdialog.cpp" line="436"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="242"/>
<location filename="../src/optionsdialog.cpp" line="319"/>
<source>WYSIWYG</source>
<translation>WYSIWYG</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="320"/>
<source>High-Resolution</source>
<translation>Hohe Auflösung</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="325"/>
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
<translation>Der Druckbereich ist circa der Anzeigebereich. Das Karten-Zoom ändert sich nicht.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="327"/>
<source>The zoom level will be changed so that the whole content (tracks/waypoints) fits to the printed area and the map resolution is as close as possible to the print resolution.</source>
<translation>Das Karten-Zoom ändert sich so, dass der ganze Inhalt (Strecken/Wegpunkte) in den Druckbereich passen und die Kartenauflösung so nah wie möglich an der Druckauflösung ist.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="349"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="244"/>
<location filename="../src/optionsdialog.cpp" line="351"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="246"/>
<location filename="../src/optionsdialog.cpp" line="353"/>
<source>Distance</source>
<translation>Distanz</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="248"/>
<location filename="../src/optionsdialog.cpp" line="355"/>
<source>Time</source>
<translation>Zeit</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="250"/>
<location filename="../src/optionsdialog.cpp" line="357"/>
<source>Moving time</source>
<translation>Bewegungszeit</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="252"/>
<location filename="../src/optionsdialog.cpp" line="359"/>
<source>Item count (&gt;1)</source>
<translation>Elementanzahl (&gt;1)</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="267"/>
<location filename="../src/optionsdialog.cpp" line="374"/>
<source>Separate graph page</source>
<translation>Separate Seite für Graphen</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="277"/>
<location filename="../src/optionsdialog.cpp" line="384"/>
<source>Print mode</source>
<translation>Druckmodus</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="385"/>
<source>Header</source>
<translation>Kopfzeile</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="285"/>
<location filename="../src/optionsdialog.cpp" line="393"/>
<source>Use OpenGL</source>
<translation>OpenGL verwenden</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="297"/>
<location filename="../src/optionsdialog.cpp" line="399"/>
<source>MB</source>
<translation>MB</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="301"/>
<location filename="../src/optionsdialog.cpp" line="403"/>
<source>Image cache size:</source>
<translation>Bild-Cache größe:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="314"/>
<location filename="../src/optionsdialog.cpp" line="337"/>
<location filename="../src/optionsdialog.cpp" line="416"/>
<location filename="../src/optionsdialog.cpp" line="439"/>
<source>System</source>
<translation>System</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="331"/>
<location filename="../src/optionsdialog.cpp" line="433"/>
<source>Appearance</source>
<translation>Erscheinungsbild</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="333"/>
<location filename="../src/optionsdialog.cpp" line="435"/>
<source>Data</source>
<translation>Daten</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="335"/>
<location filename="../src/optionsdialog.cpp" line="437"/>
<source>Print &amp; Export</source>
<translation>Druck &amp; Export</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="364"/>
<location filename="../src/optionsdialog.cpp" line="466"/>
<source>Options</source>
<translation>Einstellungen</translation>
</message>
@ -1187,27 +1291,27 @@
<context>
<name>WaypointItem</name>
<message>
<location filename="../src/waypointitem.cpp" line="17"/>
<location filename="../src/waypointitem.cpp" line="19"/>
<source>Name</source>
<translation>Name</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="18"/>
<location filename="../src/waypointitem.cpp" line="20"/>
<source>Coordinates</source>
<translation>Koordinaten</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="21"/>
<location filename="../src/waypointitem.cpp" line="23"/>
<source>Elevation</source>
<translation>Höhe</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="24"/>
<location filename="../src/waypointitem.cpp" line="26"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="27"/>
<location filename="../src/waypointitem.cpp" line="29"/>
<source>Description</source>
<translation>Beschreibung</translation>
</message>

View File

@ -28,47 +28,47 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data.cpp" line="93"/>
<location filename="../src/data.cpp" line="102"/>
<source>Supported files (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</source>
<translation>Filer som stöds (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>CSV files (*.csv)</source>
<translation>CSV-filer (*.csv)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="94"/>
<location filename="../src/data.cpp" line="103"/>
<source>FIT files (*.fit)</source>
<translation>FIT-filer (*.fit)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>GPX files (*.gpx)</source>
<translation>GPX-filer (*.gpx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="95"/>
<location filename="../src/data.cpp" line="104"/>
<source>IGC files (*.igc)</source>
<translation>IGC-filer (*.igc)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>KML files (*.kml)</source>
<translation>KML-filer (*.kml)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="96"/>
<location filename="../src/data.cpp" line="105"/>
<source>NMEA files (*.nmea)</source>
<translation>NMEA-filer (*.nmea)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>TCX files (*.tcx)</source>
<translation>TCX-filer (*.tcx)</translation>
</message>
<message>
<location filename="../src/data.cpp" line="97"/>
<location filename="../src/data.cpp" line="106"/>
<source>All files (*)</source>
<translation>Alla filer (*)</translation>
</message>
@ -115,7 +115,7 @@
<context>
<name>ExportDialog</name>
<message>
<location filename="../src/exportdialog.cpp" line="120"/>
<location filename="../src/exportdialog.cpp" line="134"/>
<source>Export to PDF</source>
<translation>Exportera till PDF</translation>
</message>
@ -125,79 +125,84 @@
<translation>PDF-filer (*.pdf);;Alla filer (*)</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="38"/>
<location filename="../src/exportdialog.cpp" line="51"/>
<source>Portrait</source>
<translation>Stående</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="39"/>
<location filename="../src/exportdialog.cpp" line="52"/>
<source>Landscape</source>
<translation>Liggande</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="83"/>
<location filename="../src/exportdialog.cpp" line="96"/>
<source>Page size:</source>
<translation>Sidstorlek:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="84"/>
<location filename="../src/exportdialog.cpp" line="98"/>
<source>Orientation:</source>
<translation>Orientering:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="80"/>
<location filename="../src/exportdialog.cpp" line="93"/>
<source>Page Setup</source>
<translation>Sidinställning</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>in</source>
<translation>i</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="52"/>
<location filename="../src/exportdialog.cpp" line="65"/>
<source>mm</source>
<translation>mm</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="85"/>
<location filename="../src/exportdialog.cpp" line="97"/>
<source>Resolution:</source>
<translation>Upplösning:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="99"/>
<source>Margins:</source>
<translation>Marginaler:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="91"/>
<location filename="../src/exportdialog.cpp" line="105"/>
<source>File:</source>
<translation>Fil:</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="98"/>
<location filename="../src/exportdialog.cpp" line="112"/>
<source>Output file</source>
<translation>Utdatafil</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="105"/>
<location filename="../src/exportdialog.cpp" line="119"/>
<source>Export</source>
<translation>Exportera</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>Error</source>
<translation>Fel</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="127"/>
<location filename="../src/exportdialog.cpp" line="141"/>
<source>No output file selected.</source>
<translation>Ingen utdatafil vald.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="137"/>
<location filename="../src/exportdialog.cpp" line="151"/>
<source>%1 is a directory.</source>
<translation>%1 är en mapp.</translation>
</message>
<message>
<location filename="../src/exportdialog.cpp" line="142"/>
<location filename="../src/exportdialog.cpp" line="156"/>
<source>%1 is not writable.</source>
<translation>%1 är skrivskyddad.</translation>
</message>
@ -243,12 +248,12 @@
<translation>GPXSee distribueras under vilkoren för GNU General Public License version 3. För mer info om GPXSee, besök hemsidan </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="724"/>
<location filename="../src/gui.cpp" line="725"/>
<source>Open file</source>
<translation>Öppna fil</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="814"/>
<location filename="../src/gui.cpp" line="815"/>
<source>Open POI file</source>
<translation>Öppna POI-fil</translation>
</message>
@ -386,7 +391,7 @@
</message>
<message>
<location filename="../src/gui.cpp" line="443"/>
<location filename="../src/gui.cpp" line="1006"/>
<location filename="../src/gui.cpp" line="986"/>
<source>Moving time</source>
<translation>Förflyttningstid</translation>
</message>
@ -521,32 +526,37 @@
<translation>Online-kartors URL:er, läses från följande fil vid programstart:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="705"/>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name, tiles URL and an optional maximal zoom level delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Filformatet är en kartpost per rad, bestående av kartans namn, webbadress och maximal zoomnivå om tillämpligt, Kartrutans X- och Y-koordinater ersätts med $x och $y, i webbadressen och zoomnivån ersätts med $z. Ett exempel en kartfil kan se ut här:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="706"/>
<source>Offline maps</source>
<translation>Offline-kartor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="706"/>
<location filename="../src/gui.cpp" line="707"/>
<source>Offline maps are loaded on program startup from the following directory:</source>
<translation>Offline-kartor läses in från följande mapp vid programstart:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1197"/>
<location filename="../src/gui.cpp" line="1179"/>
<source>Open map file</source>
<translation>Öppna kartfil</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1218"/>
<location filename="../src/gui.cpp" line="1200"/>
<source>Error loading map:</source>
<translation>Fel vid inläsning av karta:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="1233"/>
<location filename="../src/gui.cpp" line="1215"/>
<source>No files loaded</source>
<translation>Inga filer inlästa</translation>
</message>
<message numerus="yes">
<location filename="../src/gui.cpp" line="1237"/>
<location filename="../src/gui.cpp" line="1219"/>
<source>%n files</source>
<translation>
<numerusform>%n filer</numerusform>
@ -554,13 +564,13 @@
</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="992"/>
<location filename="../src/gui.cpp" line="995"/>
<location filename="../src/gui.cpp" line="972"/>
<location filename="../src/gui.cpp" line="975"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="984"/>
<location filename="../src/gui.cpp" line="964"/>
<source>Routes</source>
<translation>Rutter</translation>
</message>
@ -585,7 +595,7 @@
<translation>Exportera till PDF...</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="986"/>
<location filename="../src/gui.cpp" line="966"/>
<source>Waypoints</source>
<translation>Vägpunkter</translation>
</message>
@ -610,43 +620,38 @@
<translation>Sista filen</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="698"/>
<source>The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Filformatet är en kartpost per rad, bestående av kartnamn och kartrutans URL, avgränsade med ett TAB-tecken. Kartrutans X- och Y-koordinater ersätts med $x och $y i URL:en och zoomnivån ersätts med $z. Exempel en kartfil kan se ut här:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="709"/>
<location filename="../src/gui.cpp" line="710"/>
<source>The expected structure is one map/atlas in a separate subdirectory. Supported map formats are OziExplorer maps and TrekBuddy maps/atlases (tared and non-tared).</source>
<translation>Den förväntade strukturen är en karta/atlas i en separat undermapp. Kartformat som stöds är OziExplorer kartor och TrekBuddy-kartor/-kartsamlingar (tarerade och icke tarerade).</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="714"/>
<location filename="../src/gui.cpp" line="715"/>
<source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source>
<translation>För att GPXSee skall läsa in en POI-fil automatiskt vid programstart, läggs filen i följande mapp:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="803"/>
<location filename="../src/gui.cpp" line="804"/>
<source>Error loading data file:</source>
<translation>Fel vid inläsning av datafil:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="806"/>
<location filename="../src/gui.cpp" line="831"/>
<location filename="../src/gui.cpp" line="807"/>
<location filename="../src/gui.cpp" line="832"/>
<source>Line: %1</source>
<translation>Rad: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="828"/>
<location filename="../src/gui.cpp" line="829"/>
<source>Error loading POI file:</source>
<translation>Fel vid inläsning av POI-fil:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="978"/>
<location filename="../src/gui.cpp" line="958"/>
<source>Name</source>
<translation>Namn</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="982"/>
<location filename="../src/gui.cpp" line="962"/>
<source>Tracks</source>
<translation>Spår</translation>
</message>
@ -662,20 +667,20 @@
<translation>Navigation</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="713"/>
<location filename="../src/gui.cpp" line="714"/>
<source>POIs</source>
<translation>POI:er</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="412"/>
<location filename="../src/gui.cpp" line="1002"/>
<location filename="../src/gui.cpp" line="982"/>
<source>Distance</source>
<translation>Avstånd</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="419"/>
<location filename="../src/gui.cpp" line="543"/>
<location filename="../src/gui.cpp" line="1004"/>
<location filename="../src/gui.cpp" line="984"/>
<source>Time</source>
<translation>Tid</translation>
</message>
@ -756,269 +761,368 @@
<context>
<name>MapList</name>
<message>
<location filename="../src/maplist.cpp" line="127"/>
<location filename="../src/maplist.cpp" line="141"/>
<source>Map files (*.map *.tba *.tar)</source>
<translation>Kartfiler (*.map *.tba *.tar)</translation>
</message>
<message>
<location filename="../src/maplist.cpp" line="128"/>
<location filename="../src/maplist.cpp" line="142"/>
<source>URL list files (*.txt)</source>
<translation type="unfinished"></translation>
<translation>URL-listfiler (*.txt)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../src/optionsdialog.cpp" line="36"/>
<location filename="../src/optionsdialog.cpp" line="49"/>
<source>Base color:</source>
<translation>Basfärg:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="37"/>
<location filename="../src/optionsdialog.cpp" line="50"/>
<source>Palette shift:</source>
<translation>Palettskiftning:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="49"/>
<location filename="../src/optionsdialog.cpp" line="63"/>
<source>Track width:</source>
<translation>Spårtjocklek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="50"/>
<location filename="../src/optionsdialog.cpp" line="64"/>
<source>Track style:</source>
<translation>Spårstil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="52"/>
<location filename="../src/optionsdialog.cpp" line="68"/>
<source>Tracks</source>
<translation>Spår</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="62"/>
<location filename="../src/optionsdialog.cpp" line="79"/>
<source>Route width:</source>
<translation>Ruttjocklek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="63"/>
<location filename="../src/optionsdialog.cpp" line="80"/>
<source>Route style:</source>
<translation>Ruttstil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="65"/>
<location filename="../src/optionsdialog.cpp" line="84"/>
<source>Routes</source>
<translation>Rutter</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="69"/>
<location filename="../src/optionsdialog.cpp" line="102"/>
<location filename="../src/optionsdialog.cpp" line="88"/>
<location filename="../src/optionsdialog.cpp" line="166"/>
<source>Use anti-aliasing</source>
<translation>Använd kantutjämning</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="100"/>
<location filename="../src/optionsdialog.cpp" line="164"/>
<source>Line width:</source>
<translation>Linjetjocklek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="116"/>
<location filename="../src/optionsdialog.cpp" line="52"/>
<source>Colors</source>
<translation>Färger</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="117"/>
<location filename="../src/optionsdialog.cpp" line="186"/>
<source>Background color:</source>
<translation>Bakgrundsfärg:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<source>Paths</source>
<translation>Sökvägar</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="118"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<location filename="../src/optionsdialog.cpp" line="187"/>
<source>Map opacity:</source>
<translation>Kartopacitet:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="200"/>
<source>Map</source>
<translation>Karta</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="199"/>
<location filename="../src/optionsdialog.cpp" line="386"/>
<source>Graphs</source>
<translation>Diagram</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="66"/>
<location filename="../src/optionsdialog.cpp" line="82"/>
<source>Width:</source>
<translation>Bredd:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="67"/>
<location filename="../src/optionsdialog.cpp" line="83"/>
<source>Style:</source>
<translation>Stil:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="120"/>
<source>Waypoint color:</source>
<translation>Navigeringspunktsfärg:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="121"/>
<source>Waypoint size:</source>
<translation>Navigeringspunktsstorlek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="123"/>
<location filename="../src/optionsdialog.cpp" line="139"/>
<source>Color:</source>
<translation>Färg:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="124"/>
<location filename="../src/optionsdialog.cpp" line="140"/>
<source>Size:</source>
<translation>Storlek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="125"/>
<source>Waypoints</source>
<translation>Navigeringspunkter</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="136"/>
<source>POI color:</source>
<translation>POI-färg:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="137"/>
<source>POI size:</source>
<translation>POI-storlek:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="141"/>
<source>POIs</source>
<translation>POI:er</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="198"/>
<source>Points</source>
<translation>Punkter</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="207"/>
<source>Moving average window size</source>
<translation>Flyttar vanlig fönsterstorlek</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="144"/>
<location filename="../src/optionsdialog.cpp" line="226"/>
<source>Elevation:</source>
<translation>Höjd:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="145"/>
<location filename="../src/optionsdialog.cpp" line="227"/>
<source>Speed:</source>
<translation>Hastighet:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="146"/>
<location filename="../src/optionsdialog.cpp" line="228"/>
<source>Heart rate:</source>
<translation>Hjärtfrekvens:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="147"/>
<location filename="../src/optionsdialog.cpp" line="229"/>
<source>Cadence:</source>
<translation>Stegfrekvens:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="148"/>
<location filename="../src/optionsdialog.cpp" line="230"/>
<source>Power:</source>
<translation>Kraft:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="150"/>
<location filename="../src/optionsdialog.cpp" line="232"/>
<source>Smoothing</source>
<translation>Utjämning</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="154"/>
<location filename="../src/optionsdialog.cpp" line="236"/>
<source>Eliminate GPS outliers</source>
<translation>Eliminera GPS-extremvärden</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="160"/>
<location filename="../src/optionsdialog.cpp" line="242"/>
<source>Outlier elimination</source>
<translation>Extremvärdeseliminering</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="167"/>
<location filename="../src/optionsdialog.cpp" line="249"/>
<source>Smoothing:</source>
<translation>Utjämning:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="190"/>
<location filename="../src/optionsdialog.cpp" line="267"/>
<source>mi/h</source>
<translation>mi/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="193"/>
<location filename="../src/optionsdialog.cpp" line="270"/>
<source>km/h</source>
<translation>km/h</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="197"/>
<location filename="../src/optionsdialog.cpp" line="274"/>
<source>s</source>
<translation>sek</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="201"/>
<location filename="../src/optionsdialog.cpp" line="278"/>
<source>Minimal speed:</source>
<translation>Minsta hastighet:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="202"/>
<location filename="../src/optionsdialog.cpp" line="279"/>
<source>Minimal duration:</source>
<translation>Kortast varaktighet:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="209"/>
<location filename="../src/optionsdialog.cpp" line="286"/>
<source>Filtering</source>
<translation>Filtrerar</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="210"/>
<location filename="../src/optionsdialog.cpp" line="287"/>
<source>Pause detection</source>
<translation>Pausa identifiering</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="222"/>
<location filename="../src/optionsdialog.cpp" line="299"/>
<source>mi</source>
<translation>mi</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="225"/>
<location filename="../src/optionsdialog.cpp" line="302"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="229"/>
<location filename="../src/optionsdialog.cpp" line="306"/>
<source>POI radius:</source>
<translation>POI-radie:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="235"/>
<location filename="../src/optionsdialog.cpp" line="334"/>
<location filename="../src/optionsdialog.cpp" line="312"/>
<location filename="../src/optionsdialog.cpp" line="436"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="242"/>
<location filename="../src/optionsdialog.cpp" line="319"/>
<source>WYSIWYG</source>
<translation>WYSIWYG</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="320"/>
<source>High-Resolution</source>
<translation>Högupplösning</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="325"/>
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
<translation>Det utskrivna området är ungefär detsamma som synligt område skärmen. Kartans zoomnivå ändras inte.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="327"/>
<source>The zoom level will be changed so that the whole content (tracks/waypoints) fits to the printed area and the map resolution is as close as possible to the print resolution.</source>
<translation>Zoomnivån kommer att ändras att hela innehållet (spår/vägpunkter) passar utskriftsområdet och kartresolutionen är nära som möjligt till utskriftsupplösningen.</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="349"/>
<source>Name</source>
<translation>Namn</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="244"/>
<location filename="../src/optionsdialog.cpp" line="351"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="246"/>
<location filename="../src/optionsdialog.cpp" line="353"/>
<source>Distance</source>
<translation>Avstånd</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="248"/>
<location filename="../src/optionsdialog.cpp" line="355"/>
<source>Time</source>
<translation>Tid</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="250"/>
<location filename="../src/optionsdialog.cpp" line="357"/>
<source>Moving time</source>
<translation>Förflyttningstid</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="252"/>
<location filename="../src/optionsdialog.cpp" line="359"/>
<source>Item count (&gt;1)</source>
<translation>Objektantal (&gt;1)</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="267"/>
<location filename="../src/optionsdialog.cpp" line="374"/>
<source>Separate graph page</source>
<translation>Separat diagramsida</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="277"/>
<source>Header</source>
<translation></translation>
<location filename="../src/optionsdialog.cpp" line="384"/>
<source>Print mode</source>
<translation>Utskriftsläge</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="285"/>
<location filename="../src/optionsdialog.cpp" line="385"/>
<source>Header</source>
<translation>Rubrik</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="393"/>
<source>Use OpenGL</source>
<translation>Använd OpenGL</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="297"/>
<location filename="../src/optionsdialog.cpp" line="399"/>
<source>MB</source>
<translation>MB</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="301"/>
<location filename="../src/optionsdialog.cpp" line="403"/>
<source>Image cache size:</source>
<translation>Cashe-storlek för bilder:</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="314"/>
<location filename="../src/optionsdialog.cpp" line="337"/>
<location filename="../src/optionsdialog.cpp" line="416"/>
<location filename="../src/optionsdialog.cpp" line="439"/>
<source>System</source>
<translation>System</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="331"/>
<location filename="../src/optionsdialog.cpp" line="433"/>
<source>Appearance</source>
<translation>Utseende</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="333"/>
<location filename="../src/optionsdialog.cpp" line="435"/>
<source>Data</source>
<translation>Data</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="335"/>
<location filename="../src/optionsdialog.cpp" line="437"/>
<source>Print &amp; Export</source>
<translation>Utskrift &amp; Export</translation>
</message>
<message>
<location filename="../src/optionsdialog.cpp" line="364"/>
<location filename="../src/optionsdialog.cpp" line="466"/>
<source>Options</source>
<translation>Alternativ</translation>
</message>
@ -1187,27 +1291,27 @@
<context>
<name>WaypointItem</name>
<message>
<location filename="../src/waypointitem.cpp" line="17"/>
<location filename="../src/waypointitem.cpp" line="19"/>
<source>Name</source>
<translation>Namn</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="18"/>
<location filename="../src/waypointitem.cpp" line="20"/>
<source>Coordinates</source>
<translation>Koordinater</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="21"/>
<location filename="../src/waypointitem.cpp" line="23"/>
<source>Elevation</source>
<translation>Höjd</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="24"/>
<location filename="../src/waypointitem.cpp" line="26"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location filename="../src/waypointitem.cpp" line="27"/>
<location filename="../src/waypointitem.cpp" line="29"/>
<source>Description</source>
<translation>Beskrivning</translation>
</message>

View File

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

View File

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

View File

@ -1,4 +1,5 @@
Open Topo Map https://a.tile.opentopomap.org/$z/$x/$y.png
Open Street Map http://tile.openstreetmap.org/$z/$x/$y.png
USGS Topo https://navigator.er.usgs.gov/tiles/tcr.cgi/$z/$x/$y.png
USGS Imagery https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y
Open Topo Map https://a.tile.opentopomap.org/$z/$x/$y.png 17
4UMaps http://4umaps.eu/$z/$x/$y.png 15
Open Street Map http://tile.openstreetmap.org/$z/$x/$y.png 19
USGS Topo https://navigator.er.usgs.gov/tiles/tcr.cgi/$z/$x/$y.png 15
USGS Imagery https://navigator.er.usgs.gov/tiles/aerial_Imagery.cgi/$z/$x/$y 15

View File

@ -303,15 +303,14 @@ void Atlas::draw(QPainter *painter, const QRectF &rect)
{
// All in one map
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
QRectF ir = rect.intersected(_bounds.at(i).second);
if (ir == rect) {
if (_bounds.at(i).second.contains(rect)) {
draw(painter, rect, i);
return;
}
}
// Multiple maps
painter->fillRect(rect, Qt::white);
painter->fillRect(rect, _backgroundColor);
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
QRectF ir = rect.intersected(_bounds.at(i).second);
if (!ir.isNull())

View File

@ -13,7 +13,6 @@ public:
QString label() const {return tr("Cadence");}
void loadData(const Data &data, const QList<PathItem *> &paths);
void clear();
void setUnits(enum Units) {}
void showTracks(bool show);
void showRoutes(bool show) {Q_UNUSED(show);}

View File

@ -9,6 +9,8 @@
ColorBox::ColorBox(QWidget *parent) : QWidget(parent)
{
_color = Qt::red;
_alpha = true;
setSizePolicy(QSizePolicy::QSizePolicy::Minimum, QSizePolicy::Fixed);
}
@ -51,9 +53,9 @@ void ColorBox::mousePressEvent(QMouseEvent *event)
{
if (event->button() != Qt::LeftButton)
return;
QColor color = QColorDialog::getColor(_color, this, QString(),
QColorDialog::ShowAlphaChannel);
QColorDialog::ColorDialogOptions options = _alpha
? QColorDialog::ShowAlphaChannel : (QColorDialog::ColorDialogOptions)0;
QColor color = QColorDialog::getColor(_color, this, QString(), options);
if (color.isValid()) {
_color = color;
update();

View File

@ -12,6 +12,7 @@ public:
const QColor &color() const {return _color;}
void setColor(const QColor &color);
void enableAlphaChannel(bool enable) {_alpha = enable;}
QSize sizeHint() const;
@ -24,6 +25,7 @@ protected:
private:
QColor _color;
bool _alpha;
};
#endif // COLORBOX_H

View File

@ -10,8 +10,7 @@
#define APP_HOMEPAGE "http://www.gpxsee.org"
#define FONT_FAMILY "Arial"
#define FONT_SIZE 12
#define SCREEN_DPI 96.0
#define FONT_SIZE 12 // px
#define ELLIPSOID_FILE QString("ellipsoids.csv")
#define DATUM_FILE QString("datums.csv")

View File

@ -19,11 +19,9 @@ qreal Coordinates::distanceTo(const Coordinates &c) const
QDebug operator<<(QDebug dbg, const Coordinates &coordinates)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "Coordinates(" << coordinates.lon() << ", "
<< coordinates.lat() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}
QPair<Coordinates, Coordinates> Coordinates::boundingRect(qreal distance) const

View File

@ -11,21 +11,30 @@
#include "data.h"
static GPXParser gpx;
static TCXParser tcx;
static KMLParser kml;
static FITParser fit;
static CSVParser csv;
static IGCParser igc;
static NMEAParser nmea;
static QHash<QString, Parser*> parsers()
{
QHash<QString, Parser*> hash;
hash.insert("gpx", new GPXParser());
hash.insert("tcx", new TCXParser());
hash.insert("kml", new KMLParser());
hash.insert("fit", new FITParser());
hash.insert("csv", new CSVParser());
hash.insert("igc", new IGCParser());
hash.insert("nmea", new NMEAParser());
hash.insert("gpx", &gpx);
hash.insert("tcx", &tcx);
hash.insert("kml", &kml);
hash.insert("fit", &fit);
hash.insert("csv", &csv);
hash.insert("igc", &igc);
hash.insert("nmea", &nmea);
return hash;
}
QHash<QString, Parser*> Data::_parsers = parsers();
Data::~Data()

View File

@ -70,7 +70,7 @@ qreal EmptyMap::zoomOut()
void EmptyMap::draw(QPainter *painter, const QRectF &rect)
{
painter->fillRect(rect, Qt::white);
painter->fillRect(rect, _backgroundColor);
}
QPointF EmptyMap::ll2xy(const Coordinates &c)

View File

@ -26,15 +26,28 @@ ExportDialog::ExportDialog(Export *exp, QWidget *parent)
_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();
@ -81,6 +94,7 @@ ExportDialog::ExportDialog(Export *exp, QWidget *parent)
#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
@ -161,9 +175,11 @@ void ExportDialog::accept()
? 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,

View File

@ -16,6 +16,7 @@ struct Export {
QPrinter::PaperSize paperSize;
QPrinter::Orientation orientation;
MarginsF margins;
int resolution;
Units units;
};
@ -37,6 +38,7 @@ private:
FileSelectWidget *_fileSelect;
QComboBox *_paperSize;
QComboBox *_resolution;
QRadioButton *_portrait;
QRadioButton *_landscape;
QDoubleSpinBox *_topMargin;

View File

@ -2,9 +2,7 @@
QDebug operator<<(QDebug dbg, const GraphPoint &point)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "GraphPoint(" << point.s() << ", " << point.t() << ", "
<< point.y() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -20,7 +20,7 @@ public:
virtual QString label() const = 0;
virtual void loadData(const Data &data, const QList<PathItem *> &paths) = 0;
virtual void clear() {}
virtual void setUnits(enum Units units) {Q_UNUSED(units)}
virtual void setUnits(enum Units units) {GraphView::setUnits(units);}
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)}

View File

@ -326,11 +326,9 @@ void GraphView::mousePressEvent(QMouseEvent *e)
QGraphicsView::mousePressEvent(e);
}
void GraphView::plot(QPainter *painter, const QRectF &target)
void GraphView::plot(QPainter *painter, const QRectF &target, qreal scale)
{
qreal ratio = painter->paintEngine()->paintDevice()->logicalDpiX()
/ SCREEN_DPI;
QSizeF canvas = QSizeF(target.width() / ratio, target.height() / ratio);
QSizeF canvas = QSizeF(target.width() / scale, target.height() / scale);
setUpdatesEnabled(false);
redraw(canvas);
@ -463,3 +461,8 @@ void GraphView::useOpenGL(bool use)
else
setViewport(new QWidget);
}
void GraphView::useAntiAliasing(bool use)
{
setRenderHint(QPainter::Antialiasing, use);
}

View File

@ -53,9 +53,10 @@ public:
qreal sliderPosition() const {return _sliderPos;}
void setSliderPosition(qreal pos);
void plot(QPainter *painter, const QRectF &target);
void plot(QPainter *painter, const QRectF &target, qreal scale);
void useOpenGL(bool use);
void useAntiAliasing(bool use);
signals:
void sliderPositionChanged(qreal);

View File

@ -696,10 +696,11 @@ void GUI::dataSources()
"following file:")
+ "</p><p><code>" + USER_MAP_FILE + "</code></p><p>"
+ tr("The file format is one map entry per line, consisting of the map "
"name and tiles URL delimited by a TAB character. The tile X and Y "
"coordinates are replaced with $x and $y in the URL and the zoom "
"level is replaced with $z. An example map file could look like:")
+ "</p><p><code>Map1 http://tile.server.com/map/$z/$x/$y.png"
"name, tiles URL and an optional maximal zoom level delimited by "
"a TAB character. The tile X and Y coordinates are replaced with $x "
"and $y in the URL and the zoom level is replaced with $z. An example "
"map file could look like:")
+ "</p><p><code>Map1 http://tile.server.com/map/$z/$x/$y.png 15"
"<br/>Map2 http://mapserver.org/map/$z-$x-$y</code></p>"
+ "<h4>" + tr("Offline maps") + "</h4><p>"
@ -854,17 +855,21 @@ void GUI::closePOIFiles()
_poi->clear();
}
void GUI::printFile()
{
QPrinter printer(QPrinter::HighResolution);
QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted)
plot(&printer);
}
void GUI::openOptions()
{
#define SET_VIEW_OPTION(option, action) \
if (options.option != _options.option) \
_pathView->action(options.option)
#define SET_TAB_OPTION(option, action) \
if (options.option != _options.option) \
for (int i = 0; i < _tabs.count(); i++) \
_tabs.at(i)->action(options.option)
#define SET_TRACK_OPTION(option, action) \
if (options.option != _options.option) { \
Track::action(options.option); \
reload = true; \
}
Options options(_options);
bool reload = false;
@ -872,71 +877,36 @@ void GUI::openOptions()
if (dialog.exec() != QDialog::Accepted)
return;
if (options.palette != _options.palette) {
_pathView->setPalette(options.palette);
for (int i = 0; i < _tabs.count(); i++)
_tabs.at(i)->setPalette(options.palette);
}
if (options.trackWidth != _options.trackWidth)
_pathView->setTrackWidth(options.trackWidth);
if (options.routeWidth != _options.routeWidth)
_pathView->setRouteWidth(options.routeWidth);
if (options.trackStyle != _options.trackStyle)
_pathView->setTrackStyle(options.trackStyle);
if (options.routeStyle != _options.routeStyle)
_pathView->setRouteStyle(options.routeStyle);
if (options.pathAntiAliasing != _options.pathAntiAliasing)
_pathView->setRenderHint(QPainter::Antialiasing,
options.pathAntiAliasing);
if (options.graphWidth != _options.graphWidth)
for (int i = 0; i < _tabs.count(); i++)
_tabs.at(i)->setGraphWidth(options.graphWidth);
if (options.graphAntiAliasing != _options.graphAntiAliasing)
for (int i = 0; i < _tabs.count(); i++)
_tabs.at(i)->setRenderHint(QPainter::Antialiasing,
options.graphAntiAliasing);
SET_VIEW_OPTION(palette, setPalette);
SET_VIEW_OPTION(mapOpacity, setMapOpacity);
SET_VIEW_OPTION(backgroundColor, setBackgroundColor);
SET_VIEW_OPTION(trackWidth, setTrackWidth);
SET_VIEW_OPTION(routeWidth, setRouteWidth);
SET_VIEW_OPTION(trackStyle, setTrackStyle);
SET_VIEW_OPTION(routeStyle, setRouteStyle);
SET_VIEW_OPTION(waypointSize, setWaypointSize);
SET_VIEW_OPTION(waypointColor, setWaypointColor);
SET_VIEW_OPTION(poiSize, setPOISize);
SET_VIEW_OPTION(poiColor, setPOIColor);
SET_VIEW_OPTION(pathAntiAliasing, useAntiAliasing);
SET_VIEW_OPTION(useOpenGL, useOpenGL);
if (options.elevationFilter != _options.elevationFilter) {
Track::setElevationFilter(options.elevationFilter);
reload = true;
}
if (options.speedFilter != _options.speedFilter) {
Track::setSpeedFilter(options.speedFilter);
reload = true;
}
if (options.heartRateFilter != _options.heartRateFilter) {
Track::setHeartRateFilter(options.heartRateFilter);
reload = true;
}
if (options.cadenceFilter != _options.cadenceFilter) {
Track::setCadenceFilter(options.cadenceFilter);
reload = true;
}
if (options.powerFilter != _options.powerFilter) {
Track::setPowerFilter(options.powerFilter);
reload = true;
}
if (options.outlierEliminate != _options.outlierEliminate) {
Track::setOutlierElimination(options.outlierEliminate);
reload = true;
}
if (options.pauseSpeed != _options.pauseSpeed) {
Track::setPauseSpeed(options.pauseSpeed);
reload = true;
}
if (options.pauseInterval != _options.pauseInterval) {
Track::setPauseInterval(options.pauseInterval);
reload = true;
}
SET_TAB_OPTION(palette, setPalette);
SET_TAB_OPTION(graphWidth, setGraphWidth);
SET_TAB_OPTION(graphAntiAliasing, useAntiAliasing);
SET_TAB_OPTION(useOpenGL, useOpenGL);
SET_TRACK_OPTION(elevationFilter, setElevationFilter);
SET_TRACK_OPTION(speedFilter, setSpeedFilter);
SET_TRACK_OPTION(heartRateFilter, setHeartRateFilter);
SET_TRACK_OPTION(cadenceFilter, setCadenceFilter);
SET_TRACK_OPTION(powerFilter, setPowerFilter);
SET_TRACK_OPTION(outlierEliminate, setOutlierElimination);
SET_TRACK_OPTION(pauseSpeed, setPauseSpeed);
SET_TRACK_OPTION(pauseInterval, setPauseInterval);
if (options.poiRadius != _options.poiRadius)
_poi->setRadius(options.poiRadius);
if (options.useOpenGL != _options.useOpenGL) {
_pathView->useOpenGL(options.useOpenGL);
for (int i = 0; i < _tabs.count(); i++)
_tabs.at(i)->useOpenGL(options.useOpenGL);
}
if (options.pixmapCache != _options.pixmapCache)
QPixmapCache::setCacheLimit(options.pixmapCache * 1024);
@ -946,6 +916,15 @@ void GUI::openOptions()
_options = options;
}
void GUI::printFile()
{
QPrinter printer(QPrinter::HighResolution);
QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted)
plot(&printer);
}
void GUI::exportFile()
{
ExportDialog dialog(&_export, this);
@ -956,6 +935,7 @@ void GUI::exportFile()
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setCreator(QString(APP_NAME) + QString(" ")
+ QString(APP_VERSION));
printer.setResolution(_export.resolution);
printer.setOrientation(_export.orientation);
printer.setOutputFileName(_export.fileName);
printer.setPaperSize(_export.paperSize);
@ -1005,28 +985,29 @@ void GUI::plot(QPrinter *printer)
if (tm > 0 && _options.printMovingTime)
info.insert(tr("Moving time"), Format::timeSpan(tm));
ratio = p.paintEngine()->paintDevice()->logicalDpiX() / SCREEN_DPI;
qreal fsr = 1085.0 / (qMax(printer->width(), printer->height())
/ (qreal)printer->resolution());
ratio = p.paintEngine()->paintDevice()->logicalDpiX() / fsr;
if (info.isEmpty()) {
ih = 0;
mh = 0;
} else {
ih = info.contentSize().height() * ratio;
mh = ih / 2;
info.plot(&p, QRectF(0, 0, printer->width(), ih));
info.plot(&p, QRectF(0, 0, printer->width(), ih), ratio);
}
if (_graphTabWidget->isVisible() && !_options.separateGraphPage) {
qreal r = (((qreal)(printer)->width()) / (qreal)(printer->height()));
gh = (printer->width() > printer->height())
? 0.15 * r * (printer->height() - ih - 2*mh)
: 0.15 * (printer->height() - ih - 2*mh);
gh = qMax(gh, ratio * 150);
GraphTab *gt = static_cast<GraphTab*>(_graphTabWidget->currentWidget());
gt->plot(&p, QRectF(0, printer->height() - gh, printer->width(), gh));
gt->plot(&p, QRectF(0, printer->height() - gh, printer->width(), gh),
ratio);
} else
gh = 0;
_pathView->plot(&p, QRectF(0, ih + mh, printer->width(), printer->height()
- (ih + 2*mh + gh)));
- (ih + 2*mh + gh)), ratio, _options.hiresPrint);
if (_graphTabWidget->isVisible() && _options.separateGraphPage) {
printer->newPage();
@ -1043,7 +1024,8 @@ void GUI::plot(QPrinter *printer)
qreal y = 0;
for (int i = 0; i < _tabs.size(); i++) {
if (_tabs.at(i)->count()) {
_tabs.at(i)->plot(&p, QRectF(0, y, printer->width(), gh));
_tabs.at(i)->plot(&p, QRectF(0, y, printer->width(), gh),
ratio);
y += gh + sp;
}
}
@ -1579,6 +1561,8 @@ void GUI::writeSettings()
settings.beginGroup(EXPORT_SETTINGS_GROUP);
if (_export.orientation != PAPER_ORIENTATION_DEFAULT)
settings.setValue(PAPER_ORIENTATION_SETTING, _export.orientation);
if (_export.resolution != RESOLUTION_DEFAULT)
settings.setValue(RESOLUTION_SETTING, _export.resolution);
if (_export.paperSize != PAPER_SIZE_DEFAULT)
settings.setValue(PAPER_SIZE_SETTING, _export.paperSize);
if (_export.margins.left() != MARGIN_LEFT_DEFAULT)
@ -1598,6 +1582,10 @@ void GUI::writeSettings()
settings.setValue(PALETTE_COLOR_SETTING, _options.palette.color());
if (_options.palette.shift() != PALETTE_SHIFT_DEFAULT)
settings.setValue(PALETTE_SHIFT_SETTING, _options.palette.shift());
if (_options.mapOpacity != MAP_OPACITY_DEFAULT)
settings.setValue(MAP_OPACITY_SETTING, _options.mapOpacity);
if (_options.backgroundColor != BACKGROUND_COLOR_DEFAULT)
settings.setValue(BACKGROUND_COLOR_SETTING, _options.backgroundColor);
if (_options.trackWidth != TRACK_WIDTH_DEFAULT)
settings.setValue(TRACK_WIDTH_SETTING, _options.trackWidth);
if (_options.routeWidth != ROUTE_WIDTH_DEFAULT)
@ -1606,6 +1594,14 @@ void GUI::writeSettings()
settings.setValue(TRACK_STYLE_SETTING, (int)_options.trackStyle);
if (_options.routeStyle != ROUTE_STYLE_DEFAULT)
settings.setValue(ROUTE_STYLE_SETTING, (int)_options.routeStyle);
if (_options.waypointSize != WAYPOINT_SIZE_DEFAULT)
settings.setValue(WAYPOINT_SIZE_SETTING, _options.waypointSize);
if (_options.waypointColor != WAYPOINT_COLOR_DEFAULT)
settings.setValue(WAYPOINT_COLOR_SETTING, _options.waypointColor);
if (_options.poiSize != POI_SIZE_DEFAULT)
settings.setValue(POI_SIZE_SETTING, _options.poiSize);
if (_options.poiColor != POI_COLOR_DEFAULT)
settings.setValue(POI_COLOR_SETTING, _options.poiColor);
if (_options.graphWidth != GRAPH_WIDTH_DEFAULT)
settings.setValue(GRAPH_WIDTH_SETTING, _options.graphWidth);
if (_options.pathAntiAliasing != PATH_AA_DEFAULT)
@ -1634,6 +1630,8 @@ void GUI::writeSettings()
settings.setValue(USE_OPENGL_SETTING, _options.useOpenGL);
if (_options.pixmapCache != PIXMAP_CACHE_DEFAULT)
settings.setValue(PIXMAP_CACHE_SETTING, _options.pixmapCache);
if (_options.hiresPrint != HIRES_PRINT_DEFAULT)
settings.setValue(HIRES_PRINT_SETTING, _options.hiresPrint);
if (_options.printName != PRINT_NAME_DEFAULT)
settings.setValue(PRINT_NAME_SETTING, _options.printName);
if (_options.printDate != PRINT_DATE_DEFAULT)
@ -1773,6 +1771,8 @@ void GUI::readSettings()
settings.beginGroup(EXPORT_SETTINGS_GROUP);
_export.orientation = (QPrinter::Orientation) settings.value(
PAPER_ORIENTATION_SETTING, PAPER_ORIENTATION_DEFAULT).toInt();
_export.resolution = settings.value(RESOLUTION_SETTING, RESOLUTION_DEFAULT)
.toInt();
_export.paperSize = (QPrinter::PaperSize) settings.value(PAPER_SIZE_SETTING,
PAPER_SIZE_DEFAULT).toInt();
qreal ml = settings.value(MARGIN_LEFT_SETTING, MARGIN_LEFT_DEFAULT)
@ -1793,6 +1793,10 @@ void GUI::readSettings()
qreal ps = settings.value(PALETTE_SHIFT_SETTING, PALETTE_SHIFT_DEFAULT)
.toDouble();
_options.palette = Palette(pc, ps);
_options.mapOpacity = settings.value(MAP_OPACITY_SETTING,
MAP_OPACITY_DEFAULT).toInt();
_options.backgroundColor = settings.value(BACKGROUND_COLOR_SETTING,
BACKGROUND_COLOR_DEFAULT).value<QColor>();
_options.trackWidth = settings.value(TRACK_WIDTH_SETTING,
TRACK_WIDTH_DEFAULT).toInt();
_options.routeWidth = settings.value(ROUTE_WIDTH_SETTING,
@ -1803,6 +1807,14 @@ void GUI::readSettings()
(int)ROUTE_STYLE_DEFAULT).toInt();
_options.pathAntiAliasing = settings.value(PATH_AA_SETTING, PATH_AA_DEFAULT)
.toBool();
_options.waypointSize = settings.value(WAYPOINT_SIZE_SETTING,
WAYPOINT_SIZE_DEFAULT).toInt();
_options.waypointColor = settings.value(WAYPOINT_COLOR_SETTING,
WAYPOINT_COLOR_DEFAULT).value<QColor>();
_options.poiSize = settings.value(POI_SIZE_SETTING, POI_SIZE_DEFAULT)
.toInt();
_options.poiColor = settings.value(POI_COLOR_SETTING, POI_COLOR_DEFAULT)
.value<QColor>();
_options.graphWidth = settings.value(GRAPH_WIDTH_SETTING,
GRAPH_WIDTH_DEFAULT).toInt();
_options.graphAntiAliasing = settings.value(GRAPH_AA_SETTING,
@ -1829,6 +1841,8 @@ void GUI::readSettings()
.toBool();
_options.pixmapCache = settings.value(PIXMAP_CACHE_SETTING,
PIXMAP_CACHE_DEFAULT).toInt();
_options.hiresPrint = settings.value(HIRES_PRINT_SETTING,
HIRES_PRINT_DEFAULT).toBool();
_options.printName = settings.value(PRINT_NAME_SETTING, PRINT_NAME_DEFAULT)
.toBool();
_options.printDate = settings.value(PRINT_DATE_SETTING, PRINT_DATE_DEFAULT)
@ -1845,10 +1859,16 @@ void GUI::readSettings()
SEPARATE_GRAPH_PAGE_DEFAULT).toBool();
_pathView->setPalette(_options.palette);
_pathView->setMapOpacity(_options.mapOpacity);
_pathView->setBackgroundColor(_options.backgroundColor);
_pathView->setTrackWidth(_options.trackWidth);
_pathView->setRouteWidth(_options.routeWidth);
_pathView->setTrackStyle(_options.trackStyle);
_pathView->setRouteStyle(_options.routeStyle);
_pathView->setWaypointSize(_options.waypointSize);
_pathView->setWaypointColor(_options.waypointColor);
_pathView->setPOISize(_options.poiSize);
_pathView->setPOIColor(_options.poiColor);
_pathView->setRenderHint(QPainter::Antialiasing, _options.pathAntiAliasing);
if (_options.useOpenGL)
_pathView->useOpenGL(true);

View File

@ -75,7 +75,7 @@ Coordinates LambertConic::xy2ll(const QPointF &p) const
double dx = p.x() - _fe;
double dy = p.y() - _fn - _R0;
double R = sqrt(dx * dx + dy * dy);
double q = _q0 - log(R / _R0) / _n;
double q = _q0 - log(fabs(R / _R0)) / _n;
return Coordinates(rad2deg(deg2rad(_cm) + dl / _n), rad2deg(iq(_e, q)));
}

View File

@ -4,6 +4,7 @@
#include <QObject>
#include <QString>
#include <QRectF>
#include <QColor>
class QPainter;
class Coordinates;
@ -14,7 +15,7 @@ class Map : public QObject
Q_OBJECT
public:
Map(QObject *parent = 0) : QObject(parent) {}
Map(QObject *parent = 0) : QObject(parent) {_backgroundColor = Qt::white;}
virtual const QString &name() const = 0;
@ -37,8 +38,13 @@ public:
virtual void load() {}
virtual void unload() {}
void setBackgroundColor(const QColor &color) {_backgroundColor = color;}
signals:
void loaded();
protected:
QColor _backgroundColor;
};
#endif // MAP_H

View File

@ -1,24 +1,38 @@
#include <QFileInfo>
#include <QDir>
#include "range.h"
#include "atlas.h"
#include "offlinemap.h"
#include "onlinemap.h"
#include "maplist.h"
#define ZOOM_MAX 18
#define ZOOM_MIN 2
Map *MapList::loadListEntry(const QByteArray &line)
{
int max;
QList<QByteArray> list = line.split('\t');
if (list.size() != 2)
if (list.size() < 2)
return 0;
QByteArray ba1 = list[0].trimmed();
QByteArray ba2 = list[1].trimmed();
QByteArray ba1 = list.at(0).trimmed();
QByteArray ba2 = list.at(1).trimmed();
if (ba1.isEmpty() || ba2.isEmpty())
return 0;
if (list.size() == 3) {
bool ok;
max = QString(list.at(2).trimmed()).toInt(&ok);
if (!ok)
return 0;
} else
max = ZOOM_MAX;
return new OnlineMap(QString::fromUtf8(ba1.data(), ba1.size()),
QString::fromLatin1(ba2.data(), ba2.size()), this);
QString::fromLatin1(ba2.data(), ba2.size()), Range(ZOOM_MIN, max), this);
}
bool MapList::loadList(const QString &path)

View File

@ -118,8 +118,6 @@ void Matrix::zeroize()
QDebug operator<<(QDebug dbg, const Matrix &matrix)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "Matrix(" << endl;
for (size_t i = 0; i < matrix.h(); i++) {
for (size_t j = 0; j < matrix.w(); j++)
@ -128,7 +126,5 @@ QDebug operator<<(QDebug dbg, const Matrix &matrix)
}
dbg << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -507,16 +507,16 @@ bool NMEAParser::parse(QFile *file, QList<TrackData> &tracks,
if (validSentence(line, len)) {
if (!memcmp(line + 3, "RMC,", 4)) {
if (!readRMC(track, line + 7, len))
if (!readRMC(track, line + 7, len - 7))
return false;
} else if (!memcmp(line + 3, "GGA,", 4)) {
if (!readGGA(track, line + 7, len))
if (!readGGA(track, line + 7, len - 7))
return false;
} else if (!memcmp(line + 3, "WPL,", 4)) {
if (!readWPL(waypoints, line + 7, len))
if (!readWPL(waypoints, line + 7, len - 7))
return false;
} else if (!memcmp(line + 3, "ZDA,", 4)) {
if (!readZDA(line + 7, len))
if (!readZDA(line + 7, len - 7))
return false;
}
}

View File

@ -229,6 +229,24 @@ bool OfflineMap::createProjection(const QString &datum,
else if (projection == "(SG) Swedish Grid")
_projection = new TransverseMercator(d.ellipsoid(), 0, 15.808278, 1,
1500000, 0);
else if (projection == "(I) France Zone I")
_projection = new LambertConic(d.ellipsoid(), 48.598523, 50.395912,
49.5, 2.337229, 1 /*0.99987734*/, 600000, 1200000);
else if (projection == "(II) France Zone II")
_projection = new LambertConic(d.ellipsoid(), 45.898919, 47.696014,
46.8, 2.337229, 1 /*0.99987742*/, 600000, 2200000);
else if (projection == "(III) France Zone III")
_projection = new LambertConic(d.ellipsoid(), 43.199291, 44.996094,
44.1, 2.337229, 1 /*0.99987750*/, 600000, 3200000);
else if (projection == "(IV) France Zone IV")
_projection = new LambertConic(d.ellipsoid(), 41.560388, 42.767663,
42.165, 2.337229, 1 /*0.99994471*/, 234.358, 4185861.369);
else if (projection == "(VICGRID) Victoria Australia")
_projection = new LambertConic(d.ellipsoid(), -36, -38, -37, 145, 1,
2500000, 4500000);
else if (projection == "(VG94) VICGRID94 Victoria Australia")
_projection = new LambertConic(d.ellipsoid(), -36, -38, -37, 145, 1,
2500000, 2500000);
else {
_errorString = QString("%1: Unknown map projection").arg(projection);
return false;
@ -591,7 +609,8 @@ void OfflineMap::drawTiled(QPainter *painter, const QRectF &rect)
int y = tl.y() + j * _tileSize.height();
if (!QRectF(QPointF(x, y), _tileSize).intersects(bounds())) {
painter->fillRect(QRectF(QPoint(x, y), _tileSize), Qt::white);
painter->fillRect(QRectF(QPoint(x, y), _tileSize),
_backgroundColor);
continue;
}
@ -613,7 +632,8 @@ void OfflineMap::drawTiled(QPainter *painter, const QRectF &rect)
if (pixmap.isNull()) {
qWarning("%s: error loading tile image", qPrintable(
_tileName.arg(QString::number(x), QString::number(y))));
painter->fillRect(QRectF(QPoint(x, y), _tileSize), Qt::white);
painter->fillRect(QRectF(QPoint(x, y), _tileSize),
_backgroundColor);
} else
painter->drawPixmap(QPoint(x, y), pixmap);
}
@ -634,7 +654,7 @@ void OfflineMap::drawOZF(QPainter *painter, const QRectF &rect)
if (!QRectF(QPointF(x, y), _ozf.tileSize()).intersects(bounds())) {
painter->fillRect(QRectF(QPoint(x, y), _ozf.tileSize()),
Qt::white);
_backgroundColor);
continue;
}
@ -650,7 +670,7 @@ void OfflineMap::drawOZF(QPainter *painter, const QRectF &rect)
if (pixmap.isNull()) {
qWarning("%s: error loading tile image", qPrintable(key));
painter->fillRect(QRectF(QPoint(x, y), _ozf.tileSize()),
Qt::white);
_backgroundColor);
} else
painter->drawPixmap(QPoint(x, y), pixmap);
}
@ -660,7 +680,7 @@ void OfflineMap::drawOZF(QPainter *painter, const QRectF &rect)
void OfflineMap::drawImage(QPainter *painter, const QRectF &rect)
{
if (!_img || _img->isNull())
painter->fillRect(rect, Qt::white);
painter->fillRect(rect, _backgroundColor);
else {
QRect r(rect.toRect());
painter->drawImage(r.left(), r.top(), *_img, r.left(), r.top(),

View File

@ -12,8 +12,6 @@
#include "onlinemap.h"
#define ZOOM_MAX 18
#define ZOOM_MIN 3
#define TILE_SIZE 256
static QPoint mercator2tile(const QPointF &m, int z)
@ -36,16 +34,27 @@ static int scale2zoom(qreal scale)
return (int)log2(360.0/(scale * (qreal)TILE_SIZE));
}
static bool loadTileFile(Tile &tile, const QString &file)
{
if (!tile.pixmap().load(file)) {
qWarning("%s: error loading tile file\n", qPrintable(file));
return false;
}
return true;
}
Downloader *OnlineMap::downloader;
OnlineMap::OnlineMap(const QString &name, const QString &url, QObject *parent)
: Map(parent)
OnlineMap::OnlineMap(const QString &name, const QString &url,
const Range &zooms, QObject *parent) : Map(parent)
{
_name = name;
_url = url;
_block = false;
_zoom = ZOOM_MAX;
_zooms = zooms;
_zoom = zooms.max();
connect(downloader, SIGNAL(finished()), this, SLOT(emitLoaded()));
@ -54,6 +63,12 @@ OnlineMap::OnlineMap(const QString &name, const QString &url, QObject *parent)
qWarning("Error creating tiles dir: %s\n", qPrintable(path));
}
void OnlineMap::fillTile(Tile &tile)
{
tile.pixmap() = QPixmap(TILE_SIZE, TILE_SIZE);
tile.pixmap().fill(_backgroundColor);
}
void OnlineMap::emitLoaded()
{
emit loaded();
@ -115,23 +130,7 @@ void OnlineMap::loadTilesSync(QList<Tile> &list)
}
}
void OnlineMap::fillTile(Tile &tile)
{
tile.pixmap() = QPixmap(TILE_SIZE, TILE_SIZE);
tile.pixmap().fill();
}
bool OnlineMap::loadTileFile(Tile &tile, const QString &file)
{
if (!tile.pixmap().load(file)) {
qWarning("%s: error loading tile file\n", qPrintable(file));
return false;
}
return true;
}
QString OnlineMap::tileUrl(const Tile &tile)
QString OnlineMap::tileUrl(const Tile &tile) const
{
QString url(_url);
@ -142,7 +141,7 @@ QString OnlineMap::tileUrl(const Tile &tile)
return url;
}
QString OnlineMap::tileFile(const Tile &tile)
QString OnlineMap::tileFile(const Tile &tile) const
{
QString file = TILES_DIR + QString("/%1/%2-%3-%4").arg(name())
.arg(tile.zoom()).arg(tile.xy().x()).arg(tile.xy().y());
@ -166,20 +165,26 @@ QRectF OnlineMap::bounds() const
1.0/zoom2scale(_zoom));
}
int OnlineMap::limitZoom(int zoom) const
{
if (zoom < _zooms.min())
return _zooms.min();
if (zoom > _zooms.max())
return _zooms.max();
return zoom;
}
qreal OnlineMap::zoomFit(const QSize &size, const RectC &br)
{
if (!br.isValid())
_zoom = ZOOM_MAX;
_zoom = _zooms.max();
else {
QRectF tbr(Mercator().ll2xy(br.topLeft()),
Mercator().ll2xy(br.bottomRight()));
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
_zoom = scale2zoom(qMax(sc.x(), sc.y()));
if (_zoom < ZOOM_MIN)
_zoom = ZOOM_MIN;
if (_zoom > ZOOM_MAX)
_zoom = ZOOM_MAX;
_zoom = limitZoom(scale2zoom(qMax(sc.x(), sc.y())));
}
return _zoom;
@ -187,13 +192,8 @@ qreal OnlineMap::zoomFit(const QSize &size, const RectC &br)
qreal OnlineMap::zoomFit(qreal resolution, const Coordinates &c)
{
_zoom = (int)(log2((WGS84_RADIUS * 2 * M_PI * cos(deg2rad(c.lat())))
/ resolution) - log2(TILE_SIZE));
if (_zoom < ZOOM_MIN)
_zoom = ZOOM_MIN;
if (_zoom > ZOOM_MAX)
_zoom = ZOOM_MAX;
_zoom = limitZoom((int)(log2((WGS84_RADIUS * 2 * M_PI
* cos(deg2rad(c.lat()))) / resolution) - log2(TILE_SIZE)));
return _zoom;
}
@ -208,13 +208,13 @@ qreal OnlineMap::resolution(const QPointF &p) const
qreal OnlineMap::zoomIn()
{
_zoom = qMin(_zoom + 1, ZOOM_MAX);
_zoom = qMin(_zoom + 1, _zooms.max());
return _zoom;
}
qreal OnlineMap::zoomOut()
{
_zoom = qMax(_zoom - 1, ZOOM_MIN);
_zoom = qMax(_zoom - 1, _zooms.min());
return _zoom;
}

View File

@ -3,6 +3,7 @@
#include "map.h"
#include "tile.h"
#include "range.h"
class Downloader;
@ -11,7 +12,8 @@ class OnlineMap : public Map
Q_OBJECT
public:
OnlineMap(const QString &name, const QString &url, QObject *parent = 0);
OnlineMap(const QString &name, const QString &url, const Range &zooms,
QObject *parent = 0);
const QString &name() const {return _name;}
@ -39,13 +41,14 @@ private slots:
void emitLoaded();
private:
QString tileUrl(const Tile &tile);
QString tileFile(const Tile &tile);
bool loadTileFile(Tile &tile, const QString &file);
void fillTile(Tile &tile);
QString tileUrl(const Tile &tile) const;
QString tileFile(const Tile &tile) const;
void loadTilesAsync(QList<Tile> &list);
void loadTilesSync(QList<Tile> &list);
int limitZoom(int zoom) const;
Range _zooms;
int _zoom;
QString _name;
QString _url;

View File

@ -9,6 +9,7 @@
#include <QGroupBox>
#include <QCheckBox>
#include <QComboBox>
#include <QRadioButton>
#include <QLabel>
#include <QSysInfo>
#include "config.h"
@ -16,14 +17,27 @@
#include "colorbox.h"
#include "stylecombobox.h"
#include "oddspinbox.h"
#include "percentslider.h"
#include "optionsdialog.h"
#define MENU_MARGIN 20
#define MENU_ICON_SIZE 32
#ifdef Q_OS_MAC
static QFrame *line()
{
QFrame *l = new QFrame();
l->setFrameShape(QFrame::HLine);
l->setFrameShadow(QFrame::Sunken);
return l;
}
#endif
QWidget *OptionsDialog::createAppearancePage()
{
// Paths
_baseColor = new ColorBox();
_baseColor->setColor(_options->palette.color());
_colorOffset = new QDoubleSpinBox();
@ -31,14 +45,13 @@ QWidget *OptionsDialog::createAppearancePage()
_colorOffset->setMaximum(1.0);
_colorOffset->setSingleStep(0.01);
_colorOffset->setValue(_options->palette.shift());
QFormLayout *paletteLayout = new QFormLayout();
paletteLayout->addRow(tr("Base color:"), _baseColor);
paletteLayout->addRow(tr("Palette shift:"), _colorOffset);
QWidget *colorTab = new QWidget();
colorTab->setLayout(paletteLayout);
#ifndef Q_OS_MAC
QGroupBox *colorBox = new QGroupBox(tr("Colors"));
colorBox->setLayout(paletteLayout);
#endif // Q_OS_MAC
_trackWidth = new QSpinBox();
_trackWidth->setValue(_options->trackWidth);
@ -46,12 +59,15 @@ QWidget *OptionsDialog::createAppearancePage()
_trackStyle = new StyleComboBox();
_trackStyle->setValue(_options->trackStyle);
QFormLayout *trackLayout = new QFormLayout();
#ifdef Q_OS_MAC
trackLayout->addRow(tr("Track width:"), _trackWidth);
trackLayout->addRow(tr("Track style:"), _trackStyle);
#ifndef Q_OS_MAC
#else // Q_OS_MAC
trackLayout->addRow(tr("Width:"), _trackWidth);
trackLayout->addRow(tr("Style:"), _trackStyle);
QGroupBox *trackBox = new QGroupBox(tr("Tracks"));
trackBox->setLayout(trackLayout);
#endif
#endif // Q_OS_MAC
_routeWidth = new QSpinBox();
_routeWidth->setValue(_options->routeWidth);
@ -59,9 +75,12 @@ QWidget *OptionsDialog::createAppearancePage()
_routeStyle = new StyleComboBox();
_routeStyle->setValue(_options->routeStyle);
QFormLayout *routeLayout = new QFormLayout();
#ifdef Q_OS_MAC
routeLayout->addRow(tr("Route width:"), _routeWidth);
routeLayout->addRow(tr("Route style:"), _routeStyle);
#ifndef Q_OS_MAC
#else // Q_OS_MAC
routeLayout->addRow(tr("Width:"), _routeWidth);
routeLayout->addRow(tr("Style:"), _routeStyle);
QGroupBox *routeBox = new QGroupBox(tr("Routes"));
routeBox->setLayout(routeLayout);
#endif // Q_OS_MAC
@ -74,18 +93,14 @@ QWidget *OptionsDialog::createAppearancePage()
QWidget *pathTab = new QWidget();
QVBoxLayout *pathTabLayout = new QVBoxLayout();
#ifdef Q_OS_MAC
QFrame *l1 = new QFrame();
l1->setFrameShape(QFrame::HLine);
l1->setFrameShadow(QFrame::Sunken);
QFrame *l2 = new QFrame();
l2->setFrameShape(QFrame::HLine);
l2->setFrameShadow(QFrame::Sunken);
pathTabLayout->addLayout(paletteLayout);
pathTabLayout->addWidget(line());
pathTabLayout->addLayout(trackLayout);
pathTabLayout->addWidget(l1);
pathTabLayout->addWidget(line());
pathTabLayout->addLayout(routeLayout);
pathTabLayout->addWidget(l2);
pathTabLayout->addWidget(line());
#else // Q_OS_MAC
pathTabLayout->addWidget(colorBox);
pathTabLayout->addWidget(trackBox);
pathTabLayout->addWidget(routeBox);
#endif // Q_OS_MAC
@ -93,6 +108,55 @@ QWidget *OptionsDialog::createAppearancePage()
pathTabLayout->addStretch();
pathTab->setLayout(pathTabLayout);
// Waypoints
_waypointSize = new QSpinBox();
_waypointSize->setMinimum(1);
_waypointSize->setValue(_options->waypointSize);
_waypointColor = new ColorBox();
_waypointColor->setColor(_options->waypointColor);
QFormLayout *waypointLayout = new QFormLayout();
#ifdef Q_OS_MAC
waypointLayout->addRow(tr("Waypoint color:"), _waypointColor);
waypointLayout->addRow(tr("Waypoint size:"), _waypointSize);
#else // Q_OS_MAC
waypointLayout->addRow(tr("Color:"), _waypointColor);
waypointLayout->addRow(tr("Size:"), _waypointSize);
QGroupBox *waypointBox = new QGroupBox(tr("Waypoints"));
waypointBox->setLayout(waypointLayout);
#endif // Q_OS_MAC
_poiSize = new QSpinBox();
_poiSize->setMinimum(1);
_poiSize->setValue(_options->poiSize);
_poiColor = new ColorBox();
_poiColor->setColor(_options->poiColor);
QFormLayout *poiLayout = new QFormLayout();
#ifdef Q_OS_MAC
poiLayout->addRow(tr("POI color:"), _poiColor);
poiLayout->addRow(tr("POI size:"), _poiSize);
#else // Q_OS_MAC
poiLayout->addRow(tr("Color:"), _poiColor);
poiLayout->addRow(tr("Size:"), _poiSize);
QGroupBox *poiBox = new QGroupBox(tr("POIs"));
poiBox->setLayout(poiLayout);
#endif // Q_OS_MAC
QWidget *pointTab = new QWidget();
QVBoxLayout *pointTabLayout = new QVBoxLayout();
#ifdef Q_OS_MAC
pointTabLayout->addLayout(waypointLayout);
pointTabLayout->addWidget(line());
pointTabLayout->addLayout(poiLayout);
#else // Q_OS_MAC
pointTabLayout->addWidget(waypointBox);
pointTabLayout->addWidget(poiBox);
#endif // Q_OS_MAC
pointTabLayout->addStretch();
pointTab->setLayout(pointTabLayout);
// Graphs
_graphWidth = new QSpinBox();
_graphWidth->setValue(_options->graphWidth);
_graphWidth->setMinimum(1);
@ -104,7 +168,6 @@ QWidget *OptionsDialog::createAppearancePage()
QFormLayout *graphAALayout = new QFormLayout();
graphAALayout->addWidget(_graphAA);
QWidget *graphTab = new QWidget();
QVBoxLayout *graphTabLayout = new QVBoxLayout();
graphTabLayout->addLayout(graphLayout);
@ -112,10 +175,29 @@ QWidget *OptionsDialog::createAppearancePage()
graphTabLayout->addStretch();
graphTab->setLayout(graphTabLayout);
// Map
_mapOpacity = new PercentSlider();
_mapOpacity->setValue(_options->mapOpacity);
_backgroundColor = new ColorBox();
_backgroundColor->setColor(_options->backgroundColor);
_backgroundColor->enableAlphaChannel(false);
QFormLayout *mapLayout = new QFormLayout();
mapLayout->addRow(tr("Background color:"), _backgroundColor);
mapLayout->addRow(tr("Map opacity:"), _mapOpacity);
QWidget *mapTab = new QWidget();
QVBoxLayout *mapTabLayout = new QVBoxLayout();
mapTabLayout->addLayout(mapLayout);
mapTabLayout->addStretch();
mapTab->setLayout(mapTabLayout);
QTabWidget *appearancePage = new QTabWidget();
appearancePage->addTab(colorTab, tr("Colors"));
appearancePage->addTab(pathTab, tr("Paths"));
appearancePage->addTab(pointTab, tr("Points"));
appearancePage->addTab(graphTab, tr("Graphs"));
appearancePage->addTab(mapTab, tr("Map"));
return appearancePage;
}
@ -164,14 +246,9 @@ QWidget *OptionsDialog::createDataPage()
QWidget *filterTab = new QWidget();
QVBoxLayout *filterTabLayout = new QVBoxLayout();
#ifdef Q_OS_MAC
QLabel *label = new QLabel(tr("Smoothing:"));
QFrame *line = new QFrame();
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
filterTabLayout->addWidget(label);
filterTabLayout->addWidget(new QLabel(tr("Smoothing:")));
filterTabLayout->addLayout(smoothLayout);
filterTabLayout->addWidget(line);
filterTabLayout->addWidget(line());
filterTabLayout->addLayout(outlierLayout);
#else // Q_OS_MAC
filterTabLayout->addWidget(smoothBox);
@ -239,6 +316,36 @@ QWidget *OptionsDialog::createPOIPage()
QWidget *OptionsDialog::createExportPage()
{
_wysiwyg = new QRadioButton(tr("WYSIWYG"));
_hires = new QRadioButton(tr("High-Resolution"));
if (_options->hiresPrint)
_hires->setChecked(true);
else
_wysiwyg->setChecked(true);
QLabel *lw = new QLabel(tr("The printed area is approximately the display"
" area. The map zoom level does not change."));
QLabel *lh = new QLabel(tr("The zoom level will be changed so that"
" the whole content (tracks/waypoints) fits to the printed area and"
" the map resolution is as close as possible to the print resolution."));
QFont f = lw->font();
f.setPointSize(f.pointSize() - 1);
lw->setWordWrap(true);
lh->setWordWrap(true);
lw->setFont(f);
lh->setFont(f);
QVBoxLayout *modeTabLayout = new QVBoxLayout();
modeTabLayout->addWidget(_wysiwyg);
modeTabLayout->addWidget(lw);
modeTabLayout->addSpacing(10);
modeTabLayout->addWidget(_hires);
modeTabLayout->addWidget(lh);
modeTabLayout->addStretch();
QWidget *modeTab = new QWidget();
modeTab->setLayout(modeTabLayout);
_name = new QCheckBox(tr("Name"));
_name->setChecked(_options->printName);
_date = new QCheckBox(tr("Date"));
@ -274,6 +381,7 @@ QWidget *OptionsDialog::createExportPage()
QTabWidget *exportPage = new QTabWidget();
exportPage->addTab(modeTab, tr("Print mode"));
exportPage->addTab(headerTab, tr("Header"));
exportPage->addTab(graphTab, tr("Graphs"));
@ -283,12 +391,6 @@ QWidget *OptionsDialog::createExportPage()
QWidget *OptionsDialog::createSystemPage()
{
_useOpenGL = new QCheckBox(tr("Use OpenGL"));
#ifdef Q_OS_WIN32
if (QSysInfo::WindowsVersion < QSysInfo::WV_VISTA) {
_useOpenGL->setChecked(false);
_useOpenGL->setEnabled(false);
} else
#endif // Q_OS_WIN32
_useOpenGL->setChecked(_options->useOpenGL);
_pixmapCache = new QSpinBox();
@ -369,6 +471,8 @@ void OptionsDialog::accept()
{
_options->palette.setColor(_baseColor->color());
_options->palette.setShift(_colorOffset->value());
_options->mapOpacity = _mapOpacity->value();
_options->backgroundColor = _backgroundColor->color();
_options->trackWidth = _trackWidth->value();
_options->trackStyle = (Qt::PenStyle) _trackStyle->itemData(
_trackStyle->currentIndex()).toInt();
@ -376,6 +480,10 @@ void OptionsDialog::accept()
_options->routeStyle = (Qt::PenStyle) _routeStyle->itemData(
_routeStyle->currentIndex()).toInt();
_options->pathAntiAliasing = _pathAA->isChecked();
_options->waypointSize = _waypointSize->value();
_options->waypointColor = _waypointColor->color();
_options->poiSize = _poiSize->value();
_options->poiColor = _poiColor->color();
_options->graphWidth = _graphWidth->value();
_options->graphAntiAliasing = _graphAA->isChecked();
@ -385,16 +493,21 @@ void OptionsDialog::accept()
_options->cadenceFilter = _cadenceFilter->value();
_options->powerFilter = _powerFilter->value();
_options->outlierEliminate = _outlierEliminate->isChecked();
_options->pauseSpeed = (_options->units == Imperial)
qreal pauseSpeed = (_options->units == Imperial)
? _pauseSpeed->value() / MS2MIH : _pauseSpeed->value() / MS2KMH;
if (qAbs(pauseSpeed - _options->pauseSpeed) > 0.01)
_options->pauseSpeed = pauseSpeed;
_options->pauseInterval = _pauseInterval->value();
_options->poiRadius = (_options->units == Imperial)
qreal poiRadius = (_options->units == Imperial)
? _poiRadius->value() * MIINM : _poiRadius->value() * KMINM;
if (qAbs(poiRadius - _options->poiRadius) > 0.01)
_options->poiRadius = poiRadius;
_options->useOpenGL = _useOpenGL->isChecked();
_options->pixmapCache = _pixmapCache->value();
_options->hiresPrint = _hires->isChecked();
_options->printName = _name->isChecked();
_options->printDate = _date->isChecked();
_options->printDistance = _distance->isChecked();

View File

@ -12,6 +12,8 @@ class QSpinBox;
class QDoubleSpinBox;
class QComboBox;
class QCheckBox;
class QRadioButton;
class PercentSlider;
struct Options {
// Appearance
@ -20,9 +22,15 @@ struct Options {
int routeWidth;
Qt::PenStyle trackStyle;
Qt::PenStyle routeStyle;
QColor waypointColor;
QColor poiColor;
int waypointSize;
int poiSize;
int graphWidth;
bool pathAntiAliasing;
bool graphAntiAliasing;
int mapOpacity;
QColor backgroundColor;
// Data
int elevationFilter;
int speedFilter;
@ -38,6 +46,7 @@ struct Options {
bool useOpenGL;
int pixmapCache;
// Print/Export
bool hiresPrint;
bool printName;
bool printDate;
bool printDistance;
@ -71,11 +80,17 @@ private:
// Appearance
ColorBox *_baseColor;
QDoubleSpinBox *_colorOffset;
PercentSlider *_mapOpacity;
ColorBox *_backgroundColor;
QSpinBox *_trackWidth;
StyleComboBox *_trackStyle;
QSpinBox *_routeWidth;
StyleComboBox *_routeStyle;
QCheckBox *_pathAA;
QSpinBox *_waypointSize;
ColorBox *_waypointColor;
QSpinBox *_poiSize;
ColorBox *_poiColor;
QSpinBox *_graphWidth;
QCheckBox *_graphAA;
// Data
@ -93,6 +108,8 @@ private:
QSpinBox *_pixmapCache;
QCheckBox *_useOpenGL;
// Print/Export
QRadioButton *_wysiwyg;
QRadioButton *_hires;
QCheckBox *_name;
QCheckBox *_date;
QCheckBox *_distance;

View File

@ -1,3 +1,4 @@
#include <cstring>
#include <QtEndian>
#include <QFile>
#include "ozf.h"
@ -52,8 +53,8 @@ bool OZF::read(void *data, size_t size, size_t decryptSize)
bool OZF::initOZF3()
{
quint8 randomNumber, initial;
quint32 keyblock;
quint8 h1[8];
quint8 h2[16], h2d[16];
if (!_file.seek(14))
@ -75,41 +76,23 @@ bool OZF::initOZF3()
return false;
_tileSize = *(h1 + 6);
if (!_file.seek(15 + randomNumber))
if (!_file.seek(15 + randomNumber + 4))
return false;
if (!readValue(keyblock))
if (_file.read((char*)h2, sizeof(h2)) != (qint64)sizeof(h2))
return false;
switch (keyblock & 0xFF) {
case 0xf1:
initial += 0x8a;
break;
case 0x18:
case 0x54:
initial += 0xa0;
break;
case 0x56:
initial += 0xb9;
break;
case 0x43:
initial += 0x6a;
break;
case 0x83:
initial += 0xa4;
break;
case 0xc5:
initial += 0x7e;
break;
case 0x38:
initial += 0xc1;
break;
default:
break;
for (int i = 0; i < 256; i++) {
memcpy(h2d, h2, sizeof(h2d));
decrypt(h2d, sizeof(h2d), (quint8)i);
if ((quint32)*h2d == 40 && (quint16)*(h2d + 12) == 1
&& (quint16)*(h2d + 14) == 8) {
_key = (quint8)i;
return true;
}
}
_key = initial;
return true;
return false;
}
bool OZF::initOZF2()
@ -135,8 +118,10 @@ bool OZF::readHeaders()
} else if (magic == OZF3_MAGIC) {
if (!initOZF3())
return false;
} else
} else {
qWarning("%s: not a OZF2/OZF3 file", qPrintable(_file.fileName()));
return false;
}
return true;
}
@ -152,7 +137,8 @@ bool OZF::readTileTable()
return false;
if (!readValue(tableOffset))
return false;
zooms = (_file.size() - tableOffset - sizeof(quint32)) / sizeof(quint32);
zooms = (int)((_file.size() - tableOffset - sizeof(quint32))
/ sizeof(quint32));
for (int i = 0; i < zooms - 2; i++) {
if (!_file.seek(tableOffset + i * sizeof(quint32)))
@ -196,7 +182,7 @@ bool OZF::readTileTable()
_zooms.append(zoom);
}
return true;
return _zooms.isEmpty() ? false : true;
}
bool OZF::load(const QString &path)
@ -209,13 +195,13 @@ bool OZF::load(const QString &path)
return false;
if (!readHeaders()) {
qWarning("%s: not a OZF2/OZF3 file", qPrintable(_file.fileName()));
qWarning("%s: Invalid header", qPrintable(_file.fileName()));
_file.close();
return false;
}
if (!readTileTable()) {
qWarning("%s: file format error", qPrintable(_file.fileName()));
qWarning("%s: Invalid tile table", qPrintable(_file.fileName()));
_file.close();
return false;
}

View File

@ -39,9 +39,7 @@ void Palette::reset()
QDebug operator<<(QDebug dbg, const Palette &palette)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "Palette(" << palette.color() << ", " << palette.shift()
<< ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -14,9 +14,7 @@ RectC Path::boundingRect() const
QDebug operator<<(QDebug dbg, const PathPoint &point)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "PathPoint(" << point.distance() << ", "
<< point.coordinates() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -16,7 +16,7 @@
#include "pathview.h"
#define MAX_DIGITAL_ZOOM 1
#define MAX_DIGITAL_ZOOM 2
#define MIN_DIGITAL_ZOOM -3
#define MARGIN 10.0
#define SCALE_OFFSET 7
@ -46,6 +46,8 @@ PathView::PathView(Map *map, POI *poi, QWidget *parent)
connect(_poi, SIGNAL(pointsChanged()), this, SLOT(updatePOI()));
_units = Metric;
_opacity = 1.0;
_backgroundColor = Qt::white;
_showMap = true;
_showTracks = true;
@ -60,10 +62,15 @@ PathView::PathView(Map *map, POI *poi, QWidget *parent)
_routeWidth = 3;
_trackStyle = Qt::SolidLine;
_routeStyle = Qt::DashLine;
_waypointSize = 8;
_waypointColor = Qt::black;
_poiSize = 8;
_poiColor = Qt::black;
_plot = false;
_digitalZoom = 0;
_map->setBackgroundColor(_backgroundColor);
_scene->setSceneRect(_map->bounds());
_res = _map->resolution(_scene->sceneRect().center());
}
@ -131,6 +138,8 @@ void PathView::addWaypoints(const QList<Waypoint> &waypoints)
_waypoints.append(wi);
updateWaypointsBoundingRect(wi->waypoint().coordinates());
wi->setZValue(1);
wi->setSize(_waypointSize);
wi->setColor(_waypointColor);
wi->showLabel(_showWaypointLabels);
wi->setUnits(_units);
wi->setVisible(_showWaypoints);
@ -144,7 +153,7 @@ void PathView::addWaypoints(const QList<Waypoint> &waypoints)
QList<PathItem *> PathView::loadData(const Data &data)
{
QList<PathItem *> paths;
qreal scale = _map->zoom();
qreal zoom = _map->zoom();
for (int i = 0; i < data.tracks().count(); i++)
paths.append(addTrack(*(data.tracks().at(i))));
@ -155,7 +164,7 @@ QList<PathItem *> PathView::loadData(const Data &data)
if (_tracks.empty() && _routes.empty() && _waypoints.empty())
return paths;
if (mapScale() != scale)
if (mapZoom() != zoom)
rescale();
else
updatePOIVisibility();
@ -179,11 +188,11 @@ void PathView::updateWaypointsBoundingRect(const Coordinates &wp)
_wr.unite(wp);
}
qreal PathView::mapScale() const
qreal PathView::mapZoom() const
{
RectC br = _tr | _rr | _wr;
return _map->zoomFit(viewport()->size() - QSize(MARGIN/2, MARGIN/2), br);
return _map->zoomFit(viewport()->size() - QSize(2*MARGIN, 2*MARGIN), br);
}
QPointF PathView::contentCenter() const
@ -323,6 +332,8 @@ void PathView::addPOI(const QVector<Waypoint> &waypoints)
WaypointItem *pi = new WaypointItem(w, _map);
pi->setZValue(1);
pi->setSize(_poiSize);
pi->setColor(_poiColor);
pi->showLabel(_showPOILabels);
pi->setVisible(_showPOI);
pi->setDigitalZoom(_digitalZoom);
@ -470,13 +481,23 @@ void PathView::keyPressEvent(QKeyEvent *event)
zoom(z, pos, c);
}
void PathView::plot(QPainter *painter, const QRectF &target)
void PathView::plot(QPainter *painter, const QRectF &target, qreal scale,
bool hires)
{
QRect orig, adj;
qreal ratio, diff;
qreal ratio, diff, origRes, q;
QPointF origScene, origPos;
Coordinates origLL;
// Enter plot mode
setUpdatesEnabled(false);
_plot = true;
_map->setBlockingMode(true);
// Compute sizes & ratios
orig = viewport()->rect();
origPos = _mapScale->pos();
if (orig.height() * (target.width() / target.height()) - orig.width() < 0) {
ratio = target.height() / target.width();
@ -487,20 +508,51 @@ void PathView::plot(QPainter *painter, const QRectF &target)
diff = (orig.height() * ratio) - orig.width();
adj = orig.adjusted(-diff/2, 0, diff/2, 0);
}
q = (target.width() / scale) / adj.width();
setUpdatesEnabled(false);
_plot = true;
_map->setBlockingMode(true);
// Adjust the view for printing
if (hires) {
origScene = mapToScene(orig.center());
origLL = _map->xy2ll(origScene);
origRes = _map->resolution(origScene);
QPointF pos = _mapScale->pos();
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
-(SCALE_OFFSET + _mapScale->boundingRect().width()),
-(SCALE_OFFSET + _mapScale->boundingRect().height())))));
QPointF s(painter->device()->logicalDpiX()
/ (qreal)metric(QPaintDevice::PdmDpiX),
painter->device()->logicalDpiY()
/ (qreal)metric(QPaintDevice::PdmDpiY));
adj = QRect(0, 0, adj.width() * s.x(), adj.height() * s.y());
_map->zoomFit(adj.size(), _tr | _rr | _wr);
rescale();
QPointF center = contentCenter();
centerOn(center);
adj.moveCenter(mapFromScene(center));
_mapScale->setResolution(_map->resolution(_map->ll2xy(origLL)));
_mapScale->setDigitalZoom(-log2(s.x() / q));
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
-(SCALE_OFFSET + _mapScale->boundingRect().width()) * (s.x() / q),
-(SCALE_OFFSET + _mapScale->boundingRect().height()) * (s.x() / q)))));
} else {
_mapScale->setDigitalZoom(-log2(1.0 / q));
_mapScale->setPos(mapToScene(QPoint(adj.bottomRight() + QPoint(
-(SCALE_OFFSET + _mapScale->boundingRect().width()) / q ,
-(SCALE_OFFSET + _mapScale->boundingRect().height()) / q))));
}
// Print the view
render(painter, target, adj);
_mapScale->setPos(pos);
// Revert view changes to display mode
if (hires) {
_map->zoomFit(origRes, origLL);
rescale();
centerOn(origScene);
_mapScale->setResolution(origRes);
}
_mapScale->setDigitalZoom(0);
_mapScale->setPos(origPos);
// Exit plot mode
_map->setBlockingMode(false);
_plot = false;
setUpdatesEnabled(true);
@ -637,18 +689,71 @@ void PathView::setRouteStyle(Qt::PenStyle style)
_routes.at(i)->setStyle(style);
}
void PathView::setWaypointSize(int size)
{
_waypointSize = size;
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setSize(size);
}
void PathView::setWaypointColor(const QColor &color)
{
_waypointColor = color;
for (int i = 0; i < _waypoints.size(); i++)
_waypoints.at(i)->setColor(color);
}
void PathView::setPOISize(int size)
{
QHash<SearchPointer<Waypoint>, WaypointItem*>::const_iterator it;
_poiSize = size;
for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
it.value()->setSize(size);
}
void PathView::setPOIColor(const QColor &color)
{
QHash<SearchPointer<Waypoint>, WaypointItem*>::const_iterator it;
_poiColor = color;
for (it = _pois.constBegin(); it != _pois.constEnd(); it++)
it.value()->setColor(color);
}
void PathView::setMapOpacity(int opacity)
{
_opacity = opacity / 100.0;
resetCachedContent();
}
void PathView::setBackgroundColor(const QColor &color)
{
_backgroundColor = color;
_map->setBackgroundColor(color);
resetCachedContent();
}
void PathView::drawBackground(QPainter *painter, const QRectF &rect)
{
if (_showMap)
if (_showMap) {
if (_opacity < 1.0) {
painter->fillRect(rect, _backgroundColor);
painter->setOpacity(_opacity);
}
_map->draw(painter, rect);
else
painter->fillRect(rect, Qt::white);
} else
painter->fillRect(rect, _backgroundColor);
}
void PathView::resizeEvent(QResizeEvent *event)
{
qreal scale = _map->zoom();
if (mapScale() != scale)
qreal zoom = _map->zoom();
if (mapZoom() != zoom)
rescale();
QPointF center = contentCenter();
@ -691,3 +796,8 @@ void PathView::useOpenGL(bool use)
else
setViewport(new QWidget);
}
void PathView::useAntiAliasing(bool use)
{
setRenderHint(QPainter::Antialiasing, use);
}

View File

@ -37,7 +37,7 @@ public:
void setMap(Map *map);
void setUnits(enum Units units);
void plot(QPainter *painter, const QRectF &target);
void plot(QPainter *painter, const QRectF &target, qreal scale, bool hires);
int trackCount() const {return _tracks.count();}
int routeCount() const {return _routes.count();}
@ -45,7 +45,18 @@ public:
void clear();
void setTrackWidth(int width);
void setRouteWidth(int width);
void setTrackStyle(Qt::PenStyle style);
void setRouteStyle(Qt::PenStyle style);
void setWaypointSize(int size);
void setWaypointColor(const QColor &color);
void setPOISize(int size);
void setPOIColor(const QColor &color);
void setMapOpacity(int opacity);
void setBackgroundColor(const QColor &color);
void useOpenGL(bool use);
void useAntiAliasing(bool use);
public slots:
void redraw();
@ -59,10 +70,6 @@ public slots:
void showRoutes(bool show);
void showWaypoints(bool show);
void showRouteWaypoints(bool show);
void setTrackWidth(int width);
void setRouteWidth(int width);
void setTrackStyle(Qt::PenStyle style);
void setRouteStyle(Qt::PenStyle style);
private slots:
void updatePOI();
@ -75,7 +82,7 @@ private:
void loadPOI();
void clearPOI();
qreal mapScale() const;
qreal mapZoom() const;
QPointF contentCenter() const;
void rescale();
void zoom(int zoom, const QPoint &pos, const Coordinates &c);
@ -107,6 +114,8 @@ private:
Palette _palette;
Units _units;
qreal _opacity;
QColor _backgroundColor;
bool _showMap;
bool _showTracks;
bool _showRoutes;
@ -120,6 +129,10 @@ private:
int _routeWidth;
Qt::PenStyle _trackStyle;
Qt::PenStyle _routeStyle;
int _waypointSize;
int _poiSize;
QColor _waypointColor;
QColor _poiColor;
int _digitalZoom;
bool _plot;

48
src/percentslider.cpp Normal file
View File

@ -0,0 +1,48 @@
#include <QSlider>
#include <QLabel>
#include <QHBoxLayout>
#include "units.h"
#include "percentslider.h"
static QString format(int value)
{
return QString::number(value) + UNIT_SPACE + QString("%");
}
PercentSlider::PercentSlider(QWidget *parent) : QWidget(parent)
{
_slider = new QSlider(Qt::Horizontal);
_label = new QLabel();
_slider->setMinimum(0);
_slider->setMaximum(100);
QFontMetrics fm(_label->font());
_label->setFixedWidth(fm.boundingRect(format(_slider->maximum())).width());
_label->setAlignment(Qt::AlignRight);
connect(_slider, SIGNAL(sliderMoved(int)), this, SLOT(updateLabel(int)));
QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget(_slider);
layout->addWidget(_label);
setLayout(layout);
}
void PercentSlider::updateLabel(int value)
{
_label->setText(format(value));
}
int PercentSlider::value() const
{
return _slider->value();
}
void PercentSlider::setValue(int value)
{
_slider->setValue(value);
_label->setText(format(value));
}

29
src/percentslider.h Normal file
View File

@ -0,0 +1,29 @@
#ifndef PERCENTSLIDER_H
#define PERCENTSLIDER_H
#include <QWidget>
class QSlider;
class QLabel;
class PercentSlider : public QWidget
{
Q_OBJECT
public:
PercentSlider(QWidget *parent = 0);
int value() const;
public slots:
void setValue(int value);
private slots:
void updateLabel(int value);
private:
QSlider *_slider;
QLabel *_label;
};
#endif // PERCENTSLIDER_H

View File

@ -8,10 +8,14 @@ void RangeF::resize(qreal size)
_max += adj;
}
QDebug operator<<(QDebug dbg, const Range &range)
{
dbg.nospace() << "Range(" << range.min() << ", " << range.max() << ")";
return dbg.space();
}
QDebug operator<<(QDebug dbg, const RangeF &range)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "RangeF(" << range.min() << ", " << range.max() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -4,6 +4,20 @@
#include <QtGlobal>
#include <QDebug>
class Range
{
public:
Range() {_min = 0; _max = 0;}
Range(int min, int max) {_min = min, _max = max;}
int min() const {return _min;}
int max() const {return _max;}
int size() const {return (_max - _min);}
private:
int _min, _max;
};
class RangeF
{
public:
@ -20,6 +34,7 @@ private:
qreal _min, _max;
};
QDebug operator<<(QDebug dbg, const Range &range);
QDebug operator<<(QDebug dbg, const RangeF &range);
#endif // RANGE_H

View File

@ -58,8 +58,6 @@ void RectC::unite(const Coordinates &c)
QDebug operator<<(QDebug dbg, const RectC &rect)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.size() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -132,7 +132,7 @@ void ScaleItem::setUnits(enum Units units)
update();
}
void ScaleItem::setDigitalZoom(int zoom)
void ScaleItem::setDigitalZoom(qreal zoom)
{
prepareGeometryChange();
_digitalZoom = zoom;

View File

@ -15,7 +15,7 @@ public:
void setResolution(qreal res);
void setUnits(enum Units units);
void setDigitalZoom(int zoom);
void setDigitalZoom(qreal zoom);
private:
void updateBoundingRect();
@ -28,7 +28,7 @@ private:
Units _units;
bool _scale;
int _digitalZoom;
qreal _digitalZoom;
QRectF _boundingRect;
};

View File

@ -70,12 +70,18 @@
#define EXPORT_FILENAME_SETTING "fileName"
#define EXPORT_FILENAME_DEFAULT QString("%1/export.pdf"). \
arg(QDir::currentPath())
#define RESOLUTION_SETTING "resolution"
#define RESOLUTION_DEFAULT 600
#define OPTIONS_SETTINGS_GROUP "Options"
#define PALETTE_COLOR_SETTING "paletteColor"
#define PALETTE_COLOR_DEFAULT QColor(Qt::blue)
#define PALETTE_SHIFT_SETTING "paletteShift"
#define PALETTE_SHIFT_DEFAULT 0.62
#define MAP_OPACITY_SETTING "mapOpacity"
#define MAP_OPACITY_DEFAULT 100
#define BACKGROUND_COLOR_SETTING "backgroundColor"
#define BACKGROUND_COLOR_DEFAULT QColor(Qt::white)
#define TRACK_WIDTH_SETTING "trackWidth"
#define TRACK_WIDTH_DEFAULT 3
#define ROUTE_WIDTH_SETTING "routeWidth"
@ -84,6 +90,14 @@
#define TRACK_STYLE_DEFAULT Qt::SolidLine
#define ROUTE_STYLE_SETTING "routeStyle"
#define ROUTE_STYLE_DEFAULT Qt::DotLine
#define WAYPOINT_SIZE_SETTING "waypointSize"
#define WAYPOINT_SIZE_DEFAULT 8
#define WAYPOINT_COLOR_SETTING "waypointColor"
#define WAYPOINT_COLOR_DEFAULT QColor(Qt::black)
#define POI_SIZE_SETTING "poiSize"
#define POI_SIZE_DEFAULT 8
#define POI_COLOR_SETTING "poiColor"
#define POI_COLOR_DEFAULT QColor(Qt::black)
#define GRAPH_WIDTH_SETTING "graphWidth"
#define GRAPH_WIDTH_DEFAULT 1
#define PATH_AA_SETTING "pathAntiAliasing"
@ -112,6 +126,8 @@
#define USE_OPENGL_DEFAULT false
#define PIXMAP_CACHE_SETTING "pixmapCache"
#define PIXMAP_CACHE_DEFAULT 64 /* MB */
#define HIRES_PRINT_SETTING "hiresPrint"
#define HIRES_PRINT_DEFAULT false
#define PRINT_NAME_SETTING "printName"
#define PRINT_NAME_DEFAULT true
#define PRINT_DATE_SETTING "printDate"

View File

@ -56,6 +56,16 @@ Coordinates TCXParser::position()
return pos;
}
void TCXParser::heartRateBpm(Trackpoint &trackpoint)
{
while (_reader.readNextStartElement()) {
if (_reader.name() == "Value")
trackpoint.setHeartRate(number());
else
_reader.skipCurrentElement();
}
}
void TCXParser::extensions(Trackpoint &trackpoint)
{
while (_reader.readNextStartElement()) {
@ -78,7 +88,7 @@ void TCXParser::trackpointData(Trackpoint &trackpoint)
else if (_reader.name() == "Time")
trackpoint.setTimestamp(time());
else if (_reader.name() == "HeartRateBpm")
trackpoint.setHeartRate(number());
heartRateBpm(trackpoint);
else if (_reader.name() == "Cadence")
trackpoint.setCadence(number());
else if (_reader.name() == "Extensions")

View File

@ -26,6 +26,7 @@ private:
void trackpointData(Trackpoint &trackpoint);
void waypointData(Waypoint &waypoint);
void extensions(Trackpoint &trackpoint);
void heartRateBpm(Trackpoint &trackpoint);
Coordinates position();
qreal number();
QDateTime time();

View File

@ -16,11 +16,9 @@ void TrackInfo::insert(const QString &key, const QString &value)
_info->insert(key, value);
}
void TrackInfo::plot(QPainter *painter, const QRectF &target)
void TrackInfo::plot(QPainter *painter, const QRectF &target, qreal scale)
{
qreal ratio = painter->paintEngine()->paintDevice()->logicalDpiX()
/ SCREEN_DPI;
QSizeF canvas = QSizeF(target.width() / ratio, target.height() / ratio);
QSizeF canvas = QSizeF(target.width() / scale, target.height() / scale);
QSizeF diff = QSizeF(qAbs(canvas.width() - sceneRect().width()),
qAbs(canvas.height() - sceneRect().height()));
QRectF adj = sceneRect().adjusted(0, -diff.height()/2, diff.width(),

View File

@ -13,7 +13,7 @@ public:
TrackInfo(QObject *parent = 0);
void insert(const QString &key, const QString &value);
void plot(QPainter *painter, const QRectF &target);
void plot(QPainter *painter, const QRectF &target, qreal scale);
bool isEmpty() const;
QSizeF contentSize() const;

View File

@ -2,11 +2,9 @@
QDebug operator<<(QDebug dbg, const Trackpoint &trackpoint)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "Trackpoint(" << trackpoint.coordinates() << ", "
<< trackpoint.timestamp() << ", " << trackpoint.elevation() << ", "
<< trackpoint.speed() << ", " << trackpoint.heartRate() << ", "
<< trackpoint.temperature() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -25,10 +25,6 @@ enum Units {
#define C2FS 1.8 // Celsius to Farenheit - scale
#define C2FO 32.0 // Celsius to Farenheit - offset
#ifdef Q_OS_WIN32
#define UNIT_SPACE QString(" ")
#else // Q_OS_WIN32
#define UNIT_SPACE QString::fromUtf8("\xE2\x80\x89")
#endif // Q_OS_WIN32
#endif // UNITS_H

View File

@ -2,9 +2,7 @@
QDebug operator<<(QDebug dbg, const Waypoint &waypoint)
{
const bool ais = dbg.autoInsertSpaces();
dbg.nospace() << "Waypoint(" << waypoint.coordinates() << ", "
<< waypoint.name() << ", " << waypoint.description() << ")";
dbg.setAutoInsertSpaces(ais);
return dbg.maybeSpace();
return dbg.space();
}

View File

@ -6,8 +6,10 @@
#include "waypointitem.h"
#define POINT_SIZE 8
#define HOVER_SIZE 10
#define HS(size) \
((int)((qreal)size * 1.2))
#define FS(size) \
((int)((qreal)size * 1.41))
QString WaypointItem::toolTip(Units units)
{
@ -36,6 +38,8 @@ WaypointItem::WaypointItem(const Waypoint &waypoint, Map *map,
_waypoint = waypoint;
_showLabel = true;
_hover = false;
_size = 8;
_color = Qt::black;
updateShape();
@ -48,11 +52,11 @@ WaypointItem::WaypointItem(const Waypoint &waypoint, Map *map,
void WaypointItem::updateShape()
{
QPainterPath p;
qreal pointSize = _hover ? HOVER_SIZE : POINT_SIZE;
qreal pointSize = _hover ? HS(_size) : _size;
if (_showLabel) {
QFont font;
font.setPixelSize(FONT_SIZE);
font.setPixelSize(FS(_size));
font.setFamily(FONT_FAMILY);
if (_hover)
font.setBold(true);
@ -74,11 +78,13 @@ void WaypointItem::paint(QPainter *painter,
Q_UNUSED(option);
Q_UNUSED(widget);
qreal pointSize = _hover ? HOVER_SIZE : POINT_SIZE;
qreal pointSize = _hover ? HS(_size) : _size;
painter->setPen(_color);
if (_showLabel) {
QFont font;
font.setPixelSize(FONT_SIZE);
font.setPixelSize(FS(_size));
font.setFamily(FONT_FAMILY);
if (_hover)
font.setBold(true);
@ -90,7 +96,7 @@ void WaypointItem::paint(QPainter *painter,
+ ts.height(), _waypoint.name());
}
painter->setBrush(Qt::SolidPattern);
painter->setBrush(QBrush(_color, Qt::SolidPattern));
painter->drawEllipse(-pointSize/2, -pointSize/2, pointSize, pointSize);
/*
@ -100,6 +106,19 @@ void WaypointItem::paint(QPainter *painter,
*/
}
void WaypointItem::setSize(int size)
{
prepareGeometryChange();
_size = size;
updateShape();
}
void WaypointItem::setColor(const QColor &color)
{
_color = color;
update();
}
void WaypointItem::setUnits(enum Units units)
{
setToolTip(toolTip(units));

View File

@ -16,6 +16,8 @@ public:
void setMap(Map *map) {setPos(map->ll2xy(_waypoint.coordinates()));}
void setUnits(Units units);
void setSize(int size);
void setColor(const QColor &color);
void showLabel(bool show);
void setDigitalZoom(int zoom) {setScale(pow(2, -zoom));}
@ -34,6 +36,8 @@ private:
QPainterPath _shape;
Waypoint _waypoint;
QColor _color;
int _size;
bool _hover;
bool _showLabel;
};