mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-01 13:29:16 +02:00
Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
0e4a5abc2b | |||
7a2f6b96a9 | |||
24c03fc15b | |||
f9af06267a | |||
2f9751672e | |||
140e975524 | |||
e6a39b5146 | |||
937251fbdc | |||
6e92557806 | |||
a3625ac89d | |||
a7e02bdc8b | |||
ed4e201b08 | |||
06901d8d7a | |||
698f14c835 | |||
f8806417d4 | |||
52e8eb1f6e | |||
0483d393ac | |||
5aa21380cb | |||
254deae04a | |||
076a091a5b | |||
bb7787b001 | |||
bc6d48d1fe | |||
9bae94f30d | |||
351fc0309a | |||
d8116c7f5d |
@ -1,4 +1,4 @@
|
||||
version: 6.0.{build}
|
||||
version: 6.2.{build}
|
||||
configuration: Release
|
||||
platform: Any CPU
|
||||
environment:
|
||||
|
@ -3,8 +3,8 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.
|
||||
|
||||
## Features
|
||||
* User-definable online maps (OSM/Google tiles, WMTS, WMS).
|
||||
* Offline maps (OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
|
||||
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
|
||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, GeoTIFF images).
|
||||
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
||||
* Support for multiple tracks in one view.
|
||||
* Support for POI files.
|
||||
@ -42,4 +42,4 @@ http://www.gpxsee.org
|
||||
[GPXSee maps repository](https://github.com/tumic0/GPXSee-maps)
|
||||
|
||||
## Translations
|
||||
GPXSee uses [Weblate](https://hosted.weblate.org/projects/gpxsee) for translations.
|
||||
GPXSee uses [Weblate](https://hosted.weblate.org/projects/gpxsee/translations/) for translations.
|
||||
|
10
gpxsee.pro
10
gpxsee.pro
@ -1,5 +1,5 @@
|
||||
TARGET = GPXSee
|
||||
VERSION = 6.0
|
||||
VERSION = 6.2
|
||||
|
||||
QT += core \
|
||||
gui \
|
||||
@ -21,6 +21,7 @@ HEADERS += src/config.h \
|
||||
src/common/wgs84.h \
|
||||
src/common/str2int.h \
|
||||
src/common/rtree.h \
|
||||
src/common/kv.h \
|
||||
src/GUI/app.h \
|
||||
src/GUI/icons.h \
|
||||
src/GUI/gui.h \
|
||||
@ -138,7 +139,6 @@ HEADERS += src/config.h \
|
||||
src/map/mercator.h \
|
||||
src/map/jnxmap.h \
|
||||
src/map/krovak.h \
|
||||
src/GUI/kv.h \
|
||||
src/data/locparser.h \
|
||||
src/data/slfparser.h \
|
||||
src/map/geotiffmap.h \
|
||||
@ -263,7 +263,8 @@ TRANSLATIONS = lang/gpxsee_en.ts \
|
||||
lang/gpxsee_ru.ts \
|
||||
lang/gpxsee_fi.ts \
|
||||
lang/gpxsee_fr.ts \
|
||||
lang/gpxsee_pl.ts
|
||||
lang/gpxsee_pl.ts \
|
||||
lang/gpxsee_nb.ts
|
||||
|
||||
macx {
|
||||
ICON = icons/gpxsee.icns
|
||||
@ -276,7 +277,8 @@ macx {
|
||||
lang/gpxsee_fr.qm \
|
||||
lang/gpxsee_ru.qm \
|
||||
lang/gpxsee_sv.qm \
|
||||
lang/gpxsee_pl.qm
|
||||
lang/gpxsee_pl.qm \
|
||||
lang/gpxsee_nb.qm
|
||||
CSV.path = Contents/Resources
|
||||
CSV.files = pkg/csv
|
||||
MAPS.path = Contents/Resources
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Exportovat do PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>Soubory PDF (*.pdf);;Všechny soubory (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Na výšku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Na šířku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Velikost stránky:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientace:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Nastavení stránky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation>Soubory PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation>Všechny soubory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Rozlišení:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Okraje:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Soubor:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Výstupní soubor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Exportovat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Chyba</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Nebyl zvolen žádný výstupní soubor.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 je adresář.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 nelze zapsat.</translation>
|
||||
</message>
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>PDF Export</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>PDF-Dateien (*.pdf);;Alle Dateien (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Hochformat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Querformat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Seitengröße:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientierung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Seiten Setup</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation>PDF-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Druckauflösung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Ränder:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Ausgabedatei:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Ausgabedatei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Export</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Fehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Keine Ausgabedatei ausgewählt.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 ist ein Verzeichniss.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 ist nich schreibbar.</translation>
|
||||
</message>
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Vie PDF:ksi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>PDF-tiedostot (*.pdf);;Kaikki tiedostot (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Pystysuunta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Vaakasuunta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Sivukoko:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Suunta:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Sivuasetukset</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation>PDF-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation>Kaikki tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Resoluutio:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Reunukset:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Tiedosto:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Tulostustiedosto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Vie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Virhe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Ei tulostustiedostoa valittu.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 on hakemisto.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 ei voi kirjoittaa.</translation>
|
||||
</message>
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Exporter au format PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>Fichiers PDF (*.pdf);;Tous les fichiers (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Portrait</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Paysage</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Format de papier :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientation :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Style de page</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation type="unfinished">Tous les fichiers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>po</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Résolution :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Marges :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Fichier :</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Fichier exporté</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Exporter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Erreur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Auncun fichier sélectionné.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 est un dossier.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 n'est pas inscriptible.</translation>
|
||||
</message>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Eksportuj do PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>Pliki PDF (*.pdf);;Wszystkie pliki (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Pionowo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Poziomo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Rozmiar strony:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientacja:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Ustawienia strony</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation type="unfinished">Wszystkie pliki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Rozdzielczość:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Marginesy:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Plik:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Plik docelowy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Eksportuj</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Błąd</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Nie wybrano pliku docelowego.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 jest katalogiem.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 nie jest zapisywalny.</translation>
|
||||
</message>
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Экспорт в PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>PDF файлы (*.pdf);;Все файлы (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Портретная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Ландшафтная</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Размер страницы:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Ориентация:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Параметры страницы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation>PDF файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation>Все файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>in</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>мм</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Разрешение:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Поля:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Файл:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Файл вывода</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Экспорт</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Ошибка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Не выбран файл вывода.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>Файл %1 - это директория.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 не доступен для записи.</translation>
|
||||
</message>
|
||||
@ -395,7 +400,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="223"/>
|
||||
<source>Open...</source>
|
||||
<translation>Открыть...</translation>
|
||||
<translation>Открыть…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="212"/>
|
||||
@ -407,17 +412,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="254"/>
|
||||
<source>Statistics...</source>
|
||||
<translation>Статистика...</translation>
|
||||
<translation>Статистика…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="262"/>
|
||||
<source>Load POI file...</source>
|
||||
<translation>Загрузить файл с точками POI...</translation>
|
||||
<translation>Загрузить файл с точками POI…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="298"/>
|
||||
<source>Load map...</source>
|
||||
<translation>Загрузить карту...</translation>
|
||||
<translation>Загрузить карту…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="307"/>
|
||||
@ -516,7 +521,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="453"/>
|
||||
<source>Options...</source>
|
||||
<translation>Параметры...</translation>
|
||||
<translation>Параметры…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="459"/>
|
||||
@ -723,12 +728,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="228"/>
|
||||
<source>Print...</source>
|
||||
<translation>Печать...</translation>
|
||||
<translation>Печать…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="235"/>
|
||||
<source>Export to PDF...</source>
|
||||
<translation>Экспорт в PDF...</translation>
|
||||
<translation>Экспорт в PDF…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="996"/>
|
||||
|
@ -182,94 +182,99 @@
|
||||
<context>
|
||||
<name>ExportDialog</name>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="134"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>Exportera till PDF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files (*.pdf);;All files (*)</source>
|
||||
<translation>PDF-filer (*.pdf);;Alla filer (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="51"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<source>Portrait</source>
|
||||
<translation>Stående</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="53"/>
|
||||
<source>Landscape</source>
|
||||
<translation>Liggande</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="96"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<source>Page size:</source>
|
||||
<translation>Sidstorlek:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientering:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="93"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Sidinställning</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>PDF files</source>
|
||||
<translation>PDF-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
<source>All files</source>
|
||||
<translation>Alla filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>in</source>
|
||||
<translation>i</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="65"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="66"/>
|
||||
<source>mm</source>
|
||||
<translation>mm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="97"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="98"/>
|
||||
<source>Resolution:</source>
|
||||
<translation>Upplösning:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="100"/>
|
||||
<source>Margins:</source>
|
||||
<translation>Marginaler:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="105"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="106"/>
|
||||
<source>File:</source>
|
||||
<translation>Fil:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="112"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="113"/>
|
||||
<source>Output file</source>
|
||||
<translation>Utdatafil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="119"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="120"/>
|
||||
<source>Export</source>
|
||||
<translation>Exportera</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>Error</source>
|
||||
<translation>Fel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="141"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="142"/>
|
||||
<source>No output file selected.</source>
|
||||
<translation>Ingen utdatafil vald.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="151"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 är en mapp.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 är skrivskyddad.</translation>
|
||||
</message>
|
||||
|
@ -8,21 +8,23 @@
|
||||
<summary>GPS log file viewer and analyzer</summary>
|
||||
<description>
|
||||
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
|
||||
KML, FIT, IGC, NMEA and OziExplorer files.</p>
|
||||
KML, FIT, IGC, NMEA, SLF, LOC and OziExplorer files.</p>
|
||||
|
||||
<p>Features:</p>
|
||||
<ul>
|
||||
<li>User-definable online maps (OSM/Google tiles, WMTS, WMS).</li>
|
||||
<li>Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF
|
||||
images).</li>
|
||||
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
|
||||
WMS, TMS).</li>
|
||||
<li>Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases,
|
||||
GeoTIFF images).</li>
|
||||
<li>Elevation, speed, heart rate, cadence, power and temperature
|
||||
graphs.</li>
|
||||
<li>Support for multiple tracks in one view.</li>
|
||||
<li>Support for POI files.</li>
|
||||
<li>Print/export to PDF.</li>
|
||||
<li>Full-screen mode.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, OziExplorer (PLT, WPT, RTE)
|
||||
and Garmin CSV files.</li>
|
||||
<li>HiDPI/Retina displays & maps support.</li>
|
||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, OziExplorer (PLT,
|
||||
WPT, RTE) and Garmin CSV files.</li>
|
||||
</ul>
|
||||
</description>
|
||||
|
||||
@ -38,6 +40,10 @@
|
||||
<categories>
|
||||
<category>Graphics</category>
|
||||
<category>Viewer</category>
|
||||
<category>Maps</category>
|
||||
<category>Geoscience</category>
|
||||
<category>Geography</category>
|
||||
<category>DataVisualization</category>
|
||||
</categories>
|
||||
|
||||
<url type="homepage">http://www.gpxsee.org</url>
|
||||
@ -58,5 +64,7 @@
|
||||
<mimetype>application/vnd.oziexplorer.plt</mimetype>
|
||||
<mimetype>application/vnd.oziexplorer.rte</mimetype>
|
||||
<mimetype>application/vnd.oziexplorer.wpt</mimetype>
|
||||
<mimetype>application/loc+xml</mimetype>
|
||||
<mimetype>application/slf+xml</mimetype>
|
||||
</mimetypes>
|
||||
</component>
|
||||
|
@ -30,7 +30,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.0"
|
||||
!define VERSION "6.2"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}.exe"
|
||||
@ -206,6 +206,7 @@ SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||
!insertmacro LOCALIZATION "French" "fr"
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
|
@ -30,7 +30,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "6.0"
|
||||
!define VERSION "6.2"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
@ -208,6 +208,7 @@ SectionGroup "Localization" SEC_LOCALIZATION
|
||||
!insertmacro LOCALIZATION "Finnish" "fi"
|
||||
!insertmacro LOCALIZATION "French" "fr"
|
||||
!insertmacro LOCALIZATION "German" "de"
|
||||
!insertmacro LOCALIZATION "Norwegian" "nb"
|
||||
!insertmacro LOCALIZATION "Polish" "pl"
|
||||
!insertmacro LOCALIZATION "Russian" "ru"
|
||||
!insertmacro LOCALIZATION "Swedish" "sv"
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QNetworkProxyFactory>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QLibraryInfo>
|
||||
#include <QSettings>
|
||||
#include "map/downloader.h"
|
||||
#include "map/ellipsoid.h"
|
||||
#include "map/gcs.h"
|
||||
@ -12,6 +13,7 @@
|
||||
#include "opengl.h"
|
||||
#include "gui.h"
|
||||
#include "config.h"
|
||||
#include "settings.h"
|
||||
#include "app.h"
|
||||
|
||||
|
||||
@ -36,7 +38,16 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
QNetworkProxyFactory::setUseSystemConfiguration(true);
|
||||
Downloader::setNetworkAccessManager(new QNetworkAccessManager(this));
|
||||
QSettings settings(APP_NAME, APP_NAME);
|
||||
settings.beginGroup(OPTIONS_SETTINGS_GROUP);
|
||||
#ifdef ENABLE_HTTP2
|
||||
Downloader::enableHTTP2(settings.value(ENABLE_HTTP2_SETTING,
|
||||
ENABLE_HTTP2_DEFAULT).toBool());
|
||||
#endif // ENABLE_HTTP2
|
||||
Downloader::setTimeout(settings.value(CONNECTION_TIMEOUT_SETTING,
|
||||
CONNECTION_TIMEOUT_DEFAULT).toInt());
|
||||
settings.endGroup();
|
||||
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
@ -22,7 +22,8 @@ ExportDialog::ExportDialog(Export *exp, QWidget *parent)
|
||||
int index;
|
||||
|
||||
_fileSelect = new FileSelectWidget();
|
||||
_fileSelect->setFilter(tr("PDF files (*.pdf);;All files (*)"));
|
||||
_fileSelect->setFilter(tr("PDF files") + " (*.pdf);;" + tr("All files")
|
||||
+ " (*)");
|
||||
_fileSelect->setFile(_export->fileName);
|
||||
|
||||
_paperSize = new QComboBox();
|
||||
|
@ -147,44 +147,47 @@ void GUI::createMapActions()
|
||||
_mapsActionGroup = new QActionGroup(this);
|
||||
_mapsActionGroup->setExclusive(true);
|
||||
|
||||
for (int i = 0; i < _ml->maps().count(); i++) {
|
||||
QAction *a = new QAction(_ml->maps().at(i)->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
|
||||
_mapsSignalMapper->setMapping(a, i);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
|
||||
_mapActions.append(a);
|
||||
}
|
||||
for (int i = 0; i < _ml->maps().count(); i++)
|
||||
createMapAction(_ml->maps().at(i));
|
||||
|
||||
connect(_mapsSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SLOT(mapChanged(int)));
|
||||
}
|
||||
|
||||
QAction *GUI::createMapAction(const Map *map)
|
||||
{
|
||||
QAction *a = new QAction(map->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
|
||||
_mapActions.append(a);
|
||||
_mapsSignalMapper->setMapping(a, _mapActions.size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
void GUI::createPOIFilesActions()
|
||||
{
|
||||
_poiFilesSignalMapper = new QSignalMapper(this);
|
||||
|
||||
for (int i = 0; i < _poi->files().count(); i++)
|
||||
createPOIFileAction(i);
|
||||
createPOIFileAction(_poi->files().at(i));
|
||||
|
||||
connect(_poiFilesSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SLOT(poiFileChecked(int)));
|
||||
}
|
||||
|
||||
QAction *GUI::createPOIFileAction(int index)
|
||||
QAction *GUI::createPOIFileAction(const QString &fileName)
|
||||
{
|
||||
QAction *a = new QAction(QFileInfo(_poi->files().at(index)).fileName(),
|
||||
this);
|
||||
QAction *a = new QAction(QFileInfo(fileName).fileName(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
|
||||
_poiFilesSignalMapper->setMapping(a, index);
|
||||
connect(a, SIGNAL(triggered()), _poiFilesSignalMapper, SLOT(map()));
|
||||
|
||||
_poiFilesActions.append(a);
|
||||
_poiFilesSignalMapper->setMapping(a, _poiFilesActions.size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _poiFilesSignalMapper, SLOT(map()));
|
||||
|
||||
return a;
|
||||
}
|
||||
@ -838,7 +841,15 @@ bool GUI::openPOIFile(const QString &fileName)
|
||||
if (fileName.isEmpty() || _poi->files().contains(fileName))
|
||||
return false;
|
||||
|
||||
if (!_poi->loadFile(fileName)) {
|
||||
if (_poi->loadFile(fileName)) {
|
||||
_mapView->showPOI(true);
|
||||
_showPOIAction->setChecked(true);
|
||||
QAction *action = createPOIFileAction(fileName);
|
||||
action->setChecked(true);
|
||||
_poiFilesMenu->addAction(action);
|
||||
|
||||
return true;
|
||||
} else {
|
||||
QString error = tr("Error loading POI file:") + "\n\n"
|
||||
+ fileName + "\n\n" + _poi->errorString();
|
||||
if (_poi->errorLine())
|
||||
@ -846,14 +857,6 @@ bool GUI::openPOIFile(const QString &fileName)
|
||||
QMessageBox::critical(this, APP_NAME, error);
|
||||
|
||||
return false;
|
||||
} else {
|
||||
_mapView->showPOI(true);
|
||||
_showPOIAction->setChecked(true);
|
||||
QAction *action = createPOIFileAction(_poi->files().indexOf(fileName));
|
||||
action->setChecked(true);
|
||||
_poiFilesMenu->addAction(action);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1294,18 +1297,11 @@ bool GUI::loadMap(const QString &fileName)
|
||||
return false;
|
||||
|
||||
if (_ml->loadFile(fileName)) {
|
||||
QAction *a = new QAction(_ml->maps().last()->name(), this);
|
||||
a->setMenuRole(QAction::NoRole);
|
||||
a->setCheckable(true);
|
||||
a->setActionGroup(_mapsActionGroup);
|
||||
_mapsSignalMapper->setMapping(a, _ml->maps().size() - 1);
|
||||
connect(a, SIGNAL(triggered()), _mapsSignalMapper, SLOT(map()));
|
||||
_mapActions.append(a);
|
||||
QAction *a = createMapAction(_ml->maps().last());
|
||||
_mapMenu->insertAction(_mapsEnd, a);
|
||||
_showMapAction->setEnabled(true);
|
||||
_clearMapCacheAction->setEnabled(true);
|
||||
_mapActions.last()->trigger();
|
||||
|
||||
a->trigger();
|
||||
return true;
|
||||
} else {
|
||||
QString error = tr("Error loading map:") + "\n\n"
|
||||
@ -2089,10 +2085,6 @@ void GUI::readSettings()
|
||||
_poi->setRadius(_options.poiRadius);
|
||||
|
||||
QPixmapCache::setCacheLimit(_options.pixmapCache * 1024);
|
||||
Downloader::setTimeout(_options.connectionTimeout);
|
||||
#ifdef ENABLE_HTTP2
|
||||
Downloader::enableHTTP2(_options.enableHTTP2);
|
||||
#endif // ENABLE_HTTP2
|
||||
|
||||
settings.endGroup();
|
||||
}
|
||||
|
@ -96,7 +96,8 @@ private:
|
||||
void closeFiles();
|
||||
void plot(QPrinter *printer);
|
||||
|
||||
QAction *createPOIFileAction(int index);
|
||||
QAction *createPOIFileAction(const QString &fileName);
|
||||
QAction *createMapAction(const Map *map);
|
||||
void createPOIFilesActions();
|
||||
void createMapActions();
|
||||
void createActions();
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include <QList>
|
||||
#include "kv.h"
|
||||
#include "common/kv.h"
|
||||
|
||||
class InfoItem : public QGraphicsItem
|
||||
{
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#define MAX_DIGITAL_ZOOM 2
|
||||
#define MIN_DIGITAL_ZOOM -3
|
||||
#define MARGIN 10.0
|
||||
#define MARGIN 10
|
||||
#define SCALE_OFFSET 7
|
||||
|
||||
MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
void ToolTip::insert(const QString &key, const QString &value)
|
||||
{
|
||||
QPair<QString, QString> entry(key, value);
|
||||
_list.append(entry);
|
||||
_list.append(KV(key, value));
|
||||
}
|
||||
|
||||
QString ToolTip::toString()
|
||||
@ -11,8 +10,8 @@ QString ToolTip::toString()
|
||||
QString ret = "<table>";
|
||||
|
||||
for (int i = 0; i < _list.count(); i++)
|
||||
ret += "<tr><td align=\"right\"><b>" + _list.at(i).first
|
||||
+ ": </b></td><td>" + _list.at(i).second + "</td></tr>";
|
||||
ret += "<tr><td align=\"right\"><b>" + _list.at(i).key()
|
||||
+ ": </b></td><td>" + _list.at(i).value() + "</td></tr>";
|
||||
|
||||
ret += "</table>";
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
#include <QPair>
|
||||
#include "common/kv.h"
|
||||
|
||||
class ToolTip
|
||||
{
|
||||
@ -12,7 +12,7 @@ public:
|
||||
QString toString();
|
||||
|
||||
private:
|
||||
QList<QPair<QString, QString> > _list;
|
||||
QList<KV> _list;
|
||||
};
|
||||
|
||||
#endif // TOOLTIP_H
|
||||
|
@ -32,6 +32,8 @@ private:
|
||||
double _lat, _lon;
|
||||
};
|
||||
|
||||
Q_DECLARE_TYPEINFO(Coordinates, Q_PRIMITIVE_TYPE);
|
||||
|
||||
inline bool operator==(const Coordinates &c1, const Coordinates &c2)
|
||||
{return (c1.lat() == c2.lat() && c1.lon() == c2.lon());}
|
||||
inline bool operator!=(const Coordinates &c1, const Coordinates &c2)
|
||||
|
@ -8,7 +8,7 @@ class Range
|
||||
{
|
||||
public:
|
||||
Range() {_min = 0; _max = 0;}
|
||||
Range(int min, int max) {_min = min, _max = max;}
|
||||
Range(int min, int max) : _min(min), _max(max) {}
|
||||
|
||||
int min() const {return _min;}
|
||||
int max() const {return _max;}
|
||||
@ -29,7 +29,7 @@ class RangeF
|
||||
{
|
||||
public:
|
||||
RangeF() {_min = 0; _max = 0;}
|
||||
RangeF(qreal min, qreal max) {_min = min, _max = max;}
|
||||
RangeF(qreal min, qreal max) : _min(min), _max(max) {}
|
||||
|
||||
RangeF operator&(const RangeF &r) const;
|
||||
RangeF &operator&=(const RangeF &r) {*this = *this & r; return *this;}
|
||||
|
@ -98,9 +98,9 @@ bool Data::loadFile(const QString &fileName)
|
||||
file.reset();
|
||||
}
|
||||
|
||||
qWarning("Error loading data file: %s:\n", qPrintable(fileName));
|
||||
qWarning("Error loading data file: %s:", qPrintable(fileName));
|
||||
for (it = _parsers.begin(); it != _parsers.end(); it++)
|
||||
qWarning("%s: line %d: %s\n", qPrintable(it.key()),
|
||||
qWarning("%s: line %d: %s", qPrintable(it.key()),
|
||||
it.value()->errorLine(), qPrintable(it.value()->errorString()));
|
||||
|
||||
_errorLine = 0;
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "waypoint.h"
|
||||
#include "path.h"
|
||||
|
||||
class WaypointItem;
|
||||
|
||||
class POI : public QObject
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
void SLFParser::warning(const char *text) const
|
||||
{
|
||||
const QFile *file = static_cast<QFile *>(_reader.device());
|
||||
qWarning("%s:%lld: %s\n", qPrintable(file->fileName()),
|
||||
qWarning("%s:%lld: %s", qPrintable(file->fileName()),
|
||||
_reader.lineNumber(), text);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
void TCXParser::warning(const char *text) const
|
||||
{
|
||||
const QFile *file = static_cast<QFile *>(_reader.device());
|
||||
qWarning("%s:%lld: %s\n", qPrintable(file->fileName()),
|
||||
qWarning("%s:%lld: %s", qPrintable(file->fileName()),
|
||||
_reader.lineNumber(), text);
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,10 @@
|
||||
|
||||
#define ATTR_REDIRECT QNetworkRequest::RedirectionTargetAttribute
|
||||
#define ATTR_FILE QNetworkRequest::User
|
||||
#define ATTR_ORIGIN (QNetworkRequest::Attribute)(QNetworkRequest::User + 1)
|
||||
#define ATTR_LEVEL (QNetworkRequest::Attribute)(QNetworkRequest::User + 2)
|
||||
#define ATTR_ORIGIN \
|
||||
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::User + 1)
|
||||
#define ATTR_LEVEL \
|
||||
static_cast<QNetworkRequest::Attribute>(QNetworkRequest::User + 2)
|
||||
|
||||
#define MAX_REDIRECT_LEVEL 5
|
||||
#define RETRIES 3
|
||||
@ -78,19 +80,25 @@ private:
|
||||
};
|
||||
|
||||
|
||||
QNetworkAccessManager *Downloader::_manager = 0;
|
||||
int Downloader::_timeout = 30;
|
||||
#ifdef ENABLE_HTTP2
|
||||
bool Downloader::_http2 = true;
|
||||
#endif // ENABLE_HTTP2
|
||||
|
||||
QNetworkAccessManager *Downloader::manager()
|
||||
{
|
||||
static QNetworkAccessManager manager;
|
||||
return &manager;
|
||||
}
|
||||
|
||||
bool Downloader::doDownload(const Download &dl,
|
||||
const QByteArray &authorization, const Redirect *redirect)
|
||||
{
|
||||
QUrl url(dl.url());
|
||||
const QUrl &url = dl.url();
|
||||
|
||||
if (!url.isValid() || !(url.scheme() == "http" || url.scheme() == "https")) {
|
||||
qWarning("%s: Invalid URL\n", qPrintable(url.toString()));
|
||||
if (!url.isValid() || !(url.scheme() == QLatin1String("http")
|
||||
|| url.scheme() == QLatin1String("https"))) {
|
||||
qWarning("%s: Invalid URL", qPrintable(url.toString()));
|
||||
if (redirect)
|
||||
_errorDownloads.insert(redirect->origin(), RETRIES);
|
||||
return false;
|
||||
@ -115,7 +123,7 @@ bool Downloader::doDownload(const Download &dl,
|
||||
QVariant(_http2));
|
||||
#endif // ENABLE_HTTP2
|
||||
|
||||
QNetworkReply *reply = _manager->get(request);
|
||||
QNetworkReply *reply = manager()->get(request);
|
||||
if (reply && reply->isRunning()) {
|
||||
_currentDownloads.insert(url);
|
||||
ReplyTimeout::setTimeout(reply, _timeout);
|
||||
@ -138,7 +146,7 @@ bool Downloader::saveToDisk(const QString &filename, QIODevice *data)
|
||||
QFile file(filename);
|
||||
|
||||
if (!file.open(QIODevice::WriteOnly)) {
|
||||
qWarning("Error writing file: %s: %s\n",
|
||||
qWarning("Error writing file: %s: %s",
|
||||
qPrintable(filename), qPrintable(file.errorString()));
|
||||
return false;
|
||||
}
|
||||
@ -159,34 +167,33 @@ void Downloader::insertError(const QUrl &url, QNetworkReply::NetworkError error)
|
||||
|
||||
void Downloader::downloadFinished(QNetworkReply *reply)
|
||||
{
|
||||
QUrl url = reply->request().url();
|
||||
QUrl url(reply->request().url());
|
||||
QNetworkReply::NetworkError error = reply->error();
|
||||
|
||||
if (error) {
|
||||
QUrl origin = reply->request().attribute(ATTR_ORIGIN).toUrl();
|
||||
QUrl origin(reply->request().attribute(ATTR_ORIGIN).toUrl());
|
||||
if (origin.isEmpty()) {
|
||||
insertError(url, error);
|
||||
qWarning("Error downloading file: %s: %s\n",
|
||||
qWarning("Error downloading file: %s: %s",
|
||||
url.toEncoded().constData(), qPrintable(reply->errorString()));
|
||||
} else {
|
||||
insertError(origin, error);
|
||||
qWarning("Error downloading file: %s -> %s: %s\n",
|
||||
qWarning("Error downloading file: %s -> %s: %s",
|
||||
origin.toEncoded().constData(), url.toEncoded().constData(),
|
||||
qPrintable(reply->errorString()));
|
||||
}
|
||||
} else {
|
||||
QUrl location = reply->attribute(ATTR_REDIRECT).toUrl();
|
||||
QString filename = reply->request().attribute(ATTR_FILE)
|
||||
.toString();
|
||||
QUrl location(reply->attribute(ATTR_REDIRECT).toUrl());
|
||||
QString filename(reply->request().attribute(ATTR_FILE).toString());
|
||||
|
||||
if (!location.isEmpty()) {
|
||||
QUrl origin = reply->request().attribute(ATTR_ORIGIN).toUrl();
|
||||
QUrl origin(reply->request().attribute(ATTR_ORIGIN).toUrl());
|
||||
int level = reply->request().attribute(ATTR_LEVEL).toInt();
|
||||
|
||||
if (level >= MAX_REDIRECT_LEVEL) {
|
||||
_errorDownloads.insert(origin, RETRIES);
|
||||
qWarning("Error downloading file: %s: "
|
||||
"redirect level limit reached (redirect loop?)\n",
|
||||
"redirect level limit reached (redirect loop?)",
|
||||
origin.toEncoded().constData());
|
||||
} else {
|
||||
QUrl redirectUrl;
|
||||
@ -225,3 +232,11 @@ bool Downloader::get(const QList<Download> &list,
|
||||
|
||||
return finishEmitted;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_HTTP2
|
||||
void Downloader::enableHTTP2(bool enable)
|
||||
{
|
||||
_http2 = enable;
|
||||
manager()->clearConnectionCache();
|
||||
}
|
||||
#endif // ENABLE_HTTP2
|
||||
|
@ -15,8 +15,8 @@ class Download
|
||||
public:
|
||||
Download(const QUrl &url, const QString &file) : _url(url), _file(file) {}
|
||||
|
||||
const QUrl& url() const {return _url;}
|
||||
const QString& file() const {return _file;}
|
||||
const QUrl &url() const {return _url;}
|
||||
const QString &file() const {return _file;}
|
||||
|
||||
private:
|
||||
QUrl _url;
|
||||
@ -48,10 +48,8 @@ public:
|
||||
|
||||
static void setTimeout(int timeout) {_timeout = timeout;}
|
||||
#ifdef ENABLE_HTTP2
|
||||
static void enableHTTP2(bool enable) {_http2 = enable;}
|
||||
static void enableHTTP2(bool enable);
|
||||
#endif // ENABLE_HTTP2
|
||||
static void setNetworkAccessManager(QNetworkAccessManager *manager)
|
||||
{_manager = manager;}
|
||||
|
||||
signals:
|
||||
void finished();
|
||||
@ -69,6 +67,8 @@ private:
|
||||
const Redirect *redirect = 0);
|
||||
bool saveToDisk(const QString &filename, QIODevice *data);
|
||||
|
||||
static QNetworkAccessManager *manager();
|
||||
|
||||
QSet<QUrl> _currentDownloads;
|
||||
QHash<QUrl, int> _errorDownloads;
|
||||
|
||||
@ -76,7 +76,6 @@ private:
|
||||
#ifdef ENABLE_HTTP2
|
||||
static bool _http2;
|
||||
#endif // ENABLE_HTTP2
|
||||
static QNetworkAccessManager *_manager;
|
||||
};
|
||||
|
||||
#endif // DOWNLOADER_H
|
||||
|
@ -1,41 +1,18 @@
|
||||
#include <QtGlobal>
|
||||
#include <QPainter>
|
||||
#include "common/coordinates.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/wgs84.h"
|
||||
#include "osm.h"
|
||||
#include "emptymap.h"
|
||||
|
||||
|
||||
#define ZOOM_MIN 0
|
||||
#define ZOOM_MAX 19
|
||||
#define TILE_SIZE 256
|
||||
|
||||
static QPointF ll2m(const Coordinates &c)
|
||||
{
|
||||
return QPointF(c.lon(), rad2deg(log(tan(M_PI_4 + deg2rad(c.lat())/2.0))));
|
||||
}
|
||||
|
||||
static Coordinates m2ll(const QPointF &p)
|
||||
{
|
||||
return Coordinates(p.x(), rad2deg(2.0 * atan(exp(deg2rad(p.y()))) - M_PI_2));
|
||||
}
|
||||
|
||||
static qreal zoom2scale(int zoom)
|
||||
{
|
||||
return (360.0/(qreal)((1<<zoom) * TILE_SIZE));
|
||||
}
|
||||
|
||||
static int scale2zoom(qreal scale)
|
||||
{
|
||||
return (int)log2(360.0/(scale * (qreal)TILE_SIZE));
|
||||
}
|
||||
|
||||
static int limitZoom(int zoom)
|
||||
{
|
||||
if (zoom < ZOOM_MIN)
|
||||
return ZOOM_MIN;
|
||||
if (zoom > ZOOM_MAX)
|
||||
return ZOOM_MAX;
|
||||
if (zoom < OSM::ZOOMS.min())
|
||||
return OSM::ZOOMS.min();
|
||||
if (zoom > OSM::ZOOMS.max())
|
||||
return OSM::ZOOMS.max();
|
||||
|
||||
return zoom;
|
||||
}
|
||||
@ -43,23 +20,23 @@ static int limitZoom(int zoom)
|
||||
|
||||
EmptyMap::EmptyMap(QObject *parent) : Map(parent)
|
||||
{
|
||||
_zoom = ZOOM_MAX;
|
||||
_zoom = OSM::ZOOMS.max();
|
||||
}
|
||||
|
||||
QRectF EmptyMap::bounds()
|
||||
{
|
||||
return QRectF(ll2xy(Coordinates(-180, 85)), ll2xy(Coordinates(180, -85)));
|
||||
return QRectF(ll2xy(OSM::BOUNDS.topLeft()), ll2xy(OSM::BOUNDS.bottomRight()));
|
||||
}
|
||||
|
||||
int EmptyMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
{
|
||||
if (!rect.isValid())
|
||||
_zoom = ZOOM_MAX;
|
||||
_zoom = OSM::ZOOMS.max();
|
||||
else {
|
||||
QRectF tbr(ll2m(rect.topLeft()), ll2m(rect.bottomRight()));
|
||||
QRectF tbr(OSM::ll2m(rect.topLeft()), OSM::ll2m(rect.bottomRight()));
|
||||
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
|
||||
|
||||
_zoom = limitZoom(scale2zoom(qMax(sc.x(), -sc.y())));
|
||||
_zoom = limitZoom(OSM::scale2zoom(qMax(sc.x(), -sc.y()), TILE_SIZE));
|
||||
}
|
||||
|
||||
return _zoom;
|
||||
@ -67,21 +44,18 @@ int EmptyMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
|
||||
qreal EmptyMap::resolution(const QRectF &rect)
|
||||
{
|
||||
qreal scale = zoom2scale(_zoom);
|
||||
|
||||
return (WGS84_RADIUS * 2.0 * M_PI * scale / 360.0
|
||||
* cos(2.0 * atan(exp(deg2rad(-rect.center().y() * scale))) - M_PI/2));
|
||||
return OSM::resolution(rect.center(), _zoom, TILE_SIZE);
|
||||
}
|
||||
|
||||
int EmptyMap::zoomIn()
|
||||
{
|
||||
_zoom = qMin(_zoom + 1, ZOOM_MAX);
|
||||
_zoom = qMin(_zoom + 1, OSM::ZOOMS.max());
|
||||
return _zoom;
|
||||
}
|
||||
|
||||
int EmptyMap::zoomOut()
|
||||
{
|
||||
_zoom = qMax(_zoom - 1, ZOOM_MIN);
|
||||
_zoom = qMax(_zoom - 1, OSM::ZOOMS.min());
|
||||
return _zoom;
|
||||
}
|
||||
|
||||
@ -94,13 +68,13 @@ void EmptyMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
|
||||
QPointF EmptyMap::ll2xy(const Coordinates &c)
|
||||
{
|
||||
qreal scale = zoom2scale(_zoom);
|
||||
QPointF m = ll2m(c);
|
||||
qreal scale = OSM::zoom2scale(_zoom, TILE_SIZE);
|
||||
QPointF m = OSM::ll2m(c);
|
||||
return QPointF(m.x() / scale, m.y() / -scale);
|
||||
}
|
||||
|
||||
Coordinates EmptyMap::xy2ll(const QPointF &p)
|
||||
{
|
||||
qreal scale = zoom2scale(_zoom);
|
||||
return m2ll(QPointF(p.x() * scale, -p.y() * scale));
|
||||
qreal scale = OSM::zoom2scale(_zoom, TILE_SIZE);
|
||||
return OSM::m2ll(QPointF(p.x() * scale, -p.y() * scale));
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "mapsource.h"
|
||||
|
||||
|
||||
MapSource::Config::Config() : type(OSM), zooms(osm::zooms), bounds(osm::bounds),
|
||||
MapSource::Config::Config() : type(OSM), zooms(OSM::ZOOMS), bounds(OSM::BOUNDS),
|
||||
format("image/png"), rest(false), tileRatio(1.0) {}
|
||||
|
||||
|
||||
@ -31,21 +31,21 @@ Range MapSource::zooms(QXmlStreamReader &reader)
|
||||
|
||||
if (attr.hasAttribute("min")) {
|
||||
min = attr.value("min").toString().toInt(&res);
|
||||
if (!res || !osm::zooms.contains(min)) {
|
||||
if (!res || !OSM::ZOOMS.contains(min)) {
|
||||
reader.raiseError("Invalid minimal zoom level");
|
||||
return Range();
|
||||
}
|
||||
} else
|
||||
min = osm::zooms.min();
|
||||
min = OSM::ZOOMS.min();
|
||||
|
||||
if (attr.hasAttribute("max")) {
|
||||
max = attr.value("max").toString().toInt(&res);
|
||||
if (!res || !osm::zooms.contains(max)) {
|
||||
if (!res || !OSM::ZOOMS.contains(max)) {
|
||||
reader.raiseError("Invalid maximal zoom level");
|
||||
return Range();
|
||||
}
|
||||
} else
|
||||
max = osm::zooms.max();
|
||||
max = OSM::ZOOMS.max();
|
||||
|
||||
if (min > max) {
|
||||
reader.raiseError("Invalid maximal/minimal zoom level combination");
|
||||
@ -63,41 +63,41 @@ RectC MapSource::bounds(QXmlStreamReader &reader)
|
||||
|
||||
if (attr.hasAttribute("top")) {
|
||||
top = attr.value("top").toString().toDouble(&res);
|
||||
if (!res || (top < osm::bounds.bottom() || top > osm::bounds.top())) {
|
||||
if (!res || (top < OSM::BOUNDS.bottom() || top > OSM::BOUNDS.top())) {
|
||||
reader.raiseError("Invalid bounds top value");
|
||||
return RectC();
|
||||
}
|
||||
} else
|
||||
top = osm::bounds.top();
|
||||
top = OSM::BOUNDS.top();
|
||||
|
||||
if (attr.hasAttribute("bottom")) {
|
||||
bottom = attr.value("bottom").toString().toDouble(&res);
|
||||
if (!res || (bottom < osm::bounds.bottom()
|
||||
|| bottom > osm::bounds.top())) {
|
||||
if (!res || (bottom < OSM::BOUNDS.bottom()
|
||||
|| bottom > OSM::BOUNDS.top())) {
|
||||
reader.raiseError("Invalid bounds bottom value");
|
||||
return RectC();
|
||||
}
|
||||
} else
|
||||
bottom = osm::bounds.bottom();
|
||||
bottom = OSM::BOUNDS.bottom();
|
||||
|
||||
if (attr.hasAttribute("left")) {
|
||||
left = attr.value("left").toString().toDouble(&res);
|
||||
if (!res || (left < osm::bounds.left() || left > osm::bounds.right())) {
|
||||
if (!res || (left < OSM::BOUNDS.left() || left > OSM::BOUNDS.right())) {
|
||||
reader.raiseError("Invalid bounds left value");
|
||||
return RectC();
|
||||
}
|
||||
} else
|
||||
left = osm::bounds.left();
|
||||
left = OSM::BOUNDS.left();
|
||||
|
||||
if (attr.hasAttribute("right")) {
|
||||
right = attr.value("right").toString().toDouble(&res);
|
||||
if (!res || (right < osm::bounds.left()
|
||||
|| right > osm::bounds.right())) {
|
||||
if (!res || (right < OSM::BOUNDS.left()
|
||||
|| right > OSM::BOUNDS.right())) {
|
||||
reader.raiseError("Invalid bounds right value");
|
||||
return RectC();
|
||||
}
|
||||
} else
|
||||
right = osm::bounds.right();
|
||||
right = OSM::BOUNDS.right();
|
||||
|
||||
if (bottom >= top) {
|
||||
reader.raiseError("Invalid bottom/top bounds combination");
|
||||
@ -156,8 +156,8 @@ void MapSource::map(QXmlStreamReader &reader, Config &config)
|
||||
if (!attr.hasAttribute("id"))
|
||||
reader.raiseError("Missing dimension id");
|
||||
else
|
||||
config.dimensions.append(QPair<QString, QString>(
|
||||
attr.value("id").toString(), reader.readElementText()));
|
||||
config.dimensions.append(KV(attr.value("id").toString(),
|
||||
reader.readElementText()));
|
||||
} else if (reader.name() == "crs") {
|
||||
config.coordinateSystem = coordinateSystem(reader);
|
||||
config.crs = reader.readElementText();
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QList>
|
||||
#include "common/range.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/kv.h"
|
||||
#include "downloader.h"
|
||||
#include "coordinatesystem.h"
|
||||
|
||||
@ -36,7 +37,7 @@ private:
|
||||
QString crs;
|
||||
CoordinateSystem coordinateSystem;
|
||||
bool rest;
|
||||
QList<QPair<QString, QString> > dimensions;
|
||||
QList<KV> dimensions;
|
||||
Authorization authorization;
|
||||
qreal tileRatio;
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include <QPainter>
|
||||
#include <QPixmapCache>
|
||||
#include "common/rectc.h"
|
||||
#include "common/wgs84.h"
|
||||
#include "osm.h"
|
||||
#include "config.h"
|
||||
#include "mbtilesmap.h"
|
||||
@ -74,11 +73,11 @@ MBTilesMap::MBTilesMap(const QString &fileName, QObject *parent)
|
||||
qMax(0, query.value(2).toInt())) + 1, _zooms.min());
|
||||
double maxY = index2mercator(qMin((1<<_zooms.min()) - 1,
|
||||
qMax(0, query.value(3).toInt())) + 1, _zooms.min());
|
||||
Coordinates tl(osm::m2ll(QPointF(minX, maxY)));
|
||||
Coordinates br(osm::m2ll(QPointF(maxX, minY)));
|
||||
Coordinates tl(OSM::m2ll(QPointF(minX, maxY)));
|
||||
Coordinates br(OSM::m2ll(QPointF(maxX, minY)));
|
||||
// Workaround of broken zoom levels 0 and 1 due to numerical instability
|
||||
tl.rlat() = qMin(tl.lat(), osm::bounds.top());
|
||||
br.rlat() = qMax(br.lat(), osm::bounds.bottom());
|
||||
tl.rlat() = qMin(tl.lat(), OSM::BOUNDS.top());
|
||||
br.rlat() = qMax(br.lat(), OSM::BOUNDS.bottom());
|
||||
_bounds = RectC(tl, br);
|
||||
}
|
||||
|
||||
@ -152,9 +151,9 @@ int MBTilesMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
if (!rect.isValid())
|
||||
_zoom = _zooms.max();
|
||||
else {
|
||||
QRectF tbr(osm::ll2m(rect.topLeft()), osm::ll2m(rect.bottomRight()));
|
||||
QRectF tbr(OSM::ll2m(rect.topLeft()), OSM::ll2m(rect.bottomRight()));
|
||||
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
|
||||
_zoom = limitZoom(osm::scale2zoom(qMax(sc.x(), -sc.y())
|
||||
_zoom = limitZoom(OSM::scale2zoom(qMax(sc.x(), -sc.y())
|
||||
/ coordinatesRatio(), _tileSize));
|
||||
}
|
||||
|
||||
@ -163,10 +162,7 @@ int MBTilesMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
|
||||
qreal MBTilesMap::resolution(const QRectF &rect)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, _tileSize);
|
||||
|
||||
return (WGS84_RADIUS * 2.0 * M_PI * scale / 360.0
|
||||
* cos(2.0 * atan(exp(deg2rad(-rect.center().y() * scale))) - M_PI/2));
|
||||
return OSM::resolution(rect.center(), _zoom, _tileSize);
|
||||
}
|
||||
|
||||
int MBTilesMap::zoomIn()
|
||||
@ -215,11 +211,11 @@ QByteArray MBTilesMap::tileData(int zoom, const QPoint &tile) const
|
||||
void MBTilesMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
{
|
||||
Q_UNUSED(flags);
|
||||
qreal scale = osm::zoom2scale(_zoom, _tileSize);
|
||||
qreal scale = OSM::zoom2scale(_zoom, _tileSize);
|
||||
QRectF b(bounds());
|
||||
|
||||
|
||||
QPoint tile = osm::mercator2tile(QPointF(rect.topLeft().x() * scale,
|
||||
QPoint tile = OSM::mercator2tile(QPointF(rect.topLeft().x() * scale,
|
||||
-rect.topLeft().y() * scale) * coordinatesRatio(), _zoom);
|
||||
QPointF tl(floor(rect.left() / tileSize())
|
||||
* tileSize(), floor(rect.top() / tileSize()) * tileSize());
|
||||
@ -251,14 +247,14 @@ void MBTilesMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
|
||||
QPointF MBTilesMap::ll2xy(const Coordinates &c)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, _tileSize);
|
||||
QPointF m = osm::ll2m(c);
|
||||
qreal scale = OSM::zoom2scale(_zoom, _tileSize);
|
||||
QPointF m = OSM::ll2m(c);
|
||||
return QPointF(m.x() / scale, m.y() / -scale) / coordinatesRatio();
|
||||
}
|
||||
|
||||
Coordinates MBTilesMap::xy2ll(const QPointF &p)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, _tileSize);
|
||||
return osm::m2ll(QPointF(p.x() * scale, -p.y() * scale)
|
||||
qreal scale = OSM::zoom2scale(_zoom, _tileSize);
|
||||
return OSM::m2ll(QPointF(p.x() * scale, -p.y() * scale)
|
||||
* coordinatesRatio());
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <QtCore>
|
||||
#include <QPainter>
|
||||
#include "common/coordinates.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/wgs84.h"
|
||||
#include "downloader.h"
|
||||
#include "osm.h"
|
||||
#include "config.h"
|
||||
@ -15,22 +14,12 @@ OnlineMap::OnlineMap(const QString &name, const QString &url,
|
||||
const Authorization &authorization, bool invertY, QObject *parent)
|
||||
: Map(parent), _name(name), _zooms(zooms), _bounds(bounds),
|
||||
_zoom(_zooms.max()), _deviceRatio(1.0), _tileRatio(tileRatio),
|
||||
_invertY(invertY), _valid(false)
|
||||
_invertY(invertY)
|
||||
{
|
||||
QString dir(TILES_DIR + "/" + _name);
|
||||
|
||||
_tileLoader = new TileLoader(this);
|
||||
_tileLoader = new TileLoader(TILES_DIR + "/" + _name, this);
|
||||
_tileLoader->setUrl(url);
|
||||
_tileLoader->setDir(dir);
|
||||
_tileLoader->setAuthorization(authorization);
|
||||
connect(_tileLoader, SIGNAL(finished()), this, SIGNAL(loaded()));
|
||||
|
||||
if (!QDir().mkpath(dir)) {
|
||||
_errorString = "Error creating tiles dir";
|
||||
return;
|
||||
}
|
||||
|
||||
_valid = true;
|
||||
}
|
||||
|
||||
QRectF OnlineMap::bounds()
|
||||
@ -53,9 +42,9 @@ int OnlineMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
if (!rect.isValid())
|
||||
_zoom = _zooms.max();
|
||||
else {
|
||||
QRectF tbr(osm::ll2m(rect.topLeft()), osm::ll2m(rect.bottomRight()));
|
||||
QRectF tbr(OSM::ll2m(rect.topLeft()), OSM::ll2m(rect.bottomRight()));
|
||||
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
|
||||
_zoom = limitZoom(osm::scale2zoom(qMax(sc.x(), -sc.y())
|
||||
_zoom = limitZoom(OSM::scale2zoom(qMax(sc.x(), -sc.y())
|
||||
/ coordinatesRatio(), TILE_SIZE));
|
||||
}
|
||||
|
||||
@ -64,10 +53,7 @@ int OnlineMap::zoomFit(const QSize &size, const RectC &rect)
|
||||
|
||||
qreal OnlineMap::resolution(const QRectF &rect)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, TILE_SIZE);
|
||||
|
||||
return (WGS84_RADIUS * 2.0 * M_PI * scale / 360.0
|
||||
* cos(2.0 * atan(exp(deg2rad(-rect.center().y() * scale))) - M_PI/2));
|
||||
return OSM::resolution(rect.center(), _zoom, TILE_SIZE);
|
||||
}
|
||||
|
||||
int OnlineMap::zoomIn()
|
||||
@ -99,21 +85,25 @@ qreal OnlineMap::tileSize() const
|
||||
|
||||
void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, TILE_SIZE);
|
||||
qreal scale = OSM::zoom2scale(_zoom, TILE_SIZE);
|
||||
QRectF b(bounds());
|
||||
|
||||
QPoint tile = osm::mercator2tile(QPointF(rect.topLeft().x() * scale,
|
||||
QPoint tile = OSM::mercator2tile(QPointF(rect.topLeft().x() * scale,
|
||||
-rect.topLeft().y() * scale) * coordinatesRatio(), _zoom);
|
||||
QPointF tl(floor(rect.left() / tileSize())
|
||||
* tileSize(), floor(rect.top() / tileSize()) * tileSize());
|
||||
|
||||
QList<Tile> tiles;
|
||||
QSizeF s(qMin(rect.right() - tl.x(), b.width()),
|
||||
qMin(rect.bottom() - tl.y(), b.height()));
|
||||
for (int i = 0; i < ceil(s.width() / tileSize()); i++)
|
||||
for (int j = 0; j < ceil(s.height() / tileSize()); j++)
|
||||
tiles.append(Tile(QPoint(tile.x() + i,
|
||||
_invertY ? (1<<_zoom) - (tile.y() + j) - 1 : tile.y() + j), _zoom));
|
||||
int width = qCeil(s.width() / tileSize());
|
||||
int height = qCeil(s.height() / tileSize());
|
||||
|
||||
QVector<Tile> tiles;
|
||||
tiles.reserve(width * height);
|
||||
for (int i = 0; i < width; i++)
|
||||
for (int j = 0; j < height; j++)
|
||||
tiles.append(Tile(QPoint(tile.x() + i, _invertY ? (1<<_zoom)
|
||||
- (tile.y() + j) - 1 : tile.y() + j), _zoom));
|
||||
|
||||
if (flags & Map::Block)
|
||||
_tileLoader->loadTilesSync(tiles);
|
||||
@ -122,9 +112,10 @@ void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
|
||||
for (int i = 0; i < tiles.count(); i++) {
|
||||
Tile &t = tiles[i];
|
||||
QPointF tp(qMax(tl.x(), b.left()) + (t.xy().x() - tile.x()) * tileSize(),
|
||||
qMax(tl.y(), b.top()) + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 :
|
||||
t.xy().y()) - tile.y()) * tileSize());
|
||||
QPointF tp = _zoom ? QPointF(tl.x() + (t.xy().x() - tile.x())
|
||||
* tileSize(), tl.y() + ((_invertY ? (1<<_zoom) - t.xy().y() - 1 :
|
||||
t.xy().y()) - tile.y()) * tileSize()) : QPointF(-128, -128);
|
||||
|
||||
if (!t.pixmap().isNull()) {
|
||||
#ifdef ENABLE_HIDPI
|
||||
t.pixmap().setDevicePixelRatio(imageRatio());
|
||||
@ -136,14 +127,14 @@ void OnlineMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
|
||||
QPointF OnlineMap::ll2xy(const Coordinates &c)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, TILE_SIZE);
|
||||
QPointF m = osm::ll2m(c);
|
||||
qreal scale = OSM::zoom2scale(_zoom, TILE_SIZE);
|
||||
QPointF m = OSM::ll2m(c);
|
||||
return QPointF(m.x() / scale, m.y() / -scale) / coordinatesRatio();
|
||||
}
|
||||
|
||||
Coordinates OnlineMap::xy2ll(const QPointF &p)
|
||||
{
|
||||
qreal scale = osm::zoom2scale(_zoom, TILE_SIZE);
|
||||
return osm::m2ll(QPointF(p.x() * scale, -p.y() * scale)
|
||||
qreal scale = OSM::zoom2scale(_zoom, TILE_SIZE);
|
||||
return OSM::m2ll(QPointF(p.x() * scale, -p.y() * scale)
|
||||
* coordinatesRatio());
|
||||
}
|
||||
|
@ -34,9 +34,6 @@ public:
|
||||
void setDevicePixelRatio(qreal ratio) {_deviceRatio = ratio;}
|
||||
void clearCache() {_tileLoader->clearCache();}
|
||||
|
||||
bool isValid() const {return _valid;}
|
||||
QString errorString() const {return _errorString;}
|
||||
|
||||
private:
|
||||
int limitZoom(int zoom) const;
|
||||
qreal tileSize() const;
|
||||
@ -50,9 +47,6 @@ private:
|
||||
int _zoom;
|
||||
qreal _deviceRatio, _tileRatio;
|
||||
bool _invertY;
|
||||
|
||||
bool _valid;
|
||||
QString _errorString;
|
||||
};
|
||||
|
||||
#endif // ONLINEMAP_H
|
||||
|
@ -1,29 +1,40 @@
|
||||
#include <QtCore>
|
||||
#include "common/wgs84.h"
|
||||
#include "osm.h"
|
||||
|
||||
|
||||
#define EPSILON 1e-6
|
||||
|
||||
QPointF osm::ll2m(const Coordinates &c)
|
||||
QPointF OSM::ll2m(const Coordinates &c)
|
||||
{
|
||||
return QPointF(c.lon(), rad2deg(log(tan(M_PI_4 + deg2rad(c.lat())/2.0))));
|
||||
}
|
||||
|
||||
Coordinates osm::m2ll(const QPointF &p)
|
||||
Coordinates OSM::m2ll(const QPointF &p)
|
||||
{
|
||||
return Coordinates(p.x(), rad2deg(2.0 * atan(exp(deg2rad(p.y()))) - M_PI_2));
|
||||
}
|
||||
|
||||
QPoint osm::mercator2tile(const QPointF &m, int z)
|
||||
QPoint OSM::mercator2tile(const QPointF &m, int zoom)
|
||||
{
|
||||
return QPoint((int)(floor((m.x() + 180.0) / 360.0 * (1<<z))),
|
||||
(int)(floor((1.0 - (m.y() / 180.0)) / 2.0 * (1<<z))));
|
||||
return QPoint(qFloor((m.x() + 180.0) / 360.0 * (1<<zoom)),
|
||||
qFloor((1.0 - (m.y() / 180.0)) / 2.0 * (1<<zoom)));
|
||||
}
|
||||
|
||||
qreal osm::zoom2scale(int zoom, int tileSize)
|
||||
qreal OSM::zoom2scale(int zoom, int tileSize)
|
||||
{
|
||||
return (360.0/(qreal)((1<<zoom) * tileSize));
|
||||
}
|
||||
|
||||
int osm::scale2zoom(qreal scale, int tileSize)
|
||||
int OSM::scale2zoom(qreal scale, int tileSize)
|
||||
{
|
||||
return (int)(log2(360.0/(scale * (qreal)tileSize)) + EPSILON);
|
||||
}
|
||||
|
||||
qreal OSM::resolution(const QPointF &p, int zoom, int tileSize)
|
||||
{
|
||||
qreal scale = zoom2scale(zoom, tileSize);
|
||||
|
||||
return (WGS84_RADIUS * 2.0 * M_PI * scale / 360.0
|
||||
* cos(2.0 * atan(exp(deg2rad(-p.y() * scale))) - M_PI/2));
|
||||
}
|
||||
|
@ -6,17 +6,18 @@
|
||||
#include <common/rectc.h>
|
||||
#include <common/range.h>
|
||||
|
||||
namespace osm
|
||||
namespace OSM
|
||||
{
|
||||
static const RectC bounds(Coordinates(-180, 85.0511),
|
||||
static const RectC BOUNDS(Coordinates(-180, 85.0511),
|
||||
Coordinates(180, -85.0511));
|
||||
static const Range zooms(0, 19);
|
||||
static const Range ZOOMS(0, 19);
|
||||
|
||||
QPointF ll2m(const Coordinates &c);
|
||||
Coordinates m2ll(const QPointF &p);
|
||||
QPoint mercator2tile(const QPointF &m, int z);
|
||||
QPoint mercator2tile(const QPointF &m, int zoom);
|
||||
qreal zoom2scale(int zoom, int tileSize);
|
||||
int scale2zoom(qreal scale, int tileSize);
|
||||
qreal resolution(const QPointF &p, int zoom, int tileSize);
|
||||
}
|
||||
|
||||
#endif // OSM_H
|
||||
|
@ -96,7 +96,7 @@ bool Tar::loadTmi(const QString &path)
|
||||
QByteArray line = file.readLine();
|
||||
int pos = line.indexOf(':');
|
||||
if (line.size() < 10 || pos < 7 || !line.startsWith("block")) {
|
||||
qWarning("%s:%d: syntax error\n", qPrintable(path), ln);
|
||||
qWarning("%s:%d: syntax error", qPrintable(path), ln);
|
||||
_index.clear();
|
||||
return false;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
class Tile
|
||||
{
|
||||
public:
|
||||
Tile() {}
|
||||
Tile(const QPoint &xy, const QVariant &zoom, const RectD &bbox = RectD())
|
||||
{_xy = xy; _zoom = zoom; _bbox = bbox;}
|
||||
|
||||
|
@ -7,20 +7,24 @@
|
||||
static bool loadTileFile(Tile &tile, const QString &file)
|
||||
{
|
||||
if (!tile.pixmap().load(file)) {
|
||||
qWarning("%s: error loading tile file\n", qPrintable(file));
|
||||
qWarning("%s: error loading tile file", qPrintable(file));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
TileLoader::TileLoader(QObject *parent) : QObject(parent)
|
||||
TileLoader::TileLoader(const QString &dir, QObject *parent)
|
||||
: QObject(parent), _dir(dir)
|
||||
{
|
||||
if (!QDir().mkpath(_dir))
|
||||
qWarning("%s: %s", qPrintable(_dir), "Error creating tiles directory");
|
||||
|
||||
_downloader = new Downloader(this);
|
||||
connect(_downloader, SIGNAL(finished()), this, SIGNAL(finished()));
|
||||
}
|
||||
|
||||
void TileLoader::loadTilesAsync(QList<Tile> &list)
|
||||
void TileLoader::loadTilesAsync(QVector<Tile> &list)
|
||||
{
|
||||
QList<Download> dl;
|
||||
|
||||
@ -28,21 +32,23 @@ void TileLoader::loadTilesAsync(QList<Tile> &list)
|
||||
Tile &t = list[i];
|
||||
QString file(tileFile(t));
|
||||
QFileInfo fi(file);
|
||||
QUrl url(tileUrl(t));
|
||||
|
||||
if (url.isLocalFile())
|
||||
loadTileFile(t, url.toLocalFile());
|
||||
else if (fi.exists())
|
||||
if (fi.exists())
|
||||
loadTileFile(t, file);
|
||||
else
|
||||
dl.append(Download(tileUrl(t), file));
|
||||
else {
|
||||
QUrl url(tileUrl(t));
|
||||
if (url.isLocalFile())
|
||||
loadTileFile(t, url.toLocalFile());
|
||||
else
|
||||
dl.append(Download(url, file));
|
||||
}
|
||||
}
|
||||
|
||||
if (!dl.empty())
|
||||
_downloader->get(dl, _authorization);
|
||||
}
|
||||
|
||||
void TileLoader::loadTilesSync(QList<Tile> &list)
|
||||
void TileLoader::loadTilesSync(QVector<Tile> &list)
|
||||
{
|
||||
QList<Download> dl;
|
||||
|
||||
@ -50,14 +56,16 @@ void TileLoader::loadTilesSync(QList<Tile> &list)
|
||||
Tile &t = list[i];
|
||||
QString file(tileFile(t));
|
||||
QFileInfo fi(file);
|
||||
QUrl url(tileUrl(t));
|
||||
|
||||
if (url.isLocalFile())
|
||||
loadTileFile(t, url.toLocalFile());
|
||||
else if (fi.exists())
|
||||
if (fi.exists())
|
||||
loadTileFile(t, file);
|
||||
else
|
||||
dl.append(Download(tileUrl(t), file));
|
||||
else {
|
||||
QUrl url(tileUrl(t));
|
||||
if (url.isLocalFile())
|
||||
loadTileFile(t, url.toLocalFile());
|
||||
else
|
||||
dl.append(Download(url, file));
|
||||
}
|
||||
}
|
||||
|
||||
if (dl.empty())
|
||||
@ -112,8 +120,7 @@ QUrl TileLoader::tileUrl(const Tile &tile) const
|
||||
|
||||
QString TileLoader::tileFile(const Tile &tile) const
|
||||
{
|
||||
QString file = _dir + QString("/%1-%2-%3").arg(tile.zoom().toString())
|
||||
.arg(tile.xy().x()).arg(tile.xy().y());
|
||||
|
||||
return file;
|
||||
return _dir + QLatin1Char('/') + tile.zoom().toString() + QLatin1Char('-')
|
||||
+ QString::number(tile.xy().x()) + QLatin1Char('-')
|
||||
+ QString::number(tile.xy().y());
|
||||
}
|
||||
|
@ -11,15 +11,14 @@ class TileLoader : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TileLoader(QObject *parent = 0);
|
||||
TileLoader(const QString &dir, QObject *parent = 0);
|
||||
|
||||
void setUrl(const QString &url) {_url = url;}
|
||||
void setDir(const QString &dir) {_dir = dir;}
|
||||
void setAuthorization(const Authorization &authorization)
|
||||
{_authorization = authorization;}
|
||||
|
||||
void loadTilesAsync(QList<Tile> &list);
|
||||
void loadTilesSync(QList<Tile> &list);
|
||||
void loadTilesAsync(QVector<Tile> &list);
|
||||
void loadTilesSync(QVector<Tile> &list);
|
||||
void clearCache();
|
||||
|
||||
signals:
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QRectF>
|
||||
#include "common/range.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/kv.h"
|
||||
#include "projection.h"
|
||||
#include "downloader.h"
|
||||
#include "coordinatesystem.h"
|
||||
@ -18,9 +19,8 @@ public:
|
||||
{
|
||||
public:
|
||||
Setup(const QString &url, const QString &layer, const QString &style,
|
||||
const QString &format, const QString &crs,
|
||||
const CoordinateSystem &cs,
|
||||
const QList<QPair<QString, QString> > &dimensions,
|
||||
const QString &format, const QString &crs, const CoordinateSystem &cs,
|
||||
const QList<KV> &dimensions,
|
||||
const Authorization &authorization = Authorization())
|
||||
: _url(url), _layer(layer), _style(style), _format(format),
|
||||
_crs(crs), _cs(cs), _dimensions(dimensions),
|
||||
@ -33,8 +33,7 @@ public:
|
||||
const QString &format() const {return _format;}
|
||||
const QString &crs() const {return _crs;}
|
||||
const CoordinateSystem &coordinateSystem() const {return _cs;}
|
||||
const QList<QPair<QString, QString> > &dimensions() const
|
||||
{return _dimensions;}
|
||||
const QList<KV> &dimensions() const {return _dimensions;}
|
||||
|
||||
private:
|
||||
QString _url;
|
||||
@ -43,7 +42,7 @@ public:
|
||||
QString _format;
|
||||
QString _crs;
|
||||
CoordinateSystem _cs;
|
||||
QList<QPair<QString, QString> > _dimensions;
|
||||
QList<KV> _dimensions;
|
||||
Authorization _authorization;
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <QtCore>
|
||||
#include <QDir>
|
||||
#include <QPainter>
|
||||
#include "common/wgs84.h"
|
||||
@ -32,8 +33,8 @@ QString WMSMap::tileUrl(const QString &version) const
|
||||
url.append(QString("&SRS=%1").arg(_setup.crs()));
|
||||
|
||||
for (int i = 0; i < _setup.dimensions().size(); i++) {
|
||||
const QPair<QString, QString> &dim = _setup.dimensions().at(i);
|
||||
url.append(QString("&%1=%2").arg(dim.first, dim.second));
|
||||
const KV &dim = _setup.dimensions().at(i);
|
||||
url.append(QString("&%1=%2").arg(dim.key(), dim.value()));
|
||||
}
|
||||
|
||||
return url;
|
||||
@ -50,9 +51,9 @@ void WMSMap::computeZooms(const RangeF &scaleDenominator)
|
||||
|
||||
if (scaleDenominator.size() > 0) {
|
||||
double ld = log2(scaleDenominator.max()) - log2(scaleDenominator.min());
|
||||
int cld = ceil(ld);
|
||||
double step = ld / (qreal)cld;
|
||||
qreal lmax = log2(scaleDenominator.max());
|
||||
int cld = (int)ceil(ld);
|
||||
double step = ld / (double)cld;
|
||||
double lmax = log2(scaleDenominator.max());
|
||||
for (int i = 0; i <= cld; i++)
|
||||
_zooms.append(pow(2.0, lmax - i * step));
|
||||
} else
|
||||
@ -105,13 +106,7 @@ WMSMap::WMSMap(const QString &name, const WMS::Setup &setup, QObject *parent)
|
||||
: Map(parent), _name(name), _setup(setup), _tileLoader(0), _zoom(0),
|
||||
_ratio(1.0), _valid(false)
|
||||
{
|
||||
if (!QDir().mkpath(tilesDir())) {
|
||||
_errorString = "Error creating tiles dir";
|
||||
return;
|
||||
}
|
||||
|
||||
_tileLoader = new TileLoader(this);
|
||||
_tileLoader->setDir(tilesDir());
|
||||
_tileLoader = new TileLoader(tilesDir(), this);
|
||||
_tileLoader->setAuthorization(_setup.authorization());
|
||||
connect(_tileLoader, SIGNAL(finished()), this, SIGNAL(loaded()));
|
||||
|
||||
@ -124,7 +119,7 @@ void WMSMap::clearCache()
|
||||
_zoom = 0;
|
||||
|
||||
if (!loadWMS())
|
||||
qWarning("%s: %s\n", qPrintable(_name), qPrintable(_errorString));
|
||||
qWarning("%s: %s", qPrintable(_name), qPrintable(_errorString));
|
||||
}
|
||||
|
||||
QRectF WMSMap::bounds()
|
||||
@ -194,12 +189,13 @@ qreal WMSMap::tileSize() const
|
||||
|
||||
void WMSMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
{
|
||||
QPoint tl = QPoint((int)floor(rect.left() / tileSize()),
|
||||
(int)floor(rect.top() / tileSize()));
|
||||
QPoint br = QPoint((int)ceil(rect.right() / tileSize()),
|
||||
(int)ceil(rect.bottom() / tileSize()));
|
||||
QPoint tl = QPoint(qFloor(rect.left() / tileSize()),
|
||||
qFloor(rect.top() / tileSize()));
|
||||
QPoint br = QPoint(qCeil(rect.right() / tileSize()),
|
||||
qCeil(rect.bottom() / tileSize()));
|
||||
|
||||
QList<Tile> tiles;
|
||||
QVector<Tile> tiles;
|
||||
tiles.reserve((br.x() - tl.x()) * (br.y() - tl.y()));
|
||||
for (int i = tl.x(); i < br.x(); i++) {
|
||||
for (int j = tl.y(); j < br.y(); j++) {
|
||||
PointD ttl(_transform.img2proj(QPointF(i * TILE_SIZE,
|
||||
|
@ -318,8 +318,8 @@ WMTS::WMTS(const QString &file, const WMTS::Setup &setup) : _valid(false)
|
||||
setup.url().contains('?') ? "&" : "?" , setup.format(),
|
||||
setup.layer(), style, setup.set());
|
||||
for (int i = 0; i < setup.dimensions().size(); i++) {
|
||||
const QPair<QString, QString> &dim = setup.dimensions().at(i);
|
||||
_tileUrl.append(QString("&%1=%2").arg(dim.first, dim.second));
|
||||
const KV &dim = setup.dimensions().at(i);
|
||||
_tileUrl.append(QString("&%1=%2").arg(dim.key(), dim.value()));
|
||||
}
|
||||
} else {
|
||||
_tileUrl.replace("{Style}", style, Qt::CaseInsensitive);
|
||||
@ -328,8 +328,8 @@ WMTS::WMTS(const QString &file, const WMTS::Setup &setup) : _valid(false)
|
||||
_tileUrl.replace("{TileRow}", "$y", Qt::CaseInsensitive);
|
||||
_tileUrl.replace("{TileCol}", "$x", Qt::CaseInsensitive);
|
||||
for (int i = 0; i < setup.dimensions().size(); i++) {
|
||||
const QPair<QString, QString> &dim = setup.dimensions().at(i);
|
||||
_tileUrl.replace(QString("{%1}").arg(dim.first), dim.second,
|
||||
const KV &dim = setup.dimensions().at(i);
|
||||
_tileUrl.replace(QString("{%1}").arg(dim.key()), dim.value(),
|
||||
Qt::CaseInsensitive);
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <QList>
|
||||
#include <QHash>
|
||||
#include "common/rectc.h"
|
||||
#include "common/kv.h"
|
||||
#include "projection.h"
|
||||
#include "downloader.h"
|
||||
#include "coordinatesystem.h"
|
||||
@ -21,8 +22,7 @@ public:
|
||||
public:
|
||||
Setup(const QString &url, const QString &layer, const QString &set,
|
||||
const QString &style, const QString &format, bool rest,
|
||||
const CoordinateSystem &cs,
|
||||
const QList<QPair<QString, QString> > &dimensions,
|
||||
const CoordinateSystem &cs, const QList<KV> &dimensions,
|
||||
const Authorization &authorization = Authorization())
|
||||
: _url(url), _layer(layer), _set(set), _style(style),
|
||||
_format(format), _rest(rest), _cs(cs), _dimensions(dimensions),
|
||||
@ -36,8 +36,7 @@ public:
|
||||
const QString &format() const {return _format;}
|
||||
bool rest() const {return _rest;}
|
||||
const CoordinateSystem &coordinateSystem() const {return _cs;}
|
||||
const QList<QPair<QString, QString> > &dimensions() const
|
||||
{return _dimensions;}
|
||||
const QList<KV> &dimensions() const {return _dimensions;}
|
||||
|
||||
private:
|
||||
QString _url;
|
||||
@ -47,7 +46,7 @@ public:
|
||||
QString _format;
|
||||
bool _rest;
|
||||
CoordinateSystem _cs;
|
||||
QList<QPair<QString, QString> > _dimensions;
|
||||
QList<KV> _dimensions;
|
||||
Authorization _authorization;
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <QtCore>
|
||||
#include <QPainter>
|
||||
#include "common/rectc.h"
|
||||
#include "common/wgs84.h"
|
||||
@ -39,13 +40,7 @@ WMTSMap::WMTSMap(const QString &name, const WMTS::Setup &setup, qreal tileRatio,
|
||||
QObject *parent) : Map(parent), _name(name), _setup(setup), _tileLoader(0),
|
||||
_zoom(0), _deviceRatio(1.0), _tileRatio(tileRatio), _valid(false)
|
||||
{
|
||||
if (!QDir().mkpath(tilesDir())) {
|
||||
_errorString = "Error creating tiles dir";
|
||||
return;
|
||||
}
|
||||
|
||||
_tileLoader = new TileLoader(this);
|
||||
_tileLoader->setDir(tilesDir());
|
||||
_tileLoader = new TileLoader(tilesDir(), this);
|
||||
_tileLoader->setAuthorization(_setup.authorization());
|
||||
connect(_tileLoader, SIGNAL(finished()), this, SIGNAL(loaded()));
|
||||
|
||||
@ -58,7 +53,7 @@ void WMTSMap::clearCache()
|
||||
_zoom = 0;
|
||||
|
||||
if (!loadWMTS())
|
||||
qWarning("%s: %s\n", qPrintable(_name), qPrintable(_errorString));
|
||||
qWarning("%s: %s", qPrintable(_name), qPrintable(_errorString));
|
||||
}
|
||||
|
||||
QString WMTSMap::tilesDir() const
|
||||
@ -174,12 +169,13 @@ void WMTSMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
||||
const WMTS::Zoom &z = _zooms.at(_zoom);
|
||||
QSizeF ts(tileSize(z));
|
||||
|
||||
QPoint tl = QPoint((int)floor(rect.left() / ts.width()),
|
||||
(int)floor(rect.top() / ts.height()));
|
||||
QPoint br = QPoint((int)ceil(rect.right() / ts.width()),
|
||||
(int)ceil(rect.bottom() / ts.height()));
|
||||
QPoint tl = QPoint(qFloor(rect.left() / ts.width()),
|
||||
qFloor(rect.top() / ts.height()));
|
||||
QPoint br = QPoint(qCeil(rect.right() / ts.width()),
|
||||
qCeil(rect.bottom() / ts.height()));
|
||||
|
||||
QList<Tile> tiles;
|
||||
QVector<Tile> tiles;
|
||||
tiles.reserve((br.x() - tl.x()) * (br.y() - tl.y()));
|
||||
for (int i = tl.x(); i < br.x(); i++)
|
||||
for (int j = tl.y(); j < br.y(); j++)
|
||||
tiles.append(Tile(QPoint(i, j), z.id()));
|
||||
|
Reference in New Issue
Block a user