Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
86f5da9355 | |||
3587d29cb6 | |||
beb93bcd1f | |||
dd911a95b0 | |||
1fc644e1d6 | |||
dc628c9554 | |||
ec3eccd580 | |||
a3d22dcd2a | |||
c13d7ae51d | |||
e4085cc25a | |||
8a13355740 | |||
8f799e1bcf | |||
5cd0a3a8b0 | |||
283197612b | |||
2d0ac129ce | |||
499869119a | |||
fdcc431a4e | |||
38a4a4c32b | |||
6efd8e7fd1 | |||
5b3c448582 | |||
054ae32689 | |||
0594774570 | |||
e11d6d280d | |||
897de9920e | |||
82923a4529 | |||
4daa9fd55c | |||
3270625172 | |||
d70c4fefd5 | |||
c364121288 | |||
62eb5a09ae | |||
d0438b3ee8 | |||
5b83f1b86b | |||
241ecb36f2 | |||
f5b9f6e392 | |||
d04775d58e | |||
68644aa25d | |||
acbf72a983 |
@ -1,4 +1,4 @@
|
||||
version: 7.5.{build}
|
||||
version: 7.6.{build}
|
||||
configuration: Release
|
||||
platform: Any CPU
|
||||
environment:
|
||||
|
@ -2,7 +2,7 @@
|
||||
GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common GPS log file formats.
|
||||
|
||||
## Features
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT) and Garmin CSV files.
|
||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin CSV and geotagged JPEG files.
|
||||
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
|
||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin JNX maps, TwoNav RMaps, GeoTIFF images).
|
||||
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
||||
|
33
gpxsee.pro
@ -3,7 +3,7 @@ unix:!macx {
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 7.5
|
||||
VERSION = 7.6
|
||||
|
||||
QT += core \
|
||||
gui \
|
||||
@ -84,6 +84,9 @@ HEADERS += src/common/config.h \
|
||||
src/GUI/mapview.h \
|
||||
src/GUI/font.h \
|
||||
src/GUI/areaitem.h \
|
||||
src/map/IMG/bitmapline.h \
|
||||
src/map/IMG/textpathitem.h \
|
||||
src/map/IMG/textpointitem.h \
|
||||
src/map/projection.h \
|
||||
src/map/ellipsoid.h \
|
||||
src/map/datum.h \
|
||||
@ -163,7 +166,18 @@ HEADERS += src/common/config.h \
|
||||
src/map/calibrationpoint.h \
|
||||
src/map/color.h \
|
||||
src/data/exifparser.h \
|
||||
src/data/imageinfo.h
|
||||
src/data/imageinfo.h \
|
||||
src/map/imgmap.h \
|
||||
src/map/IMG/img.h \
|
||||
src/map/IMG/subfile.h \
|
||||
src/map/IMG/trefile.h \
|
||||
src/map/IMG/rgnfile.h \
|
||||
src/map/IMG/lblfile.h \
|
||||
src/map/IMG/vectortile.h \
|
||||
src/map/IMG/subdiv.h \
|
||||
src/map/IMG/units.h \
|
||||
src/map/IMG/style.h \
|
||||
src/map/IMG/netfile.h
|
||||
SOURCES += src/main.cpp \
|
||||
src/common/coordinates.cpp \
|
||||
src/common/rectc.cpp \
|
||||
@ -215,6 +229,9 @@ SOURCES += src/main.cpp \
|
||||
src/GUI/gearratiographitem.cpp \
|
||||
src/GUI/mapview.cpp \
|
||||
src/GUI/areaitem.cpp \
|
||||
src/map/IMG/bitmapline.cpp \
|
||||
src/map/IMG/textpathitem.cpp \
|
||||
src/map/IMG/textpointitem.cpp \
|
||||
src/map/maplist.cpp \
|
||||
src/map/onlinemap.cpp \
|
||||
src/map/downloader.cpp \
|
||||
@ -280,7 +297,16 @@ SOURCES += src/main.cpp \
|
||||
src/map/obliquestereographic.cpp \
|
||||
src/GUI/coordinatesitem.cpp \
|
||||
src/map/rmap.cpp \
|
||||
src/data/exifparser.cpp
|
||||
src/data/exifparser.cpp \
|
||||
src/map/imgmap.cpp \
|
||||
src/map/IMG/img.cpp \
|
||||
src/map/IMG/subfile.cpp \
|
||||
src/map/IMG/trefile.cpp \
|
||||
src/map/IMG/rgnfile.cpp \
|
||||
src/map/IMG/lblfile.cpp \
|
||||
src/map/IMG/vectortile.cpp \
|
||||
src/map/IMG/style.cpp \
|
||||
src/map/IMG/netfile.cpp
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
HEADERS += src/data/geojsonparser.h
|
||||
@ -362,6 +388,7 @@ win32 {
|
||||
|
||||
unix:!macx {
|
||||
isEmpty(PREFIX):PREFIX = /usr/local
|
||||
lessThan(QT_MAJOR_VERSION, 5) {DEFINES += PREFIX=\\\"$$PREFIX\\\"}
|
||||
|
||||
maps.files = pkg/maps/*
|
||||
maps.path = $$PREFIX/share/gpxsee/maps
|
||||
|
84
gpxsee.qrc
@ -1,46 +1,46 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>icons/dialog-close.png</file>
|
||||
<file>icons/dialog-close@2x.png</file>
|
||||
<file>icons/document-open.png</file>
|
||||
<file>icons/document-open@2x.png</file>
|
||||
<file>icons/document-print.png</file>
|
||||
<file>icons/document-print@2x.png</file>
|
||||
<file>icons/document-export.png</file>
|
||||
<file>icons/document-export@2x.png</file>
|
||||
<file>icons/flag.png</file>
|
||||
<file>icons/flag@2x.png</file>
|
||||
<file>icons/gpxsee.png</file>
|
||||
<file>icons/gpxsee@2x.png</file>
|
||||
<file>icons/application-exit.png</file>
|
||||
<file>icons/application-exit@2x.png</file>
|
||||
<file>icons/applications-internet.png</file>
|
||||
<file>icons/applications-internet@2x.png</file>
|
||||
<file>icons/view-refresh.png</file>
|
||||
<file>icons/view-refresh@2x.png</file>
|
||||
<file>icons/arrow-left.png</file>
|
||||
<file>icons/arrow-left@2x.png</file>
|
||||
<file>icons/arrow-right.png</file>
|
||||
<file>icons/arrow-right@2x.png</file>
|
||||
<file>icons/arrow-left-double.png</file>
|
||||
<file>icons/arrow-left-double@2x.png</file>
|
||||
<file>icons/arrow-right-double.png</file>
|
||||
<file>icons/arrow-right-double@2x.png</file>
|
||||
<file>icons/view-fullscreen.png</file>
|
||||
<file>icons/view-fullscreen@2x.png</file>
|
||||
<file>icons/office-chart-line.png</file>
|
||||
<file>icons/office-chart-line@2x.png</file>
|
||||
<file>icons/format-stroke-color.png</file>
|
||||
<file>icons/format-stroke-color@2x.png</file>
|
||||
<file>icons/flag_32.png</file>
|
||||
<file>icons/flag_32@2x.png</file>
|
||||
<file>icons/preferences-system.png</file>
|
||||
<file>icons/preferences-system@2x.png</file>
|
||||
<file>icons/document-print_32.png</file>
|
||||
<file>icons/document-print_32@2x.png</file>
|
||||
<file>icons/view-filter.png</file>
|
||||
<file>icons/view-filter@2x.png</file>
|
||||
<file>icons/applications-internet_32.png</file>
|
||||
<file>icons/applications-internet_32@2x.png</file>
|
||||
<file alias="gpxsee.png">icons/gpxsee.png</file>
|
||||
<file alias="gpxsee@2x.png">icons/gpxsee@2x.png</file>
|
||||
<file alias="dialog-close.png">icons/GUI/dialog-close.png</file>
|
||||
<file alias="dialog-close@2x.png">icons/GUI/dialog-close@2x.png</file>
|
||||
<file alias="document-open.png">icons/GUI/document-open.png</file>
|
||||
<file alias="document-open@2x.png">icons/GUI/document-open@2x.png</file>
|
||||
<file alias="document-print.png">icons/GUI/document-print.png</file>
|
||||
<file alias="document-print@2x.png">icons/GUI/document-print@2x.png</file>
|
||||
<file alias="document-export.png">icons/GUI/document-export.png</file>
|
||||
<file alias="document-export@2x.png">icons/GUI/document-export@2x.png</file>
|
||||
<file alias="flag.png">icons/GUI/flag.png</file>
|
||||
<file alias="flag@2x.png">icons/GUI/flag@2x.png</file>
|
||||
<file alias="application-exit.png">icons/GUI/application-exit.png</file>
|
||||
<file alias="application-exit@2x.png">icons/GUI/application-exit@2x.png</file>
|
||||
<file alias="applications-internet.png">icons/GUI/applications-internet.png</file>
|
||||
<file alias="applications-internet@2x.png">icons/GUI/applications-internet@2x.png</file>
|
||||
<file alias="view-refresh.png">icons/GUI/view-refresh.png</file>
|
||||
<file alias="view-refresh@2x.png">icons/GUI/view-refresh@2x.png</file>
|
||||
<file alias="arrow-left.png">icons/GUI/arrow-left.png</file>
|
||||
<file alias="arrow-left@2x.png">icons/GUI/arrow-left@2x.png</file>
|
||||
<file alias="arrow-right.png">icons/GUI/arrow-right.png</file>
|
||||
<file alias="arrow-right@2x.png">icons/GUI/arrow-right@2x.png</file>
|
||||
<file alias="arrow-left-double.png">icons/GUI/arrow-left-double.png</file>
|
||||
<file alias="arrow-left-double@2x.png">icons/GUI/arrow-left-double@2x.png</file>
|
||||
<file alias="arrow-right-double.png">icons/GUI/arrow-right-double.png</file>
|
||||
<file alias="arrow-right-double@2x.png">icons/GUI/arrow-right-double@2x.png</file>
|
||||
<file alias="view-fullscreen.png">icons/GUI/view-fullscreen.png</file>
|
||||
<file alias="view-fullscreen@2x.png">icons/GUI/view-fullscreen@2x.png</file>
|
||||
<file alias="office-chart-line.png">icons/GUI/office-chart-line.png</file>
|
||||
<file alias="office-chart-line@2x.png">icons/GUI/office-chart-line@2x.png</file>
|
||||
<file alias="format-stroke-color.png">icons/GUI/format-stroke-color.png</file>
|
||||
<file alias="format-stroke-color@2x.png">icons/GUI/format-stroke-color@2x.png</file>
|
||||
<file alias="flag_32.png">icons/GUI/flag_32.png</file>
|
||||
<file alias="flag_32@2x.png">icons/GUI/flag_32@2x.png</file>
|
||||
<file alias="preferences-system.png">icons/GUI/preferences-system.png</file>
|
||||
<file alias="preferences-system@2x.png">icons/GUI/preferences-system@2x.png</file>
|
||||
<file alias="document-print_32.png">icons/GUI/document-print_32.png</file>
|
||||
<file alias="document-print_32@2x.png">icons/GUI/document-print_32@2x.png</file>
|
||||
<file alias="view-filter.png">icons/GUI/view-filter.png</file>
|
||||
<file alias="view-filter@2x.png">icons/GUI/view-filter@2x.png</file>
|
||||
<file alias="applications-internet_32.png">icons/GUI/applications-internet_32.png</file>
|
||||
<file alias="applications-internet_32@2x.png">icons/GUI/applications-internet_32@2x.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 926 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 924 B After Width: | Height: | Size: 924 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 865 B After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
169
icons/GUI/licence.txt
Normal file
@ -0,0 +1,169 @@
|
||||
The GUI icons are Oxygen icons from the KDE project (http://www.kde.org)
|
||||
licensed under LGPLv3.
|
||||
|
||||
-----
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 728 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 381 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Podporované soubory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>Soubory CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>Soubory FIT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>Soubory GeoJSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>Soubory GPX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>Soubory IGC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>Obrázky JPEG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>Soubory KML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>Soubory LOC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>Soubory NMEA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>Soubory OziExploreru</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>Soubory TCX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>Soubory SLF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Všechny soubory</translation>
|
||||
</message>
|
||||
@ -991,42 +991,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Podporované soubory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles mapy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX mapy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation>Garmin IMG mapy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer mapy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy mapy/atlasy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF obrázky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav mapy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Online mapové zdroje</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Understøttede filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle filer</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Understøttede filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX-kort</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer-kort</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy kort/atlas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF billeder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation type="unfinished">Online-kort kilder</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Unterstützte Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG Bilder</translation>
|
||||
<translation>JPEG-Bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF-Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle Dateien</translation>
|
||||
</message>
|
||||
@ -194,7 +194,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="135"/>
|
||||
<source>Export to PDF</source>
|
||||
<translation>PDF Export</translation>
|
||||
<translation>In PDF exportieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="52"/>
|
||||
@ -214,12 +214,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="99"/>
|
||||
<source>Orientation:</source>
|
||||
<translation>Orientierung:</translation>
|
||||
<translation>Ausrichtung:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="94"/>
|
||||
<source>Page Setup</source>
|
||||
<translation>Seiten Setup</translation>
|
||||
<translation>Seite einrichten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="25"/>
|
||||
@ -281,12 +281,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="152"/>
|
||||
<source>%1 is a directory.</source>
|
||||
<translation>%1 ist ein Verzeichniss.</translation>
|
||||
<translation>%1 ist ein Verzeichnis.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/exportdialog.cpp" line="157"/>
|
||||
<source>%1 is not writable.</source>
|
||||
<translation>%1 ist nich schreibbar.</translation>
|
||||
<translation>%1 ist nicht beschreibbar.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -294,7 +294,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/fileselectwidget.cpp" line="38"/>
|
||||
<source>Select file</source>
|
||||
<translation>Datei Auswählen</translation>
|
||||
<translation>Datei auswählen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -348,7 +348,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="844"/>
|
||||
<source>Open POI file</source>
|
||||
<translation>POI Datei öffnen</translation>
|
||||
<translation>POI-Datei öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="200"/>
|
||||
@ -370,7 +370,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="242"/>
|
||||
<source>Reload</source>
|
||||
<translation>Neu Laden</translation>
|
||||
<translation>Neu laden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="588"/>
|
||||
@ -390,7 +390,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="265"/>
|
||||
<source>Overlap POIs</source>
|
||||
<translation>POI überlappen</translation>
|
||||
<translation>POIs überlappen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="270"/>
|
||||
@ -415,7 +415,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="218"/>
|
||||
<source>Open...</source>
|
||||
<translation>Öffnen...</translation>
|
||||
<translation>Öffnen …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="207"/>
|
||||
@ -427,17 +427,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="249"/>
|
||||
<source>Statistics...</source>
|
||||
<translation>Statistiken...</translation>
|
||||
<translation>Statistiken …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="257"/>
|
||||
<source>Load POI file...</source>
|
||||
<translation>POI-Datei laden...</translation>
|
||||
<translation>POI-Datei laden …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="293"/>
|
||||
<source>Load map...</source>
|
||||
<translation>Karte laden...</translation>
|
||||
<translation>Karte laden …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="302"/>
|
||||
@ -474,7 +474,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="343"/>
|
||||
<source>Waypoint labels</source>
|
||||
<translation>Wegpunkt Labels</translation>
|
||||
<translation>Wegpunkt-Labels</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="355"/>
|
||||
@ -551,7 +551,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="463"/>
|
||||
<source>Options...</source>
|
||||
<translation>Einstellungen...</translation>
|
||||
<translation>Einstellungen …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="469"/>
|
||||
@ -601,7 +601,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="665"/>
|
||||
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at %1.</source>
|
||||
<translation>GPXSee wird unter der GNU General Public License version 3 vertrieben. Mehr Informationen zu GPXSee auf der Homepage %1.</translation>
|
||||
<translation>GPXSee wird unter der GNU General Public License version 3 veröffentlicht. Mehr Informationen zu GPXSee auf der Homepage %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="692"/>
|
||||
@ -673,12 +673,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1309"/>
|
||||
<source>Open map file</source>
|
||||
<translation>Karte Datei öffnen</translation>
|
||||
<translation>Kartendatei öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1332"/>
|
||||
<source>Error loading map:</source>
|
||||
<translation>Fehler beim Laden der Karte-Datei:</translation>
|
||||
<translation>Fehler beim Laden der Kartendatei:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1343"/>
|
||||
@ -715,12 +715,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="223"/>
|
||||
<source>Print...</source>
|
||||
<translation>Drucken...</translation>
|
||||
<translation>Drucken …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="230"/>
|
||||
<source>Export to PDF...</source>
|
||||
<translation>Als PDF exportieren...</translation>
|
||||
<translation>Als PDF exportieren …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1029"/>
|
||||
@ -736,7 +736,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="348"/>
|
||||
<source>Route waypoints</source>
|
||||
<translation>Routen Wegpunkte</translation>
|
||||
<translation>Routen-Wegpunkte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="489"/>
|
||||
@ -791,7 +791,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="833"/>
|
||||
<source>Error loading data file:</source>
|
||||
<translation>Fehler beim Laden der Datei:</translation>
|
||||
<translation>Fehler beim Laden der Datendatei:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="836"/>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Unterstützte Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer Karten</translation>
|
||||
<translation>MBTiles-Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy Karten/Atlanten</translation>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX-Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation>Garmin IMG-Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF Bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav Karten</translation>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer-Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy-Karten/Atlanten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF-Bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav-Karten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Online-Kartenquellen</translation>
|
||||
</message>
|
||||
@ -1106,7 +1111,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="266"/>
|
||||
<source>Map opacity:</source>
|
||||
<translation>Karte Deckkraft:</translation>
|
||||
<translation>Kartendeckkraft:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="279"/>
|
||||
@ -1256,7 +1261,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="315"/>
|
||||
<source>Eliminate GPS outliers</source>
|
||||
<translation>GPS Ausreißer entfernen</translation>
|
||||
<translation>GPS-Ausreißer entfernen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="324"/>
|
||||
@ -1349,17 +1354,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="139"/>
|
||||
<source>Area border width:</source>
|
||||
<translation>Flächen Randbreite:</translation>
|
||||
<translation>Flächen-Randbreite:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="140"/>
|
||||
<source>Area border style:</source>
|
||||
<translation>Flächen Randstil:</translation>
|
||||
<translation>Flächen-Randstil:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="141"/>
|
||||
<source>Area fill opacity:</source>
|
||||
<translation>Flächen Deckkraft:</translation>
|
||||
<translation>Flächendeckkraft:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="145"/>
|
||||
@ -1405,7 +1410,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="473"/>
|
||||
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
|
||||
<translation>Der Druckbereich ist circa der Anzeigebereich. Das Karten-Zoom ändert sich nicht.</translation>
|
||||
<translation>Der Druckbereich entspricht ungefähr dem Anzeigebereich. Das Karten-Zoom ändert sich nicht.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="475"/>
|
||||
@ -1475,7 +1480,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="561"/>
|
||||
<source>Image cache size:</source>
|
||||
<translation>Bild-Cache größe:</translation>
|
||||
<translation>Bild-Cachegröße:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="562"/>
|
||||
@ -1506,7 +1511,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="601"/>
|
||||
<source>Print & Export</source>
|
||||
<translation>Druck & Export</translation>
|
||||
<translation>Druck / Export</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="630"/>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formatos soportados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>Archivos CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>Archivos FIT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>Archivos GeoJSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>Archivos GPX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>Archivos IGC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>Imagen JPEG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>Archivos KML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>Archivos LOC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>Archivos NMEA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>Archivos OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>Archivos SLF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>Archivos TCX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Todos los archivos</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formatos soportados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>Mapas MBTiles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Mapas Garmin JNX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>Mapas OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>Mapas/atlas TrekBuddy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>Imagenes GeoTIFF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>Mapas TwoNav</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Mapas Online</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Tuetut tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG-kuvat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF-tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Kaikki tiedostot</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Tuetut tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles-kartat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX -kartat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer-kartat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy-kartat/kartastot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF -kuvat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav-kartat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Online-karttojen lähteet</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formats pris en charge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>Données CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>Données FIT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>Données GeoJSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>Données GPX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>Données IGC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>Images JPEG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>Données KML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>Données LOC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>Données NMEA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>Données OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>Données TCX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>Données SLF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Tous les fichiers</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formats pris en charge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>Cartes MBTiles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Cartes Garmin JNX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>Cartes OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>Cartes ou atlas TrekBuddy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>Images GeoTIFF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>Cartes TwoNav</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Cartes en ligne</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Støttede filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG-bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle filer</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Støttede filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles-kart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX-kart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation>Garming IMG-kart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer-kart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy kart/atlas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF-bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav-kart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Nettbaserte kartkilder</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Obsługiwane pliki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>Pliki CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>Pliki FIT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>Pliki GPX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>Pliki IGC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>Pliki KML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>Pliki LOC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>Pliki NMEA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>Pliki OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>Pliki TCX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>Pliki SLF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Wszystkie pliki</translation>
|
||||
</message>
|
||||
@ -991,42 +991,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Obsługiwane pliki</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>Mapy MBTiles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Mapy Garmin JNX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>Mapy OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>Mapy/atlasy TrekBuddy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>Obrazy GeoTIFF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Źródła map online</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formatos suportados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>Arquivos CSV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>Arquivos FIT</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>Arquivos GeoJSON</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>Arquivos GPX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>Arquivos IGC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>Imagens JPEG</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>Arquivos KML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>Arquivos LOC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>Arquivos NMEA</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>Arquivos OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>Arquivos SLF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>Arquivos TCX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Todos os arquivos</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Formatos suportados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>Mapas MBTiles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Mapas Garmin JNX</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>Mapas OziExplorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>Mapas/Atlas TrekBuddy</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>Imagens GeoTIFF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>Mapas TwoNav</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Mapas online</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Все поддерживаемые файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG изображения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Все файлы</translation>
|
||||
</message>
|
||||
@ -991,42 +991,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Все поддерживаемые файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles карты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX карты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer карты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy карты/атласы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF изображения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav карты</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Источники онлайн карт</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Filer som stöds</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG-bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF-filer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Alla filer</translation>
|
||||
</message>
|
||||
@ -990,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Filer som stöds</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles-kartor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX-kartor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation>Garmin IMG-kartor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer-kartor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy-kartor/-atlaser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF-bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav-kartor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Online-kartkällor</translation>
|
||||
</message>
|
||||
|
@ -47,72 +47,72 @@
|
||||
<context>
|
||||
<name>Data</name>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="147"/>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Desteklenen dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="148"/>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<source>CSV files</source>
|
||||
<translation>CSV dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="149"/>
|
||||
<location filename="../src/data/data.cpp" line="150"/>
|
||||
<source>FIT files</source>
|
||||
<translation>FIT dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="151"/>
|
||||
<location filename="../src/data/data.cpp" line="152"/>
|
||||
<source>GeoJSON files</source>
|
||||
<translation>GeoJSON dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="153"/>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<source>GPX files</source>
|
||||
<translation>GPX dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="154"/>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<source>IGC files</source>
|
||||
<translation>IGC dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="155"/>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<source>JPEG images</source>
|
||||
<translation>JPEG resimler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="156"/>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<source>KML files</source>
|
||||
<translation>KML dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="157"/>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<source>LOC files</source>
|
||||
<translation>LOC dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="158"/>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<source>NMEA files</source>
|
||||
<translation>NMEA dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="159"/>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<source>OziExplorer files</source>
|
||||
<translation>OziExplorer dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="160"/>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<source>SLF files</source>
|
||||
<translation>SLF dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="161"/>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<source>TCX files</source>
|
||||
<translation>TCX dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="162"/>
|
||||
<location filename="../src/data/data.cpp" line="163"/>
|
||||
<source>All files</source>
|
||||
<translation>Tüm dosyalar</translation>
|
||||
</message>
|
||||
@ -838,6 +838,7 @@
|
||||
<source>%n files</source>
|
||||
<translation>
|
||||
<numerusform>%n dosya</numerusform>
|
||||
<numerusform>%n dosya</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
@ -989,42 +990,47 @@
|
||||
<context>
|
||||
<name>MapList</name>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="119"/>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<source>Supported files</source>
|
||||
<translation>Desteklenen dosyalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="121"/>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<source>MBTiles maps</source>
|
||||
<translation>MBTiles haritalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="122"/>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<source>Garmin JNX maps</source>
|
||||
<translation>Garmin JNX haritalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||
<source>Garmin IMG maps</source>
|
||||
<translation>Garmin IMG haritaları</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<source>OziExplorer maps</source>
|
||||
<translation>OziExplorer haritalar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="124"/>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<source>TrekBuddy maps/atlases</source>
|
||||
<translation>TrekBuddy haritalar/atlaslar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||
<location filename="../src/map/maplist.cpp" line="128"/>
|
||||
<source>GeoTIFF images</source>
|
||||
<translation>GeoTIFF görüntü</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="126"/>
|
||||
<location filename="../src/map/maplist.cpp" line="129"/>
|
||||
<source>TwoNav maps</source>
|
||||
<translation>TwoNav haritaları</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="127"/>
|
||||
<location filename="../src/map/maplist.cpp" line="130"/>
|
||||
<source>Online map sources</source>
|
||||
<translation>Online harita kaynakları</translation>
|
||||
</message>
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "7.5"
|
||||
!define VERSION "7.6"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}.exe"
|
||||
|
@ -7,7 +7,7 @@
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "7.5"
|
||||
!define VERSION "7.6"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>4UMaps</name>
|
||||
<url>https://4umaps.com/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<bounds bottom="-65"/>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © 4UMaps.eu</copyright>
|
||||
</map>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0" type="WMTS">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3" type="WMTS">
|
||||
<name>Antarctica</name>
|
||||
<url type="REST">https://gis.ngdc.noaa.gov/arcgis/rest/services/antarctic/antarctic_basemap/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</url>
|
||||
<copyright>NOAA National Centers for Environmental Information (NCEI); International Bathymetric Chart of the Southern Ocean (IBCSO); General Bathymetric Chart of the Oceans (GEBCO); Natural Earth</copyright>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>Open Street Map</name>
|
||||
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL) | Rendering: © OpenStreetMap (CC-BY-SA)</copyright>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>Open Topo Map</name>
|
||||
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
|
||||
<zoom max="17"/>
|
||||
<copyright>Map data: © OpenStreetMap contributors (ODbL), SRTM | Rendering: © OpenTopoMap (CC-BY-SA)</copyright>
|
||||
</map>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>USGS Imagery</name>
|
||||
<url>https://basemap.nationalmap.gov/ArcGIS/rest/services/USGSImageryOnly/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<bounds bottom="0" top="74"/>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
</map>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<map xmlns="http://www.gpxsee.org/map/1.0">
|
||||
<map xmlns="http://www.gpxsee.org/map/1.3">
|
||||
<name>USGS Topo</name>
|
||||
<url>https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/$z/$y/$x</url>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
<zoom min="2" max="15"/>
|
||||
<copyright>Map services and data available from U.S. Geological Survey, National Geospatial Program.</copyright>
|
||||
</map>
|
||||
|
@ -51,7 +51,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
"QThreadStorage: Thread X exited after QThreadStorage Y destroyed" */
|
||||
Downloader::setNetworkManager(new QNetworkAccessManager(this));
|
||||
DEM::setDir(ProgramPaths::demDir());
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
OPENGL_SET_FORMAT(4, 8);
|
||||
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
@ -11,6 +11,10 @@ CoordinatesItem::CoordinatesItem(QGraphicsItem *parent) : QGraphicsItem(parent)
|
||||
_font.setPixelSize(FONT_SIZE);
|
||||
_font.setFamily(FONT_FAMILY);
|
||||
|
||||
_digitalZoom = 0;
|
||||
|
||||
setAcceptHoverEvents(true);
|
||||
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
@ -48,6 +52,12 @@ void CoordinatesItem::setFormat(const CoordinatesFormat &format)
|
||||
updateBoundingRect();
|
||||
}
|
||||
|
||||
void CoordinatesItem::setDigitalZoom(qreal zoom)
|
||||
{
|
||||
_digitalZoom = zoom;
|
||||
setScale(pow(2, -_digitalZoom));
|
||||
}
|
||||
|
||||
void CoordinatesItem::updateBoundingRect()
|
||||
{
|
||||
QFontMetrics fm(_font);
|
||||
|
@ -17,6 +17,7 @@ public:
|
||||
|
||||
void setCoordinates(const Coordinates &c);
|
||||
void setFormat(const CoordinatesFormat &format);
|
||||
void setDigitalZoom(qreal zoom);
|
||||
|
||||
private:
|
||||
void updateBoundingRect();
|
||||
@ -25,6 +26,7 @@ private:
|
||||
CoordinatesFormat _format;
|
||||
QRectF _boundingRect;
|
||||
QFont _font;
|
||||
qreal _digitalZoom;
|
||||
};
|
||||
|
||||
#endif // COORDINATESITEM_H
|
||||
|
@ -1,30 +1,30 @@
|
||||
#ifndef ICONS_H
|
||||
#define ICONS_H
|
||||
|
||||
#define APP_ICON ":/icons/gpxsee.png"
|
||||
#define APP_ICON ":/gpxsee.png"
|
||||
|
||||
// Toolbar/menu icons
|
||||
#define OPEN_FILE_ICON ":/icons/document-open.png"
|
||||
#define EXPORT_FILE_ICON ":/icons/document-export.png"
|
||||
#define PRINT_FILE_ICON ":/icons/document-print.png"
|
||||
#define CLOSE_FILE_ICON ":/icons/dialog-close.png"
|
||||
#define SHOW_POI_ICON ":/icons/flag.png"
|
||||
#define SHOW_MAP_ICON ":/icons/applications-internet.png"
|
||||
#define SHOW_GRAPHS_ICON ":/icons/office-chart-line.png"
|
||||
#define QUIT_ICON ":/icons/application-exit.png"
|
||||
#define RELOAD_FILE_ICON ":/icons/view-refresh.png"
|
||||
#define NEXT_FILE_ICON ":/icons/arrow-right.png"
|
||||
#define PREV_FILE_ICON ":/icons/arrow-left.png"
|
||||
#define LAST_FILE_ICON ":/icons/arrow-right-double.png"
|
||||
#define FIRST_FILE_ICON ":/icons/arrow-left-double.png"
|
||||
#define FULLSCREEN_ICON ":/icons/view-fullscreen.png"
|
||||
#define OPEN_FILE_ICON ":/document-open.png"
|
||||
#define EXPORT_FILE_ICON ":/document-export.png"
|
||||
#define PRINT_FILE_ICON ":/document-print.png"
|
||||
#define CLOSE_FILE_ICON ":/dialog-close.png"
|
||||
#define SHOW_POI_ICON ":/flag.png"
|
||||
#define SHOW_MAP_ICON ":/applications-internet.png"
|
||||
#define SHOW_GRAPHS_ICON ":/office-chart-line.png"
|
||||
#define QUIT_ICON ":/application-exit.png"
|
||||
#define RELOAD_FILE_ICON ":/view-refresh.png"
|
||||
#define NEXT_FILE_ICON ":/arrow-right.png"
|
||||
#define PREV_FILE_ICON ":/arrow-left.png"
|
||||
#define LAST_FILE_ICON ":/arrow-right-double.png"
|
||||
#define FIRST_FILE_ICON ":/arrow-left-double.png"
|
||||
#define FULLSCREEN_ICON ":/view-fullscreen.png"
|
||||
|
||||
// Options dialog icons
|
||||
#define APPEARANCE_ICON ":/icons/format-stroke-color.png"
|
||||
#define POI_ICON ":/icons/flag_32.png"
|
||||
#define SYSTEM_ICON ":/icons/preferences-system.png"
|
||||
#define PRINT_EXPORT_ICON ":/icons/document-print_32.png"
|
||||
#define DATA_ICON ":/icons/view-filter.png"
|
||||
#define MAPS_ICON ":/icons/applications-internet_32.png"
|
||||
#define APPEARANCE_ICON ":/format-stroke-color.png"
|
||||
#define POI_ICON ":/flag_32.png"
|
||||
#define SYSTEM_ICON ":/preferences-system.png"
|
||||
#define PRINT_EXPORT_ICON ":/document-print_32.png"
|
||||
#define DATA_ICON ":/view-filter.png"
|
||||
#define MAPS_ICON ":/applications-internet_32.png"
|
||||
|
||||
#endif /* ICONS_H */
|
||||
|
@ -39,7 +39,6 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
setRenderHint(QPainter::Antialiasing, true);
|
||||
setAcceptDrops(false);
|
||||
setMouseTracking(true);
|
||||
|
||||
_mapScale = new ScaleItem();
|
||||
_mapScale->setZValue(2.0);
|
||||
@ -476,6 +475,7 @@ void MapView::digitalZoom(int zoom)
|
||||
it.value()->setDigitalZoom(_digitalZoom);
|
||||
|
||||
_mapScale->setDigitalZoom(_digitalZoom);
|
||||
_coordinates->setDigitalZoom(_digitalZoom);
|
||||
}
|
||||
|
||||
void MapView::zoom(int zoom, const QPoint &pos)
|
||||
@ -751,6 +751,7 @@ void MapView::showPOILabels(bool show)
|
||||
void MapView::showCoordinates(bool show)
|
||||
{
|
||||
_coordinates->setVisible(show);
|
||||
setMouseTracking(show);
|
||||
}
|
||||
|
||||
void MapView::setPOIOverlap(bool overlap)
|
||||
|
@ -14,13 +14,15 @@
|
||||
#endif
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QGLFormat fmt; \
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QGLFormat::setDefaultFormat(fmt);}
|
||||
#else
|
||||
#define OPENGL_SET_SAMPLES(samples) \
|
||||
#define OPENGL_SET_FORMAT(samples, stencilBuffer) \
|
||||
{QSurfaceFormat fmt; \
|
||||
fmt.setSamples(samples);\
|
||||
fmt.setStencilBufferSize(stencilBuffer); \
|
||||
fmt.setSamples(samples); \
|
||||
QSurfaceFormat::setDefaultFormat(fmt);}
|
||||
#endif
|
||||
|
@ -14,4 +14,8 @@
|
||||
#define ENABLE_HIDPI
|
||||
#endif // QT >= 5.6
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#define ENABLE_GEOJSON
|
||||
#endif // QT >= 5.0
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
@ -31,7 +31,7 @@
|
||||
#else
|
||||
#define USER_DIR QDir::homePath() + QString("/.local/share/") \
|
||||
+ qApp->applicationName()
|
||||
#define GLOBAL_DIR QString("/usr/share/") + qApp->applicationName()
|
||||
#define GLOBAL_DIR QString(PREFIX "/share/") + qApp->applicationName()
|
||||
#endif
|
||||
|
||||
static QString dir(const QString &dirName, bool writable = false)
|
||||
|
@ -28,6 +28,11 @@ public:
|
||||
double left() const {return _tl.lon();}
|
||||
double right() const {return _br.lon();}
|
||||
|
||||
void setLeft(double val) {_tl.rlon() = val;}
|
||||
void setRight(double val) {_br.rlon() = val;}
|
||||
void setTop(double val) {_tl.rlat() = val;}
|
||||
void setBottom(double val) {_br.rlat() = val;}
|
||||
|
||||
RectC operator|(const RectC &r) const;
|
||||
RectC &operator|=(const RectC &r) {*this = *this | r; return *this;}
|
||||
RectC operator&(const RectC &r) const;
|
||||
@ -35,6 +40,13 @@ public:
|
||||
|
||||
RectC united(const Coordinates &c) const;
|
||||
|
||||
bool intersects(const RectC &r) const
|
||||
{return (right() >= r.left() && bottom() <= r.top() && left() <= r.right()
|
||||
&& top() >= r.bottom());}
|
||||
bool contains(const Coordinates&c) const
|
||||
{return (c.lon() >= left() && c.lon() <= right() && c.lat() <= top()
|
||||
&& c.lat() >= bottom());}
|
||||
|
||||
private:
|
||||
Coordinates _tl, _br;
|
||||
};
|
||||
|
@ -215,6 +215,8 @@ public:
|
||||
StackElement m_stack[MAX_STACK];
|
||||
// Top Of Stack index
|
||||
int m_tos;
|
||||
|
||||
friend class RTree;
|
||||
};
|
||||
|
||||
// Get 'first' for iteration
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QLineF>
|
||||
#include "common/config.h"
|
||||
#include "gpxparser.h"
|
||||
#include "tcxparser.h"
|
||||
#include "csvparser.h"
|
||||
@ -12,9 +13,9 @@
|
||||
#include "oziparsers.h"
|
||||
#include "locparser.h"
|
||||
#include "slfparser.h"
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef ENABLE_GEOJSON
|
||||
#include "geojsonparser.h"
|
||||
#endif // QT 5
|
||||
#endif // ENABLE_GEOJSON
|
||||
#include "exifparser.h"
|
||||
#include "dem.h"
|
||||
#include "data.h"
|
||||
@ -32,9 +33,9 @@ static WPTParser wpt;
|
||||
static RTEParser rte;
|
||||
static LOCParser loc;
|
||||
static SLFParser slf;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef ENABLE_GEOJSON
|
||||
static GeoJSONParser geojson;
|
||||
#endif // QT 5
|
||||
#endif // ENABLE_GEOJSON
|
||||
static EXIFParser exif;
|
||||
|
||||
static QHash<QString, Parser*> parsers()
|
||||
@ -53,10 +54,10 @@ static QHash<QString, Parser*> parsers()
|
||||
hash.insert("rte", &rte);
|
||||
hash.insert("loc", &loc);
|
||||
hash.insert("slf", &slf);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef ENABLE_GEOJSON
|
||||
hash.insert("json", &geojson);
|
||||
hash.insert("geojson", &geojson);
|
||||
#endif // QT 5
|
||||
#endif // ENABLE_GEOJSON
|
||||
hash.insert("jpeg", &exif);
|
||||
hash.insert("jpg", &exif);
|
||||
|
||||
@ -147,9 +148,9 @@ QString Data::formats()
|
||||
qApp->translate("Data", "Supported files") + " (" + supported + ");;"
|
||||
+ qApp->translate("Data", "CSV files") + " (*.csv);;"
|
||||
+ qApp->translate("Data", "FIT files") + " (*.fit);;"
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef ENABLE_GEOJSON
|
||||
+ qApp->translate("Data", "GeoJSON files") + " (*.geojson *.json);;"
|
||||
#endif // QT5
|
||||
#endif // ENABLE_GEOJSON
|
||||
+ qApp->translate("Data", "GPX files") + " (*.gpx);;"
|
||||
+ qApp->translate("Data", "IGC files") + " (*.igc);;"
|
||||
+ qApp->translate("Data", "JPEG images") + " (*.jpg *.jpeg);;"
|
||||
|
@ -217,7 +217,7 @@ Graph Track::speed() const
|
||||
v = 0;
|
||||
stop.append(gs.size());
|
||||
} else if (_useReportedSpeed && sd.at(j).hasSpeed()
|
||||
&& seg.outliers.contains(j))
|
||||
&& !seg.outliers.contains(j))
|
||||
v = sd.at(j).speed();
|
||||
else if (!std::isnan(seg.speed.at(j)) && !seg.outliers.contains(j))
|
||||
v = seg.speed.at(j);
|
||||
|
39
src/map/IMG/bitmapline.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
#include <QPainter>
|
||||
#include <QImage>
|
||||
#include "bitmapline.h"
|
||||
|
||||
static QImage img2line(const QImage &img, int width)
|
||||
{
|
||||
Q_ASSERT(img.format() == QImage::Format_ARGB32_Premultiplied);
|
||||
QImage res(width, img.height(), QImage::Format_ARGB32_Premultiplied);
|
||||
const int srcBpl = img.bytesPerLine();
|
||||
const int dstBpl = res.bytesPerLine();
|
||||
const uchar *srcBits = img.bits();
|
||||
uchar *dstBits = res.bits();
|
||||
|
||||
for (int i = 0; i < img.height(); i++) {
|
||||
const uchar *srcLine = srcBits + srcBpl * i;
|
||||
uchar *dstLine = dstBits + dstBpl * i;
|
||||
|
||||
for (int j = dstBpl; j > 0; j -= srcBpl, dstLine += srcBpl)
|
||||
memcpy(dstLine, srcLine, qMin(j, srcBpl));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void BitmapLine::draw(QPainter *painter, const QPolygonF &line,
|
||||
const QImage &img)
|
||||
{
|
||||
for (int i = 1; i < line.size(); i++) {
|
||||
QLineF segment(line.at(i-1).x(), line.at(i-1).y(), line.at(i).x(),
|
||||
line.at(i).y());
|
||||
|
||||
painter->save();
|
||||
painter->translate(segment.p1());
|
||||
painter->rotate(-segment.angle());
|
||||
painter->drawImage(0, -img.height()/2, img2line(img, segment.length()));
|
||||
painter->restore();
|
||||
}
|
||||
}
|
||||
|
13
src/map/IMG/bitmapline.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef BITMAPLINE_H
|
||||
#define BITMAPLINE_H
|
||||
|
||||
class QPainter;
|
||||
class QImage;
|
||||
class QPolygonF;
|
||||
|
||||
namespace BitmapLine
|
||||
{
|
||||
void draw(QPainter *painter, const QPolygonF &line, const QImage &img);
|
||||
}
|
||||
|
||||
#endif // BITMAPLINE_H
|
247
src/map/IMG/img.cpp
Normal file
@ -0,0 +1,247 @@
|
||||
#include <QSet>
|
||||
#include <QtEndian>
|
||||
#include "vectortile.h"
|
||||
#include "img.h"
|
||||
|
||||
|
||||
#define CHECK(condition) \
|
||||
if (!(condition)) { \
|
||||
_errorString = "Invalid/corrupted IMG file"; \
|
||||
return; \
|
||||
}
|
||||
|
||||
struct CTX
|
||||
{
|
||||
CTX(const RectC &rect, int bits, QList<IMG::Poly> *polygons,
|
||||
QList<IMG::Poly> *lines, QList<IMG::Point> *points)
|
||||
: rect(rect), bits(bits), polygons(polygons), lines(lines),
|
||||
points(points) {}
|
||||
|
||||
const RectC ▭
|
||||
int bits;
|
||||
QList<IMG::Poly> *polygons;
|
||||
QList<IMG::Poly> *lines;
|
||||
QList<IMG::Point> *points;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
static QDebug operator<<(QDebug dbg, const QMap<QString, VectorTile*> &map)
|
||||
{
|
||||
dbg.nospace() << "TileMap(";
|
||||
for (QMap<QString, VectorTile*>::const_iterator it = map.constBegin();
|
||||
it != map.constEnd(); ++it)
|
||||
dbg << "(" << it.key() << ", " << *(*it) << ")";
|
||||
dbg << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
||||
{
|
||||
if (!_file.open(QFile::ReadOnly)) {
|
||||
_errorString = _file.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
// Read IMG header
|
||||
char signature[7], identifier[7];
|
||||
_file.read((char*)&_key, 1) && _file.seek(0x10)
|
||||
&& read(signature, sizeof(signature)) && _file.seek(0x41)
|
||||
&& read(identifier, sizeof(identifier));
|
||||
if (memcmp(signature, "DSKIMG", sizeof(signature))
|
||||
|| memcmp(identifier, "GARMIN", sizeof(identifier))) {
|
||||
_errorString = "Not a Garmin IMG file";
|
||||
return;
|
||||
}
|
||||
char d1[20], d2[31];
|
||||
quint8 e1, e2;
|
||||
CHECK(_file.seek(0x49) && read(d1, sizeof(d1)) && _file.seek(0x61)
|
||||
&& readValue(e1) && readValue(e2) && _file.seek(0x65)
|
||||
&& read(d2, sizeof(d2)));
|
||||
QByteArray nba(QByteArray(d1, sizeof(d1)) + QByteArray(d2, sizeof(d2)));
|
||||
_name = QString(nba).trimmed();
|
||||
_blockSize = 1 << (e1 + e2);
|
||||
|
||||
// Read the FAT table
|
||||
quint8 flag;
|
||||
quint64 offset = 0x200;
|
||||
// Skip unused FAT blocks if any
|
||||
while (true) {
|
||||
CHECK(_file.seek(offset) && readValue(flag));
|
||||
if (flag)
|
||||
break;
|
||||
offset += 512;
|
||||
}
|
||||
|
||||
// Read first FAT block with FAT table size
|
||||
char name[8], type[3];
|
||||
quint32 size;
|
||||
quint16 part;
|
||||
CHECK(_file.seek(offset + 12) && readValue(size));
|
||||
offset += 512;
|
||||
int cnt = (size - offset) / 512;
|
||||
|
||||
|
||||
QMap<QString, VectorTile*> tileMap;
|
||||
QMap<QString, SubFile*> TYPMap;
|
||||
|
||||
// Read FAT blocks describing the IMG sub-files
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
quint16 block;
|
||||
CHECK(_file.seek(offset) && readValue(flag) && read(name, sizeof(name))
|
||||
&& read(type, sizeof(type)) && readValue(size) && readValue(part));
|
||||
SubFile::Type tt = SubFile::type(type);
|
||||
|
||||
if (tt == SubFile::GMP) {
|
||||
_errorString = "NT maps not supported";
|
||||
return;
|
||||
}
|
||||
|
||||
QString fn(QByteArray(name, sizeof(name)));
|
||||
if (VectorTile::isTileFile(tt)) {
|
||||
VectorTile *tile;
|
||||
QMap<QString, VectorTile*>::iterator it = tileMap.find(fn);
|
||||
if (it == tileMap.end()) {
|
||||
tile = new VectorTile();
|
||||
tileMap.insert(fn, tile);
|
||||
} else
|
||||
tile = *it;
|
||||
|
||||
SubFile *file = part ? tile->file(tt)
|
||||
: tile->addFile(this, tt, size);
|
||||
CHECK(file);
|
||||
|
||||
_file.seek(offset + 0x20);
|
||||
for (int i = 0; i < 240; i++) {
|
||||
CHECK(readValue(block));
|
||||
if (block == 0xFFFF)
|
||||
break;
|
||||
file->addBlock(block);
|
||||
}
|
||||
} else if (tt == SubFile::TYP) {
|
||||
SubFile *typ;
|
||||
QMap<QString, SubFile*>::iterator it = TYPMap.find(fn);
|
||||
if (it == TYPMap.end()) {
|
||||
typ = new SubFile(this, size);
|
||||
TYPMap.insert(fn, typ);
|
||||
} else
|
||||
typ = *it;
|
||||
|
||||
_file.seek(offset + 0x20);
|
||||
for (int i = 0; i < 240; i++) {
|
||||
CHECK(readValue(block));
|
||||
if (block == 0xFFFF)
|
||||
break;
|
||||
typ->addBlock(block);
|
||||
}
|
||||
}
|
||||
|
||||
offset += 512;
|
||||
}
|
||||
|
||||
// Create tile tree
|
||||
QSet<int> bits;
|
||||
for (QMap<QString, VectorTile*>::iterator it = tileMap.begin();
|
||||
it != tileMap.end(); ++it) {
|
||||
CHECK((*it)->init());
|
||||
|
||||
double min[2], max[2];
|
||||
min[0] = (*it)->bounds().left();
|
||||
min[1] = (*it)->bounds().bottom();
|
||||
max[0] = (*it)->bounds().right();
|
||||
max[1] = (*it)->bounds().top();
|
||||
_tileTree.Insert(min, max, *it);
|
||||
|
||||
_bounds |= (*it)->bounds();
|
||||
|
||||
for (int i = 0; i < (*it)->bits().count(); i++)
|
||||
bits.insert((*it)->bits().at(i));
|
||||
}
|
||||
_bits = bits.toList();
|
||||
qSort(_bits);
|
||||
|
||||
// Read TYP file if any
|
||||
if (!TYPMap.isEmpty()) {
|
||||
SubFile *typ = TYPMap.values().first();
|
||||
_style = Style(typ);
|
||||
qDeleteAll(TYPMap);
|
||||
}
|
||||
|
||||
_valid = true;
|
||||
}
|
||||
|
||||
IMG::~IMG()
|
||||
{
|
||||
TileTree::Iterator it;
|
||||
for (_tileTree.GetFirst(it); !_tileTree.IsNull(it); _tileTree.GetNext(it))
|
||||
delete _tileTree.GetAt(it);
|
||||
}
|
||||
|
||||
static bool cb(VectorTile *tile, void *context)
|
||||
{
|
||||
CTX *ctx = (CTX*)context;
|
||||
tile->objects(ctx->rect, ctx->bits, ctx->polygons, ctx->lines, ctx->points);
|
||||
return true;
|
||||
}
|
||||
|
||||
void IMG::objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
||||
QList<Poly> *lines, QList<Point> *points) const
|
||||
{
|
||||
int mb = _bits.first();
|
||||
for (int i = 0; i < _bits.size(); i++) {
|
||||
if (_bits.at(i) > bits)
|
||||
break;
|
||||
else
|
||||
mb = _bits.at(i);
|
||||
}
|
||||
|
||||
CTX ctx(rect, mb, polygons, lines, points);
|
||||
double min[2], max[2];
|
||||
|
||||
min[0] = rect.left();
|
||||
min[1] = rect.bottom();
|
||||
max[0] = rect.right();
|
||||
max[1] = rect.top();
|
||||
|
||||
_tileTree.Search(min, max, cb, &ctx);
|
||||
}
|
||||
|
||||
qint64 IMG::read(char *data, qint64 maxSize)
|
||||
{
|
||||
qint64 ret = _file.read(data, maxSize);
|
||||
if (_key)
|
||||
for (int i = 0; i < ret; i++)
|
||||
data[i] ^= _key;
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<class T> bool IMG::readValue(T &val)
|
||||
{
|
||||
T data;
|
||||
|
||||
if (read((char*)&data, sizeof(T)) < (qint64)sizeof(T))
|
||||
return false;
|
||||
|
||||
if (sizeof(T) > 1)
|
||||
val = qFromLittleEndian(data);
|
||||
else
|
||||
val = data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IMG::readBlock(int blockNum, QByteArray &data)
|
||||
{
|
||||
QByteArray *block = _blockCache[blockNum];
|
||||
if (!block) {
|
||||
if (!_file.seek((qint64)blockNum * (qint64)_blockSize))
|
||||
return false;
|
||||
data.resize(_blockSize);
|
||||
if (read(data.data(), _blockSize) < _blockSize)
|
||||
return false;
|
||||
_blockCache.insert(blockNum, new QByteArray(data));
|
||||
} else
|
||||
data = *block;
|
||||
|
||||
return true;
|
||||
}
|
88
src/map/IMG/img.h
Normal file
@ -0,0 +1,88 @@
|
||||
#ifndef IMG_H
|
||||
#define IMG_H
|
||||
|
||||
#include <QRect>
|
||||
#include <QFile>
|
||||
#include <QByteArray>
|
||||
#include <QCache>
|
||||
#include <QDebug>
|
||||
#include "common/rtree.h"
|
||||
#include "common/rectc.h"
|
||||
#include "common/range.h"
|
||||
#include "style.h"
|
||||
|
||||
class VectorTile;
|
||||
class SubFile;
|
||||
|
||||
class IMG
|
||||
{
|
||||
public:
|
||||
struct Poly {
|
||||
/* QPointF insted of Coordinates for performance reasons (no need to
|
||||
duplicate all the vectors for drawing). Note, that we do not want to
|
||||
ll2xy() the points in the IMG class as this can not be done in
|
||||
parallel. */
|
||||
QVector<QPointF> points;
|
||||
QString label;
|
||||
quint32 type;
|
||||
|
||||
bool operator<(const Poly &other) const
|
||||
{return type > other.type;}
|
||||
};
|
||||
|
||||
struct Point {
|
||||
Point() : id(0) {}
|
||||
|
||||
Coordinates coordinates;
|
||||
QString label;
|
||||
quint32 type;
|
||||
bool poi;
|
||||
quint64 id;
|
||||
|
||||
bool operator<(const Point &other) const
|
||||
{return id < other.id;}
|
||||
};
|
||||
|
||||
|
||||
IMG(const QString &fileName);
|
||||
~IMG();
|
||||
|
||||
const QString &name() const {return _name;}
|
||||
const RectC &bounds() const {return _bounds;}
|
||||
Range zooms() const {return Range(_bits.first(), _bits.last());}
|
||||
|
||||
bool isValid() const {return _valid;}
|
||||
const QString &errorString() const {return _errorString;}
|
||||
|
||||
void objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
||||
QList<Poly> *lines, QList<Point> *points) const;
|
||||
|
||||
const Style &style() const {return _style;}
|
||||
|
||||
private:
|
||||
friend class SubFile;
|
||||
|
||||
typedef RTree<VectorTile*, double, 2> TileTree;
|
||||
|
||||
int blockSize() const {return _blockSize;}
|
||||
bool readBlock(int blockNum, QByteArray &data);
|
||||
qint64 read(char *data, qint64 maxSize);
|
||||
template<class T> bool readValue(T &val);
|
||||
|
||||
QFile _file;
|
||||
quint8 _key;
|
||||
int _blockSize;
|
||||
QCache<int, QByteArray> _blockCache;
|
||||
|
||||
TileTree _tileTree;
|
||||
|
||||
QString _name;
|
||||
RectC _bounds;
|
||||
QList<int> _bits;
|
||||
Style _style;
|
||||
|
||||
bool _valid;
|
||||
QString _errorString;
|
||||
};
|
||||
|
||||
#endif // IMG_H
|
173
src/map/IMG/lblfile.cpp
Normal file
@ -0,0 +1,173 @@
|
||||
#include <QTextCodec>
|
||||
#include "lblfile.h"
|
||||
|
||||
enum Charset {Normal, Symbol, Special};
|
||||
|
||||
static quint8 NORMAL_CHARS[] = {
|
||||
' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
|
||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||
'X', 'Y', 'Z', '~', '~', '~', '~', '~',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', '~', '~', '~', '~', '~', '~'
|
||||
};
|
||||
|
||||
static quint8 SYMBOL_CHARS[] = {
|
||||
'@', '!', '"', '#', '$', '%', '&', '\'',
|
||||
'(', ')', '*', '+', ',', '-', '.', '/',
|
||||
'~', '~', '~', '~', '~', '~', '~', '~',
|
||||
'~', '~', ':', ';', '<', '=', '>', '?',
|
||||
'~', '~', '~', '~', '~', '~', '~', '~',
|
||||
'~', '~', '~', '[', '\\', ']', '^', '_'
|
||||
};
|
||||
|
||||
static quint8 SPECIAL_CHARS[] = {
|
||||
'`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
|
||||
'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
|
||||
'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
|
||||
'x', 'y', 'z', '~', '~', '~', '~', '~',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', '~', '~', '~', '~', '~', '~'
|
||||
};
|
||||
|
||||
static QString capitalize(const QString &str)
|
||||
{
|
||||
if (str.isEmpty())
|
||||
return str;
|
||||
for (int i = 0; i < str.size(); i++)
|
||||
if (str.at(i).isLetter() && !str.at(i).isUpper())
|
||||
return str;
|
||||
|
||||
QString ret(str);
|
||||
for (int i = 0; i < str.size(); i++)
|
||||
if (i && !str.at(i-1).isSpace())
|
||||
ret[i] = str.at(i).toLower();
|
||||
else
|
||||
ret[i] = str.at(i);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool LBLFile::init()
|
||||
{
|
||||
Handle hdl;
|
||||
quint16 codepage;
|
||||
|
||||
if (!(seek(hdl, 0x15) && readUInt32(hdl, _offset)
|
||||
&& readUInt32(hdl, _size) && readByte(hdl, _multiplier)
|
||||
&& readByte(hdl, _encoding) && seek(hdl, 0x57)
|
||||
&& readUInt32(hdl, _poiOffset) && readUInt32(hdl, _poiSize)
|
||||
&& seek(hdl, 0xAA) && readUInt16(hdl, codepage)))
|
||||
return false;
|
||||
|
||||
_multiplier = 1<<_multiplier;
|
||||
|
||||
if (codepage == 65001)
|
||||
_codec = QTextCodec::codecForName("UTF-8");
|
||||
else if (codepage == 0)
|
||||
_codec = 0;
|
||||
else
|
||||
_codec = QTextCodec::codecForName(QString("CP%1").arg(codepage)
|
||||
.toLatin1());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QString LBLFile::label6b(Handle &hdl, quint32 offset) const
|
||||
{
|
||||
QByteArray result;
|
||||
Charset curCharSet = Normal;
|
||||
quint8 b1, b2, b3;
|
||||
|
||||
if (!seek(hdl, offset))
|
||||
return QString();
|
||||
|
||||
while (true) {
|
||||
if (!(readByte(hdl, b1) && readByte(hdl, b2) && readByte(hdl, b3)))
|
||||
return QString();
|
||||
|
||||
int c[]= {b1>>2, (b1&0x3)<<4|b2>>4, (b2&0xF)<<2|b3>>6, b3&0x3F};
|
||||
|
||||
for (int cpt = 0; cpt < 4; cpt++) {
|
||||
if (c[cpt] > 0x2F)
|
||||
return QString::fromLatin1(result);
|
||||
switch (curCharSet) {
|
||||
case Normal:
|
||||
if (c[cpt] == 0x1c)
|
||||
curCharSet = Symbol;
|
||||
else if (c[cpt] == 0x1b)
|
||||
curCharSet = Special;
|
||||
else if(c[cpt] == 0x1d)
|
||||
result.append('|');
|
||||
else if (c[cpt] == 0x1f)
|
||||
result.append(' ');
|
||||
else if (c[cpt] == 0x1e)
|
||||
result.append(' ');
|
||||
else
|
||||
result.append(NORMAL_CHARS[c[cpt]]);
|
||||
break;
|
||||
case Symbol:
|
||||
result.append(SYMBOL_CHARS[c[cpt]]);
|
||||
curCharSet = Normal;
|
||||
break;
|
||||
case Special:
|
||||
result.append(SPECIAL_CHARS[c[cpt]]);
|
||||
curCharSet = Normal;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QString LBLFile::label8b(Handle &hdl, quint32 offset) const
|
||||
{
|
||||
QByteArray result;
|
||||
quint8 c;
|
||||
|
||||
if (!seek(hdl, offset))
|
||||
return QString();
|
||||
|
||||
while (true) {
|
||||
if (!readByte(hdl, c))
|
||||
return QString();
|
||||
if (!c)
|
||||
break;
|
||||
|
||||
if (c >= 0x1B && c <= 0x1F)
|
||||
result.append(' ');
|
||||
else if (c > 0x07)
|
||||
result.append(c);
|
||||
}
|
||||
|
||||
return _codec ? _codec->toUnicode(result) : QString::fromLatin1(result);
|
||||
}
|
||||
|
||||
QString LBLFile::label(Handle &hdl, quint32 offset, bool poi)
|
||||
{
|
||||
if (!_init) {
|
||||
if (!(_init = init()))
|
||||
return QString();
|
||||
}
|
||||
|
||||
quint32 labelOffset;
|
||||
if (poi) {
|
||||
quint32 poiOffset;
|
||||
if (!(seek(hdl, _poiOffset + offset) && readUInt24(hdl, poiOffset)))
|
||||
return QString();
|
||||
labelOffset = _offset + (poiOffset & 0x3FFFFF) * _multiplier;
|
||||
} else
|
||||
labelOffset = _offset + offset * _multiplier;
|
||||
|
||||
if (labelOffset > _offset + _size)
|
||||
return QString();
|
||||
|
||||
switch (_encoding) {
|
||||
case 6:
|
||||
return capitalize(label6b(hdl, labelOffset));
|
||||
case 9:
|
||||
case 10:
|
||||
return capitalize(label8b(hdl, labelOffset));
|
||||
default:
|
||||
return QString();
|
||||
}
|
||||
}
|
32
src/map/IMG/lblfile.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef LBLFILE_H
|
||||
#define LBLFILE_H
|
||||
|
||||
#include "subfile.h"
|
||||
|
||||
class QTextCodec;
|
||||
|
||||
class LBLFile : public SubFile
|
||||
{
|
||||
public:
|
||||
LBLFile(IMG *img, quint32 size) : SubFile(img, size), _init(false) {}
|
||||
|
||||
QString label(Handle &hdl, quint32 offset, bool poi = false);
|
||||
|
||||
private:
|
||||
bool init();
|
||||
|
||||
QString label6b(Handle &hdl, quint32 offset) const;
|
||||
QString label8b(Handle &hdl, quint32 offset) const;
|
||||
|
||||
quint32 _offset;
|
||||
quint32 _size;
|
||||
quint32 _poiOffset;
|
||||
quint32 _poiSize;
|
||||
quint8 _multiplier;
|
||||
quint8 _encoding;
|
||||
QTextCodec *_codec;
|
||||
|
||||
bool _init;
|
||||
};
|
||||
|
||||
#endif // LBLFILE_H
|
30
src/map/IMG/netfile.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "netfile.h"
|
||||
|
||||
bool NETFile::init()
|
||||
{
|
||||
Handle hdl;
|
||||
|
||||
if (!(seek(hdl, 0x15) && readUInt32(hdl, _offset)
|
||||
&& readUInt32(hdl, _size) && readByte(hdl, _multiplier)))
|
||||
return false;
|
||||
|
||||
_multiplier = 1<<_multiplier;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NETFile::lblOffset(Handle &hdl, quint32 netOffset, quint32 &lblOffset)
|
||||
{
|
||||
if (!_init) {
|
||||
if (!(_init = init()))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(seek(hdl, _offset + netOffset * _multiplier)
|
||||
&& readUInt24(hdl, lblOffset)))
|
||||
return false;
|
||||
|
||||
lblOffset &= 0x3FFFFF;
|
||||
|
||||
return true;
|
||||
}
|
23
src/map/IMG/netfile.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef NETFILE_H
|
||||
#define NETFILE_H
|
||||
|
||||
#include "subfile.h"
|
||||
|
||||
class NETFile : public SubFile
|
||||
{
|
||||
public:
|
||||
NETFile(IMG *img, quint32 size) : SubFile(img, size), _init(false) {}
|
||||
|
||||
bool lblOffset(Handle &hdl, quint32 netOffset, quint32 &lblOffset);
|
||||
|
||||
private:
|
||||
bool init();
|
||||
|
||||
quint32 _offset;
|
||||
quint32 _size;
|
||||
quint8 _multiplier;
|
||||
|
||||
bool _init;
|
||||
};
|
||||
|
||||
#endif // NETFILE_H
|
516
src/map/IMG/rgnfile.cpp
Normal file
@ -0,0 +1,516 @@
|
||||
#include "trefile.h"
|
||||
#include "units.h"
|
||||
#include "lblfile.h"
|
||||
#include "netfile.h"
|
||||
#include "rgnfile.h"
|
||||
|
||||
|
||||
bool RGNFile::BitStream::read(int bits, quint32 &val)
|
||||
{
|
||||
val = 0;
|
||||
|
||||
for (int pos = 0; pos < bits; ) {
|
||||
if (!_remaining) {
|
||||
if (!_length || !_file.readByte(_hdl, _data))
|
||||
return false;
|
||||
_remaining = 8;
|
||||
_length--;
|
||||
}
|
||||
|
||||
quint32 get = bits - pos;
|
||||
if (get >= _remaining) {
|
||||
val |= _data << pos;
|
||||
pos += _remaining;
|
||||
_remaining = 0;
|
||||
} else {
|
||||
quint32 mask = (1<<get) - 1;
|
||||
val |= (_data & mask)<<pos;
|
||||
_data >>= get;
|
||||
_remaining -= get;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::BitStream::readDelta(int bits, int sign, bool extraBit,
|
||||
qint32 &delta)
|
||||
{
|
||||
quint32 value;
|
||||
int bo = 0;
|
||||
|
||||
if (!read(bits, value))
|
||||
return false;
|
||||
|
||||
if (extraBit) {
|
||||
value>>=1;
|
||||
bo = 1;
|
||||
}
|
||||
|
||||
if (!sign) {
|
||||
qint32 signMask = 1 << (bits - bo - 1);
|
||||
if (value & signMask) {
|
||||
qint32 comp = value ^ signMask;
|
||||
if (comp)
|
||||
delta = comp - signMask;
|
||||
else {
|
||||
qint32 other;
|
||||
if (!readDelta(bits - bo, sign, false, other))
|
||||
return false;
|
||||
if (other < 0)
|
||||
delta = 1 - signMask + other;
|
||||
else
|
||||
delta = signMask - 1 + other;
|
||||
}
|
||||
} else {
|
||||
delta = value;
|
||||
}
|
||||
} else {
|
||||
delta = value * sign;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::BitStream::finish()
|
||||
{
|
||||
while (_length--)
|
||||
if (!_file.readByte(_hdl, _data))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool RGNFile::init()
|
||||
{
|
||||
Handle hdl;
|
||||
|
||||
if (!(seek(hdl, 0x15) && readUInt32(hdl, _offset)
|
||||
&& readUInt32(hdl, _size) && readUInt32(hdl, _polygonsOffset)
|
||||
&& readUInt32(hdl, _polygonsSize) && seek(hdl, 0x39)
|
||||
&& readUInt32(hdl, _linesOffset) && readUInt32(hdl, _linesSize)
|
||||
&& seek(hdl, 0x55) && readUInt32(hdl, _pointsOffset)
|
||||
&& readUInt32(hdl, _pointsSize)))
|
||||
return false;
|
||||
|
||||
if (_offset + _size > size())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::sign(BitStream &bs, int &val)
|
||||
{
|
||||
quint32 bit;
|
||||
val = 0;
|
||||
|
||||
if (!bs.read(1, bit))
|
||||
return false;
|
||||
if (bit) {
|
||||
if (!bs.read(1, bit))
|
||||
return false;
|
||||
val = bit ? -1 : 1;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int RGNFile::bitSize(quint8 baseSize, bool variableSign, bool extraBit)
|
||||
{
|
||||
int bits = 2;
|
||||
if (baseSize <= 9)
|
||||
bits += baseSize;
|
||||
else
|
||||
bits += 2 * baseSize - 9;
|
||||
|
||||
if (variableSign)
|
||||
bits++;
|
||||
if (extraBit)
|
||||
bits++;
|
||||
|
||||
return bits;
|
||||
}
|
||||
|
||||
bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
|
||||
Handle &netHdl, QList<IMG::Poly> *polys) const
|
||||
{
|
||||
if (segment.start() == segment.end())
|
||||
return true;
|
||||
|
||||
if (!seek(hdl, segment.start()))
|
||||
return false;
|
||||
|
||||
quint32 labelPtr;
|
||||
quint8 type, len8, bitstreamInfo;
|
||||
qint16 lon, lat;
|
||||
quint16 len;
|
||||
|
||||
while (hdl.pos < (int)segment.end()) {
|
||||
IMG::Poly poly;
|
||||
|
||||
if (!(readByte(hdl, type) && readUInt24(hdl, labelPtr)
|
||||
&& readInt16(hdl, lon) && readInt16(hdl, lat)))
|
||||
return false;
|
||||
if (type & 0x80) {
|
||||
if (!readUInt16(hdl, len))
|
||||
return false;
|
||||
} else {
|
||||
if (!readByte(hdl, len8))
|
||||
return false;
|
||||
len = len8;
|
||||
}
|
||||
if (!readByte(hdl, bitstreamInfo))
|
||||
return false;
|
||||
|
||||
poly.type = (segment.type() == Segment::Polygon)
|
||||
? ((quint32)(type & 0x7F)) << 8 : ((quint32)(type & 0x3F)) << 8;
|
||||
|
||||
RectC br;
|
||||
QPoint pos(subdiv->lon() + ((qint32)lon<<(24-subdiv->bits())),
|
||||
subdiv->lat() + ((qint32)lat<<(24-subdiv->bits())));
|
||||
Coordinates c(toWGS84(pos.x()), toWGS84(pos.y()));
|
||||
br = br.united(c);
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
|
||||
BitStream bs(*this, hdl, len);
|
||||
int lonSign, latSign;
|
||||
if (!sign(bs, lonSign) || !sign(bs, latSign))
|
||||
return false;
|
||||
bool extraBit = labelPtr & 0x400000;
|
||||
int lonBits = bitSize(bitstreamInfo & 0x0F, !lonSign, extraBit);
|
||||
int latBits = bitSize(bitstreamInfo >> 4, !latSign, false);
|
||||
|
||||
while (bs.hasNext(lonBits + latBits)) {
|
||||
qint32 lonDelta, latDelta;
|
||||
|
||||
if (!(bs.readDelta(lonBits, lonSign, extraBit, lonDelta)
|
||||
&& bs.readDelta(latBits, latSign, false, latDelta)))
|
||||
return false;
|
||||
|
||||
pos.rx() += lonDelta<<(24-subdiv->bits());
|
||||
pos.ry() += latDelta<<(24-subdiv->bits());
|
||||
|
||||
Coordinates c(toWGS84(pos.x()), toWGS84(pos.y()));
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
br = br.united(c);
|
||||
}
|
||||
if (!bs.finish())
|
||||
return false;
|
||||
|
||||
if (!rect.intersects(br))
|
||||
continue;
|
||||
|
||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||
if (labelPtr & 0x800000) {
|
||||
quint32 lblOff;
|
||||
if (net && net->lblOffset(netHdl, labelPtr & 0x3FFFFF, lblOff))
|
||||
poly.label = lbl->label(lblHdl, lblOff);
|
||||
} else
|
||||
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
||||
}
|
||||
|
||||
polys->append(poly);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::extPolyObjects(const RectC &rect, Handle &hdl,
|
||||
const SubDiv *subdiv, const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Poly> *polys) const
|
||||
{
|
||||
quint32 labelPtr;
|
||||
quint8 type, subtype, len8, len82, bitstreamInfo;
|
||||
qint16 lon, lat;
|
||||
quint16 len;
|
||||
|
||||
|
||||
if (!seek(hdl, segment.start()))
|
||||
return false;
|
||||
|
||||
while (hdl.pos < (int)segment.end()) {
|
||||
IMG::Poly poly;
|
||||
|
||||
if (!(readByte(hdl, type) && readByte(hdl, subtype)
|
||||
&& readInt16(hdl, lon) && readInt16(hdl, lat) && readByte(hdl, len8)))
|
||||
return false;
|
||||
|
||||
if (subtype & 0x80) {
|
||||
qWarning("Polygons/lines with extra bytes not supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (len8 & 0x01)
|
||||
len = (len8>>1) - 1;
|
||||
else {
|
||||
if (!readByte(hdl, len82))
|
||||
return false;
|
||||
len = ((len8 | ((quint16)len82<<8))>>2) - 1;
|
||||
}
|
||||
if (!readByte(hdl, bitstreamInfo))
|
||||
return false;
|
||||
poly.type = 0x10000 + (quint16(type) << 8) + (subtype & 0x1F);
|
||||
|
||||
RectC br;
|
||||
QPoint pos(subdiv->lon() + ((qint32)lon<<(24-subdiv->bits())),
|
||||
subdiv->lat() + ((qint32)lat<<(24-subdiv->bits())));
|
||||
Coordinates c(toWGS84(pos.x()), toWGS84(pos.y()));
|
||||
br = br.united(c);
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
|
||||
BitStream bs(*this, hdl, len);
|
||||
int lonSign, latSign;
|
||||
if (!sign(bs, lonSign) || !sign(bs, latSign))
|
||||
return false;
|
||||
quint32 extraBit;
|
||||
bs.read(1, extraBit);
|
||||
int lonBits = bitSize(bitstreamInfo & 0x0F, !lonSign, extraBit);
|
||||
int latBits = bitSize(bitstreamInfo >> 4, !latSign, extraBit);
|
||||
|
||||
while (bs.hasNext(lonBits + latBits)) {
|
||||
qint32 lonDelta, latDelta;
|
||||
|
||||
if (!(bs.readDelta(lonBits, lonSign, false, lonDelta)
|
||||
&& bs.readDelta(latBits, latSign, false, latDelta)))
|
||||
return false;
|
||||
|
||||
pos.rx() += lonDelta<<(24-subdiv->bits());
|
||||
pos.ry() += latDelta<<(24-subdiv->bits());
|
||||
|
||||
Coordinates c(toWGS84(pos.x()), toWGS84(pos.y()));
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
br = br.united(c);
|
||||
}
|
||||
if (!bs.finish())
|
||||
return false;
|
||||
|
||||
if (subtype & 0x20) {
|
||||
if (!readUInt24(hdl, labelPtr))
|
||||
return false;
|
||||
if (lbl)
|
||||
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
||||
}
|
||||
|
||||
if (!rect.intersects(br))
|
||||
continue;
|
||||
|
||||
polys->append(poly);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::pointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Point> *points) const
|
||||
{
|
||||
quint8 type, subtype;
|
||||
qint16 lon, lat;
|
||||
quint32 labelPtr;
|
||||
|
||||
if (!seek(hdl, segment.start()))
|
||||
return false;
|
||||
|
||||
while (hdl.pos < (int)segment.end()) {
|
||||
IMG::Point point;
|
||||
|
||||
if (!(readByte(hdl, type) && readUInt24(hdl, labelPtr)
|
||||
&& readInt16(hdl, lon) && readInt16(hdl, lat)))
|
||||
return false;
|
||||
if (labelPtr & 0x800000) {
|
||||
if (!readByte(hdl, subtype))
|
||||
return false;
|
||||
} else
|
||||
subtype = 0;
|
||||
|
||||
point.type = (quint16)type<<8 | subtype;
|
||||
|
||||
qint16 lonOffset = lon<<(24-subdiv->bits());
|
||||
qint16 latOffset = lat<<(24-subdiv->bits());
|
||||
point.coordinates = Coordinates(toWGS84(subdiv->lon() + lonOffset),
|
||||
toWGS84(subdiv->lat() + latOffset));
|
||||
|
||||
if (!rect.contains(point.coordinates))
|
||||
continue;
|
||||
|
||||
point.poi = labelPtr & 0x400000;
|
||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
||||
point.id = ((quint64)lbl->offset())<<24 | (labelPtr & 0x3FFFFF);
|
||||
}
|
||||
|
||||
points->append(point);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RGNFile::extPointObjects(const RectC &rect, Handle &hdl,
|
||||
const SubDiv *subdiv, const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Point> *points) const
|
||||
{
|
||||
quint8 type, subtype;
|
||||
qint16 lon, lat;
|
||||
quint32 labelPtr;
|
||||
|
||||
if (!seek(hdl, segment.start()))
|
||||
return false;
|
||||
|
||||
while (hdl.pos < (int)segment.end()) {
|
||||
IMG::Point point;
|
||||
|
||||
if (!(readByte(hdl, type) && readByte(hdl, subtype)
|
||||
&& readInt16(hdl, lon) && readInt16(hdl, lat)))
|
||||
return false;
|
||||
|
||||
if (subtype & 0x80) {
|
||||
qWarning("Points with extra bytes not supported");
|
||||
return false;
|
||||
}
|
||||
|
||||
point.type = 0x10000 | (((quint32)type)<<8) | (subtype & 0x1F);
|
||||
|
||||
qint16 lonOffset = lon<<(24-subdiv->bits());
|
||||
qint16 latOffset = lat<<(24-subdiv->bits());
|
||||
point.coordinates = Coordinates(toWGS84(subdiv->lon() + lonOffset),
|
||||
toWGS84(subdiv->lat() + latOffset));
|
||||
|
||||
if (subtype & 0x20) {
|
||||
if (!readUInt24(hdl, labelPtr))
|
||||
return false;
|
||||
point.poi = labelPtr & 0x400000;
|
||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
||||
point.id = ((quint64)lbl->offset())<<24 | (labelPtr & 0x3FFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
if (rect.contains(point.coordinates))
|
||||
points->append(point);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void RGNFile::objects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
||||
NETFile *net, QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||
QList<IMG::Point> *points)
|
||||
{
|
||||
Handle rgnHdl, lblHdl, netHdl;
|
||||
|
||||
if (!_init) {
|
||||
if (!(_init = init()))
|
||||
return;
|
||||
}
|
||||
|
||||
QVector<RGNFile::Segment> seg(segments(rgnHdl, subdiv));
|
||||
for (int i = 0; i < seg.size(); i++) {
|
||||
switch (seg.at(i).type()) {
|
||||
case Segment::Point:
|
||||
case Segment::IndexedPoint:
|
||||
if (points)
|
||||
pointObjects(rect, rgnHdl, subdiv, seg.at(i), lbl, lblHdl,
|
||||
points);
|
||||
break;
|
||||
case Segment::Line:
|
||||
if (lines)
|
||||
polyObjects(rect, rgnHdl, subdiv, seg.at(i), lbl, lblHdl,
|
||||
net, netHdl, lines);
|
||||
break;
|
||||
case Segment::Polygon:
|
||||
if (polygons)
|
||||
polyObjects(rect, rgnHdl, subdiv, seg.at(i), lbl, lblHdl,
|
||||
net, netHdl, polygons);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RGNFile::extObjects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
||||
QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||
QList<IMG::Point> *points)
|
||||
{
|
||||
Handle rgnHdl, lblHdl;
|
||||
|
||||
if (!_init) {
|
||||
if (!(_init = init()))
|
||||
return;
|
||||
}
|
||||
|
||||
if (polygons && subdiv->polygonsOffset() != subdiv->polygonsEnd()) {
|
||||
quint32 start = _polygonsOffset + subdiv->polygonsOffset();
|
||||
quint32 end = subdiv->polygonsEnd()
|
||||
? _polygonsOffset + subdiv->polygonsEnd()
|
||||
: _polygonsOffset + _polygonsSize;
|
||||
extPolyObjects(rect, rgnHdl, subdiv, Segment(start, end,
|
||||
Segment::Polygon), lbl, lblHdl, polygons);
|
||||
}
|
||||
if (lines && subdiv->linesOffset() != subdiv->linesEnd()) {
|
||||
quint32 start = _linesOffset + subdiv->linesOffset();
|
||||
quint32 end = subdiv->linesEnd()
|
||||
? _linesOffset + subdiv->linesEnd()
|
||||
: _linesOffset + _linesSize;
|
||||
extPolyObjects(rect, rgnHdl, subdiv, Segment(start, end, Segment::Line),
|
||||
lbl, lblHdl, lines);
|
||||
}
|
||||
if (points && subdiv->pointsOffset() != subdiv->pointsEnd()) {
|
||||
quint32 start = _pointsOffset + subdiv->pointsOffset();
|
||||
quint32 end = subdiv->pointsEnd()
|
||||
? _pointsOffset + subdiv->pointsEnd()
|
||||
: _pointsOffset + _linesSize;
|
||||
extPointObjects(rect, rgnHdl, subdiv, Segment(start, end,
|
||||
Segment::Point), lbl, lblHdl, points);
|
||||
}
|
||||
}
|
||||
|
||||
QVector<RGNFile::Segment> RGNFile::segments(Handle &hdl, const SubDiv *subdiv)
|
||||
const
|
||||
{
|
||||
if (subdiv->offset() == subdiv->end() || !(subdiv->objects() & 0xF0))
|
||||
return QVector<Segment>();
|
||||
|
||||
quint32 offset = _offset + subdiv->offset();
|
||||
|
||||
int no = 0;
|
||||
for (quint8 mask = 0x10; mask; mask <<= 1)
|
||||
if (subdiv->objects() & mask)
|
||||
no++;
|
||||
|
||||
if (!seek(hdl, offset))
|
||||
return QVector<Segment>();
|
||||
|
||||
QVector<Segment> ret;
|
||||
quint32 start = offset + 2 * (no - 1);
|
||||
quint16 po;
|
||||
int cnt = 0;
|
||||
|
||||
for (quint8 mask = 0x10; mask; mask <<= 1) {
|
||||
if (subdiv->objects() & mask) {
|
||||
if (cnt) {
|
||||
if (!readUInt16(hdl, po))
|
||||
return QVector<Segment>();
|
||||
start = offset + po;
|
||||
}
|
||||
if (!ret.isEmpty())
|
||||
ret.last().setEnd(start);
|
||||
ret.append(Segment(start, (Segment::Type)mask));
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
|
||||
ret.last().setEnd(subdiv->end() ? _offset + subdiv->end() : _offset + _size);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const RGNFile::Segment &segment)
|
||||
{
|
||||
dbg.nospace() << "Segment(" << segment.start() << ", " << segment.end()
|
||||
<< ", " << segment.type() << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
107
src/map/IMG/rgnfile.h
Normal file
@ -0,0 +1,107 @@
|
||||
#ifndef RGNFILE_H
|
||||
#define RGNFILE_H
|
||||
|
||||
#include "img.h"
|
||||
#include "subfile.h"
|
||||
#include "subdiv.h"
|
||||
|
||||
class LBLFile;
|
||||
class NETFile;
|
||||
|
||||
class RGNFile : public SubFile
|
||||
{
|
||||
public:
|
||||
RGNFile(IMG *img, quint32 size) : SubFile(img, size), _init(false) {}
|
||||
|
||||
void objects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
||||
NETFile *net, QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||
QList<IMG::Point> *points);
|
||||
void extObjects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
||||
QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||
QList<IMG::Point> *points);
|
||||
|
||||
private:
|
||||
class Segment {
|
||||
public:
|
||||
enum Type {
|
||||
Point = 0x10,
|
||||
IndexedPoint = 0x20,
|
||||
Line = 0x40,
|
||||
Polygon = 0x80
|
||||
};
|
||||
|
||||
Segment() : _start(0), _end(0), _type(Point) {}
|
||||
Segment(quint32 start, Type type)
|
||||
: _start(start), _end(0), _type(type) {}
|
||||
Segment(quint32 start, quint32 end, Type type)
|
||||
: _start(start), _end(end), _type(type) {}
|
||||
|
||||
void setEnd(quint32 end) {_end = end;}
|
||||
|
||||
quint32 start() const {return _start;}
|
||||
quint32 end() const {return _end;}
|
||||
Type type() const {return _type;}
|
||||
|
||||
private:
|
||||
quint32 _start;
|
||||
quint32 _end;
|
||||
Type _type;
|
||||
};
|
||||
|
||||
class BitStream {
|
||||
public:
|
||||
BitStream(const SubFile &file, Handle &hdl, quint16 length)
|
||||
: _file(file), _hdl(hdl), _length(length), _remaining(0) {}
|
||||
|
||||
bool read(int bits, quint32 &val);
|
||||
bool readDelta(int bits, int sign, bool extraBit, qint32 &delta);
|
||||
bool hasNext(int bits) const
|
||||
{return _length * 8 + _remaining >= (quint32)bits;}
|
||||
bool finish();
|
||||
|
||||
private:
|
||||
const SubFile &_file;
|
||||
Handle &_hdl;
|
||||
quint16 _length;
|
||||
quint32 _remaining;
|
||||
quint8 _data;
|
||||
};
|
||||
|
||||
static bool sign(BitStream &bs, int &val);
|
||||
static int bitSize(quint8 baseSize, bool variableSign, bool extraBit);
|
||||
|
||||
bool init();
|
||||
QVector<Segment> segments(Handle &hdl, const SubDiv *subdiv) const;
|
||||
bool polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl, NETFile *net,
|
||||
Handle &netHdl, QList<IMG::Poly> *polys) const;
|
||||
bool pointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Point> *points) const;
|
||||
bool extPolyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Poly> *polys) const;
|
||||
bool extPointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
||||
const Segment &segment, LBLFile *lbl, Handle &lblHdl,
|
||||
QList<IMG::Point> *points) const;
|
||||
|
||||
friend QDebug operator<<(QDebug dbg, const RGNFile::Segment &segment);
|
||||
|
||||
quint32 _offset;
|
||||
quint32 _size;
|
||||
|
||||
quint32 _polygonsOffset;
|
||||
quint32 _polygonsSize;
|
||||
quint32 _linesOffset;
|
||||
quint32 _linesSize;
|
||||
quint32 _pointsOffset;
|
||||
quint32 _pointsSize;
|
||||
|
||||
bool _init;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const RGNFile::Segment &segment);
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
#endif // RGNFILE_H
|
857
src/map/IMG/style.cpp
Normal file
@ -0,0 +1,857 @@
|
||||
#include <QImage>
|
||||
#include "style.h"
|
||||
|
||||
#define TYPE(t) ((t)<<8)
|
||||
|
||||
void Style::defaultPolygonStyle()
|
||||
{
|
||||
_polygons[TYPE(0x01)] = Style::Polygon(QBrush("#dfd3b5"));
|
||||
_polygons[TYPE(0x02)] = Style::Polygon(QBrush("#dfd3b5"));
|
||||
_polygons[TYPE(0x03)] = Style::Polygon(QBrush("#dfd3b5"));
|
||||
_polygons[TYPE(0x04)] = Style::Polygon(QBrush("#ff4040", Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x05)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x06)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x07)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x08)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x09)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x0a)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x0b)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x0c)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x0d)] = Style::Polygon(QBrush("#f8e3be"));
|
||||
_polygons[TYPE(0x0e)] = Style::Polygon(QBrush("#ffffff"));
|
||||
_polygons[TYPE(0x0f)] = Style::Polygon(QBrush("#e6e2d9"));
|
||||
_polygons[TYPE(0x10)] = Style::Polygon(QBrush("#e6e2d9"));
|
||||
_polygons[TYPE(0x11)] = Style::Polygon(QBrush("#e6e2d9"));
|
||||
_polygons[TYPE(0x12)] = Style::Polygon(QBrush("#e6e2d9"));
|
||||
_polygons[TYPE(0x13)] = Style::Polygon(QBrush("#dbd0b6"),
|
||||
QPen(QColor("#cdccc4"), 1));
|
||||
_polygons[TYPE(0x14)] = Style::Polygon(QBrush(QColor("#9ac269"),
|
||||
Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x15)] = Style::Polygon(QBrush(QColor("#9ac269"),
|
||||
Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x16)] = Style::Polygon(QBrush(QColor("#9ac269"),
|
||||
Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x17)] = Style::Polygon(QBrush("#d4ebb8"));
|
||||
_polygons[TYPE(0x18)] = Style::Polygon(QBrush("#d4ebb8"));
|
||||
_polygons[TYPE(0x19)] = Style::Polygon(QBrush("#d6d4ce"));
|
||||
_polygons[TYPE(0x1a)] = Style::Polygon(QBrush("#000000", Qt::Dense6Pattern),
|
||||
QPen(QColor("#cdccc4"), 1));
|
||||
_polygons[TYPE(0x1e)] = Style::Polygon(QBrush(QColor("#9ac269"),
|
||||
Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x1f)] = Style::Polygon(QBrush(QColor("#9ac269"),
|
||||
Qt::BDiagPattern));
|
||||
_polygons[TYPE(0x28)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x29)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x32)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x3b)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x3c)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x3d)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x3e)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x3f)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x40)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x41)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x42)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x43)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x44)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x45)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x46)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x47)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x48)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x49)] = Style::Polygon(QBrush("#9fc4e1"));
|
||||
_polygons[TYPE(0x4b)] = Style::Polygon(QBrush("#f1f0e5"), QPen("#f1f0e5"));
|
||||
_polygons[TYPE(0x4a)] = Style::Polygon(QBrush("#f1f0e5"), QPen("#f1f0e5"));
|
||||
_polygons[TYPE(0x4c)] = Style::Polygon(QBrush("#9fc4e1", Qt::Dense6Pattern));
|
||||
_polygons[TYPE(0x4d)] = Style::Polygon(QBrush("#ddf1fd"));
|
||||
_polygons[TYPE(0x4e)] = Style::Polygon(QBrush("#e3edc1"));
|
||||
_polygons[TYPE(0x4f)] = Style::Polygon(QBrush("#d4ebb8"));
|
||||
_polygons[TYPE(0x50)] = Style::Polygon(QBrush("#d4ebb8"));
|
||||
_polygons[TYPE(0x51)] = Style::Polygon(QBrush("#9fc4e1", Qt::Dense4Pattern));
|
||||
_polygons[TYPE(0x52)] = Style::Polygon(QBrush("#d4ebb8"));
|
||||
|
||||
_drawOrder << TYPE(0x4b) << TYPE(0x4a) << TYPE(0x01) << TYPE(0x02)
|
||||
<< TYPE(0x03) << TYPE(0x17) << TYPE(0x18) << TYPE(0x19) << TYPE(0x1a)
|
||||
<< TYPE(0x28) << TYPE(0x29) << TYPE(0x32) << TYPE(0x3b) << TYPE(0x3c)
|
||||
<< TYPE(0x3d) << TYPE(0x3e) << TYPE(0x3f) << TYPE(0x40) << TYPE(0x41)
|
||||
<< TYPE(0x42) << TYPE(0x43) << TYPE(0x44) << TYPE(0x45) << TYPE(0x46)
|
||||
<< TYPE(0x47) << TYPE(0x48) << TYPE(0x49) << TYPE(0x4c) << TYPE(0x4d)
|
||||
<< TYPE(0x4e) << TYPE(0x4f) << TYPE(0x50) << TYPE(0x51) << TYPE(0x52)
|
||||
<< TYPE(0x14) << TYPE(0x15) << TYPE(0x1e) << TYPE(0x1f) << TYPE(0x04)
|
||||
<< TYPE(0x05) << TYPE(0x06) << TYPE(0x07) << TYPE(0x08) << TYPE(0x09)
|
||||
<< TYPE(0x0a) << TYPE(0x0b) << TYPE(0x0c) << TYPE(0x0d) << TYPE(0x0e)
|
||||
<< TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x13);
|
||||
}
|
||||
|
||||
void Style::defaultLineStyle()
|
||||
{
|
||||
QVector<qreal> pattern;
|
||||
pattern << 4 << 4;
|
||||
QPen rr(QColor("#717171"), 3, Qt::CustomDashLine);
|
||||
rr.setDashPattern(pattern);
|
||||
|
||||
_lines[TYPE(0x01)] = Style::Line(QPen(QColor("#9bd772"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#72a35a"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x02)] = Style::Line(QPen(QColor("#ffcc78"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#e8a541"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x03)] = Style::Line(QPen(QColor("#ffcc78"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#e8a541"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x04)] = Style::Line(QPen(QColor("#faef75"), 3, Qt::SolidLine),
|
||||
QPen(QColor("#dbd27b"), 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x05)] = Style::Line(QPen(QColor("#ffffff"), 3, Qt::SolidLine),
|
||||
QPen(QColor("#d5cdc0"), 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x06)] = Style::Line(QPen(QColor("#ffffff"), 3, Qt::SolidLine),
|
||||
QPen(QColor("#d5cdc0"), 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x07)] = Style::Line(QPen(QColor("#ffffff"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#d5cdc0"), 4, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x08)] = Style::Line(QPen(QColor("#ffcc78"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#e8a541"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x09)] = Style::Line(QPen(QColor("#9bd772"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#72a35a"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x0a)] = Style::Line(QPen(QColor("#aba083"), 1, Qt::DashLine));
|
||||
_lines[TYPE(0x0b)] = Style::Line(QPen(QColor("#ffcc78"), 2, Qt::SolidLine),
|
||||
QPen(QColor("#e8a541"), 6, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x0c)] = Style::Line(QPen(QColor("#ffffff"), 3, Qt::SolidLine),
|
||||
QPen(QColor("#d5cdc0"), 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x14)] = Style::Line(rr, QPen(Qt::white, 3, Qt::SolidLine,
|
||||
Qt::RoundCap, Qt::RoundJoin));
|
||||
_lines[TYPE(0x16)] = Style::Line(QPen(QColor("#aba083"), 1, Qt::DotLine));
|
||||
_lines[TYPE(0x18)] = Style::Line(QPen(QColor("#9fc4e1"), 2, Qt::SolidLine));
|
||||
_lines[TYPE(0x18)].setTextColor(QColor("#9fc4e1"));
|
||||
//_lines[TYPE(0x1a)] = Style::Line(QPen(QColor("#7697b7"), 1, Qt::DashLine));
|
||||
_lines[TYPE(0x1b)] = Style::Line(QPen(QColor("#7697b7"), 1, Qt::DashLine));
|
||||
_lines[TYPE(0x1e)] = Style::Line(QPen(QColor("#505145"), 2, Qt::DashDotLine));
|
||||
_lines[TYPE(0x1f)] = Style::Line(QPen(QColor("#9fc4e1"), 3, Qt::SolidLine));
|
||||
_lines[TYPE(0x1f)].setTextColor(QColor("#9fc4e1"));
|
||||
_lines[TYPE(0x20)] = Style::Line(QPen(QColor("#cacfc0"), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x20)].setTextColor(QColor("#62695a"));
|
||||
_lines[TYPE(0x20)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x21)] = Style::Line(QPen(QColor("#cacfc0"), 1.5, Qt::SolidLine));
|
||||
_lines[TYPE(0x21)].setTextColor(QColor("#62695a"));
|
||||
_lines[TYPE(0x21)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x22)] = Style::Line(QPen(QColor("#cacfc0"), 2, Qt::SolidLine));
|
||||
_lines[TYPE(0x22)].setTextColor(QColor("#62695a"));
|
||||
_lines[TYPE(0x22)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x23)] = Style::Line(QPen(QColor("#55aaff"), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x23)].setTextColor(QColor("#55aaff"));
|
||||
_lines[TYPE(0x23)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x24)] = Style::Line(QPen(QColor("#55aaff"), 1.5, Qt::SolidLine));
|
||||
_lines[TYPE(0x24)].setTextColor(QColor("#55aaff"));
|
||||
_lines[TYPE(0x24)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x25)] = Style::Line(QPen(QColor("#55aaff"), 2, Qt::SolidLine));
|
||||
_lines[TYPE(0x25)].setTextColor(QColor("#55aaff"));
|
||||
_lines[TYPE(0x25)].setTextFontSize(Style::Small);
|
||||
_lines[TYPE(0x26)] = Style::Line(QPen(QColor("#9fc4e1"), 2, Qt::DotLine));
|
||||
_lines[TYPE(0x27)] = Style::Line(QPen(QColor("#ffffff"), 4, Qt::SolidLine),
|
||||
QPen(QColor("#d5cdc0"), 5, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
|
||||
//_lines[TYPE(0x28)] = Style::Line(QPen(QColor("#5a5a5a"), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x29)] = Style::Line(QPen(QColor("#5a5a5a"), 1, Qt::SolidLine));
|
||||
_lines[TYPE(0x29)].setTextFontSize(Style::None);
|
||||
}
|
||||
|
||||
static bool readBitmap(SubFile *file, SubFile::Handle &hdl, QImage &img,
|
||||
int bpp)
|
||||
{
|
||||
if (!bpp)
|
||||
return true;
|
||||
|
||||
for (int y = 0; y < img.height(); y++) {
|
||||
for (int x = 0; x < img.width(); x += 8/bpp) {
|
||||
quint8 color;
|
||||
if (!file->readByte(hdl, color))
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < 8/bpp && x + i < img.width(); i++) {
|
||||
int value = (i > 0) ? (color >>= bpp) : color;
|
||||
|
||||
if (bpp == 4)
|
||||
value = value & 0xf;
|
||||
else if (bpp == 2)
|
||||
value = value & 0x3;
|
||||
else if (bpp == 1)
|
||||
value = value & 0x1;
|
||||
|
||||
img.setPixel(x + i, y, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool readColor(SubFile *file, SubFile::Handle &hdl, QColor &color)
|
||||
{
|
||||
quint8 b, g, r;
|
||||
|
||||
if (!(file->readByte(hdl, b) && file->readByte(hdl, g)
|
||||
&& file->readByte(hdl, r)))
|
||||
return false;
|
||||
|
||||
color = qRgb(r, g, b);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool skipLocalization(SubFile *file, SubFile::Handle &hdl)
|
||||
{
|
||||
quint8 t8;
|
||||
quint16 len;
|
||||
|
||||
if (!file->readByte(hdl, t8))
|
||||
return false;
|
||||
len = t8;
|
||||
|
||||
if (len & 0x01)
|
||||
len = len >> 1;
|
||||
else {
|
||||
if (!file->readByte(hdl, t8))
|
||||
return false;
|
||||
len = (((quint16)t8) << 8) | len;
|
||||
len = len >> 2;
|
||||
}
|
||||
|
||||
if (!file->seek(hdl, hdl.pos + len))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Style::itemInfo(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion, ItemInfo &info)
|
||||
{
|
||||
quint16 t16_1, t16_2;
|
||||
quint8 t8;
|
||||
|
||||
if (section.arrayItemSize == 5) {
|
||||
if (!(file->readUInt16(hdl, t16_1) && file->readUInt16(hdl, t16_2)
|
||||
&& file->readByte(hdl, t8)))
|
||||
return false;
|
||||
info.offset = t16_2 | (t8<<16);
|
||||
} else if (section.arrayItemSize == 4) {
|
||||
if (!(file->readUInt16(hdl, t16_1) && file->readUInt16(hdl, t16_2)))
|
||||
return false;
|
||||
info.offset = t16_2;
|
||||
} else if (section.arrayItemSize == 3) {
|
||||
if (!(file->readUInt16(hdl, t16_1) && file->readByte(hdl, t8)))
|
||||
return false;
|
||||
info.offset = t8;
|
||||
} else
|
||||
return false;
|
||||
|
||||
t16_2 = (t16_1 >> 5) | (( t16_1 & 0x1f) << 11);
|
||||
info.type = t16_2 & 0x7F;
|
||||
info.subtype = t16_1 & 0x1F;
|
||||
info.extended = t16_1 & 0x2000;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::parsePolygons(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion)
|
||||
{
|
||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||
return false;
|
||||
ItemInfo info;
|
||||
if (!itemInfo(file, hdl, section, info))
|
||||
return false;
|
||||
quint32 type = info.extended
|
||||
? 0x10000 | (info.type << 8) | info.subtype : (info.type << 8);
|
||||
|
||||
quint8 t8, flags;
|
||||
if (!(file->seek(hdl, section.offset + info.offset)
|
||||
&& file->readByte(hdl, t8)))
|
||||
return false;
|
||||
flags = t8 & 0x0F;
|
||||
|
||||
QColor c1, c2, c3, c4;
|
||||
QImage img(32, 32, QImage::Format_Indexed8);
|
||||
|
||||
switch (flags) {
|
||||
case 0x01:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3) && readColor(file, hdl, c4)))
|
||||
return false;
|
||||
_polygons[type] = Style::Polygon(QBrush(c1), QPen(c3, 2));
|
||||
break;
|
||||
|
||||
case 0x06:
|
||||
case 0x07:
|
||||
if (!readColor(file, hdl, c1))
|
||||
return false;
|
||||
_polygons[type] = Style::Polygon(QBrush(c1));
|
||||
break;
|
||||
|
||||
case 0x08:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)))
|
||||
return false;
|
||||
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_polygons[type] = Style::Polygon(QBrush(img));
|
||||
break;
|
||||
|
||||
case 0x09:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3) && readColor(file, hdl, c4)))
|
||||
return false;
|
||||
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_polygons[type] = Style::Polygon(QBrush(img));
|
||||
break;
|
||||
|
||||
case 0x0B:
|
||||
case 0x0D:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3)))
|
||||
return false;
|
||||
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, (flags == 0x0B) ? qRgba(255, 255, 255, 0)
|
||||
: c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_polygons[type] = Style::Polygon(QBrush(img));
|
||||
break;
|
||||
|
||||
case 0x0E:
|
||||
if (!readColor(file, hdl, c1))
|
||||
return false;
|
||||
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, qRgba(255, 255, 255, 0));
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_polygons[type] = Style::Polygon(QBrush(img));
|
||||
break;
|
||||
|
||||
case 0x0F:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)))
|
||||
return false;
|
||||
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, qRgba(255, 255, 255, 0));
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_polygons[type] = Style::Polygon(QBrush(img));
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::parseLines(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion)
|
||||
{
|
||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||
return false;
|
||||
ItemInfo info;
|
||||
if (!itemInfo(file, hdl, section, info))
|
||||
return false;
|
||||
quint32 type = info.extended
|
||||
? 0x10000 | (info.type << 8) | info.subtype : (info.type << 8);
|
||||
|
||||
quint8 t8_1, t8_2, flags, rows;
|
||||
if (!(file->seek(hdl, section.offset + info.offset)
|
||||
&& file->readByte(hdl, t8_1) && file->readByte(hdl, t8_2)))
|
||||
return false;
|
||||
flags = t8_1 & 0x07;
|
||||
rows = t8_1 >> 3;
|
||||
bool localization = t8_2 & 0x01;
|
||||
bool textColor = t8_2 & 0x04;
|
||||
|
||||
QColor c1, c2, c3, c4;
|
||||
quint8 w1, w2;
|
||||
|
||||
switch (flags) {
|
||||
case 0x00:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!(file->readByte(hdl, w1) && file->readByte(hdl, w2)))
|
||||
return false;
|
||||
|
||||
_lines[type] = (w2 > w1)
|
||||
? Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin), QPen(c2, w2, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin))
|
||||
: Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x01:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3) && readColor(file, hdl, c4)))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!(file->readByte(hdl, w1) && file->readByte(hdl, w2)))
|
||||
return false;
|
||||
|
||||
_lines[type] = (w2 > w1)
|
||||
? Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin), QPen(c2, w2, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin))
|
||||
: Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x03:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3)))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, qRgba(255, 255, 255, 0));
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!(file->readByte(hdl, w1) && file->readByte(hdl, w2)))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(QPen(c1, w1, Qt::SolidLine,
|
||||
Qt::RoundCap, Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x05:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)
|
||||
&& readColor(file, hdl, c3)))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, c2.rgb());
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!(file->readByte(hdl, w1) && file->readByte(hdl, w2)))
|
||||
return false;
|
||||
|
||||
_lines[type] = (w2 > w1)
|
||||
? Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin), QPen(c2, w2, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin))
|
||||
: Style::Line(QPen(c1, w1, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x06:
|
||||
if (!readColor(file, hdl, c1))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, qRgba(255, 255, 255, 0));
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!file->readByte(hdl, w1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(QPen(c1, w1, Qt::SolidLine,
|
||||
Qt::RoundCap, Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x07:
|
||||
if (!(readColor(file, hdl, c1) && readColor(file, hdl, c2)))
|
||||
return false;
|
||||
|
||||
if (rows) {
|
||||
QImage img(32, rows, QImage::Format_Indexed8);
|
||||
img.setColorCount(2);
|
||||
img.setColor(0, qRgba(255,255,255,0));
|
||||
img.setColor(1, c1.rgb());
|
||||
if (!readBitmap(file, hdl, img, 1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(img);
|
||||
} else {
|
||||
if (!file->readByte(hdl, w1))
|
||||
return false;
|
||||
|
||||
_lines[type] = Style::Line(QPen(c1, w1, Qt::SolidLine,
|
||||
Qt::RoundCap, Qt::RoundJoin));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isContourLine(type)) {
|
||||
Line &l = _lines[type];
|
||||
l.setTextColor(l.foreground().color());
|
||||
l.setTextFontSize(Small);
|
||||
}
|
||||
|
||||
if (localization && !skipLocalization(file, hdl))
|
||||
return false;
|
||||
|
||||
if (textColor) {
|
||||
quint8 labelFlags;
|
||||
if (!file->readByte(hdl, labelFlags))
|
||||
return false;
|
||||
if (labelFlags & 0x08) {
|
||||
if (!readColor(file, hdl, c1))
|
||||
return false;
|
||||
_lines[type].setTextColor(c1);
|
||||
}
|
||||
_lines[type].setTextFontSize((FontSize)(labelFlags & 0x07));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int colors2bpp(quint8 colors, quint8 flags)
|
||||
{
|
||||
switch (flags) {
|
||||
case 0x00:
|
||||
if (colors < 3)
|
||||
return colors;
|
||||
else if (colors == 3)
|
||||
return 2;
|
||||
else if (colors < 16)
|
||||
return 4;
|
||||
else
|
||||
return 8;
|
||||
case 0x10:
|
||||
if (colors == 0)
|
||||
return 1;
|
||||
else if (colors < 3)
|
||||
return 2;
|
||||
else if (colors < 15)
|
||||
return 4;
|
||||
else
|
||||
return 8;
|
||||
case 0x20:
|
||||
if (colors == 0)
|
||||
return -1;
|
||||
else if (colors < 3)
|
||||
return colors;
|
||||
else if (colors < 4)
|
||||
return 2;
|
||||
else if (colors < 16)
|
||||
return 4;
|
||||
else
|
||||
return 8;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool readColorTable(SubFile *file, SubFile::Handle &hdl, QImage& img,
|
||||
int colors, int bpp, bool transparent)
|
||||
{
|
||||
img.setColorCount(colors);
|
||||
|
||||
if (transparent) {
|
||||
quint8 byte;
|
||||
quint32 bits = 0, reg = 0, mask = 0x000000FF;
|
||||
|
||||
for (int i = 0; i < colors; i++) {
|
||||
while (bits < 28) {
|
||||
if (!file->readByte(hdl, byte))
|
||||
return false;
|
||||
|
||||
mask = 0x000000FF << bits;
|
||||
reg = reg & (~mask);
|
||||
reg = reg | (byte << bits);
|
||||
bits += 8;
|
||||
}
|
||||
|
||||
img.setColor(i, qRgba((reg >> 16) & 0x0FF, (reg >> 8) & 0x0FF,
|
||||
reg & 0x0FF, ~((reg >> 24) & 0x0F) << 4));
|
||||
|
||||
reg = reg >> 28;
|
||||
bits -= 28;
|
||||
}
|
||||
for (int i = colors; i < 1<<bpp; i++)
|
||||
img.setColor(i, qRgba(0, 0, 0, 0));
|
||||
} else {
|
||||
QColor color;
|
||||
|
||||
for (int i = 0; i < colors; i++) {
|
||||
if (!readColor(file, hdl, color))
|
||||
return false;
|
||||
img.setColor(i, color.rgb());
|
||||
}
|
||||
for (int i = colors; i < 1<<bpp; i++)
|
||||
img.setColor(i, qRgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::parsePoints(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion)
|
||||
{
|
||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||
return false;
|
||||
ItemInfo info;
|
||||
if (!itemInfo(file, hdl, section, info))
|
||||
return false;
|
||||
quint32 type = info.extended
|
||||
? 0x10000 | (info.type << 8) | info.subtype
|
||||
: (info.type << 8) | info.subtype;
|
||||
|
||||
quint8 t8_1, width, height, numColors, imgType;
|
||||
if (!(file->seek(hdl, section.offset + info.offset)
|
||||
&& file->readByte(hdl, t8_1) && file->readByte(hdl, width)
|
||||
&& file->readByte(hdl, height) && file->readByte(hdl, numColors)
|
||||
&& file->readByte(hdl, imgType)))
|
||||
return false;
|
||||
|
||||
bool localization = t8_1 & 0x04;
|
||||
bool textColor = t8_1 & 0x08;
|
||||
|
||||
int bpp = colors2bpp(numColors, imgType);
|
||||
if (bpp <= 0)
|
||||
continue;
|
||||
QImage img(width, height, QImage::Format_Indexed8);
|
||||
if (!readColorTable(file, hdl, img, numColors, bpp, imgType == 0x20))
|
||||
return false;
|
||||
if (!readBitmap(file, hdl, img, bpp))
|
||||
return false;
|
||||
_points[type] = Point(img);
|
||||
|
||||
if (t8_1 == 0x03) {
|
||||
if (!(file->readByte(hdl, numColors)
|
||||
&& file->readByte(hdl, imgType)))
|
||||
return false;
|
||||
if ((bpp = colors2bpp(numColors, imgType)) < 0)
|
||||
continue;
|
||||
if (!readColorTable(file, hdl, img, numColors, bpp, imgType == 0x20))
|
||||
return false;
|
||||
if (!readBitmap(file, hdl, img, bpp))
|
||||
return false;
|
||||
} else if (t8_1 == 0x02) {
|
||||
if (!(file->readByte(hdl, numColors)
|
||||
&& file->readByte(hdl, imgType)))
|
||||
return false;
|
||||
if ((bpp = colors2bpp(numColors, imgType)) < 0)
|
||||
continue;
|
||||
if (!readColorTable(file, hdl, img, numColors, bpp, imgType == 0x20))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (localization && !skipLocalization(file, hdl))
|
||||
return false;
|
||||
|
||||
if (textColor) {
|
||||
quint8 labelFlags;
|
||||
QColor color;
|
||||
if (!file->readByte(hdl, labelFlags))
|
||||
return false;
|
||||
if (labelFlags & 0x08) {
|
||||
if (!readColor(file, hdl, color))
|
||||
return false;
|
||||
_points[type].setTextColor(color);
|
||||
}
|
||||
_points[type].setTextFontSize((FontSize)(labelFlags & 0x07));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::parseDrawOrder(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section &order)
|
||||
{
|
||||
QList<quint32> drawOrder;
|
||||
|
||||
if (!file->seek(hdl, order.arrayOffset))
|
||||
return false;
|
||||
|
||||
for (quint32 i = 0; i < order.arraySize / order.arrayItemSize; i++) {
|
||||
quint8 type;
|
||||
quint32 subtype;
|
||||
|
||||
if (!(file->readByte(hdl, type) && file->readUInt32(hdl, subtype)))
|
||||
return false;
|
||||
|
||||
if (!subtype)
|
||||
drawOrder.append(((quint32)type) << 8);
|
||||
else {
|
||||
for (int j = 0; j < 32; j++) {
|
||||
quint32 mask = 1 << j;
|
||||
if (subtype & mask)
|
||||
drawOrder.append(0x010000 | (((quint32)type) << 8) | j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_drawOrder = drawOrder;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Style::parseTYPFile(SubFile *file)
|
||||
{
|
||||
SubFile::Handle hdl;
|
||||
Section points, lines, polygons, order;
|
||||
quint16 tmp16, codepage;
|
||||
|
||||
if (!(file->seek(hdl, 0x15) && file->readUInt16(hdl, codepage)
|
||||
&& file->readUInt32(hdl, points.offset)
|
||||
&& file->readUInt32(hdl, points.size)
|
||||
&& file->readUInt32(hdl, lines.offset)
|
||||
&& file->readUInt32(hdl, lines.size)
|
||||
&& file->readUInt32(hdl, polygons.offset)
|
||||
&& file->readUInt32(hdl, polygons.size)))
|
||||
return false;
|
||||
|
||||
if (!(file->readUInt16(hdl, tmp16) && file->readUInt16(hdl, tmp16)))
|
||||
return false;
|
||||
|
||||
if (!(file->readUInt32(hdl, points.arrayOffset)
|
||||
&& file->readUInt16(hdl, points.arrayItemSize)
|
||||
&& file->readUInt32(hdl, points.arraySize)
|
||||
&& file->readUInt32(hdl, lines.arrayOffset)
|
||||
&& file->readUInt16(hdl, lines.arrayItemSize)
|
||||
&& file->readUInt32(hdl, lines.arraySize)
|
||||
&& file->readUInt32(hdl, polygons.arrayOffset)
|
||||
&& file->readUInt16(hdl, polygons.arrayItemSize)
|
||||
&& file->readUInt32(hdl, polygons.arraySize)
|
||||
&& file->readUInt32(hdl, order.arrayOffset)
|
||||
&& file->readUInt16(hdl, order.arrayItemSize)
|
||||
&& file->readUInt32(hdl, order.arraySize)))
|
||||
return false;
|
||||
|
||||
if (!(parsePoints(file, hdl, points) && parseLines(file, hdl, lines)
|
||||
&& parsePolygons(file, hdl, polygons)
|
||||
&& parseDrawOrder(file, hdl, order))) {
|
||||
qWarning("%s: Invalid TYP file, using default style",
|
||||
qPrintable(file->imgName()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Style::Style(SubFile *typ)
|
||||
{
|
||||
defaultLineStyle();
|
||||
defaultPolygonStyle();
|
||||
|
||||
if (typ)
|
||||
parseTYPFile(typ);
|
||||
}
|
||||
|
||||
const Style::Line &Style::line(quint32 type) const
|
||||
{
|
||||
static Line null;
|
||||
|
||||
QMap<quint32, Line>::const_iterator it = _lines.find(type);
|
||||
return (it == _lines.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
const Style::Polygon &Style::polygon(quint32 type) const
|
||||
{
|
||||
static Polygon null;
|
||||
|
||||
QMap<quint32, Polygon>::const_iterator it = _polygons.find(type);
|
||||
return (it == _polygons.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
const Style::Point &Style::point(quint32 type) const
|
||||
{
|
||||
static Point null;
|
||||
|
||||
QMap<quint16, Point>::const_iterator it = _points.find(type);
|
||||
return (it == _points.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
bool Style::isContourLine(quint32 type)
|
||||
{
|
||||
return (type == TYPE(0x20) || type == TYPE(0x21) || type == TYPE(0x22)
|
||||
|| type == TYPE(0x23) || type == TYPE(0x24) || type == TYPE(0x25));
|
||||
}
|
||||
|
||||
bool Style::isSpot(quint32 type)
|
||||
{
|
||||
return (type == TYPE(0x62) || type == TYPE(0x63));
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
static QString penColor(const QPen &pen)
|
||||
{
|
||||
return (pen == Qt::NoPen) ? "None" : pen.color().name();
|
||||
}
|
||||
|
||||
static QString brushColor(const QBrush &brush)
|
||||
{
|
||||
return (brush == Qt::NoBrush) ? "None" : brush.color().name();
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, const Style::Polygon &polygon)
|
||||
{
|
||||
dbg.nospace() << "Polygon(" << brushColor(polygon.brush()) << ", "
|
||||
<< penColor(polygon.pen()) << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug dbg, const Style::Line &line)
|
||||
{
|
||||
dbg.nospace() << "Line(" << penColor(line.foreground()) << ", "
|
||||
<< penColor(line.background()) << ", " << !line.img().isNull() << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
136
src/map/IMG/style.h
Normal file
@ -0,0 +1,136 @@
|
||||
#ifndef STYLE_H
|
||||
#define STYLE_H
|
||||
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QDebug>
|
||||
#include "subfile.h"
|
||||
|
||||
|
||||
class Style
|
||||
{
|
||||
public:
|
||||
enum FontSize {
|
||||
NotSet = 0,
|
||||
None = 1,
|
||||
Small = 2,
|
||||
Normal = 3,
|
||||
Large = 4
|
||||
};
|
||||
|
||||
class Polygon {
|
||||
public:
|
||||
Polygon() : _brush(Qt::NoBrush), _pen(Qt::NoPen) {}
|
||||
Polygon(const QBrush &brush, const QPen &pen = Qt::NoPen)
|
||||
: _brush(brush)
|
||||
{
|
||||
_pen = (pen == Qt::NoPen) ? QPen(_brush, 0) : pen;
|
||||
}
|
||||
|
||||
const QPen &pen() const {return _pen;}
|
||||
const QBrush &brush() const {return _brush;}
|
||||
|
||||
private:
|
||||
QBrush _brush;
|
||||
QPen _pen;
|
||||
};
|
||||
|
||||
class Line {
|
||||
public:
|
||||
Line() : _foreground(Qt::NoPen), _background(Qt::NoPen),
|
||||
_textFontSize(NotSet) {}
|
||||
Line(const QPen &foreground, const QPen &background = Qt::NoPen)
|
||||
: _foreground(foreground), _background(background),
|
||||
_textFontSize(NotSet) {}
|
||||
Line(const QImage &img)
|
||||
: _foreground(Qt::NoPen), _background(Qt::NoPen),
|
||||
_textFontSize(NotSet), _img(img.convertToFormat(
|
||||
QImage::Format_ARGB32_Premultiplied)) {}
|
||||
|
||||
void setTextColor(const QColor &color) {_textColor = color;}
|
||||
void setTextFontSize(FontSize size) {_textFontSize = size;}
|
||||
|
||||
const QPen &foreground() const {return _foreground;}
|
||||
const QPen &background() const {return _background;}
|
||||
const QColor &textColor() const {return _textColor;}
|
||||
FontSize textFontSize() const {return _textFontSize;}
|
||||
const QImage &img() const {return _img;}
|
||||
|
||||
private:
|
||||
QPen _foreground, _background;
|
||||
QColor _textColor;
|
||||
FontSize _textFontSize;
|
||||
QImage _img;
|
||||
};
|
||||
|
||||
class Point {
|
||||
public:
|
||||
Point() : _textFontSize(NotSet) {}
|
||||
Point(const QImage &img) : _textFontSize(NotSet), _img(img) {}
|
||||
|
||||
void setTextColor(const QColor &color) {_textColor = color;}
|
||||
void setTextFontSize(FontSize size) {_textFontSize = size;}
|
||||
|
||||
const QColor &textColor() const {return _textColor;}
|
||||
FontSize textFontSize() const {return _textFontSize;}
|
||||
const QImage &img() const {return _img;}
|
||||
|
||||
private:
|
||||
QColor _textColor;
|
||||
FontSize _textFontSize;
|
||||
QImage _img;
|
||||
};
|
||||
|
||||
|
||||
Style(SubFile *typ = 0);
|
||||
|
||||
const Line &line(quint32 type) const;
|
||||
const Polygon &polygon(quint32 type) const;
|
||||
const Point &point(quint32 type) const;
|
||||
const QList<quint32> &drawOrder() const {return _drawOrder;}
|
||||
|
||||
static bool isContourLine(quint32 type);
|
||||
static bool isSpot(quint32 type);
|
||||
|
||||
private:
|
||||
struct Section {
|
||||
quint32 offset;
|
||||
quint32 size;
|
||||
quint32 arrayOffset;
|
||||
quint32 arraySize;
|
||||
quint16 arrayItemSize;
|
||||
};
|
||||
|
||||
struct ItemInfo {
|
||||
quint32 offset;
|
||||
quint8 type;
|
||||
quint8 subtype;
|
||||
bool extended;
|
||||
};
|
||||
|
||||
bool parseTYPFile(SubFile *file);
|
||||
bool parsePoints(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion);
|
||||
bool parseLines(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion);
|
||||
bool parsePolygons(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion);
|
||||
bool parseDrawOrder(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion);
|
||||
bool itemInfo(SubFile *file, SubFile::Handle &hdl,
|
||||
const Section §ion, ItemInfo &info);
|
||||
void defaultPolygonStyle();
|
||||
void defaultLineStyle();
|
||||
|
||||
QMap<quint32, Line> _lines;
|
||||
QMap<quint32, Polygon> _polygons;
|
||||
QMap<quint16, Point> _points;
|
||||
QList<quint32> _drawOrder;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const Style::Polygon &polygon);
|
||||
QDebug operator<<(QDebug dbg, const Style::Line &line);
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
#endif // STYLE_H
|
61
src/map/IMG/subdiv.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef SUBDIV_H
|
||||
#define SUBDIV_H
|
||||
|
||||
#include <QtGlobal>
|
||||
#include "common/coordinates.h"
|
||||
#include "units.h"
|
||||
|
||||
class SubDiv {
|
||||
public:
|
||||
SubDiv(quint32 offset, qint32 lon, qint32 lat, int bits, quint8 objects)
|
||||
: _offset(offset), _end(0), _lon(lon), _lat(lat), _bits(bits),
|
||||
_objects(objects), _polygonsOffset(0), _polygonsEnd(0), _linesOffset(0),
|
||||
_linesEnd(0), _pointsOffset(0), _pointsEnd(0) {}
|
||||
void setEnd(quint32 end) {_end = end;}
|
||||
|
||||
quint32 offset() const {return _offset;}
|
||||
quint32 end() const {return _end;}
|
||||
qint32 lon() const {return _lon;}
|
||||
qint32 lat() const {return _lat;}
|
||||
quint8 bits() const {return _bits;}
|
||||
quint8 objects() const {return _objects;}
|
||||
|
||||
// Extended types objects (TRE7)
|
||||
void setExtOffsets(quint32 polygon, quint32 line, quint32 point)
|
||||
{_polygonsOffset = polygon; _linesOffset = line; _pointsOffset = point;}
|
||||
void setExtEnds(quint32 polygon, quint32 line, quint32 point)
|
||||
{_polygonsEnd = polygon; _linesEnd = line; _pointsEnd = point;}
|
||||
|
||||
quint32 polygonsOffset() const {return _polygonsOffset;}
|
||||
quint32 polygonsEnd() const {return _polygonsEnd;}
|
||||
quint32 linesOffset() const {return _linesOffset;}
|
||||
quint32 linesEnd() const {return _linesEnd;}
|
||||
quint32 pointsOffset() const {return _pointsOffset;}
|
||||
quint32 pointsEnd() const {return _pointsEnd;}
|
||||
|
||||
private:
|
||||
quint32 _offset;
|
||||
quint32 _end;
|
||||
qint32 _lon, _lat;
|
||||
quint8 _bits;
|
||||
quint8 _objects;
|
||||
|
||||
quint32 _polygonsOffset;
|
||||
quint32 _polygonsEnd;
|
||||
quint32 _linesOffset;
|
||||
quint32 _linesEnd;
|
||||
quint32 _pointsOffset;
|
||||
quint32 _pointsEnd;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
inline QDebug operator<<(QDebug dbg, const SubDiv &subdiv)
|
||||
{
|
||||
Coordinates c(toWGS84(subdiv.lon()), toWGS84(subdiv.lat()));
|
||||
dbg.nospace() << "SubDiv(" << c << ", " << subdiv.offset()
|
||||
<< ", " << subdiv.end() << ", " << subdiv.objects() << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
#endif // SUBDIV_H
|
75
src/map/IMG/subfile.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
#include "img.h"
|
||||
#include "subfile.h"
|
||||
|
||||
SubFile::Type SubFile::type(const char str[3])
|
||||
{
|
||||
if (!memcmp(str, "TRE", 3))
|
||||
return TRE;
|
||||
else if (!memcmp(str, "RGN", 3))
|
||||
return RGN;
|
||||
else if (!memcmp(str, "LBL", 3))
|
||||
return LBL;
|
||||
else if (!memcmp(str, "TYP", 3))
|
||||
return TYP;
|
||||
else if (!memcmp(str, "GMP", 3))
|
||||
return GMP;
|
||||
else if (!memcmp(str, "NET", 3))
|
||||
return NET;
|
||||
else
|
||||
return Unknown;
|
||||
}
|
||||
|
||||
bool SubFile::isValid() const
|
||||
{
|
||||
return ((quint32)_img->blockSize() * (quint32)_blocks.size() - _size
|
||||
< (quint32)_img->blockSize());
|
||||
}
|
||||
|
||||
bool SubFile::seek(Handle &handle, quint32 pos) const
|
||||
{
|
||||
quint32 blockSize = _img->blockSize();
|
||||
int blockNum = pos / blockSize;
|
||||
|
||||
if (handle.blockNum != blockNum) {
|
||||
if (blockNum >= _blocks.size())
|
||||
return false;
|
||||
if (!_img->readBlock(_blocks.at(blockNum), handle.data))
|
||||
return false;
|
||||
handle.blockNum = blockNum;
|
||||
}
|
||||
|
||||
handle.blockPos = pos % blockSize;
|
||||
handle.pos = pos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SubFile::readByte(Handle &handle, quint8 &val) const
|
||||
{
|
||||
val = handle.data.at(handle.blockPos++);
|
||||
handle.pos++;
|
||||
return (handle.blockPos >= _img->blockSize())
|
||||
? seek(handle, handle.pos) : true;
|
||||
}
|
||||
|
||||
const QString &SubFile::imgName() const
|
||||
{
|
||||
return _img->name();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const SubFile &file)
|
||||
{
|
||||
bool continuous = true;
|
||||
for (int i = 1; i < file._blocks.size(); i++) {
|
||||
if (file._blocks.at(i) != file._blocks.at(i-1) + 1) {
|
||||
continuous = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dbg.nospace() << "SubFile(" << file._size << ", " << file._blocks.size()
|
||||
<< ", " << continuous << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
98
src/map/IMG/subfile.h
Normal file
@ -0,0 +1,98 @@
|
||||
#ifndef SUBFILE_H
|
||||
#define SUBFILE_H
|
||||
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
|
||||
class IMG;
|
||||
|
||||
class SubFile
|
||||
{
|
||||
public:
|
||||
enum Type {Unknown, TRE, RGN, LBL, NET, TYP, GMP};
|
||||
|
||||
struct Handle
|
||||
{
|
||||
Handle() : blockNum(-1), blockPos(-1), pos(-1) {}
|
||||
|
||||
QByteArray data;
|
||||
int blockNum;
|
||||
int blockPos;
|
||||
int pos;
|
||||
};
|
||||
|
||||
SubFile(IMG *img, quint32 size) : _img(img), _size(size) {}
|
||||
|
||||
void addBlock(quint16 block) {_blocks.append(block);}
|
||||
bool isValid() const;
|
||||
|
||||
quint32 size() const {return _size;}
|
||||
bool seek(Handle &handle, quint32 pos) const;
|
||||
bool readByte(Handle &handle, quint8 &val) const;
|
||||
|
||||
bool readUInt16(Handle &handle, quint16 &val) const
|
||||
{
|
||||
quint8 b0, b1;
|
||||
if (!(readByte(handle, b0) && readByte(handle, b1)))
|
||||
return false;
|
||||
val = b0 | ((quint16)b1) << 8;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readInt16(Handle &handle, qint16 &val) const
|
||||
{
|
||||
if (!readUInt16(handle, (quint16&)val))
|
||||
return false;
|
||||
if((quint16)val > 0x7FFF)
|
||||
val = (val & 0x7FFF) - 0x8000;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readUInt24(Handle &handle, quint32 &val) const
|
||||
{
|
||||
quint8 b0, b1, b2;
|
||||
if (!(readByte(handle, b0) && readByte(handle, b1)
|
||||
&& readByte(handle, b2)))
|
||||
return false;
|
||||
val = b0 | ((quint32)b1) << 8 | ((quint32)b2) << 16;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readInt24(Handle &handle, qint32 &val) const
|
||||
{
|
||||
if (!readUInt24(handle, (quint32&)val))
|
||||
return false;
|
||||
if (val > 0x7FFFFF)
|
||||
val = (val & 0x7FFFFF) - 0x800000;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readUInt32(Handle &handle, quint32 &val) const
|
||||
{
|
||||
quint8 b0, b1, b2, b3;
|
||||
if (!(readByte(handle, b0) && readByte(handle, b1)
|
||||
&& readByte(handle, b2) && readByte(handle, b3)))
|
||||
return false;
|
||||
val = b0 | ((quint32)b1) << 8 | ((quint32)b2) << 16
|
||||
| ((quint32)b3) << 24;
|
||||
return true;
|
||||
}
|
||||
|
||||
quint16 offset() const {return _blocks.first();}
|
||||
const QString &imgName() const;
|
||||
|
||||
static Type type(const char str[3]);
|
||||
|
||||
friend QDebug operator<<(QDebug dbg, const SubFile &file);
|
||||
|
||||
private:
|
||||
IMG *_img;
|
||||
quint32 _size;
|
||||
QVector<quint16> _blocks;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const SubFile &file);
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
#endif // SUBFILE_H
|
224
src/map/IMG/textpathitem.cpp
Normal file
@ -0,0 +1,224 @@
|
||||
#include <QFont>
|
||||
#include <QPainter>
|
||||
#include "textpathitem.h"
|
||||
|
||||
|
||||
#define MAX_TEXT_ANGLE 30
|
||||
|
||||
static bool intersection(const QLineF &line, const QRectF &rect,
|
||||
QPointF *p)
|
||||
{
|
||||
if (line.intersect(QLineF(rect.topLeft(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.intersect(QLineF(rect.topLeft(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.intersect(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
if (line.intersect(QLineF(rect.bottomRight(), rect.topRight()), p)
|
||||
== QLineF::BoundedIntersection)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static QPainterPath subpath(const QList<QLineF> &lines, int start, int end,
|
||||
qreal cut)
|
||||
{
|
||||
qreal ss = 0, es = 0;
|
||||
int si = start, ei = end;
|
||||
|
||||
for (int i = start; i <= end; i++) {
|
||||
qreal len = lines.at(i).length();
|
||||
if (ss + len < cut / 2) {
|
||||
ss += len;
|
||||
si++;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
for (int i = end; i >= start; i--) {
|
||||
qreal len = lines.at(i).length();
|
||||
if (es + len < cut / 2) {
|
||||
es += len;
|
||||
ei--;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
|
||||
QLineF sl(lines.at(si).p2(), lines.at(si).p1());
|
||||
sl.setLength(sl.length() - (cut / 2 - ss));
|
||||
QLineF el(lines.at(ei));
|
||||
el.setLength(el.length() - (cut / 2 - es));
|
||||
|
||||
QPainterPath p(sl.p2());
|
||||
for (int i = si; i <= ei; i++)
|
||||
p.lineTo(lines.at(i).p2());
|
||||
p.setElementPositionAt(p.elementCount() - 1, el.p2().x(), el.p2().y());
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static QList<QLineF> lineString(const QPolygonF &path,
|
||||
const QRectF &boundingRect)
|
||||
{
|
||||
QList<QLineF> lines;
|
||||
int start = 0, end = path.count() - 1;
|
||||
QPointF p;
|
||||
|
||||
for (int i = 0; i < path.count(); i++) {
|
||||
if (boundingRect.contains(path.at(i))) {
|
||||
start = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = path.count() - 1; i >= 0; i--) {
|
||||
if (boundingRect.contains(path.at(i))) {
|
||||
end = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (start > 0) {
|
||||
QLineF l(path.at(start-1), path.at(start));
|
||||
if (intersection(l, boundingRect, &p))
|
||||
lines.append(QLineF(p, path.at(start)));
|
||||
}
|
||||
for (int i = start + 1; i <= end; i++)
|
||||
lines.append(QLineF(path.at(i-1), path.at(i)));
|
||||
if (end < path.count() - 1) {
|
||||
QLineF l(path.at(end), path.at(end+1));
|
||||
if (intersection(l, boundingRect, &p))
|
||||
lines.append(QLineF(path.at(end), p));
|
||||
}
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
static QPainterPath textPath(const QPolygonF &path, qreal textWidth,
|
||||
qreal charWidth, const QRectF &tileRect)
|
||||
{
|
||||
QList<QLineF> lines(lineString(path, tileRect));
|
||||
qreal length = 0;
|
||||
qreal angle = lines.first().angle();
|
||||
int last = 0;
|
||||
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
qreal sl = lines.at(i).length();
|
||||
qreal a = lines.at(i).angle();
|
||||
|
||||
if (!tileRect.contains(lines.at(i).p2()) || sl < charWidth
|
||||
|| qAbs(angle - a) > MAX_TEXT_ANGLE) {
|
||||
if (length > textWidth)
|
||||
return subpath(lines, last, i - 1, length - textWidth);
|
||||
last = i;
|
||||
length = 0;
|
||||
} else
|
||||
length += sl;
|
||||
|
||||
angle = a;
|
||||
}
|
||||
|
||||
return (length > textWidth)
|
||||
? subpath(lines, last, lines.size() - 1, length - textWidth)
|
||||
: QPainterPath();
|
||||
}
|
||||
|
||||
static bool reverse(const QPainterPath &path)
|
||||
{
|
||||
QLineF l(path.elementAt(0), path.elementAt(1));
|
||||
qreal angle = l.angle();
|
||||
return (angle > 90 && angle < 270) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
TextPathItem::TextPathItem(const QPolygonF &line, const QString *label,
|
||||
const QRect &tileRect, const QFont *font, const QColor *color)
|
||||
: _text(label), _font(font), _color(color)
|
||||
{
|
||||
qreal cw = font->pixelSize() * 0.7;
|
||||
qreal textWidth = _text->size() * cw;
|
||||
qreal mw = font->pixelSize() / 2;
|
||||
_path = textPath(line, textWidth, cw, tileRect.adjusted(mw, mw, -mw, -mw));
|
||||
if (_path.isEmpty())
|
||||
return;
|
||||
|
||||
if (reverse(_path))
|
||||
_path = _path.toReversed();
|
||||
|
||||
QPainterPathStroker s;
|
||||
s.setWidth(font->pixelSize());
|
||||
s.setCapStyle(Qt::FlatCap);
|
||||
_shape = s.createStroke(_path).simplified();
|
||||
_rect = _shape.boundingRect();
|
||||
}
|
||||
|
||||
bool TextPathItem::collides(const QVector<TextPathItem> &list) const
|
||||
{
|
||||
if (_rect.isEmpty())
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
const TextPathItem &other = list.at(i);
|
||||
if (other._rect.isEmpty() || !_rect.intersects(other._rect))
|
||||
continue;
|
||||
|
||||
if (other._shape.intersects(_shape))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void TextPathItem::paint(QPainter *painter) const
|
||||
{
|
||||
QFontMetrics fm(*_font);
|
||||
int textWidth = fm.width(*_text);
|
||||
|
||||
qreal factor = (textWidth) / qMax(_path.length(), (qreal)textWidth);
|
||||
qreal percent = (1.0 - factor) / 2.0;
|
||||
|
||||
QTransform t = painter->transform();
|
||||
|
||||
painter->setFont(*_font);
|
||||
painter->setPen(Qt::white);
|
||||
|
||||
for (int i = 0; i < _text->size(); i++) {
|
||||
QPointF point = _path.pointAtPercent(percent);
|
||||
qreal angle = _path.angleAtPercent(percent);
|
||||
|
||||
painter->translate(point);
|
||||
painter->rotate(-angle);
|
||||
painter->drawText(QPoint(-1, fm.descent() - 1), _text->at(i));
|
||||
painter->drawText(QPoint(1, fm.descent() + 1), _text->at(i));
|
||||
painter->drawText(QPoint(-1, fm.descent() + 1), _text->at(i));
|
||||
painter->drawText(QPoint(1, fm.descent() -1), _text->at(i));
|
||||
painter->drawText(QPoint(0, fm.descent() - 1), _text->at(i));
|
||||
painter->drawText(QPoint(0, fm.descent() + 1), _text->at(i));
|
||||
painter->drawText(QPoint(-1, fm.descent()), _text->at(i));
|
||||
painter->drawText(QPoint(1, fm.descent()), _text->at(i));
|
||||
painter->setTransform(t);
|
||||
|
||||
int width = fm.charWidth(*_text, i);
|
||||
percent += ((qreal)width / (qreal)textWidth) * factor;
|
||||
}
|
||||
percent = (1.0 - factor) / 2.0;
|
||||
|
||||
painter->setPen(_color ? *_color : Qt::black);
|
||||
for (int i = 0; i < _text->size(); i++) {
|
||||
QPointF point = _path.pointAtPercent(percent);
|
||||
qreal angle = _path.angleAtPercent(percent);
|
||||
|
||||
painter->translate(point);
|
||||
painter->rotate(-angle);
|
||||
painter->drawText(QPoint(0, fm.descent()), _text->at(i));
|
||||
painter->setTransform(t);
|
||||
|
||||
int width = fm.charWidth(*_text, i);
|
||||
percent += ((qreal)width / (qreal)textWidth) * factor;
|
||||
}
|
||||
|
||||
//painter->setPen(Qt::red);
|
||||
//painter->drawPath(_shape);
|
||||
}
|
28
src/map/IMG/textpathitem.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef TEXTPATHITEM_H
|
||||
#define TEXTPATHITEM_H
|
||||
|
||||
#include <QVector>
|
||||
#include <QPainterPath>
|
||||
#include "img.h"
|
||||
|
||||
class TextPathItem
|
||||
{
|
||||
public:
|
||||
TextPathItem() : _text(0), _font(0), _color(0) {}
|
||||
TextPathItem(const QPolygonF &line, const QString *label,
|
||||
const QRect &tileRect, const QFont *font, const QColor *color);
|
||||
|
||||
bool isValid() const {return !_path.isEmpty();}
|
||||
bool collides(const QVector<TextPathItem> &list) const;
|
||||
void paint(QPainter *painter) const;
|
||||
|
||||
private:
|
||||
const QString *_text;
|
||||
const QFont *_font;
|
||||
const QColor *_color;
|
||||
QPainterPath _path;
|
||||
QRectF _rect;
|
||||
QPainterPath _shape;
|
||||
};
|
||||
|
||||
#endif // TEXTPATHITEM_H
|
76
src/map/IMG/textpointitem.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include "textpointitem.h"
|
||||
|
||||
|
||||
#define FLAGS (Qt::AlignCenter | Qt::TextWordWrap | Qt::TextDontClip)
|
||||
#define MAX_TEXT_WIDTH 8
|
||||
|
||||
TextPointItem::TextPointItem(const QPoint &point, const QString *text,
|
||||
const QFont *font, const QImage *img, const QColor *color)
|
||||
: _text(text), _font(font), _img(img), _color(color)
|
||||
{
|
||||
QRect iconRect;
|
||||
|
||||
if (text) {
|
||||
QFontMetrics fm(*font);
|
||||
int limit = font->pixelSize() * MAX_TEXT_WIDTH;
|
||||
_textRect = fm.boundingRect(QRect(0, 0, limit, 0), FLAGS, *text);
|
||||
}
|
||||
if (img) {
|
||||
iconRect = QRect(QPoint(point.x() - img->width()/2, point.y()
|
||||
- img->height()/2), img->size());
|
||||
_textRect.moveTopLeft(QPoint(point.x() + img->width(), point.y()
|
||||
- _textRect.height()/2));
|
||||
} else
|
||||
_textRect.moveCenter(point);
|
||||
|
||||
_rect = _textRect | iconRect;
|
||||
}
|
||||
|
||||
bool TextPointItem::collides(const QVector<TextPointItem> &list) const
|
||||
{
|
||||
for (int i = 0; i < list.size(); i++)
|
||||
if (list.at(i)._rect.intersects(_rect))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void TextPointItem::paint(QPainter *painter) const
|
||||
{
|
||||
if (_img)
|
||||
painter->drawImage(QPoint(_rect.left(), _rect.center().y()
|
||||
- _img->height()/2), *_img);
|
||||
|
||||
if (_text) {
|
||||
QImage img(_textRect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
img.fill(Qt::transparent);
|
||||
QPainter ip(&img);
|
||||
ip.setPen(Qt::white);
|
||||
ip.setFont(*_font);
|
||||
ip.drawText(img.rect(), FLAGS, *_text);
|
||||
|
||||
painter->drawImage(_textRect.x() - 1, _textRect.y() - 1, img);
|
||||
painter->drawImage(_textRect.x() + 1, _textRect.y() + 1, img);
|
||||
painter->drawImage(_textRect.x() - 1, _textRect.y() + 1, img);
|
||||
painter->drawImage(_textRect.x(), _textRect.y() - 1, img);
|
||||
painter->drawImage(_textRect.x(), _textRect.y() + 1, img);
|
||||
painter->drawImage(_textRect.x() - 1, _textRect.y(), img);
|
||||
painter->drawImage(_textRect.x() + 1, _textRect.y(), img);
|
||||
|
||||
if (_color) {
|
||||
painter->setFont(*_font);
|
||||
painter->setPen(*_color);
|
||||
painter->drawText(_textRect, FLAGS, *_text);
|
||||
} else {
|
||||
img.invertPixels();
|
||||
painter->drawImage(_textRect, img);
|
||||
}
|
||||
}
|
||||
|
||||
//painter->setPen(Qt::red);
|
||||
//painter->drawRect(_rect);
|
||||
}
|
31
src/map/IMG/textpointitem.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef TEXTPOINTITEM_H
|
||||
#define TEXTPOINTITEM_H
|
||||
|
||||
#include <QRect>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
class QPainter;
|
||||
class QFont;
|
||||
class QImage;
|
||||
class QColor;
|
||||
|
||||
class TextPointItem
|
||||
{
|
||||
public:
|
||||
TextPointItem() : _text(0), _font(0), _img(0) {}
|
||||
TextPointItem(const QPoint &point, const QString *text, const QFont *font,
|
||||
const QImage *img, const QColor *color);
|
||||
|
||||
bool collides(const QVector<TextPointItem> &list) const;
|
||||
void paint(QPainter *painter) const;
|
||||
|
||||
private:
|
||||
const QString *_text;
|
||||
const QFont *_font;
|
||||
const QImage *_img;
|
||||
const QColor *_color;
|
||||
QRect _rect, _textRect;
|
||||
};
|
||||
|
||||
#endif // TEXTPOINTITEM_H
|
225
src/map/IMG/trefile.cpp
Normal file
@ -0,0 +1,225 @@
|
||||
#include "subdiv.h"
|
||||
#include "units.h"
|
||||
#include "trefile.h"
|
||||
|
||||
|
||||
struct MapLevel {
|
||||
quint8 level;
|
||||
quint8 bits;
|
||||
quint16 subdivs;
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
static QDebug operator<<(QDebug dbg, const MapLevel &ml)
|
||||
{
|
||||
bool inherited = ml.level & 0x80 ? true : false;
|
||||
dbg.nospace() << "MapLevel(" << (ml.level & 0x7F) << ", " << inherited
|
||||
<< ", " << ml.bits << ", " << ml.subdivs << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
static void unlock(quint8 *dst, const quint8 *src, quint32 size, quint32 key)
|
||||
{
|
||||
static const unsigned char shuf[] = {
|
||||
0xb, 0xc, 0xa, 0x0,
|
||||
0x8, 0xf, 0x2, 0x1,
|
||||
0x6, 0x4, 0x9, 0x3,
|
||||
0xd, 0x5, 0x7, 0xe
|
||||
};
|
||||
|
||||
int sum = shuf[((key >> 24) + (key >> 16) + (key >> 8) + key) & 0xf];
|
||||
|
||||
for (quint32 i = 0, ringctr = 16; i < size; i++) {
|
||||
quint32 upper = src[i] >> 4;
|
||||
quint32 lower = src[i];
|
||||
|
||||
upper -= sum;
|
||||
upper -= key >> ringctr;
|
||||
upper -= shuf[(key >> ringctr) & 0xf];
|
||||
ringctr = ringctr ? ringctr - 4 : 16;
|
||||
|
||||
lower -= sum;
|
||||
lower -= key >> ringctr;
|
||||
lower -= shuf[(key >> ringctr) & 0xf];
|
||||
ringctr = ringctr ? ringctr - 4 : 16;
|
||||
|
||||
dst[i] = ((upper << 4) & 0xf0) | (lower & 0xf);
|
||||
}
|
||||
}
|
||||
|
||||
TREFile::~TREFile()
|
||||
{
|
||||
SubDivTree::Iterator jt;
|
||||
|
||||
for (QMap<int, SubDivTree*>::iterator it = _subdivs.begin();
|
||||
it != _subdivs.end(); ++it) {
|
||||
SubDivTree *tree = *it;
|
||||
for (tree->GetFirst(jt); !tree->IsNull(jt); tree->GetNext(jt))
|
||||
delete tree->GetAt(jt);
|
||||
}
|
||||
|
||||
for (QMap<int, SubDivTree*>::iterator it = _subdivs.begin();
|
||||
it != _subdivs.end(); ++it)
|
||||
delete *it;
|
||||
}
|
||||
|
||||
bool TREFile::init()
|
||||
{
|
||||
Handle hdl;
|
||||
quint8 locked;
|
||||
quint16 hdrLen;
|
||||
|
||||
if (!(isValid() && seek(hdl, 0) && readUInt16(hdl, hdrLen)
|
||||
&& seek(hdl, 0x0D) && readByte(hdl, locked)))
|
||||
return false;
|
||||
|
||||
// Tile bounds
|
||||
qint32 north, east, south, west;
|
||||
if (!(seek(hdl, 0x15) && readInt24(hdl, north) && readInt24(hdl, east)
|
||||
&& readInt24(hdl, south) && readInt24(hdl, west)))
|
||||
return false;
|
||||
_bounds = RectC(Coordinates(toWGS84(west), toWGS84(north)),
|
||||
Coordinates(toWGS84(east), toWGS84(south)));
|
||||
|
||||
quint32 levelsOffset, levelsSize, subdivOffset, subdivSize;
|
||||
if (!(readUInt32(hdl, levelsOffset) && readUInt32(hdl, levelsSize)
|
||||
&& readUInt32(hdl, subdivOffset) && readUInt32(hdl, subdivSize)))
|
||||
return false;
|
||||
|
||||
quint32 extOffset, extSize = 0;
|
||||
quint16 extItemSize = 0;
|
||||
if (hdrLen > 0x9A) {
|
||||
if (!(seek(hdl, 0x7C) && readUInt32(hdl, extOffset)
|
||||
&& readUInt32(hdl, extSize) && readUInt16(hdl, extItemSize)))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Tile levels
|
||||
if (levelsSize > 64 || !seek(hdl, levelsOffset))
|
||||
return false;
|
||||
quint8 levels[64];
|
||||
for (quint32 i = 0; i < levelsSize; i++)
|
||||
if (!readByte(hdl, levels[i]))
|
||||
return false;
|
||||
if (locked) {
|
||||
quint32 key;
|
||||
quint8 unlocked[64];
|
||||
if (!seek(hdl, 0xAA) || !readUInt32(hdl, key))
|
||||
return false;
|
||||
unlock(unlocked, levels, levelsSize, key);
|
||||
memcpy(levels, unlocked, levelsSize);
|
||||
}
|
||||
|
||||
quint32 levelsCount = levelsSize / 4;
|
||||
QVector<MapLevel> ml(levelsCount);
|
||||
QMap<int, int> level2bits;
|
||||
|
||||
for (quint32 i = 0; i < levelsCount; i++) {
|
||||
quint8 *zoom = levels + (i * 4);
|
||||
ml[i].level = *zoom;
|
||||
ml[i].bits = *(zoom + 1);
|
||||
ml[i].subdivs = *(zoom + 2) | (quint16)(*(zoom + 3)) << 8;
|
||||
if ((ml[i].level & 0xF) > 15 || ml[i].bits > 24)
|
||||
return false;
|
||||
|
||||
level2bits.insert(ml[i].level & 0xF, ml[i].bits);
|
||||
}
|
||||
|
||||
// Subdivisions
|
||||
if (!seek(hdl, subdivOffset))
|
||||
return false;
|
||||
SubDiv *s = 0;
|
||||
QList<SubDiv*> sl;
|
||||
|
||||
for (int i = 0; i < ml.size(); i++) {
|
||||
if (!(ml.at(i).level & 0x80))
|
||||
_subdivs.insert(ml.at(i).bits, new SubDivTree());
|
||||
|
||||
for (int j = 0; j < ml.at(i).subdivs; j++) {
|
||||
quint32 offset;
|
||||
qint32 lon, lat;
|
||||
quint8 objects;
|
||||
quint16 width, height, nextLevel;
|
||||
|
||||
if (!(readUInt24(hdl, offset) && readByte(hdl, objects)
|
||||
&& readInt24(hdl, lon) && readInt24(hdl, lat)
|
||||
&& readUInt16(hdl, width) && readUInt16(hdl, height)))
|
||||
return false;
|
||||
if (i != (int)levelsCount - 1)
|
||||
if (!readUInt16(hdl, nextLevel))
|
||||
return false;
|
||||
|
||||
if (s)
|
||||
s->setEnd(offset);
|
||||
|
||||
if (ml.at(i).level & 0x80) {
|
||||
sl.append(0);
|
||||
s = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
width &= 0x7FFF;
|
||||
width <<= (24 - ml.at(i).bits);
|
||||
height <<= (24 - ml.at(i).bits);
|
||||
|
||||
s = new SubDiv(offset, lon, lat, ml.at(i).bits, objects);
|
||||
sl.append(s);
|
||||
|
||||
double min[2], max[2];
|
||||
RectC bounds(Coordinates(toWGS84(lon - width),
|
||||
toWGS84(lat + height + 1)), Coordinates(toWGS84(lon + width + 1),
|
||||
toWGS84(lat - height)));
|
||||
|
||||
min[0] = bounds.left();
|
||||
min[1] = bounds.bottom();
|
||||
max[0] = bounds.right();
|
||||
max[1] = bounds.top();
|
||||
_subdivs[ml.at(i).bits]->Insert(min, max, s);
|
||||
}
|
||||
}
|
||||
|
||||
// objects with extended types (TRE7)
|
||||
if (extSize && extItemSize >= 12
|
||||
&& (sl.size() - (int)(extSize/extItemSize) + 1 >= 0)) {
|
||||
quint32 polygons, lines, points;
|
||||
if (!seek(hdl, extOffset))
|
||||
return false;
|
||||
|
||||
for (int i = sl.size() - (extSize/extItemSize) + 1; i < sl.size(); i++) {
|
||||
if (!(readUInt32(hdl, polygons) && readUInt32(hdl, lines)
|
||||
&& readUInt32(hdl, points)))
|
||||
return false;
|
||||
if (!seek(hdl, hdl.pos + extItemSize - 12))
|
||||
return false;
|
||||
if (i && sl.at(i-1))
|
||||
sl.at(i-1)->setExtEnds(polygons, lines, points);
|
||||
if (sl.at(i))
|
||||
sl.at(i)->setExtOffsets(polygons, lines, points);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool cb(SubDiv *subdiv, void *context)
|
||||
{
|
||||
QList<SubDiv*> *list = (QList<SubDiv*>*)context;
|
||||
list->append(subdiv);
|
||||
return true;
|
||||
}
|
||||
|
||||
QList<SubDiv*> TREFile::subdivs(const RectC &rect, int bits) const
|
||||
{
|
||||
QList<SubDiv*> list;
|
||||
double min[2], max[2];
|
||||
|
||||
min[0] = rect.left();
|
||||
min[1] = rect.bottom();
|
||||
max[0] = rect.right();
|
||||
max[1] = rect.top();
|
||||
|
||||
_subdivs.value(bits)->Search(min, max, cb, &list);
|
||||
|
||||
return list;
|
||||
}
|
37
src/map/IMG/trefile.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef TREFILE_H
|
||||
#define TREFILE_H
|
||||
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include <QRect>
|
||||
#include "common/rectc.h"
|
||||
#include "common/rtree.h"
|
||||
#include "subfile.h"
|
||||
|
||||
class SubDiv;
|
||||
|
||||
class TREFile : public SubFile
|
||||
{
|
||||
public:
|
||||
TREFile(IMG *img, quint32 size) : SubFile(img, size) {}
|
||||
~TREFile();
|
||||
|
||||
bool init();
|
||||
|
||||
const RectC &bounds() const {return _bounds;}
|
||||
const QList<int> bits() const {return _subdivs.keys();}
|
||||
|
||||
QList<SubDiv*> subdivs(const RectC &rect, int bits) const;
|
||||
|
||||
private:
|
||||
typedef RTree<SubDiv*, double, 2> SubDivTree;
|
||||
|
||||
bool parsePoly(Handle hdl, quint32 pos, const QMap<int, int> &level2bits,
|
||||
QMap<quint32, int> &map);
|
||||
bool parsePoints(Handle hdl, quint32 pos, const QMap<int, int> &level2bits);
|
||||
|
||||
RectC _bounds;
|
||||
QMap<int, SubDivTree*> _subdivs;
|
||||
};
|
||||
|
||||
#endif // TREFILE_H
|
11
src/map/IMG/units.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef UNITS_H
|
||||
#define UNITS_H
|
||||
|
||||
inline double toWGS84(qint32 coord)
|
||||
{
|
||||
return (coord < 0x800000)
|
||||
? (double)coord * 360.0 / (double)(1<<24)
|
||||
: (double)(coord - 0x1000000) * 360.0 / (double)(1<<24);
|
||||
}
|
||||
|
||||
#endif // UNITS_H
|
79
src/map/IMG/vectortile.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
#include "vectortile.h"
|
||||
|
||||
SubFile *VectorTile::file(SubFile::Type type)
|
||||
{
|
||||
switch (type) {
|
||||
case SubFile::TRE:
|
||||
return _tre;
|
||||
case SubFile::RGN:
|
||||
return _rgn;
|
||||
case SubFile::LBL:
|
||||
return _lbl;
|
||||
case SubFile::NET:
|
||||
return _net;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
SubFile *VectorTile::addFile(IMG *img, SubFile::Type type, quint32 size)
|
||||
{
|
||||
switch (type) {
|
||||
case SubFile::TRE:
|
||||
_tre = new TREFile(img, size);
|
||||
return _tre;
|
||||
case SubFile::RGN:
|
||||
_rgn = new RGNFile(img, size);
|
||||
return _rgn;
|
||||
case SubFile::LBL:
|
||||
_lbl = new LBLFile(img, size);
|
||||
return _lbl;
|
||||
case SubFile::NET:
|
||||
_net = new NETFile(img, size);
|
||||
return _net;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool VectorTile::init()
|
||||
{
|
||||
if (!(_tre && _tre->init() && _rgn && _rgn->isValid()))
|
||||
return false;
|
||||
if (_lbl && !_lbl->isValid())
|
||||
return false;
|
||||
if (_net && !_net->isValid())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VectorTile::objects(const RectC &rect, int bits,
|
||||
QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||
QList<IMG::Point> *points) const
|
||||
{
|
||||
QList<SubDiv*> subdivs = _tre->subdivs(rect, bits);
|
||||
for (int i = 0; i < subdivs.size(); i++) {
|
||||
_rgn->objects(rect, subdivs.at(i), _lbl, _net, polygons, lines, points);
|
||||
_rgn->extObjects(rect, subdivs.at(i), _lbl, polygons, lines,
|
||||
points);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
QDebug operator<<(QDebug dbg, const VectorTile &tile)
|
||||
{
|
||||
dbg.nospace() << "VectorTile(";
|
||||
if (tile._tre)
|
||||
dbg << "TRE: " << *(tile._tre);
|
||||
if (tile._rgn)
|
||||
dbg << ", RGN: " << *(tile._rgn);
|
||||
if (tile._lbl)
|
||||
dbg << ", LBL: " << *(tile._lbl);
|
||||
if (tile._net)
|
||||
dbg << ", NET: " << *(tile._net);
|
||||
dbg << ")";
|
||||
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|